Documentation

Google_Service_Compute_Resource_Instances extends Google_Service_Resource
in package

The "instances" collection of methods.

Typical usage is: $computeService = new Google_Service_Compute(...); $instances = $computeService->instances;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
addAccessConfig()  : Google_Service_Compute_Operation
Adds an access config to an instance's network interface.
addResourcePolicies()  : Google_Service_Compute_Operation
Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations. (instances.addResourcePolicies)
aggregatedList()  : Google_Service_Compute_InstanceAggregatedList
Retrieves aggregated list of all of the instances in your project across all regions and zones. (instances.aggregatedList)
attachDisk()  : Google_Service_Compute_Operation
Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. (instances.attachDisk)
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
delete()  : Google_Service_Compute_Operation
Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. (instances.delete)
deleteAccessConfig()  : Google_Service_Compute_Operation
Deletes an access config from an instance's network interface.
detachDisk()  : Google_Service_Compute_Operation
Detaches a disk from an instance. (instances.detachDisk)
get()  : Google_Service_Compute_Instance
Returns the specified Instance resource. Gets a list of available instances by making a list() request. (instances.get)
getGuestAttributes()  : Google_Service_Compute_GuestAttributes
Returns the specified guest attributes entry. (instances.getGuestAttributes)
getIamPolicy()  : Google_Service_Compute_Policy
Gets the access control policy for a resource. May be empty if no such policy or resource exists. (instances.getIamPolicy)
getScreenshot()  : Google_Service_Compute_Screenshot
Returns the screenshot from the specified instance. (instances.getScreenshot)
getSerialPortOutput()  : Google_Service_Compute_SerialPortOutput
Returns the last 1 MB of serial port output from the specified instance.
getShieldedInstanceIdentity()  : Google_Service_Compute_ShieldedInstanceIdentity
Returns the Shielded Instance Identity of an instance (instances.getShieldedInstanceIdentity)
insert()  : Google_Service_Compute_Operation
Creates an instance resource in the specified project using the data included in the request. (instances.insert)
listInstances()  : Google_Service_Compute_InstanceList
Retrieves the list of instances contained within the specified zone.
listReferrers()  : Google_Service_Compute_InstanceListReferrers
Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed instance group, the referrers list includes the managed instance group. For more information, read Viewing Referrers to VM Instances. (instances.listReferrers)
removeResourcePolicies()  : Google_Service_Compute_Operation
Removes resource policies from an instance.
reset()  : Google_Service_Compute_Operation
Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.
setDeletionProtection()  : Google_Service_Compute_Operation
Sets deletion protection on the instance. (instances.setDeletionProtection)
setDiskAutoDelete()  : Google_Service_Compute_Operation
Sets the auto-delete flag for a disk attached to an instance.
setIamPolicy()  : Google_Service_Compute_Policy
Sets the access control policy on the specified resource. Replaces any existing policy. (instances.setIamPolicy)
setLabels()  : Google_Service_Compute_Operation
Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation. (instances.setLabels)
setMachineResources()  : Google_Service_Compute_Operation
Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. (instances.setMachineResources)
setMachineType()  : Google_Service_Compute_Operation
Changes the machine type for a stopped instance to the machine type specified in the request. (instances.setMachineType)
setMetadata()  : Google_Service_Compute_Operation
Sets metadata for the specified instance to the data included in the request.
setMinCpuPlatform()  : Google_Service_Compute_Operation
Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform. (instances.setMinCpuPlatform)
setScheduling()  : Google_Service_Compute_Operation
Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
setServiceAccount()  : Google_Service_Compute_Operation
Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
setShieldedInstanceIntegrityPolicy()  : Google_Service_Compute_Operation
Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
setTags()  : Google_Service_Compute_Operation
Sets network tags for the specified instance to the data included in the request. (instances.setTags)
simulateMaintenanceEvent()  : Google_Service_Compute_Operation
Simulates a maintenance event on the instance.
start()  : Google_Service_Compute_Operation
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (instances.start)
startWithEncryptionKey()  : Google_Service_Compute_Operation
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (instances.startWithEncryptionKey)
stop()  : Google_Service_Compute_Operation
Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
testIamPermissions()  : Google_Service_Compute_TestPermissionsResponse
Returns permissions that a caller has on the specified resource.
update()  : Google_Service_Compute_Operation
Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
updateAccessConfig()  : Google_Service_Compute_Operation
Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
updateDisplayDevice()  : Google_Service_Compute_Operation
Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (instances.updateDisplayDevice)
updateNetworkInterface()  : Google_Service_Compute_Operation
Updates an instance's network interface. This method follows PATCH semantics.
updateShieldedInstanceConfig()  : Google_Service_Compute_Operation
Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

