class ProjectsInstancesDatabasesBackupSchedules extends Resource (View source)

The "backupSchedules" collection of methods.

Typical usage is:

 $spannerService = new Google\Service\Spanner(...);
 $backupSchedules = $spannerService->projects_instances_databases_backupSchedules;

Methods

create(string $parent, BackupSchedule $postBody, array $optParams = [])

Creates a new backup schedule. (backupSchedules.create)

delete(string $name, array $optParams = [])

Deletes a backup schedule. (backupSchedules.delete)

get(string $name, array $optParams = [])

Gets backup schedule for the input schedule name. (backupSchedules.get)

getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

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.

listProjectsInstancesDatabasesBackupSchedules(string $parent, array $optParams = [])

Lists all the backup schedules for the database.

patch(string $name, BackupSchedule $postBody, array $optParams = [])

Updates a backup schedule. (backupSchedules.patch)

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

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.

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

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. (backupSchedules.testIamPermissions)

Details

BackupSchedule create(string $parent, BackupSchedule $postBody, array $optParams = [])

Creates a new backup schedule. (backupSchedules.create)

Parameters

string $parent

Required. The name of the database that this backup schedule applies to.

BackupSchedule $postBody
array $optParams

Optional parameters.

Return Value

BackupSchedule

Exceptions

Exception

SpannerEmpty delete(string $name, array $optParams = [])

Deletes a backup schedule. (backupSchedules.delete)

Parameters

string $name

Required. The name of the schedule to delete. Values are of the form projects//instances//databases//backupSchedules/.

array $optParams

Optional parameters.

Return Value

SpannerEmpty

Exceptions

Exception

BackupSchedule get(string $name, array $optParams = [])

Gets backup schedule for the input schedule name. (backupSchedules.get)

Parameters

string $name

Required. The name of the schedule to retrieve. Values are of the form projects//instances//databases//backupSchedules/.

array $optParams

Optional parameters.

Return Value

BackupSchedule

Exceptions

Exception

Policy getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

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.

Authorization requires spanner.databases.getIamPolicy permission on resource. For backups, authorization requires spanner.backups.getIamPolicy permission on resource. (backupSchedules.getIamPolicy)

Parameters

string $resource

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.

GetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListBackupSchedulesResponse listProjectsInstancesDatabasesBackupSchedules(string $parent, array $optParams = [])

Lists all the backup schedules for the database.

(backupSchedules.listProjectsInstancesDatabasesBackupSchedules)

Parameters

string $parent

Required. Database is the parent resource whose backup schedules should be listed. Values are of the form projects//instances//databases/

array $optParams

Optional parameters.

Return Value

ListBackupSchedulesResponse

Exceptions

Exception

BackupSchedule patch(string $name, BackupSchedule $postBody, array $optParams = [])

Updates a backup schedule. (backupSchedules.patch)

Parameters

string $name

Identifier. Output only for the CreateBackupSchedule operation. Required for the UpdateBackupSchedule operation. A globally unique identifier for the backup schedule which cannot be changed. Values are of the form projects//instances//databases//backupSchedules/a-z*[a-z0-9] The final segment of the name must be between 2 and 60 characters in length.

BackupSchedule $postBody
array $optParams

Optional parameters.

Return Value

BackupSchedule

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

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.

(backupSchedules.setIamPolicy)

Parameters

string $resource

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.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

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. (backupSchedules.testIamPermissions)

Parameters

string $resource

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.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception