Documentation

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

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$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
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
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
opt_param

string backupId Required. The id of the backup to be created. The backup_id appended to parent forms the full backup name of the form projects//instances//backups/.

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
static
Return values
string

$requestUrl

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 and projects//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
opt_param

string filter An expression that filters the list of returned backups. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: <, >, <=, >=, !=, =, or :. Colon : is the contains operator. Filter rules are not case sensitive. The following fields in the Backup are eligible for filtering: * name * database * state * create_time (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * expire_time (and values are of the format YYYY-MM- DDTHH:MM:SSZ) * size_bytes You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * name:Howl - The backup's name contains the string "howl". * database:prod - The database's name contains the string "prod". * state:CREATING - The backup is pending creation. * state:READY - The backup is fully created and ready for use. * (name:howl) AND (create_time < \"2018-03-28T14:50:00Z\") - The backup name contains the string "howl" and create_time of the backup is before 2018-03-28T14:50:00Z.

  • expire_time < \"2018-03-28T14:50:00Z\" - The backup expire_time is before 2018-03-28T14:50:00Z. * size_bytes > 10000000000 - The backup's size is greater than 10GB
opt_param

string pageToken If non-empty, page_token should contain a next_page_token from a previous ListBackupsResponse to the same parent and with the same filter.

opt_param

int pageSize Number of backups to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.

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 form projects//instances/.

$postBody : Google_Service_Spanner_Backup
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string updateMask Required. A mask specifying which fields (e.g. expire_time) in the Backup resource should be updated. This mask is relative to the Backup resource, not to the request message. The field mask must always be specified; this prevents any future fields from being erased accidentally by clients that do not know about them.

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 and projects//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 and projects//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
Return values
mixed

Search results