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
$client
private
Google_Client
$client
$methods
private
array<string|int, mixed>
$methods
$resourceName
private
string
$resourceName
$rootUrl
private
string
$rootUrl
$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
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
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
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
Return values
Google_Service_Compute_Operation —call()
TODO: This function needs simplifying.
public
call( $name, $arguments[, $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
Tags
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Return values
Google_Service_Compute_Operation —convertToArrayAndStripNulls()
protected
convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
- $o : mixed