Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Deletes an entire secret and all of its versions. You can optionally include a recovery window during which you can restore the secret. If you don't specify a recovery window value, the operation defaults to 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.
At any time before recovery window ends, you can use RestoreSecret
to remove the DeletionDate
and cancel the deletion of the secret.
You cannot access the encrypted secret information in any secret that is scheduled for deletion. If you need to access that information, you must cancel the deletion with RestoreSecret
and then retrieve the information.
Minimum permissions
To run this command, you must have the following permissions:
- secretsmanager:DeleteSecret
Related operations
- To create a secret, use
CreateSecret
. - To cancel deletion of a version of a secret before the recovery window has expired, use
RestoreSecret
.
- deleteSecret :: Text -> DeleteSecret
- data DeleteSecret
- dsRecoveryWindowInDays :: Lens' DeleteSecret (Maybe Integer)
- dsSecretId :: Lens' DeleteSecret Text
- deleteSecretResponse :: Int -> DeleteSecretResponse
- data DeleteSecretResponse
- dsrsARN :: Lens' DeleteSecretResponse (Maybe Text)
- dsrsName :: Lens' DeleteSecretResponse (Maybe Text)
- dsrsDeletionDate :: Lens' DeleteSecretResponse (Maybe UTCTime)
- dsrsResponseStatus :: Lens' DeleteSecretResponse Int
Creating a Request
Creates a value of DeleteSecret
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dsRecoveryWindowInDays
- (Optional) Specifies the number of days that Secrets Manager waits before it can delete the secret. This value can range from 7 to 30 days. The default value is 30.dsSecretId
- Specifies the secret that you want to delete. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.
data DeleteSecret Source #
See: deleteSecret
smart constructor.
Request Lenses
dsRecoveryWindowInDays :: Lens' DeleteSecret (Maybe Integer) Source #
(Optional) Specifies the number of days that Secrets Manager waits before it can delete the secret. This value can range from 7 to 30 days. The default value is 30.
dsSecretId :: Lens' DeleteSecret Text Source #
Specifies the secret that you want to delete. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.
Destructuring the Response
Creates a value of DeleteSecretResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dsrsARN
- The ARN of the secret that is now scheduled for deletion.dsrsName
- The friendly name of the secret that is now scheduled for deletion.dsrsDeletionDate
- The date and time after which this secret can be deleted by Secrets Manager and can no longer be restored. This value is the date and time of the delete request plus the number of days specified inRecoveryWindowInDays
.dsrsResponseStatus
- -- | The response status code.
data DeleteSecretResponse Source #
See: deleteSecretResponse
smart constructor.
Response Lenses
dsrsARN :: Lens' DeleteSecretResponse (Maybe Text) Source #
The ARN of the secret that is now scheduled for deletion.
dsrsName :: Lens' DeleteSecretResponse (Maybe Text) Source #
The friendly name of the secret that is now scheduled for deletion.
dsrsDeletionDate :: Lens' DeleteSecretResponse (Maybe UTCTime) Source #
The date and time after which this secret can be deleted by Secrets Manager and can no longer be restored. This value is the date and time of the delete request plus the number of days specified in RecoveryWindowInDays
.
dsrsResponseStatus :: Lens' DeleteSecretResponse Int Source #
- - | The response status code.