Deletes a secret.
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 deleted secret can be recovered within the recovery period. You can also forcibly delete a secret. A forcibly deleted secret cannot be recovered.
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. | secret001 |
| ForceDeleteWithoutRecovery | string | No | Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values:
| false |
| RecoveryWindowInDays | string | No | Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. Unit: Days. | 10 |
Response parameters
Examples
Sample success responses
JSONformat
{
"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. |
| 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 | - |
| 500 | InternalFailure | Internal Failure | - |
For a list of error codes, visit the Service error codes.
