1.0
1.0
put /v1/secrets/{secret_id}/label
Description
Labels are added, moved, or removed from a version. If only the move_to_version_id value is used, the label is added. If only the remove_from_version_id value is used, the label is removed. If both values are used, the label is moved from remove_from_version_id to move_to_version_id.
State ACTIVE (CURRENT)
| Version | Supported Until |
|---|---|
| 1.0 | - |
Parameters
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
| path | secret_id required | Secret ID Example : 3265ab469f0d406d83073da3e11e7a6c | string | None |
| body | body required | SecretsManagerUpdateLabelRequest |
Responses
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | None |
| 400 | Bad Request | None |
| 403 | Forbidden | None |
| 404 | Not Found | None |
Example HTTP request
Request path
/v1/secrets/{secret_id}/label
Request header
"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = secretsmanager 1.0"
Request body
{
"label": "My Custom Label",
"move_to_version_id": "3265ab469f0d406d83073da3e11e7a6c",
"remove_from_version_id": "3265ab469f0d406d83073da3e11e7a6c"
}