Reference documentation and code samples for the Google Cloud Notebooks V1 Client class Instance.
The definition of a notebook instance.
Generated from protobuf message google.cloud.notebooks.v1.Instance
Namespace
Google \ Cloud \ Notebooks \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Output only. The name of this notebook instance. Format: projects/{project_id}/locations/{location}/instances/{instance_id}
↳ vm_image
↳ container_image
↳ post_startup_script
string
Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path ( gs://path-to-file/file-name
).
↳ proxy_uri
string
Output only. The proxy endpoint that is used to access the Jupyter notebook.
↳ instance_owners
array
Input only. The owner of this instance after creation. Format: alias@example.com
Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance.
↳ service_account
string
The service account on this instance, giving access to other Google Cloud services. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the Compute Engine default service account is used.
↳ service_account_scopes
array
Optional. The URIs of service account scopes to be included in Compute Engine instances. If not specified, the following scopes are defined: - https://www.googleapis.com/auth/cloud-platform - https://www.googleapis.com/auth/userinfo.email If not using default scopes, you need at least: https://www.googleapis.com/auth/compute
↳ machine_type
↳ accelerator_config
Instance\AcceleratorConfig
The hardware accelerator used on this instance. If you use accelerators, make sure that your configuration has enough vCPUs and memory to support the machine_type
you have selected
.
↳ state
int
Output only. The state of this instance.
↳ install_gpu_driver
bool
Whether the end user authorizes Google Cloud to install GPU driver on this instance. If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs.
↳ custom_gpu_driver_path
string
Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers.
↳ boot_disk_type
int
Input only. The type of the boot disk attached to this instance, defaults to standard persistent disk ( PD_STANDARD
).
↳ boot_disk_size_gb
int|string
Input only. The size of the boot disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not specified, this defaults to 100.
↳ data_disk_type
int
Input only. The type of the data disk attached to this instance, defaults to standard persistent disk ( PD_STANDARD
).
↳ data_disk_size_gb
int|string
Input only. The size of the data disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). You can choose the size of the data disk based on how big your notebooks and data are. If not specified, this defaults to 100.
↳ no_remove_data_disk
bool
Input only. If true, the data disk will not be auto deleted when deleting the instance.
↳ disk_encryption
int
Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
↳ kms_key
string
Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}
Learn more about using your own encryption keys
.
↳ disks
↳ shielded_instance_config
Instance\ShieldedInstanceConfig
Optional. Shielded VM configuration. Images using supported Shielded VM features .
↳ no_public_ip
bool
If true, no public IP will be assigned to this instance.
↳ no_proxy_access
bool
If true, the notebook instance will not register with the proxy.
↳ network
string
The name of the VPC that this instance is in. Format: projects/{project_id}/global/networks/{network_id}
↳ subnet
string
The name of the subnet that this instance is in. Format: projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}
↳ labels
array| Google\Protobuf\Internal\MapField
Labels to apply to this instance. These can be later modified by the setLabels method.
↳ metadata
↳ tags
↳ upgrade_history
↳ nic_type
int
Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
↳ reservation_affinity
ReservationAffinity
Optional. The optional reservation affinity. Setting this field will apply the specified Zonal Compute Reservation to this notebook instance.
↳ creator
string
Output only. Email address of entity that sent original CreateInstance request.
↳ can_ip_forward
bool
Optional. Flag to enable ip forwarding or not, default false/off. https://cloud.google.com/vpc/docs/using-routes#canipforward
↳ create_time
↳ update_time
getName
Output only. The name of this notebook instance. Format: projects/{project_id}/locations/{location}/instances/{instance_id}
string
setName
Output only. The name of this notebook instance. Format: projects/{project_id}/locations/{location}/instances/{instance_id}
var
string
$this
getVmImage
Use a Compute Engine VM image to start the notebook instance.
hasVmImage
setVmImage
Use a Compute Engine VM image to start the notebook instance.
$this
getContainerImage
Use a container image to start the notebook instance.
hasContainerImage
setContainerImage
Use a container image to start the notebook instance.
$this
getPostStartupScript
Path to a Bash script that automatically runs after a notebook instance
fully boots up. The path must be a URL or
Cloud Storage path ( gs://path-to-file/file-name
).
string
setPostStartupScript
Path to a Bash script that automatically runs after a notebook instance
fully boots up. The path must be a URL or
Cloud Storage path ( gs://path-to-file/file-name
).
var
string
$this
getProxyUri
Output only. The proxy endpoint that is used to access the Jupyter notebook.
string
setProxyUri
Output only. The proxy endpoint that is used to access the Jupyter notebook.
var
string
$this
getInstanceOwners
Input only. The owner of this instance after creation. Format: alias@example.com
Currently supports one owner only. If not specified, all of the service
account users of your VM instance's service account can use
the instance.
setInstanceOwners
Input only. The owner of this instance after creation. Format: alias@example.com
Currently supports one owner only. If not specified, all of the service
account users of your VM instance's service account can use
the instance.
var
string[]
$this
getServiceAccount
The service account on this instance, giving access to other Google Cloud services.
You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the Compute Engine default service account is used.
string
setServiceAccount
The service account on this instance, giving access to other Google Cloud services.
You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the Compute Engine default service account is used.
var
string
$this
getServiceAccountScopes
Optional. The URIs of service account scopes to be included in Compute Engine instances.
If not specified, the following scopes are defined:
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/userinfo.email If not using default scopes, you need at least: https://www.googleapis.com/auth/compute
setServiceAccountScopes
Optional. The URIs of service account scopes to be included in Compute Engine instances.
If not specified, the following scopes are defined:
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/userinfo.email If not using default scopes, you need at least: https://www.googleapis.com/auth/compute
var
string[]
$this
getMachineType
Required. The Compute Engine machine type of this instance.
string
setMachineType
Required. The Compute Engine machine type of this instance.
var
string
$this
getAcceleratorConfig
The hardware accelerator used on this instance. If you use
accelerators, make sure that your configuration has enough vCPUs and memory to support the machine_type
you have
selected
.
hasAcceleratorConfig
clearAcceleratorConfig
setAcceleratorConfig
The hardware accelerator used on this instance. If you use
accelerators, make sure that your configuration has enough vCPUs and memory to support the machine_type
you have
selected
.
$this
getState
Output only. The state of this instance.
int
setState
Output only. The state of this instance.
var
int
$this
getInstallGpuDriver
Whether the end user authorizes Google Cloud to install GPU driver on this instance.
If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs.
bool
setInstallGpuDriver
Whether the end user authorizes Google Cloud to install GPU driver on this instance.
If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs.
var
bool
$this
getCustomGpuDriverPath
Specify a custom Cloud Storage path where the GPU driver is stored.
If not specified, we'll automatically choose from official GPU drivers.
string
setCustomGpuDriverPath
Specify a custom Cloud Storage path where the GPU driver is stored.
If not specified, we'll automatically choose from official GPU drivers.
var
string
$this
getBootDiskType
Input only. The type of the boot disk attached to this instance, defaults to
standard persistent disk ( PD_STANDARD
).
int
setBootDiskType
Input only. The type of the boot disk attached to this instance, defaults to
standard persistent disk ( PD_STANDARD
).
var
int
$this
getBootDiskSizeGb
Input only. The size of the boot disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not specified, this defaults to 100.
int|string
setBootDiskSizeGb
Input only. The size of the boot disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not specified, this defaults to 100.
var
int|string
$this
getDataDiskType
Input only. The type of the data disk attached to this instance, defaults to
standard persistent disk ( PD_STANDARD
).
int
setDataDiskType
Input only. The type of the data disk attached to this instance, defaults to
standard persistent disk ( PD_STANDARD
).
var
int
$this
getDataDiskSizeGb
Input only. The size of the data disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). You can choose the size of the data disk based on how big your notebooks and data are. If not specified, this defaults to 100.
int|string
setDataDiskSizeGb
Input only. The size of the data disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). You can choose the size of the data disk based on how big your notebooks and data are. If not specified, this defaults to 100.
var
int|string
$this
getNoRemoveDataDisk
Input only. If true, the data disk will not be auto deleted when deleting the instance.
bool
setNoRemoveDataDisk
Input only. If true, the data disk will not be auto deleted when deleting the instance.
var
bool
$this
getDiskEncryption
Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
int
setDiskEncryption
Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
var
int
$this
getKmsKey
Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK.
Format: projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}
Learn more about using your own encryption keys
.
string
setKmsKey
Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK.
Format: projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}
Learn more about using your own encryption keys
.
var
string
$this
getDisks
Output only. Attached disks to notebook instance.
setDisks
Output only. Attached disks to notebook instance.
$this
getShieldedInstanceConfig
Optional. Shielded VM configuration.
hasShieldedInstanceConfig
clearShieldedInstanceConfig
setShieldedInstanceConfig
Optional. Shielded VM configuration.
$this
getNoPublicIp
If true, no public IP will be assigned to this instance.
bool
setNoPublicIp
If true, no public IP will be assigned to this instance.
var
bool
$this
getNoProxyAccess
If true, the notebook instance will not register with the proxy.
bool
setNoProxyAccess
If true, the notebook instance will not register with the proxy.
var
bool
$this
getNetwork
The name of the VPC that this instance is in.
Format: projects/{project_id}/global/networks/{network_id}
string
setNetwork
The name of the VPC that this instance is in.
Format: projects/{project_id}/global/networks/{network_id}
var
string
$this
getSubnet
The name of the subnet that this instance is in.
Format: projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}
string
setSubnet
The name of the subnet that this instance is in.
Format: projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}
var
string
$this
getLabels
Labels to apply to this instance.
These can be later modified by the setLabels method.
setLabels
Labels to apply to this instance.
These can be later modified by the setLabels method.
$this
getMetadata
Custom metadata to apply to this instance.
setMetadata
Custom metadata to apply to this instance.
$this
getTags
Optional. The Compute Engine tags to add to runtime (see Tagging instances ).
setTags
Optional. The Compute Engine tags to add to runtime (see Tagging instances ).
var
string[]
$this
getUpgradeHistory
The upgrade history of this instance.
setUpgradeHistory
The upgrade history of this instance.
$this
getNicType
Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
int
setNicType
Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
var
int
$this
getReservationAffinity
Optional. The optional reservation affinity. Setting this field will apply the specified Zonal Compute Reservation to this notebook instance.
hasReservationAffinity
clearReservationAffinity
setReservationAffinity
Optional. The optional reservation affinity. Setting this field will apply the specified Zonal Compute Reservation to this notebook instance.
$this
getCreator
Output only. Email address of entity that sent original CreateInstance request.
string
setCreator
Output only. Email address of entity that sent original CreateInstance request.
var
string
$this
getCanIpForward
Optional. Flag to enable ip forwarding or not, default false/off.
bool
setCanIpForward
Optional. Flag to enable ip forwarding or not, default false/off.
var
bool
$this
getCreateTime
Output only. Instance creation time.
hasCreateTime
clearCreateTime
setCreateTime
Output only. Instance creation time.
$this
getUpdateTime
Output only. Instance update time.
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. Instance update time.
$this
getEnvironment
string