Required. The resource name of the SecretVersion to enable in the format projects/*/locations/*/secrets/*/versions/*.
Authorization requires the following IAM permission on the specified resource name:
secretmanager.secrets.enable
Request body
The request body contains data with the following structure:
JSON representation
{"etag": string}
Fields
etag
string
Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds.
Response body
If successful, the response body contains an instance of SecretVersion.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-14 UTC."],[],[],null,["# Method: projects.locations.secrets.versions.enable\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nEnables a [SecretVersion](/secret-manager/docs/reference/rest/v1/projects.locations.secrets.versions#SecretVersion).\n\nSets the [state](/secret-manager/docs/reference/rest/v1/projects.locations.secrets.versions#SecretVersion.FIELDS.state) of the [SecretVersion](/secret-manager/docs/reference/rest/v1/projects.locations.secrets.versions#SecretVersion) to [ENABLED](/secret-manager/docs/reference/rest/v1/projects.locations.secrets.versions#SecretVersion.State.ENUM_VALUES.ENABLED).\n\n### HTTP request\n\nChoose a location: \nme-central2 me-west1 us-central1 us-east1 us-central2 us-west1 us-west2 us-west3 us-west4 us-east4 us-east5 us-south1 europe-west3 europe-west8 europe-west9 europe-west6 \n\n\u003cbr /\u003e\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [SecretVersion](/secret-manager/docs/reference/rest/v1/projects.locations.secrets.versions#SecretVersion).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/)."]]