- [HTTP request](https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys/getIamPolicy#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys/getIamPolicy#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys/getIamPolicy#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys/getIamPolicy#body.request_body)
- [Response body](https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys/getIamPolicy#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys/getIamPolicy#body.aspect)
- [Try it!](https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys/getIamPolicy#try-it)

**Full name**: projects.locations.keyRings.cryptoKeys.getIamPolicy

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

### HTTP request

Choose an endpoint:
global europe-west6 us-east7 europe-west3 us-west8 europe-west9 me-central2 us-east1 us-west1 us-west3 us-central2 us-east4 us-west2 europe-west8 us-central1 us-west4 us-east5 us-south1 northamerica-northeast1 northamerica-northeast2 us in ca   
`GET https://cloudkms.googleapis.com/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `resource` | `string` REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. |

### Query parameters

| Parameters ||
|---|---|
| `options` | ``object (`https://docs.cloud.google.com/kms/docs/reference/rest/v1/GetPolicyOptions`)`` OPTIONAL: A `GetPolicyOptions` object for specifying options to `cryptoKeys.getIamPolicy`. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/kms/docs/reference/rest/v1/Policy`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloudkms`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).