addAccessConfig()

Adds an access config to an instance's network interface.

public addAccessConfig(string $project, string $zone, string $instance, string $networkInterface, Google_Service_Compute_AccessConfig $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.addAccessConfig)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

The instance name for this request.

$networkInterface : string

The name of the network interface to add to this instance.

$postBody : Google_Service_Compute_AccessConfig
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

addResourcePolicies()

Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations. (instances.addResourcePolicies)

public addResourcePolicies(string $project, string $zone, string $instance, Google_Service_Compute_InstancesAddResourcePoliciesRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

The instance name for this request.

$postBody : Google_Service_Compute_InstancesAddResourcePoliciesRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

aggregatedList()

Retrieves aggregated list of all of the instances in your project across all regions and zones. (instances.aggregatedList)

public aggregatedList(string $project[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_InstanceAggregatedList
Parameters
$project : string

Project ID for this request.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string filter A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.

For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.

You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.

To filter on multiple expressions, provide each separate expression within parentheses. For example: (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example: (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)

opt_param

bool includeAllScopes Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.

opt_param

string maxResults The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)

opt_param

string orderBy Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.

You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.

Currently, only sorting by name or creationTimestamp desc is supported.

opt_param

string pageToken Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.

opt_param

bool returnPartialSuccess Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.

Return values
Google_Service_Compute_InstanceAggregatedList

attachDisk()

Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. (instances.attachDisk)

public attachDisk(string $project, string $zone, string $instance, Google_Service_Compute_AttachedDisk $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

The instance name for this request.

$postBody : Google_Service_Compute_AttachedDisk
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

bool forceAttach Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.

opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

delete()

Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. (instances.delete)

public delete(string $project, string $zone, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance resource to delete.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

deleteAccessConfig()

Deletes an access config from an instance's network interface.

public deleteAccessConfig(string $project, string $zone, string $instance, string $accessConfig, string $networkInterface[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.deleteAccessConfig)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

The instance name for this request.

$accessConfig : string

The name of the access config to delete.

$networkInterface : string

The name of the network interface.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

detachDisk()

Detaches a disk from an instance. (instances.detachDisk)

public detachDisk(string $project, string $zone, string $instance, string $deviceName[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Instance name for this request.

$deviceName : string

The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

get()

Returns the specified Instance resource. Gets a list of available instances by making a list() request. (instances.get)

public get(string $project, string $zone, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Instance
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance resource to return.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Compute_Instance

getGuestAttributes()

Returns the specified guest attributes entry. (instances.getGuestAttributes)

public getGuestAttributes(string $project, string $zone, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_GuestAttributes
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance scoping this request.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string queryPath Specifies the guest attributes path to be queried.

opt_param

string variableKey Specifies the key for the guest attributes entry.

Return values
Google_Service_Compute_GuestAttributes

getIamPolicy()

Gets the access control policy for a resource. May be empty if no such policy or resource exists. (instances.getIamPolicy)

public getIamPolicy(string $project, string $zone, string $resource[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Policy
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$resource : string

Name or id of the resource for this request.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

int optionsRequestedPolicyVersion Requested IAM Policy version.

Return values
Google_Service_Compute_Policy

getScreenshot()

Returns the screenshot from the specified instance. (instances.getScreenshot)

public getScreenshot(string $project, string $zone, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Screenshot
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance scoping this request.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Compute_Screenshot

getSerialPortOutput()

Returns the last 1 MB of serial port output from the specified instance.

public getSerialPortOutput(string $project, string $zone, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_SerialPortOutput

(instances.getSerialPortOutput)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance for this request.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

int port Specifies which COM or serial port to retrieve data from.

opt_param

string start Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to 0.

If the output for that byte position is available, this field matches the start parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the start property value.

You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console.

Return values
Google_Service_Compute_SerialPortOutput

getShieldedInstanceIdentity()

Returns the Shielded Instance Identity of an instance (instances.getShieldedInstanceIdentity)

public getShieldedInstanceIdentity(string $project, string $zone, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_ShieldedInstanceIdentity
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name or id of the instance scoping this request.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Compute_ShieldedInstanceIdentity

insert()

Creates an instance resource in the specified project using the data included in the request. (instances.insert)

public insert(string $project, string $zone, Google_Service_Compute_Instance $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$postBody : Google_Service_Compute_Instance
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

opt_param

string sourceInstanceTemplate Specifies instance template to create the instance.

This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googlea pis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate

  • projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate
Return values
Google_Service_Compute_Operation

listInstances()

Retrieves the list of instances contained within the specified zone.

public listInstances(string $project, string $zone[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_InstanceList

(instances.listInstances)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string filter A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.

For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.

You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.

To filter on multiple expressions, provide each separate expression within parentheses. For example: (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example: (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)

opt_param

string maxResults The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)

opt_param

string orderBy Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.

You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.

Currently, only sorting by name or creationTimestamp desc is supported.

opt_param

string pageToken Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.

opt_param

bool returnPartialSuccess Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.

Return values
Google_Service_Compute_InstanceList

listReferrers()

Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed instance group, the referrers list includes the managed instance group. For more information, read Viewing Referrers to VM Instances. (instances.listReferrers)

public listReferrers(string $project, string $zone, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_InstanceListReferrers
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string filter A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.

For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.

You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.

To filter on multiple expressions, provide each separate expression within parentheses. For example: (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example: (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)

opt_param

string maxResults The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)

opt_param

string orderBy Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.

You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.

Currently, only sorting by name or creationTimestamp desc is supported.

opt_param

string pageToken Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.

opt_param

bool returnPartialSuccess Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.

Return values
Google_Service_Compute_InstanceListReferrers

removeResourcePolicies()

Removes resource policies from an instance.

public removeResourcePolicies(string $project, string $zone, string $instance, Google_Service_Compute_InstancesRemoveResourcePoliciesRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.removeResourcePolicies)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

The instance name for this request.

$postBody : Google_Service_Compute_InstancesRemoveResourcePoliciesRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

reset()

Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.

public reset(string $project, string $zone, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.reset)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance scoping this request.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

setDeletionProtection()

Sets deletion protection on the instance. (instances.setDeletionProtection)

public setDeletionProtection(string $project, string $zone, string $resource[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$resource : string

Name or id of the resource for this request.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

bool deletionProtection Whether the resource should be protected against deletion.

opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

setDiskAutoDelete()

Sets the auto-delete flag for a disk attached to an instance.

public setDiskAutoDelete(string $project, string $zone, string $instance, bool $autoDelete, string $deviceName[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.setDiskAutoDelete)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

The instance name for this request.

$autoDelete : bool

Whether to auto-delete the disk when the instance is deleted.

$deviceName : string

The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

setIamPolicy()

Sets the access control policy on the specified resource. Replaces any existing policy. (instances.setIamPolicy)

public setIamPolicy(string $project, string $zone, string $resource, Google_Service_Compute_ZoneSetPolicyRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Policy
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$resource : string

Name or id of the resource for this request.

$postBody : Google_Service_Compute_ZoneSetPolicyRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Compute_Policy

setLabels()

Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation. (instances.setLabels)

public setLabels(string $project, string $zone, string $instance, Google_Service_Compute_InstancesSetLabelsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance scoping this request.

$postBody : Google_Service_Compute_InstancesSetLabelsRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

setMachineResources()

Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. (instances.setMachineResources)

public setMachineResources(string $project, string $zone, string $instance, Google_Service_Compute_InstancesSetMachineResourcesRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance scoping this request.

$postBody : Google_Service_Compute_InstancesSetMachineResourcesRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

setMachineType()

Changes the machine type for a stopped instance to the machine type specified in the request. (instances.setMachineType)

public setMachineType(string $project, string $zone, string $instance, Google_Service_Compute_InstancesSetMachineTypeRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance scoping this request.

$postBody : Google_Service_Compute_InstancesSetMachineTypeRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

setMetadata()

Sets metadata for the specified instance to the data included in the request.

public setMetadata(string $project, string $zone, string $instance, Google_Service_Compute_Metadata $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.setMetadata)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance scoping this request.

$postBody : Google_Service_Compute_Metadata
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

setMinCpuPlatform()

Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform. (instances.setMinCpuPlatform)

public setMinCpuPlatform(string $project, string $zone, string $instance, Google_Service_Compute_InstancesSetMinCpuPlatformRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance scoping this request.

$postBody : Google_Service_Compute_InstancesSetMinCpuPlatformRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

setScheduling()

Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.

public setScheduling(string $project, string $zone, string $instance, Google_Service_Compute_Scheduling $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.setScheduling)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Instance name for this request.

$postBody : Google_Service_Compute_Scheduling
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

setServiceAccount()

Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.

public setServiceAccount(string $project, string $zone, string $instance, Google_Service_Compute_InstancesSetServiceAccountRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.setServiceAccount)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance resource to start.

$postBody : Google_Service_Compute_InstancesSetServiceAccountRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

setShieldedInstanceIntegrityPolicy()

Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

public setShieldedInstanceIntegrityPolicy(string $project, string $zone, string $instance, Google_Service_Compute_ShieldedInstanceIntegrityPolicy $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.setShieldedInstanceIntegrityPolicy)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name or id of the instance scoping this request.

$postBody : Google_Service_Compute_ShieldedInstanceIntegrityPolicy
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

setTags()

Sets network tags for the specified instance to the data included in the request. (instances.setTags)

public setTags(string $project, string $zone, string $instance, Google_Service_Compute_Tags $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance scoping this request.

$postBody : Google_Service_Compute_Tags
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

simulateMaintenanceEvent()

Simulates a maintenance event on the instance.

public simulateMaintenanceEvent(string $project, string $zone, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.simulateMaintenanceEvent)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance scoping this request.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Compute_Operation

start()

Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (instances.start)

public start(string $project, string $zone, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance resource to start.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

startWithEncryptionKey()

Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (instances.startWithEncryptionKey)

public startWithEncryptionKey(string $project, string $zone, string $instance, Google_Service_Compute_InstancesStartWithEncryptionKeyRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance resource to start.

$postBody : Google_Service_Compute_InstancesStartWithEncryptionKeyRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

stop()

Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.

public stop(string $project, string $zone, string $instance[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.stop)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance resource to stop.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

testIamPermissions()

Returns permissions that a caller has on the specified resource.

public testIamPermissions(string $project, string $zone, string $resource, Google_Service_Compute_TestPermissionsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_TestPermissionsResponse

(instances.testIamPermissions)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$resource : string

Name or id of the resource for this request.

$postBody : Google_Service_Compute_TestPermissionsRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Compute_TestPermissionsResponse

update()

Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.

public update(string $project, string $zone, string $instance, Google_Service_Compute_Instance $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.update)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance resource to update.

$postBody : Google_Service_Compute_Instance
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string minimalAction Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require.

opt_param

string mostDisruptiveAllowedAction Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART.

opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

updateAccessConfig()

Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

public updateAccessConfig(string $project, string $zone, string $instance, string $networkInterface, Google_Service_Compute_AccessConfig $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.updateAccessConfig)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

The instance name for this request.

$networkInterface : string

The name of the network interface where the access config is attached.

$postBody : Google_Service_Compute_AccessConfig
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

updateDisplayDevice()

Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (instances.updateDisplayDevice)

public updateDisplayDevice(string $project, string $zone, string $instance, Google_Service_Compute_DisplayDevice $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation
Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name of the instance scoping this request.

$postBody : Google_Service_Compute_DisplayDevice
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

updateNetworkInterface()

Updates an instance's network interface. This method follows PATCH semantics.

public updateNetworkInterface(string $project, string $zone, string $instance, string $networkInterface, Google_Service_Compute_NetworkInterface $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.updateNetworkInterface)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

The instance name for this request.

$networkInterface : string

The name of the network interface to update.

$postBody : Google_Service_Compute_NetworkInterface
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

updateShieldedInstanceConfig()

Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

public updateShieldedInstanceConfig(string $project, string $zone, string $instance, Google_Service_Compute_ShieldedInstanceConfig $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Compute_Operation

(instances.updateShieldedInstanceConfig)

Parameters
$project : string

Project ID for this request.

$zone : string

The name of the zone for this request.

$instance : string

Name or id of the instance scoping this request.

$postBody : Google_Service_Compute_ShieldedInstanceConfig
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Return values
Google_Service_Compute_Operation

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results