Google_Service_Spanner_Resource_ProjectsInstances
extends Google_Service_Resource
in package
The "instances" collection of methods.
Typical usage is:
$spannerService = new Google_Service_Spanner(...);
$instances = $spannerService->instances;
Table of Contents
- $client : Google_Client
- $methods : array<string|int, mixed>
- $resourceName : string
- $rootUrl : string
- $serviceName : string
- $servicePath : string
- $stackParameters : mixed
- __construct() : mixed
- call() : Google_Http_Request|expectedClass
- TODO: This function needs simplifying.
- create() : Google_Service_Spanner_Operation
- Creates an instance and begins preparing it to begin serving. The returned long-running operation can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, `CreateInstance` returns `ALREADY_EXISTS`. Immediately upon completion of this request: * The instance is readable via the API, with all requested attributes but no allocated resources. Its state is `CREATING`.
- createRequestUri() : string
- Parse/expand request parameters and create a fully qualified request uri.
- delete() : Google_Service_Spanner_SpannerEmpty
- Deletes an instance. Immediately upon completion of the request: * Billing ceases for all of the instance's reserved resources. Soon afterward: * The instance and *all of its databases* immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
- get() : Google_Service_Spanner_Instance
- Gets information about a particular instance. (instances.get)
- getIamPolicy() : Google_Service_Spanner_Policy
- Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set. Authorization requires `spanner.instances.getIamPolicy` on resource.
- listProjectsInstances() : Google_Service_Spanner_ListInstancesResponse
- Lists all instances in the given project. (instances.listProjectsInstances)
- patch() : Google_Service_Spanner_Operation
- Updates an instance, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance. If the named instance does not exist, returns `NOT_FOUND`. Immediately upon completion of this request: * For resource types for which a decrease in the instance's allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: * Cancelling the operation sets its metadata's cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance are rejected. * Reading the instance via the API continues to give the pre-request resource levels. Upon completion of the returned operation: * Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). * All newly-reserved resources are available for serving the instance's tables. * The instance's new resource levels are readable via the API. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance modification. The metadata field type is UpdateInstanceMetadata. The response field type is Instance, if successful.
- setIamPolicy() : Google_Service_Spanner_Policy
- Sets the access control policy on an instance resource. Replaces any existing policy. Authorization requires `spanner.instances.setIamPolicy` on resource.
- testIamPermissions() : Google_Service_Spanner_TestIamPermissionsResponse
- Returns permissions that the caller has on the specified instance resource.
- 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 —call()
TODO: This function needs simplifying.
public
call( $name, $arguments[, $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
Tags
Return values
Google_Http_Request|expectedClass —create()
Creates an instance and begins preparing it to begin serving. The returned long-running operation can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, `CreateInstance` returns `ALREADY_EXISTS`. Immediately upon completion of this request: * The instance is readable via the API, with all requested attributes but no allocated resources. Its state is `CREATING`.
public
create(string $parent, Google_Service_Spanner_CreateInstanceRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_Operation
Until completion of the returned operation: * Cancelling the operation
renders the instance immediately unreadable via the API. * The instance can
be deleted. * All other attempts to modify the instance are rejected. Upon
completion of the returned operation: * Billing for all successfully-
allocated resources begins (some types may have lower than the requested
levels). * Databases can be created in the instance. * The instance's
allocated resource levels are readable via the API. * The instance's state
becomes READY. The returned long-running operation will have a name of the
format /operations/ and can be used to track creation of the instance. The
metadata field type is CreateInstanceMetadata. The response field type is
Instance, if successful. (instances.create)
Parameters
- $parent : string
-
Required. The name of the project in which to create the instance. Values are of the form
projects/. - $postBody : Google_Service_Spanner_CreateInstanceRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Spanner_Operation —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 an instance. Immediately upon completion of the request: * Billing ceases for all of the instance's reserved resources. Soon afterward: * The instance and *all of its databases* immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
public
delete(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_SpannerEmpty
(instances.delete)
Parameters
- $name : string
-
Required. The name of the instance to be deleted. Values are of the form
projects//instances/ - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Spanner_SpannerEmpty —get()
Gets information about a particular instance. (instances.get)
public
get(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_Instance
Parameters
- $name : string
-
Required. The name of the requested instance. Values are of the form
projects//instances/. - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_Spanner_Instance —getIamPolicy()
Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set. Authorization requires `spanner.instances.getIamPolicy` on resource.
public
getIamPolicy(string $resource, Google_Service_Spanner_GetIamPolicyRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_Policy
(instances.getIamPolicy)
Parameters
- $resource : string
-
REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is
projects//instances/for instance resources andprojects//instances//databases/for database resources. - $postBody : Google_Service_Spanner_GetIamPolicyRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Spanner_Policy —listProjectsInstances()
Lists all instances in the given project. (instances.listProjectsInstances)
public
listProjectsInstances(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_ListInstancesResponse
Parameters
- $parent : string
-
Required. The name of the project for which a list of instances is requested. Values are of the form
projects/. - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_Spanner_ListInstancesResponse —patch()
Updates an instance, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance. If the named instance does not exist, returns `NOT_FOUND`. Immediately upon completion of this request: * For resource types for which a decrease in the instance's allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: * Cancelling the operation sets its metadata's cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance are rejected. * Reading the instance via the API continues to give the pre-request resource levels. Upon completion of the returned operation: * Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). * All newly-reserved resources are available for serving the instance's tables. * The instance's new resource levels are readable via the API. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance modification. The metadata field type is UpdateInstanceMetadata. The response field type is Instance, if successful.
public
patch(string $name, Google_Service_Spanner_UpdateInstanceRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_Operation
Authorization requires spanner.instances.update permission on resource
name. (instances.patch)
Parameters
- $name : string
-
Required. A unique identifier for the instance, which cannot be changed after the instance is created. Values are of the form
projects//instances/a-z*[a-z0-9]. The final segment of the name must be between 2 and 64 characters in length. - $postBody : Google_Service_Spanner_UpdateInstanceRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Spanner_Operation —setIamPolicy()
Sets the access control policy on an instance resource. Replaces any existing policy. Authorization requires `spanner.instances.setIamPolicy` on resource.
public
setIamPolicy(string $resource, Google_Service_Spanner_SetIamPolicyRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_Policy
(instances.setIamPolicy)
Parameters
- $resource : string
-
REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is
projects//instances/for instance resources andprojects//instances//databases/for databases resources. - $postBody : Google_Service_Spanner_SetIamPolicyRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Spanner_Policy —testIamPermissions()
Returns permissions that the caller has on the specified instance resource.
public
testIamPermissions(string $resource, Google_Service_Spanner_TestIamPermissionsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_TestIamPermissionsResponse
Attempting this RPC on a non-existent Cloud Spanner instance resource will
result in a NOT_FOUND error if the user has spanner.instances.list
permission on the containing Google Cloud Project. Otherwise returns an empty
set of permissions. (instances.testIamPermissions)
Parameters
- $resource : string
-
REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is
projects//instances/for instance resources andprojects//instances//databases/for database resources. - $postBody : Google_Service_Spanner_TestIamPermissionsRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Spanner_TestIamPermissionsResponse —convertToArrayAndStripNulls()
protected
convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
- $o : mixed