Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
Google_Service_Compute_Instances_Resource Class Reference

The "instances" collection of methods. More...

Inheritance diagram for Google_Service_Compute_Instances_Resource:
Google_Service_Resource

Public Member Functions

 addAccessConfig ($project, $zone, $instance, $networkInterface, Google_Service_Compute_AccessConfig $postBody, $optParams=array())
 Adds an access config to an instance's network interface.
 
 aggregatedList ($project, $optParams=array())
 Retrieves aggregated list of instance resources.
 
 attachDisk ($project, $zone, $instance, Google_Service_Compute_AttachedDisk $postBody, $optParams=array())
 Attaches a Disk resource to an instance.
 
 call ($name, $arguments, $expected_class=null)
 TODO: This function needs simplifying.
 
 delete ($project, $zone, $instance, $optParams=array())
 Deletes the specified Instance resource.
 
 deleteAccessConfig ($project, $zone, $instance, $accessConfig, $networkInterface, $optParams=array())
 Deletes an access config from an instance's network interface.
 
 detachDisk ($project, $zone, $instance, $deviceName, $optParams=array())
 Detaches a disk from an instance.
 
 get ($project, $zone, $instance, $optParams=array())
 Returns the specified instance resource.
 
 getSerialPortOutput ($project, $zone, $instance, $optParams=array())
 Returns the specified instance's serial port output.
 
 insert ($project, $zone, Google_Service_Compute_Instance $postBody, $optParams=array())
 Creates an instance resource in the specified project using the data included in the request.
 
 listInstances ($project, $zone, $optParams=array())
 Retrieves the list of instance resources contained within the specified zone.
 
 reset ($project, $zone, $instance, $optParams=array())
 Performs a hard reset on the instance.
 
 setDiskAutoDelete ($project, $zone, $instance, $autoDelete, $deviceName, $optParams=array())
 Sets the auto-delete flag for a disk attached to an instance.
 
 setMetadata ($project, $zone, $instance, Google_Service_Compute_Metadata $postBody, $optParams=array())
 Sets metadata for the specified instance to the data included in the request.
 
 setScheduling ($project, $zone, $instance, Google_Service_Compute_Scheduling $postBody, $optParams=array())
 Sets an instance's scheduling options.
 
 setTags ($project, $zone, $instance, Google_Service_Compute_Tags $postBody, $optParams=array())
 Sets tags for the specified instance to the data included in the request.
 
 start ($project, $zone, $instance, $optParams=array())
 This method starts an instance that was stopped using the using the instances().stop method.
 
 stop ($project, $zone, $instance, $optParams=array())
 This method stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time.
 

Protected Member Functions

 convertToArrayAndStripNulls ($o)
 

Detailed Description

The "instances" collection of methods.

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

Member Function Documentation

◆ addAccessConfig()

Google_Service_Compute_Instances_Resource::addAccessConfig ( $project,
$zone,
$instance,
$networkInterface,
Google_Service_Compute_AccessConfig $postBody,
$optParams = array() )

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

(instances.addAccessConfig)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceThe instance name for this request.
string$networkInterfaceThe name of the network interface to add to this instance.
Google_AccessConfig$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

◆ aggregatedList()

Google_Service_Compute_Instances_Resource::aggregatedList ( $project,
$optParams = array() )

Retrieves aggregated list of instance resources.

(instances.aggregatedList)

Parameters
string$projectProject ID for this request.
array$optParamsOptional parameters.

@opt_param string filter Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING.

The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.

For example, filter=name ne example-instance. @opt_param string pageToken Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request. @opt_param string maxResults Maximum count of results to be returned.

Return values
Google_Service_Compute_InstanceAggregatedList

◆ attachDisk()

Google_Service_Compute_Instances_Resource::attachDisk ( $project,
$zone,
$instance,
Google_Service_Compute_AttachedDisk $postBody,
$optParams = array() )

Attaches a Disk resource to an instance.

(instances.attachDisk)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceInstance name.
Google_AttachedDisk$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

◆ call()

Google_Service_Resource::call ( $name,
$arguments,
$expected_class = null )
inherited

TODO: This function needs simplifying.

Parameters
$name
$arguments
$expected_class- optional, the expected class name
Return values
Google_Http_Request|expected_class
Exceptions
Google_Exception

◆ delete()

Google_Service_Compute_Instances_Resource::delete ( $project,
$zone,
$instance,
$optParams = array() )

