SecretsManagerClient.delete_secret
rboto-secrets-manager==0.4.0 · Service index · Types
Model summary (excerpt): Deletes a secret and all of its versions. You can specify a recovery window during which you can restore the secret. The minimum recovery window is 7 days. The default recovery window is 30 days. Secrets Manager attaches a DeletionDate stamp to the secret that specifies the end of the recovery window. At the end of the recovery window, Secrets Manager deletes the secret permanently. You can't...
Install and imports
from rboto import SecretsManagerClient
from rboto_secrets_manager.types import (
DeleteSecretOutput,
)
Signature
async def delete_secret(
*,
secret_id: str,
recovery_window_in_days: int | None = None,
force_delete_without_recovery: bool | None = None,
) -> DeleteSecretOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
secret_id |
Yes | The ARN or name of the secret to delete. For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN . |
recovery_window_in_days |
No | The number of days from 7 to 30 that Secrets Manager waits before permanently deleting the secret. You can't use both this parameter and ForceDeleteWithoutRecovery in the same call. If you don't use either, then by default Secrets Manager uses a 30 day recovery window. |
force_delete_without_recovery |
No | Specifies whether to delete the secret without any recovery window. You can't use both this parameter and RecoveryWindowInDays in the same call. If you don't use either, then by default Secrets Manager uses a 30 day recovery window. Secrets Manager performs the actual deletion with an asynchronous background process, so there might be a short delay before the secret is permanently deleted. If... |
Output
DeleteSecretOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
arn |
str | None |
Always present | — |
name |
str | None |
Always present | — |
deletion_date |
str | None |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_secrets_manager.exceptions:
InternalServiceError, InvalidParameterError, InvalidRequestError, ResourceNotFoundError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.