- [HTTP request](https://docs.cloud.google.com/kms/docs/reference/rest/v1/folders/updateAutokeyConfig#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/kms/docs/reference/rest/v1/folders/updateAutokeyConfig#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/kms/docs/reference/rest/v1/folders/updateAutokeyConfig#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/kms/docs/reference/rest/v1/folders/updateAutokeyConfig#body.request_body)
- [Response body](https://docs.cloud.google.com/kms/docs/reference/rest/v1/folders/updateAutokeyConfig#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/kms/docs/reference/rest/v1/folders/updateAutokeyConfig#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/kms/docs/reference/rest/v1/folders/updateAutokeyConfig#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/kms/docs/reference/rest/v1/folders/updateAutokeyConfig#try-it)

**Full name**: folders.updateAutokeyConfig

Updates the `https://docs.cloud.google.com/kms/docs/reference/rest/v1/AutokeyConfig` for a folder or a project. The caller must have both `cloudkms.autokeyConfigs.update` permission on the parent folder and `cloudkms.cryptoKeys.setIamPolicy` permission on the provided key project. A `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles#KeyHandle` creation in the folder's descendant projects will use this configuration to determine where to create the resulting `https://docs.cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKey`.

### 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   
`PATCH https://cloudkms.googleapis.com/v1/{autokeyConfig.name=folders/*/autokeyConfig}`

<br />

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

### Path parameters

| Parameters ||
|---|---|
| `autokeyConfig.name` | `string` Identifier. Name of the `https://docs.cloud.google.com/kms/docs/reference/rest/v1/AutokeyConfig` resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig`, `projects/{PROJECT_NUMBER}/autokeyConfig`, or `projects/{PROJECT_ID}/autokeyConfig`. |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Required. Masks which fields of the `https://docs.cloud.google.com/kms/docs/reference/rest/v1/AutokeyConfig` to update, e.g. `keyProject`. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/kms/docs/reference/rest/v1/AutokeyConfig`.

### Response body

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

### 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).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `cloudkms.autokeyConfigs.update`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).