Reference documentation and code samples for the Compute V1 Client class Instance.
Represents an Instance resource. An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances.
Generated from protobuf message google.cloud.compute.v1.Instance
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ advanced_machine_features |
Google\Cloud\Compute\V1\AdvancedMachineFeatures
Controls for advanced machine-related behavior features. |
↳ can_ip_forward |
bool
Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding . |
↳ confidential_instance_config |
Google\Cloud\Compute\V1\ConfidentialInstanceConfig
|
↳ cpu_platform |
string
[Output Only] The CPU platform used by this instance. |
↳ creation_timestamp |
string
[Output Only] Creation timestamp in RFC3339 text format. |
↳ deletion_protection |
bool
Whether the resource should be protected against deletion. |
↳ description |
string
An optional description of this resource. Provide this property when you create the resource. |
↳ disks |
array<Google\Cloud\Compute\V1\AttachedDisk>
Array of disks associated with this instance. Persistent disks must be created before you can assign them. |
↳ display_device |
Google\Cloud\Compute\V1\DisplayDevice
Enables display device for the instance. |
↳ fingerprint |
string
Specifies a fingerprint for this resource, which is essentially a hash of the instance's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance. To see the latest fingerprint, make get() request to the instance. |
↳ guest_accelerators |
array<Google\Cloud\Compute\V1\AcceleratorConfig>
A list of the type and count of accelerator cards attached to the instance. |
↳ hostname |
string
Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS. |
↳ id |
int|string
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
↳ key_revocation_action_type |
string
KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Check the KeyRevocationActionType enum for the list of possible values. |
↳ kind |
string
[Output Only] Type of the resource. Always compute#instance for instances. |
↳ label_fingerprint |
string
A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the instance. |
↳ labels |
array|Google\Protobuf\Internal\MapField
Labels to apply to this instance. These can be later modified by the setLabels method. |
↳ last_start_timestamp |
string
[Output Only] Last start timestamp in RFC3339 text format. |
↳ last_stop_timestamp |
string
[Output Only] Last stop timestamp in RFC3339 text format. |
↳ last_suspended_timestamp |
string
[Output Only] Last suspended timestamp in RFC3339 text format. |
↳ machine_type |
string
Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type: zones/us-central1-f/machineTypes/n1-standard-1 To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB): zones/zone/machineTypes/custom-CPUS-MEMORY For example: zones/us-central1-f/machineTypes/custom-4-5120 For a full list of restrictions, read the Specifications for custom machine types. |
↳ metadata |
Google\Cloud\Compute\V1\Metadata
The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys. |
↳ min_cpu_platform |
string
Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". |
↳ name |
string
The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression |
↳ network_interfaces |
array<Google\Cloud\Compute\V1\NetworkInterface>
An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance. |
↳ network_performance_config |
Google\Cloud\Compute\V1\NetworkPerformanceConfig
|
↳ params |
Google\Cloud\Compute\V1\InstanceParams
Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. |
↳ private_ipv6_google_access |
string
The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default. Check the PrivateIpv6GoogleAccess enum for the list of possible values. |
↳ reservation_affinity |
Google\Cloud\Compute\V1\ReservationAffinity
Specifies the reservations that this instance can consume from. |
↳ resource_policies |
array
Resource policies applied to this instance. |
↳ resource_status |
Google\Cloud\Compute\V1\ResourceStatus
[Output Only] Specifies values set for instance attributes as compared to the values requested by user in the corresponding input only field. |
↳ satisfies_pzs |
bool
[Output Only] Reserved for future use. |
↳ scheduling |
Google\Cloud\Compute\V1\Scheduling
Sets the scheduling options for this instance. |
↳ self_link |
string
[Output Only] Server-defined URL for this resource. |
↳ service_accounts |
array<Google\Cloud\Compute\V1\ServiceAccount>
A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information. |
↳ shielded_instance_config |
Google\Cloud\Compute\V1\ShieldedInstanceConfig
|
↳ shielded_instance_integrity_policy |
Google\Cloud\Compute\V1\ShieldedInstanceIntegrityPolicy
|
↳ source_machine_image |
string
Source machine image |
↳ source_machine_image_encryption_key |
Google\Cloud\Compute\V1\CustomerEncryptionKey
Source machine image encryption key when creating an instance from a machine image. |
↳ start_restricted |
bool
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity. |
↳ status |
string
[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more information about the status of the instance, see Instance life cycle. Check the Status enum for the list of possible values. |
↳ status_message |
string
[Output Only] An optional, human-readable explanation of the status. |
↳ tags |
Google\Cloud\Compute\V1\Tags
Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the 'tags.items' field. |
↳ zone |
string
[Output Only] URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. |
getAdvancedMachineFeatures
Controls for advanced machine-related behavior features.
Generated from protobuf field optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\AdvancedMachineFeatures|null |
hasAdvancedMachineFeatures
clearAdvancedMachineFeatures
setAdvancedMachineFeatures
Controls for advanced machine-related behavior features.
Generated from protobuf field optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\AdvancedMachineFeatures
|
Returns | |
---|---|
Type | Description |
$this |
getCanIpForward
Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding .
Generated from protobuf field optional bool can_ip_forward = 467731324;
Returns | |
---|---|
Type | Description |
bool |
hasCanIpForward
clearCanIpForward
setCanIpForward
Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding .
Generated from protobuf field optional bool can_ip_forward = 467731324;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getConfidentialInstanceConfig
Generated from protobuf field optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\ConfidentialInstanceConfig|null |
hasConfidentialInstanceConfig
clearConfidentialInstanceConfig
setConfidentialInstanceConfig
Generated from protobuf field optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\ConfidentialInstanceConfig
|
Returns | |
---|---|
Type | Description |
$this |
getCpuPlatform
[Output Only] The CPU platform used by this instance.
Generated from protobuf field optional string cpu_platform = 410285354;
Returns | |
---|---|
Type | Description |
string |
hasCpuPlatform
clearCpuPlatform
setCpuPlatform
[Output Only] The CPU platform used by this instance.
Generated from protobuf field optional string cpu_platform = 410285354;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getCreationTimestamp
[Output Only] Creation timestamp in RFC3339 text format.
Generated from protobuf field optional string creation_timestamp = 30525366;
Returns | |
---|---|
Type | Description |
string |
hasCreationTimestamp
clearCreationTimestamp
setCreationTimestamp
[Output Only] Creation timestamp in RFC3339 text format.
Generated from protobuf field optional string creation_timestamp = 30525366;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDeletionProtection
Whether the resource should be protected against deletion.
Generated from protobuf field optional bool deletion_protection = 458014698;
Returns | |
---|---|
Type | Description |
bool |
hasDeletionProtection
clearDeletionProtection
setDeletionProtection
Whether the resource should be protected against deletion.
Generated from protobuf field optional bool deletion_protection = 458014698;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getDescription
An optional description of this resource. Provide this property when you create the resource.
Generated from protobuf field optional string description = 422937596;
Returns | |
---|---|
Type | Description |
string |
hasDescription
clearDescription
setDescription
An optional description of this resource. Provide this property when you create the resource.
Generated from protobuf field optional string description = 422937596;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDisks
Array of disks associated with this instance. Persistent disks must be created before you can assign them.
Generated from protobuf field repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setDisks
Array of disks associated with this instance. Persistent disks must be created before you can assign them.
Generated from protobuf field repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Compute\V1\AttachedDisk>
|
Returns | |
---|---|
Type | Description |
$this |
getDisplayDevice
Enables display device for the instance.
Generated from protobuf field optional .google.cloud.compute.v1.DisplayDevice display_device = 258933875;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\DisplayDevice|null |
hasDisplayDevice
clearDisplayDevice
setDisplayDevice
Enables display device for the instance.
Generated from protobuf field optional .google.cloud.compute.v1.DisplayDevice display_device = 258933875;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\DisplayDevice
|
Returns | |
---|---|
Type | Description |
$this |
getFingerprint
Specifies a fingerprint for this resource, which is essentially a hash of the instance's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance. To see the latest fingerprint, make get() request to the instance.
Generated from protobuf field optional string fingerprint = 234678500;
Returns | |
---|---|
Type | Description |
string |
hasFingerprint
clearFingerprint
setFingerprint
Specifies a fingerprint for this resource, which is essentially a hash of the instance's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance. To see the latest fingerprint, make get() request to the instance.
Generated from protobuf field optional string fingerprint = 234678500;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getGuestAccelerators
A list of the type and count of accelerator cards attached to the instance.
Generated from protobuf field repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setGuestAccelerators
A list of the type and count of accelerator cards attached to the instance.
Generated from protobuf field repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Compute\V1\AcceleratorConfig>
|
Returns | |
---|---|
Type | Description |
$this |
getHostname
Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
Generated from protobuf field optional string hostname = 237067315;
Returns | |
---|---|
Type | Description |
string |
hasHostname
clearHostname
setHostname
Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
Generated from protobuf field optional string hostname = 237067315;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getId
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
Generated from protobuf field optional uint64 id = 3355;
Returns | |
---|---|
Type | Description |
int|string |
hasId
clearId
setId
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
Generated from protobuf field optional uint64 id = 3355;
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getKeyRevocationActionType
KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
Check the KeyRevocationActionType enum for the list of possible values.
Generated from protobuf field optional string key_revocation_action_type = 235941474;
Returns | |
---|---|
Type | Description |
string |
hasKeyRevocationActionType
clearKeyRevocationActionType
setKeyRevocationActionType
KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
Check the KeyRevocationActionType enum for the list of possible values.
Generated from protobuf field optional string key_revocation_action_type = 235941474;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getKind
[Output Only] Type of the resource. Always compute#instance for instances.
Generated from protobuf field optional string kind = 3292052;
Returns | |
---|---|
Type | Description |
string |
hasKind
clearKind
setKind
[Output Only] Type of the resource. Always compute#instance for instances.
Generated from protobuf field optional string kind = 3292052;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getLabelFingerprint
A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the instance.
Generated from protobuf field optional string label_fingerprint = 178124825;
Returns | |
---|---|
Type | Description |
string |
hasLabelFingerprint
clearLabelFingerprint
setLabelFingerprint
A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the instance.
Generated from protobuf field optional string label_fingerprint = 178124825;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getLabels
Labels to apply to this instance. These can be later modified by the setLabels method.
Generated from protobuf field map<string, string> labels = 500195327;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\MapField |
setLabels
Labels to apply to this instance. These can be later modified by the setLabels method.
Generated from protobuf field map<string, string> labels = 500195327;
Parameter | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$this |
getLastStartTimestamp
[Output Only] Last start timestamp in RFC3339 text format.
Generated from protobuf field optional string last_start_timestamp = 443830736;
Returns | |
---|---|
Type | Description |
string |
hasLastStartTimestamp
clearLastStartTimestamp
setLastStartTimestamp
[Output Only] Last start timestamp in RFC3339 text format.
Generated from protobuf field optional string last_start_timestamp = 443830736;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getLastStopTimestamp
[Output Only] Last stop timestamp in RFC3339 text format.
Generated from protobuf field optional string last_stop_timestamp = 412823010;
Returns | |
---|---|
Type | Description |
string |
hasLastStopTimestamp
clearLastStopTimestamp
setLastStopTimestamp
[Output Only] Last stop timestamp in RFC3339 text format.
Generated from protobuf field optional string last_stop_timestamp = 412823010;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getLastSuspendedTimestamp
[Output Only] Last suspended timestamp in RFC3339 text format.
Generated from protobuf field optional string last_suspended_timestamp = 356275337;
Returns | |
---|---|
Type | Description |
string |
hasLastSuspendedTimestamp
clearLastSuspendedTimestamp
setLastSuspendedTimestamp
[Output Only] Last suspended timestamp in RFC3339 text format.
Generated from protobuf field optional string last_suspended_timestamp = 356275337;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getMachineType
Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type: zones/us-central1-f/machineTypes/n1-standard-1 To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB): zones/zone/machineTypes/custom-CPUS-MEMORY For example: zones/us-central1-f/machineTypes/custom-4-5120 For a full list of restrictions, read the Specifications for custom machine types.
Generated from protobuf field optional string machine_type = 227711026;
Returns | |
---|---|
Type | Description |
string |
hasMachineType
clearMachineType
setMachineType
Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type: zones/us-central1-f/machineTypes/n1-standard-1 To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB): zones/zone/machineTypes/custom-CPUS-MEMORY For example: zones/us-central1-f/machineTypes/custom-4-5120 For a full list of restrictions, read the Specifications for custom machine types.
Generated from protobuf field optional string machine_type = 227711026;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getMetadata
The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
Generated from protobuf field optional .google.cloud.compute.v1.Metadata metadata = 86866735;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\Metadata|null |
hasMetadata
clearMetadata
setMetadata
The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
Generated from protobuf field optional .google.cloud.compute.v1.Metadata metadata = 86866735;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\Metadata
|
Returns | |
---|---|
Type | Description |
$this |
getMinCpuPlatform
Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
Generated from protobuf field optional string min_cpu_platform = 242912759;
Returns | |
---|---|
Type | Description |
string |
hasMinCpuPlatform
clearMinCpuPlatform
setMinCpuPlatform
Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
Generated from protobuf field optional string min_cpu_platform = 242912759;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getName
The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Generated from protobuf field optional string name = 3373707;
Returns | |
---|---|
Type | Description |
string |
hasName
clearName
setName
The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Generated from protobuf field optional string name = 3373707;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getNetworkInterfaces
An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.
Generated from protobuf field repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setNetworkInterfaces
An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.
Generated from protobuf field repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Compute\V1\NetworkInterface>
|
Returns | |
---|---|
Type | Description |
$this |
getNetworkPerformanceConfig
Generated from protobuf field optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\NetworkPerformanceConfig|null |
hasNetworkPerformanceConfig
clearNetworkPerformanceConfig
setNetworkPerformanceConfig
Generated from protobuf field optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\NetworkPerformanceConfig
|
Returns | |
---|---|
Type | Description |
$this |
getParams
Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload.
Generated from protobuf field optional .google.cloud.compute.v1.InstanceParams params = 78313862;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\InstanceParams|null |
hasParams
clearParams
setParams
Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload.
Generated from protobuf field optional .google.cloud.compute.v1.InstanceParams params = 78313862;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\InstanceParams
|
Returns | |
---|---|
Type | Description |
$this |
getPrivateIpv6GoogleAccess
The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
Check the PrivateIpv6GoogleAccess enum for the list of possible values.
Generated from protobuf field optional string private_ipv6_google_access = 48277006;
Returns | |
---|---|
Type | Description |
string |
hasPrivateIpv6GoogleAccess
clearPrivateIpv6GoogleAccess
setPrivateIpv6GoogleAccess
The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
Check the PrivateIpv6GoogleAccess enum for the list of possible values.
Generated from protobuf field optional string private_ipv6_google_access = 48277006;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getReservationAffinity
Specifies the reservations that this instance can consume from.
Generated from protobuf field optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\ReservationAffinity|null |
hasReservationAffinity
clearReservationAffinity
setReservationAffinity
Specifies the reservations that this instance can consume from.
Generated from protobuf field optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\ReservationAffinity
|
Returns | |
---|---|
Type | Description |
$this |
getResourcePolicies
Resource policies applied to this instance.
Generated from protobuf field repeated string resource_policies = 22220385;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setResourcePolicies
Resource policies applied to this instance.
Generated from protobuf field repeated string resource_policies = 22220385;
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getResourceStatus
[Output Only] Specifies values set for instance attributes as compared to the values requested by user in the corresponding input only field.
Generated from protobuf field optional .google.cloud.compute.v1.ResourceStatus resource_status = 249429315;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\ResourceStatus|null |
hasResourceStatus
clearResourceStatus
setResourceStatus
[Output Only] Specifies values set for instance attributes as compared to the values requested by user in the corresponding input only field.
Generated from protobuf field optional .google.cloud.compute.v1.ResourceStatus resource_status = 249429315;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\ResourceStatus
|
Returns | |
---|---|
Type | Description |
$this |
getSatisfiesPzs
[Output Only] Reserved for future use.
Generated from protobuf field optional bool satisfies_pzs = 480964267;
Returns | |
---|---|
Type | Description |
bool |
hasSatisfiesPzs
clearSatisfiesPzs
setSatisfiesPzs
[Output Only] Reserved for future use.
Generated from protobuf field optional bool satisfies_pzs = 480964267;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getScheduling
Sets the scheduling options for this instance.
Generated from protobuf field optional .google.cloud.compute.v1.Scheduling scheduling = 386688404;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\Scheduling|null |
hasScheduling
clearScheduling
setScheduling
Sets the scheduling options for this instance.
Generated from protobuf field optional .google.cloud.compute.v1.Scheduling scheduling = 386688404;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\Scheduling
|
Returns | |
---|---|
Type | Description |
$this |
getSelfLink
[Output Only] Server-defined URL for this resource.
Generated from protobuf field optional string self_link = 456214797;
Returns | |
---|---|
Type | Description |
string |
hasSelfLink
clearSelfLink
setSelfLink
[Output Only] Server-defined URL for this resource.
Generated from protobuf field optional string self_link = 456214797;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getServiceAccounts
A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
Generated from protobuf field repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setServiceAccounts
A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
Generated from protobuf field repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Compute\V1\ServiceAccount>
|
Returns | |
---|---|
Type | Description |
$this |
getShieldedInstanceConfig
Generated from protobuf field optional .google.cloud.compute.v1.ShieldedInstanceConfig shielded_instance_config = 12862901;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\ShieldedInstanceConfig|null |
hasShieldedInstanceConfig
clearShieldedInstanceConfig
setShieldedInstanceConfig
Generated from protobuf field optional .google.cloud.compute.v1.ShieldedInstanceConfig shielded_instance_config = 12862901;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\ShieldedInstanceConfig
|
Returns | |
---|---|
Type | Description |
$this |
getShieldedInstanceIntegrityPolicy
Generated from protobuf field optional .google.cloud.compute.v1.ShieldedInstanceIntegrityPolicy shielded_instance_integrity_policy = 163696919;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\ShieldedInstanceIntegrityPolicy|null |
hasShieldedInstanceIntegrityPolicy
clearShieldedInstanceIntegrityPolicy
setShieldedInstanceIntegrityPolicy
Generated from protobuf field optional .google.cloud.compute.v1.ShieldedInstanceIntegrityPolicy shielded_instance_integrity_policy = 163696919;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\ShieldedInstanceIntegrityPolicy
|
Returns | |
---|---|
Type | Description |
$this |
getSourceMachineImage
Source machine image
Generated from protobuf field optional string source_machine_image = 21769791;
Returns | |
---|---|
Type | Description |
string |
hasSourceMachineImage
clearSourceMachineImage
setSourceMachineImage
Source machine image
Generated from protobuf field optional string source_machine_image = 21769791;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getSourceMachineImageEncryptionKey
Source machine image encryption key when creating an instance from a machine image.
Generated from protobuf field optional .google.cloud.compute.v1.CustomerEncryptionKey source_machine_image_encryption_key = 192839075;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\CustomerEncryptionKey|null |
hasSourceMachineImageEncryptionKey
clearSourceMachineImageEncryptionKey
setSourceMachineImageEncryptionKey
Source machine image encryption key when creating an instance from a machine image.
Generated from protobuf field optional .google.cloud.compute.v1.CustomerEncryptionKey source_machine_image_encryption_key = 192839075;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\CustomerEncryptionKey
|
Returns | |
---|---|
Type | Description |
$this |
getStartRestricted
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Generated from protobuf field optional bool start_restricted = 123693144;
Returns | |
---|---|
Type | Description |
bool |
hasStartRestricted
clearStartRestricted
setStartRestricted
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Generated from protobuf field optional bool start_restricted = 123693144;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getStatus
[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more information about the status of the instance, see Instance life cycle.
Check the Status enum for the list of possible values.
Generated from protobuf field optional string status = 181260274;
Returns | |
---|---|
Type | Description |
string |
hasStatus
clearStatus
setStatus
[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more information about the status of the instance, see Instance life cycle.
Check the Status enum for the list of possible values.
Generated from protobuf field optional string status = 181260274;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getStatusMessage
[Output Only] An optional, human-readable explanation of the status.
Generated from protobuf field optional string status_message = 297428154;
Returns | |
---|---|
Type | Description |
string |
hasStatusMessage
clearStatusMessage
setStatusMessage
[Output Only] An optional, human-readable explanation of the status.
Generated from protobuf field optional string status_message = 297428154;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getTags
Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the 'tags.items' field.
Generated from protobuf field optional .google.cloud.compute.v1.Tags tags = 3552281;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\Tags|null |
hasTags
clearTags
setTags
Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the 'tags.items' field.
Generated from protobuf field optional .google.cloud.compute.v1.Tags tags = 3552281;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\Tags
|
Returns | |
---|---|
Type | Description |
$this |
getZone
[Output Only] URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
Generated from protobuf field optional string zone = 3744684;
Returns | |
---|---|
Type | Description |
string |
hasZone
clearZone
setZone
[Output Only] URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
Generated from protobuf field optional string zone = 3744684;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |