Stay organized with collections
Save and categorize content based on your preferences.
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. For backup
schedules, authorization requires spanner.backupSchedules.getIamPolicy
permission on resource.
For more information about retries and long-running operations, see
Understand connectors.
Arguments
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.
[[["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-28 UTC."],[],[],null,["# Method: googleapis.spanner.v1.projects.instances.backups.getIamPolicy\n\nGets the access control policy for a database or backup resource.\nReturns an empty policy if a database or backup exists but does not have\na policy set. Authorization requires `spanner.databases.getIamPolicy`\npermission on resource. For backups, authorization requires\n`spanner.backups.getIamPolicy` permission on resource. For backup\nschedules, authorization requires `spanner.backupSchedules.getIamPolicy`\npermission on resource.\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 [`Policy`](https://cloud.google.com/workflows/docs/reference/googleapis/spanner/v1/Overview#Policy).\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.backups/getIamPolicy). \n\n### YAML\n\n```yaml\n- getIamPolicy:\n call: googleapis.spanner.v1.projects.instances.backups.getIamPolicy\n args:\n resource: ...\n body:\n options:\n requestedPolicyVersion: ...\n result: getIamPolicyResult\n```\n\n### JSON\n\n```json\n[\n {\n \"getIamPolicy\": {\n \"call\": \"googleapis.spanner.v1.projects.instances.backups.getIamPolicy\",\n \"args\": {\n \"resource\": \"...\",\n \"body\": {\n \"options\": {\n \"requestedPolicyVersion\": \"...\"\n }\n }\n },\n \"result\": \"getIamPolicyResult\"\n }\n }\n]\n```"]]