Schedules the deletion of a secret with an optional recovery period during which you can restore it.
Operation description
If you call this operation without specifying a recovery period, the deleted secret can be recovered within 30 days.
If you specify a recovery period, the secret can be recovered within that window. You can also forcibly delete a secret, in which case it cannot be recovered.
For more information about the access policy required for RAM users or RAM roles to call this operation, see Resource Access Management.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SecretName |
string |
Yes |
The name of the secret. |
secret001 |
| ForceDeleteWithoutRecovery |
string |
No |
Whether to forcibly delete the secret. If set to true, the secret cannot be recovered. Valid values:
|
false |
| RecoveryWindowInDays |
string |
No |
The recovery period of the secret if you do not forcibly delete it. Default value: 30. Unit: days. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| SecretName |
string |
The name of the secret. |
secret001 |
| RequestId |
string |
The request ID. |
38bbed2a-15e0-45ad-98d4-816ad2ccf4ea |
| PlannedDeleteTime |
string |
The time when the secret is scheduled to be deleted. |
2022-09-15T07:02:14Z |
Examples
Success response
JSON format
{
"SecretName": "secret001",
"RequestId": "38bbed2a-15e0-45ad-98d4-816ad2ccf4ea",
"PlannedDeleteTime": "2022-09-15T07:02:14Z"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is not valid. | An invalid value is specified for the parameter. |
| 500 | InternalFailure | Internal Failure | |
| 404 | Forbidden.ResourceNotFound | Resource not found | |
| 404 | InvalidAccessKeyId.NotFound | The Access Key ID provided does not exist in our records. | |
| 409 | Rejected.ResourceInDeleteWindow | secret in delete peroid |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.