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 |
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
.
- getSecretValue :: Text -> GetSecretValue
- data GetSecretValue
- gsvVersionId :: Lens' GetSecretValue (Maybe Text)
- gsvVersionStage :: Lens' GetSecretValue (Maybe Text)
- gsvSecretId :: Lens' GetSecretValue Text
- getSecretValueResponse :: Int -> GetSecretValueResponse
- data GetSecretValueResponse
- gsvrsVersionId :: Lens' GetSecretValueResponse (Maybe Text)
- gsvrsARN :: Lens' GetSecretValueResponse (Maybe Text)
- gsvrsVersionStages :: Lens' GetSecretValueResponse (Maybe (NonEmpty Text))
- gsvrsSecretBinary :: Lens' GetSecretValueResponse (Maybe ByteString)
- gsvrsCreatedDate :: Lens' GetSecretValueResponse (Maybe UTCTime)
- gsvrsName :: Lens' GetSecretValueResponse (Maybe Text)
- gsvrsSecretString :: Lens' GetSecretValueResponse (Maybe Text)
- gsvrsResponseStatus :: Lens' GetSecretValueResponse Int
Creating a Request
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 specifyVersionStage
. If you don't specify either aVersionStage
orSecretVersionId
then the default is to perform the operation on the version with theVersionStage
value ofAWSCURRENT
. 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 specifySecretVersionId
. If you don't specify either aVersionStage
orSecretVersionId
, then the default is to perform the operation on the version with theVersionStage
value ofAWSCURRENT
.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.
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 theSecretString
orSecretBinary
fields.-- Note: ThisLens
automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. ThisLens
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 theSecretString
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 theCreateSecret
,UpdateSecret
, orPutSecretValue
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.
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.
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.
gsvrsResponseStatus :: Lens' GetSecretValueResponse Int Source #
- - | The response status code.