Required. The resource name of theSecretVersionto disable in the formatprojects/*/secrets/*/versions/*.
Authorization requires the followingIAMpermission on the specified resourcename:
secretmanager.secrets.disable
Request body
The request body contains data with the following structure:
JSON representation
{"etag":string}
Fields
etag
string
Optional. Etag of theSecretVersion. 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 ofSecretVersion.
[[["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.secrets.versions.disable\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- [Try it!](#try-it)\n\nDisables a [SecretVersion](/secret-manager/docs/reference/rest/v1/projects.secrets.versions#SecretVersion).\n\nSets the [state](/secret-manager/docs/reference/rest/v1/projects.secrets.versions#SecretVersion.FIELDS.state) of the [SecretVersion](/secret-manager/docs/reference/rest/v1/projects.secrets.versions#SecretVersion) to [DISABLED](/secret-manager/docs/reference/rest/v1/projects.secrets.versions#State.ENUM_VALUES.DISABLED).\n\n### HTTP request\n\n`POST https://secretmanager.googleapis.com/v1/{name=projects/*/secrets/*/versions/*}:disable`\n\nThe URL uses [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.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/)."]]