Google_Service_Spanner_Resource_ProjectsInstancesBackups
extends Google_Service_Resource
in package
The "backups" collection of methods.
Typical usage is:
$spannerService = new Google_Service_Spanner(...);
$backups = $spannerService->backups;
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
- Starts creating a new Cloud Spanner Backup. The returned backup long-running operation will have a name of the format `projects//instances//backups//operations/` and can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently. (backups.create)
- createRequestUri() : string
- Parse/expand request parameters and create a fully qualified request uri.
- delete() : Google_Service_Spanner_SpannerEmpty
- Deletes a pending or completed Backup. (backups.delete)
- get() : Google_Service_Spanner_Backup
- Gets metadata on a pending or completed Backup. (backups.get)
- getIamPolicy() : Google_Service_Spanner_Policy
- Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set.
- listProjectsInstancesBackups() : Google_Service_Spanner_ListBackupsResponse
- Lists completed and pending backups. Backups returned are ordered by `create_time` in descending order, starting from the most recent `create_time`. (backups.listProjectsInstancesBackups)
- patch() : Google_Service_Spanner_Backup
- Updates a pending or completed Backup. (backups.patch)
- setIamPolicy() : Google_Service_Spanner_Policy
- Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. (backups.setIamPolicy)
- testIamPermissions() : Google_Service_Spanner_TestIamPermissionsResponse
- Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. (backups.testIamPermissions)
- 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()
Starts creating a new Cloud Spanner Backup. The returned backup long-running operation will have a name of the format `projects//instances//backups//operations/` and can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently. (backups.create)
public
create(string $parent, Google_Service_Spanner_Backup $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_Operation
Parameters
- $parent : string
-
Required. The name of the instance in which the backup will be created. This must be the same instance that contains the database the backup will be created from. The backup will be stored in the location(s) specified in the instance configuration of this instance. Values are of the form
projects//instances/. - $postBody : Google_Service_Spanner_Backup
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
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 a pending or completed Backup. (backups.delete)
public
delete(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_SpannerEmpty
Parameters
- $name : string
-
Required. Name of the backup to delete. Values are of the form
projects//instances//backups/. - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Spanner_SpannerEmpty —get()
Gets metadata on a pending or completed Backup. (backups.get)
public
get(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_Backup
Parameters
- $name : string
-
Required. Name of the backup. Values are of the form
projects//instances//backups/. - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_Spanner_Backup —getIamPolicy()
Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set.
public
getIamPolicy(string $resource, Google_Service_Spanner_GetIamPolicyRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_Policy
Authorization requires spanner.databases.getIamPolicy permission on
resource. For backups, authorization requires spanner.backups.getIamPolicy
permission on resource. (backups.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 —listProjectsInstancesBackups()
Lists completed and pending backups. Backups returned are ordered by `create_time` in descending order, starting from the most recent `create_time`. (backups.listProjectsInstancesBackups)
public
listProjectsInstancesBackups(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_ListBackupsResponse
Parameters
- $parent : string
-
Required. The instance to list backups from. Values are of the form
projects//instances/. - $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_Spanner_ListBackupsResponse —patch()
Updates a pending or completed Backup. (backups.patch)
public
patch(string $name, Google_Service_Spanner_Backup $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_Backup
Parameters
- $name : string
-
Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form
projects//instances//backups/a-z*[a-z0-9]The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the formprojects//instances/. - $postBody : Google_Service_Spanner_Backup
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Tags
Return values
Google_Service_Spanner_Backup —setIamPolicy()
Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. (backups.setIamPolicy)
public
setIamPolicy(string $resource, Google_Service_Spanner_SetIamPolicyRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_Policy
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 database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. (backups.testIamPermissions)
public
testIamPermissions(string $resource, Google_Service_Spanner_TestIamPermissionsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Spanner_TestIamPermissionsResponse
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