Stay organized with collections
Save and categorize content based on your preferences.
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. Calling this method on a backup schedule that does not exist
will result in a NOT_FOUND error if the user has
spanner.backupSchedules.list permission on the containing database.
For more information about retries and long-running operations, see
Understand connectors.
Arguments
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Method: googleapis.spanner.v1.projects.instances.databases.backupSchedules.testIamPermissions\n\nReturns permissions that the caller has on the specified database or\nbackup resource. Attempting this RPC on a non-existent Cloud Spanner\ndatabase will result in a NOT_FOUND error if the user has\n`spanner.databases.list` permission on the containing Cloud Spanner\ninstance. Otherwise returns an empty set of permissions. Calling this\nmethod on a backup that does not exist will result in a NOT_FOUND error\nif the user has `spanner.backups.list` permission on the containing\ninstance. Calling this method on a backup schedule that does not exist\nwill result in a NOT_FOUND error if the user has\n`spanner.backupSchedules.list` permission on the containing database.\n\nFor more information about retries and long-running operations, see\n[Understand connectors]().\n\nArguments\n---------\n\nRaised exceptions\n-----------------\n\nResponse\n--------\n\nIf successful, the response contains an instance of [`TestIamPermissionsResponse`](https://cloud.google.com/workflows/docs/reference/googleapis/spanner/v1/Overview#TestIamPermissionsResponse).\n\nSubworkflow snippet\n-------------------\n\nSome fields might be optional or required.\nTo identify required fields, refer to the [API documentation](https://cloud.google.com/spanner/docs/reference/rest/v1/projects.instances.databases.backupSchedules/testIamPermissions). \n\n### YAML\n\n```yaml\n- testIamPermissions:\n call: googleapis.spanner.v1.projects.instances.databases.backupSchedules.testIamPermissions\n args:\n resource: ...\n body:\n permissions: ...\n result: testIamPermissionsResult\n```\n\n### JSON\n\n```json\n[\n {\n \"testIamPermissions\": {\n \"call\": \"googleapis.spanner.v1.projects.instances.databases.backupSchedules.testIamPermissions\",\n \"args\": {\n \"resource\": \"...\",\n \"body\": {\n \"permissions\": \"...\"\n }\n },\n \"result\": \"testIamPermissionsResult\"\n }\n }\n]\n```"]]