Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
|
The "instances" collection of methods. More...
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) | |
The "instances" collection of methods.
Typical usage is: $computeService = new Google_Service_Compute(...); $instances = $computeService->instances;
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)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | The instance name for this request. |
string | $networkInterface | The name of the network interface to add to this instance. |
Google_AccessConfig | $postBody | |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |
Google_Service_Compute_Instances_Resource::aggregatedList | ( | $project, | |
$optParams = array() ) |
Retrieves aggregated list of instance resources.
(instances.aggregatedList)
string | $project | Project ID for this request. |
array | $optParams | Optional 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.
Google_Service_Compute_InstanceAggregatedList |
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)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | Instance name. |
Google_AttachedDisk | $postBody | |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |
|
inherited |
TODO: This function needs simplifying.
$name | |
$arguments | |
$expected_class | - optional, the expected class name |
Google_Http_Request|expected_class |
Google_Exception |
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)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | Name of the instance resource to delete. |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |
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)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | The instance name for this request. |
string | $accessConfig | The name of the access config to delete. |
string | $networkInterface | The name of the network interface. |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |
Google_Service_Compute_Instances_Resource::detachDisk | ( | $project, | |
$zone, | |||
$instance, | |||
$deviceName, | |||
$optParams = array() ) |
Detaches a disk from an instance.
(instances.detachDisk)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | Instance name. |
string | $deviceName | Disk device name to detach. |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |
Google_Service_Compute_Instances_Resource::get | ( | $project, | |
$zone, | |||
$instance, | |||
$optParams = array() ) |
Returns the specified instance resource.
(instances.get)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | Name of the instance resource to return. |
array | $optParams | Optional parameters. |
Google_Service_Compute_Instance |
Google_Service_Compute_Instances_Resource::getSerialPortOutput | ( | $project, | |
$zone, | |||
$instance, | |||
$optParams = array() ) |
Returns the specified instance's serial port output.
(instances.getSerialPortOutput)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | Name of the instance scoping this request. |
array | $optParams | Optional parameters. |
@opt_param int port Specifies which COM or serial port to retrieve data from.
Google_Service_Compute_SerialPortOutput |
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)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
Google_Instance | $postBody | |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |
Google_Service_Compute_Instances_Resource::listInstances | ( | $project, | |
$zone, | |||
$optParams = array() ) |
Retrieves the list of instance resources contained within the specified zone.
(instances.listInstances)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
array | $optParams | Optional 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.
Google_Service_Compute_InstanceList |
Google_Service_Compute_Instances_Resource::reset | ( | $project, | |
$zone, | |||
$instance, | |||
$optParams = array() ) |
Performs a hard reset on the instance.
(instances.reset)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | Name of the instance scoping this request. |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |
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)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | The instance name. |
bool | $autoDelete | Whether to auto-delete the disk when the instance is deleted. |
string | $deviceName | The device name of the disk to modify. |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |
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)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | Name of the instance scoping this request. |
Google_Metadata | $postBody | |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |
Google_Service_Compute_Instances_Resource::setScheduling | ( | $project, | |
$zone, | |||
$instance, | |||
Google_Service_Compute_Scheduling | $postBody, | ||
$optParams = array() ) |
Sets an instance's scheduling options.
(instances.setScheduling)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | Instance name. |
Google_Scheduling | $postBody | |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |
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)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | Name of the instance scoping this request. |
Google_Tags | $postBody | |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |
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)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | Name of the instance resource to start. |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |
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)
string | $project | Project ID for this request. |
string | $zone | The name of the zone for this request. |
string | $instance | Name of the instance resource to stop. |
array | $optParams | Optional parameters. |
Google_Service_Compute_Operation |