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

Amazonka.SecretsManager.GetSecretValue

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-managed Amazon Web Services KMS key to encrypt the secret. You do not need this permission to use the account's default Amazon Web Services 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

data GetSecretValue Source #

See: newGetSecretValue smart constructor.

Constructors

GetSecretValue' 

Fields

  • versionId :: Maybe Text

    Specifies the unique identifier of the version of the secret that you want to retrieve. If you specify both this parameter and VersionStage, the two parameters must refer to the same secret version. If you don't specify either a VersionStage or VersionId 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.

  • versionStage :: Maybe Text

    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 specify both this parameter and VersionId, the two parameters must refer to the same secret version . If you don't specify either a VersionStage or VersionId, then the default is to perform the operation on the version with the VersionStage value of AWSCURRENT.

  • secretId :: Text

    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.

    For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.

Instances

Instances details
Eq GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

Read GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

Show GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

Generic GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

Associated Types

type Rep GetSecretValue :: Type -> Type #

NFData GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

Methods

rnf :: GetSecretValue -> () #

Hashable GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

ToJSON GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

AWSRequest GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

Associated Types

type AWSResponse GetSecretValue #

ToHeaders GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

ToPath GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

ToQuery GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

type Rep GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

type Rep GetSecretValue = D1 ('MetaData "GetSecretValue" "Amazonka.SecretsManager.GetSecretValue" "libZSservicesZSamazonka-secretsmanagerZSamazonka-secretsmanager" 'False) (C1 ('MetaCons "GetSecretValue'" 'PrefixI 'True) (S1 ('MetaSel ('Just "versionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "versionStage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "secretId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse GetSecretValue Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

newGetSecretValue Source #

Create a value of GetSecretValue with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:versionId:GetSecretValue', getSecretValue_versionId - Specifies the unique identifier of the version of the secret that you want to retrieve. If you specify both this parameter and VersionStage, the two parameters must refer to the same secret version. If you don't specify either a VersionStage or VersionId 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.

$sel:versionStage:GetSecretValue', getSecretValue_versionStage - 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 specify both this parameter and VersionId, the two parameters must refer to the same secret version . If you don't specify either a VersionStage or VersionId, then the default is to perform the operation on the version with the VersionStage value of AWSCURRENT.

$sel:secretId:GetSecretValue', getSecretValue_secretId - 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.

For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.

Request Lenses

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

Specifies the unique identifier of the version of the secret that you want to retrieve. If you specify both this parameter and VersionStage, the two parameters must refer to the same secret version. If you don't specify either a VersionStage or VersionId 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.

getSecretValue_versionStage :: 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 specify both this parameter and VersionId, the two parameters must refer to the same secret version . If you don't specify either a VersionStage or VersionId, then the default is to perform the operation on the version with the VersionStage value of AWSCURRENT.

getSecretValue_secretId :: 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.

For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.

Destructuring the Response

data GetSecretValueResponse Source #

See: newGetSecretValueResponse smart constructor.

Constructors

GetSecretValueResponse' 

Fields

  • versionId :: Maybe Text

    The unique identifier of this version of the secret.

  • arn :: Maybe Text

    The ARN of the secret.

  • versionStages :: Maybe (NonEmpty Text)

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

  • secretBinary :: Maybe (Sensitive Base64)

    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.

  • createdDate :: Maybe POSIX

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

  • name :: Maybe Text

    The friendly name of the secret.

  • secretString :: Maybe (Sensitive Text)

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq GetSecretValueResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

Show GetSecretValueResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

Generic GetSecretValueResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

Associated Types

type Rep GetSecretValueResponse :: Type -> Type #

NFData GetSecretValueResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

Methods

rnf :: GetSecretValueResponse -> () #

type Rep GetSecretValueResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.GetSecretValue

type Rep GetSecretValueResponse = D1 ('MetaData "GetSecretValueResponse" "Amazonka.SecretsManager.GetSecretValue" "libZSservicesZSamazonka-secretsmanagerZSamazonka-secretsmanager" 'False) (C1 ('MetaCons "GetSecretValueResponse'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "versionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "arn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "versionStages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty Text))) :*: S1 ('MetaSel ('Just "secretBinary") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive Base64))))) :*: ((S1 ('MetaSel ('Just "createdDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "secretString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive Text))) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

newGetSecretValueResponse Source #

Create a value of GetSecretValueResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:versionId:GetSecretValue', getSecretValueResponse_versionId - The unique identifier of this version of the secret.

$sel:arn:GetSecretValueResponse', getSecretValueResponse_arn - The ARN of the secret.

$sel:versionStages:GetSecretValueResponse', getSecretValueResponse_versionStages - A list of all of the staging labels currently attached to this version of the secret.

$sel:secretBinary:GetSecretValueResponse', getSecretValueResponse_secretBinary - 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.

$sel:createdDate:GetSecretValueResponse', getSecretValueResponse_createdDate - The date and time that this version of the secret was created.

$sel:name:GetSecretValueResponse', getSecretValueResponse_name - The friendly name of the secret.

$sel:secretString:GetSecretValueResponse', getSecretValueResponse_secretString - 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.

$sel:httpStatus:GetSecretValueResponse', getSecretValueResponse_httpStatus - The response's http status code.

Response Lenses

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

The unique identifier of this version of the secret.

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

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

getSecretValueResponse_secretBinary :: 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.

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

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

getSecretValueResponse_secretString :: 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.