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.GetSecretValue

Contents

Description

Retrieves the contents of the encrypted fields SecretString or SecretBinary from the specified version of a secret, whichever contains content.

Minimum permissions

To run this command, you must have the following permissions:

  • secretsmanager:GetSecretValue
  • kms:Decrypt - required only if you use a customer-created KMS key to encrypt the secret. You do not need this permission to use the account's default AWS managed CMK for Secrets Manager.

Related operations

  • To create a new version of the secret with different encrypted information, use PutSecretValue .
  • To retrieve the non-encrypted details for the secret, use DescribeSecret .

Synopsis

Creating a Request

getSecretValue Source #

Creates a value of GetSecretValue with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • gsvVersionId - Specifies the unique identifier of the version of the secret that you want to retrieve. If you specify this parameter then don't specify VersionStage . If you don't specify either a VersionStage or SecretVersionId then the default is to perform the operation on the version with the VersionStage value of AWSCURRENT . This value is typically a UUID-type value with 32 hexadecimal digits.
  • gsvVersionStage - Specifies the secret version that you want to retrieve by the staging label attached to the version. Staging labels are used to keep track of different versions during the rotation process. If you use this parameter then don't specify SecretVersionId . If you don't specify either a VersionStage or SecretVersionId , then the default is to perform the operation on the version with the VersionStage value of AWSCURRENT .
  • gsvSecretId - Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

data GetSecretValue Source #

See: getSecretValue smart constructor.

Instances

Eq GetSecretValue Source # 
Data GetSecretValue Source # 

Methods

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

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

toConstr :: GetSecretValue -> Constr #

dataTypeOf :: GetSecretValue -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetSecretValue Source # 
Show GetSecretValue Source # 
Generic GetSecretValue Source # 

Associated Types

type Rep GetSecretValue :: * -> * #

Hashable GetSecretValue Source # 
ToJSON GetSecretValue Source # 
NFData GetSecretValue Source # 

Methods

rnf :: GetSecretValue -> () #

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

Request Lenses

gsvVersionId :: Lens' GetSecretValue (Maybe Text) Source #

Specifies the unique identifier of the version of the secret that you want to retrieve. If you specify this parameter then don't specify VersionStage . If you don't specify either a VersionStage or SecretVersionId then the default is to perform the operation on the version with the VersionStage value of AWSCURRENT . This value is typically a UUID-type value with 32 hexadecimal digits.

gsvVersionStage :: Lens' GetSecretValue (Maybe Text) Source #

Specifies the secret version that you want to retrieve by the staging label attached to the version. Staging labels are used to keep track of different versions during the rotation process. If you use this parameter then don't specify SecretVersionId . If you don't specify either a VersionStage or SecretVersionId , then the default is to perform the operation on the version with the VersionStage value of AWSCURRENT .

gsvSecretId :: Lens' GetSecretValue Text Source #

Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

Destructuring the Response

getSecretValueResponse Source #

Creates a value of GetSecretValueResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • gsvrsVersionId - The unique identifier of this version of the secret.
  • gsvrsARN - The ARN of the secret.
  • gsvrsVersionStages - A list of all of the staging labels currently attached to this version of the secret.
  • gsvrsSecretBinary - The decrypted part of the protected secret information that was originally provided as binary data in the form of a byte array. The response parameter represents the binary data as a base64-encoded string. This parameter is not used if the secret is created by the Secrets Manager console. If you store custom information in this field of the secret, then you must code your Lambda rotation function to parse and interpret whatever you store in the SecretString or SecretBinary fields.-- Note: This Lens automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens accepts and returns only raw unencoded data.
  • gsvrsCreatedDate - The date and time that this version of the secret was created.
  • gsvrsName - The friendly name of the secret.
  • gsvrsSecretString - The decrypted part of the protected secret information that was originally provided as a string. If you create this secret by using the Secrets Manager console then only the SecretString parameter contains data. Secrets Manager stores the information as a JSON structure of key/value pairs that the Lambda rotation function knows how to parse. If you store custom information in the secret by using the CreateSecret , UpdateSecret , or PutSecretValue API operations instead of the Secrets Manager console, or by using the Other secret type in the console, then you must code your Lambda rotation function to parse and interpret those values.
  • gsvrsResponseStatus - -- | The response status code.

data GetSecretValueResponse Source #

See: getSecretValueResponse smart constructor.

Instances

Eq GetSecretValueResponse Source # 
Data GetSecretValueResponse Source # 

Methods

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

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

toConstr :: GetSecretValueResponse -> Constr #

dataTypeOf :: GetSecretValueResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Show GetSecretValueResponse Source # 
Generic GetSecretValueResponse Source # 
NFData GetSecretValueResponse Source # 

Methods

rnf :: GetSecretValueResponse -> () #

type Rep GetSecretValueResponse Source # 
type Rep GetSecretValueResponse = D1 * (MetaData "GetSecretValueResponse" "Network.AWS.SecretsManager.GetSecretValue" "amazonka-secretsmanager-1.6.0-K7nD2j5oEj0GsgMw0kPUxD" False) (C1 * (MetaCons "GetSecretValueResponse'" PrefixI True) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_gsvrsVersionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_gsvrsARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gsvrsVersionStages") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe (List1 Text)))) (S1 * (MetaSel (Just Symbol "_gsvrsSecretBinary") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe (Sensitive Base64)))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_gsvrsCreatedDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe POSIX))) (S1 * (MetaSel (Just Symbol "_gsvrsName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gsvrsSecretString") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe (Sensitive Text)))) (S1 * (MetaSel (Just Symbol "_gsvrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int))))))

Response Lenses

gsvrsVersionId :: Lens' GetSecretValueResponse (Maybe Text) Source #

The unique identifier of this version of the secret.

gsvrsVersionStages :: Lens' GetSecretValueResponse (Maybe (NonEmpty Text)) Source #

A list of all of the staging labels currently attached to this version of the secret.

gsvrsSecretBinary :: Lens' GetSecretValueResponse (Maybe ByteString) Source #

The decrypted part of the protected secret information that was originally provided as binary data in the form of a byte array. The response parameter represents the binary data as a base64-encoded string. This parameter is not used if the secret is created by the Secrets Manager console. If you store custom information in this field of the secret, then you must code your Lambda rotation function to parse and interpret whatever you store in the SecretString or SecretBinary fields.-- Note: This Lens automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens accepts and returns only raw unencoded data.

gsvrsCreatedDate :: Lens' GetSecretValueResponse (Maybe UTCTime) Source #

The date and time that this version of the secret was created.

gsvrsName :: Lens' GetSecretValueResponse (Maybe Text) Source #

The friendly name of the secret.

gsvrsSecretString :: Lens' GetSecretValueResponse (Maybe Text) Source #

The decrypted part of the protected secret information that was originally provided as a string. If you create this secret by using the Secrets Manager console then only the SecretString parameter contains data. Secrets Manager stores the information as a JSON structure of key/value pairs that the Lambda rotation function knows how to parse. If you store custom information in the secret by using the CreateSecret , UpdateSecret , or PutSecretValue API operations instead of the Secrets Manager console, or by using the Other secret type in the console, then you must code your Lambda rotation function to parse and interpret those values.