---
title: "POST /v1/{+resource}:testIamPermissions"
method: POST
path: "/v1/{+resource}:testIamPermissions"
tags: ["projects"]
---

# POST /v1/{+resource}:testIamPermissions

`POST /v1/{+resource}:testIamPermissions`

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.

## Path parameters

- `resource` string, required

## Request body

- TestIamPermissionsRequest — Request message for `TestIamPermissions` method.
  - `permissions` string[] — REQUIRED: The set of permissions to check for 'resource'. Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*') are not allowed.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/spanner.md) · [All operations](https://skmtc.net/google/apis/spanner/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/spanner/versions/4b66067d2622/schema)
