amazonka-secretsmanager-1.6.0: Amazon Secrets Manager SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.SecretsManager.DeleteSecret

Contents

Description

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 .

Synopsis

Creating a Request

deleteSecret Source #

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.

Instances

Eq DeleteSecret Source # 
Data DeleteSecret Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DeleteSecret -> c DeleteSecret #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DeleteSecret #

toConstr :: DeleteSecret -> Constr #

dataTypeOf :: DeleteSecret -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DeleteSecret) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DeleteSecret) #

gmapT :: (forall b. Data b => b -> b) -> DeleteSecret -> DeleteSecret #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DeleteSecret -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DeleteSecret -> r #

gmapQ :: (forall d. Data d => d -> u) -> DeleteSecret -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DeleteSecret -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DeleteSecret -> m DeleteSecret #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DeleteSecret -> m DeleteSecret #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DeleteSecret -> m DeleteSecret #

Read DeleteSecret Source # 
Show DeleteSecret Source # 
Generic DeleteSecret Source # 

Associated Types

type Rep DeleteSecret :: * -> * #

Hashable DeleteSecret Source # 
ToJSON DeleteSecret Source # 
NFData DeleteSecret Source # 

Methods

rnf :: DeleteSecret -> () #

AWSRequest DeleteSecret Source # 
ToHeaders DeleteSecret Source # 
ToPath DeleteSecret Source # 
ToQuery DeleteSecret Source # 
type Rep DeleteSecret Source # 
type Rep DeleteSecret = D1 * (MetaData "DeleteSecret" "Network.AWS.SecretsManager.DeleteSecret" "amazonka-secretsmanager-1.6.0-K7nD2j5oEj0GsgMw0kPUxD" False) (C1 * (MetaCons "DeleteSecret'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_dsRecoveryWindowInDays") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Integer))) (S1 * (MetaSel (Just Symbol "_dsSecretId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))
type Rs DeleteSecret Source # 

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

deleteSecretResponse Source #

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 in RecoveryWindowInDays .
  • dsrsResponseStatus - -- | The response status code.

data DeleteSecretResponse Source #

See: deleteSecretResponse smart constructor.

Instances

Eq DeleteSecretResponse Source # 
Data DeleteSecretResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DeleteSecretResponse -> c DeleteSecretResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DeleteSecretResponse #

toConstr :: DeleteSecretResponse -> Constr #

dataTypeOf :: DeleteSecretResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DeleteSecretResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DeleteSecretResponse) #

gmapT :: (forall b. Data b => b -> b) -> DeleteSecretResponse -> DeleteSecretResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DeleteSecretResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DeleteSecretResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> DeleteSecretResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DeleteSecretResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DeleteSecretResponse -> m DeleteSecretResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DeleteSecretResponse -> m DeleteSecretResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DeleteSecretResponse -> m DeleteSecretResponse #

Read DeleteSecretResponse Source # 
Show DeleteSecretResponse Source # 
Generic DeleteSecretResponse Source # 
NFData DeleteSecretResponse Source # 

Methods

rnf :: DeleteSecretResponse -> () #

type Rep DeleteSecretResponse Source # 
type Rep DeleteSecretResponse = D1 * (MetaData "DeleteSecretResponse" "Network.AWS.SecretsManager.DeleteSecret" "amazonka-secretsmanager-1.6.0-K7nD2j5oEj0GsgMw0kPUxD" False) (C1 * (MetaCons "DeleteSecretResponse'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_dsrsARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_dsrsName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_dsrsDeletionDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe POSIX))) (S1 * (MetaSel (Just Symbol "_dsrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))

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.