class ProjectsInstancesDatabasesDatabaseRoles extends Resource (View source)

The "databaseRoles" collection of methods.

Typical usage is:

 $spannerService = new Google\Service\Spanner(...);
 $databaseRoles = $spannerService->projects_instances_databases_databaseRoles;

Methods

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

Lists Cloud Spanner database roles.

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

Details

ListDatabaseRolesResponse listProjectsInstancesDatabasesDatabaseRoles(string $parent, array $optParams = [])

Lists Cloud Spanner database roles.

(databaseRoles.listProjectsInstancesDatabasesDatabaseRoles)

Parameters

string $parent

Required. The database whose roles should be listed. Values are of the form projects//instances//databases/.

array $optParams

Optional parameters.

Return Value

ListDatabaseRolesResponse

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. (databaseRoles.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