Updates the stage label that marks a secret version.
You can use this operation to achieve the following purposes:
- Use a specified stage label to mark a new secret version.
- Remove a specific stage label from an existing secret version.
Limits: This operation is available only for generic secrets.
In this example, the stage label that marks the version of the secret001
secret is updated. The stage label ACSCurrent
is used to mark the 002
version.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UpdateSecretVersionStage |
The operation that you want to perform. Set the value to UpdateSecretVersionStage. |
SecretName | String | Yes | secret001 |
The name of the secret. |
VersionStage | String | Yes | ACSCurrent |
The specified stage label. Valid values:
|
RemoveFromVersion | String | No | 001 |
The version from which you want to remove the specified stage label. Note You must specify at least one of the RemoveFromVersion and MoveToVersion parameters.
|
MoveToVersion | String | No | 002 |
The version to which you want to apply the specified stage label. Note
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
SecretName | String | secret001 |
The name of the secret. |
RequestId | String | 8cad259f-4d77-40ec-bbd7-b9c47a423bb9 |
The ID of the request, which is used to locate and troubleshoot issues. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=UpdateSecretVersionStage
&SecretName=secret001
&VersionStage=ACSCurrent
&RemoveFromVersion=001
&MoveToVersion=002
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateSecretVersionStageResponse>
<SecretName>secret001</SecretName>
<RequestId>8cad259f-4d77-40ec-bbd7-b9c47a423bb9</RequestId>
</UpdateSecretVersionStageResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"SecretName" : "secret001",
"RequestId" : "8cad259f-4d77-40ec-bbd7-b9c47a423bb9"
}
Error codes
For a list of error codes, visit the API Error Center.