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. For backup schedules, authorization requires spanner.backupSchedules.setIamPolicy permission on resource.
Request
- Base URL: https://spanner.googleapis.com
- URL: https://spanner.googleapis.com/v1/{+resource}:setIamPolicy
- Auth: one of:
- OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/cloud-platform) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/cloud-platform)
- OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/spanner.admin) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/spanner.admin)
Path parameters
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.
Request body
Response
Successful response
Changes
- info
the security scope
https://www.googleapis.com/auth/cloud-platformwas added to the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/cloud-platformwas added to the endpoint's security schemeOauth2c - info
the security scope
https://www.googleapis.com/auth/spanner.adminwas removed from the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/spanner.adminwas removed from the endpoint's security schemeOauth2c
- info
- breaking
removed the request body
- breaking
removed the media type
*/*for the response with the status - info
api operation id
spanner.projects.instances.backups.setIamPolicyremoved and replaced withspanner.projects.instances.databases.backupSchedules.setIamPolicy - info
the security scope
https://www.googleapis.com/auth/cloud-platformwas added to the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/cloud-platformwas added to the endpoint's security schemeOauth2c - info
the security scope
https://www.googleapis.com/auth/spanner.adminwas removed from the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/spanner.adminwas removed from the endpoint's security schemeOauth2c
- breaking