Manually rotates a secret.
Operation description
Limits:
• A secret of each Alibaba Cloud account can be rotated for a maximum of 50 times per hour.
• The RotateSecret operation is unavailable for standard secrets.
In this example, the RdsSecret/Mysql5.4/MyCred secret is manually rotated, and the version number of the secret is set to 000000123 after the secret is rotated.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| SecretName | string | Yes | The name of the secret. | RdsSecret/Mysql5.4/MyCred |
| VersionId | string | Yes | The version number of the secret after the secret is rotated. Note
The version number is used to ensure the idempotence of the request. Secrets Manager uses this version number to prevent your application from creating the same version of the secret when the application retries a request. If a version number already exists, Secrets Manager ignores the request for rotation and returns a success message.
| 000000123 |
Response parameters
Examples
Sample success responses
JSONformat
{
"VersionId": "000000123",
"SecretName": "RdsSecret/Mysql5.4/MyCred",
"RequestId": "10257c86-269d-43aa-aaf3-90ed4144bb7c",
"Arn": "acs:kms:cn-hangzhou:154035569884****:secret/RdsSecret/Mysql5.4/MyCred"
}Error codes
For a list of error codes, visit the Service error codes.