Deletes the specified Instance resource.

For more information, see Shutting down an instance. (instances.delete)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceName of the instance resource to delete.
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

◆ deleteAccessConfig()

Google_Service_Compute_Instances_Resource::deleteAccessConfig ( $project,
$zone,
$instance,
$accessConfig,
$networkInterface,
$optParams = array() )

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

(instances.deleteAccessConfig)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceThe instance name for this request.
string$accessConfigThe name of the access config to delete.
string$networkInterfaceThe name of the network interface.
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

◆ detachDisk()

Google_Service_Compute_Instances_Resource::detachDisk ( $project,
$zone,
$instance,
$deviceName,
$optParams = array() )

Detaches a disk from an instance.

(instances.detachDisk)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceInstance name.
string$deviceNameDisk device name to detach.
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

◆ get()

Google_Service_Compute_Instances_Resource::get ( $project,
$zone,
$instance,
$optParams = array() )

Returns the specified instance resource.

(instances.get)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceName of the instance resource to return.
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Instance

◆ getSerialPortOutput()

Google_Service_Compute_Instances_Resource::getSerialPortOutput ( $project,
$zone,
$instance,
$optParams = array() )

Returns the specified instance's serial port output.

(instances.getSerialPortOutput)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceName of the instance scoping this request.
array$optParamsOptional parameters.

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

Return values
Google_Service_Compute_SerialPortOutput

◆ insert()

Google_Service_Compute_Instances_Resource::insert ( $project,
$zone,
Google_Service_Compute_Instance $postBody,
$optParams = array() )

Creates an instance resource in the specified project using the data included in the request.

(instances.insert)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
Google_Instance$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

◆ listInstances()

Google_Service_Compute_Instances_Resource::listInstances ( $project,
$zone,
$optParams = array() )

Retrieves the list of instance resources contained within the specified zone.

(instances.listInstances)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
array$optParamsOptional parameters.

@opt_param string filter Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING.

The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.

For example, filter=name ne example-instance. @opt_param string pageToken Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request. @opt_param string maxResults Maximum count of results to be returned.

Return values
Google_Service_Compute_InstanceList

◆ reset()

Google_Service_Compute_Instances_Resource::reset ( $project,
$zone,
$instance,
$optParams = array() )

Performs a hard reset on the instance.

(instances.reset)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceName of the instance scoping this request.
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

◆ setDiskAutoDelete()

Google_Service_Compute_Instances_Resource::setDiskAutoDelete ( $project,
$zone,
$instance,
$autoDelete,
$deviceName,
$optParams = array() )

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

(instances.setDiskAutoDelete)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceThe instance name.
bool$autoDeleteWhether to auto-delete the disk when the instance is deleted.
string$deviceNameThe device name of the disk to modify.
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

◆ setMetadata()

Google_Service_Compute_Instances_Resource::setMetadata ( $project,
$zone,
$instance,
Google_Service_Compute_Metadata $postBody,
$optParams = array() )

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

(instances.setMetadata)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceName of the instance scoping this request.
Google_Metadata$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

◆ setScheduling()

Google_Service_Compute_Instances_Resource::setScheduling ( $project,
$zone,
$instance,
Google_Service_Compute_Scheduling $postBody,
$optParams = array() )

Sets an instance's scheduling options.

(instances.setScheduling)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceInstance name.
Google_Scheduling$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

◆ setTags()

Google_Service_Compute_Instances_Resource::setTags ( $project,
$zone,
$instance,
Google_Service_Compute_Tags $postBody,
$optParams = array() )

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

(instances.setTags)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceName of the instance scoping this request.
Google_Tags$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

◆ start()

Google_Service_Compute_Instances_Resource::start ( $project,
$zone,
$instance,
$optParams = array() )

This method starts an instance that was stopped using the using the instances().stop method.

For more information, see Restart an instance. (instances.start)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceName of the instance resource to start.
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

◆ stop()

Google_Service_Compute_Instances_Resource::stop ( $project,
$zone,
$instance,
$optParams = array() )

This method stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time.

Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine 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. (instances.stop)

Parameters
string$projectProject ID for this request.
string$zoneThe name of the zone for this request.
string$instanceName of the instance resource to stop.
array$optParamsOptional parameters.
Return values
Google_Service_Compute_Operation

The documentation for this class was generated from the following file: