Table of Contents
A low-level client to interact locally with the AWS Greengrass Core in order to retrieve deployed local secrets.
import greengrasssdk
client = greengrasssdk.client('secretsmanager')
These are the available methods:
Retrieves a specific local secret.
Request Syntax
response = client.get_secret_value(
SecretId='string',
VersionStage='string'
)
[REQUIRED]
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.
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 don't specify it, the default is to perform the operation on the version with the VersionStage value of AWSCURRENT.
dict
Response Syntax
{
'ARN': 'string',
'Name': 'string',
'VersionId': 'string',
'SecretBinary': b'bytes',
'SecretString': 'string',
'VersionStages': [
'string',
],
'CreatedDate': datetime(2015, 1, 1)
}
Response Structure
(dict) --
ARN (string) --
The ARN of the secret.
Name (string) --
The friendly name of the secret.
VersionId (string) --
The unique identifier of this version of the secret.
SecretBinary (bytes) --
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.
SecretString (string) --
The decrypted part of the protected secret information that was originally provided as a string.
VersionStages (list) --
A list of all of the staging labels currently attached to this version of the secret.
CreatedDate (datetime) --
The date and time that this version of the secret was created.