# Method: projects.locations.environments.userWorkloadsSecrets.update

- [HTTP request](https://docs.cloud.google.com/composer/docs/reference/rest/v1beta1/projects.locations.environments.userWorkloadsSecrets/update#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/composer/docs/reference/rest/v1beta1/projects.locations.environments.userWorkloadsSecrets/update#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/composer/docs/reference/rest/v1beta1/projects.locations.environments.userWorkloadsSecrets/update#body.request_body)
- [Response body](https://docs.cloud.google.com/composer/docs/reference/rest/v1beta1/projects.locations.environments.userWorkloadsSecrets/update#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/composer/docs/reference/rest/v1beta1/projects.locations.environments.userWorkloadsSecrets/update#body.aspect)
- [Try it!](https://docs.cloud.google.com/composer/docs/reference/rest/v1beta1/projects.locations.environments.userWorkloadsSecrets/update#try-it)

Updates a user workloads Secret.

This method is supported for Cloud Composer environments in versions composer-3-airflow-\*.\*.\*-build.\* and newer.

### HTTP request

`PUT https://composer.googleapis.com/v1beta1/{userWorkloadsSecret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}`

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

### Path parameters

| Parameters ||
|---|---|
| `userWorkloadsSecret.name` | `string` Identifier. The resource name of the Secret, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/composer/docs/reference/rest/v1beta1/projects.locations.environments.userWorkloadsSecrets#UserWorkloadsSecret`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/composer/docs/reference/rest/v1beta1/projects.locations.environments.userWorkloadsSecrets#UserWorkloadsSecret`.

### Authorization scopes

Requires one of the following OAuth scopes:

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

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