SecretsManagerSecretOptions
- class aws_cdk.SecretsManagerSecretOptions(*, json_field=None, version_id=None, version_stage=None)
Bases:
object
Options for referencing a secret value from Secrets Manager.
- Parameters:
json_field (
Optional
[str
]) – The key of a JSON field to retrieve. This can only be used if the secret stores a JSON object. Default: - returns all the content stored in the Secrets Manager secret.version_id (
Optional
[str
]) – Specifies the unique identifier of the version of the secret you want to use. Can specify at most one ofversionId
andversionStage
. Default: AWSCURRENTversion_stage (
Optional
[str
]) – Specifies the secret version that you want to retrieve by the staging label attached to the version. Can specify at most one ofversionId
andversionStage
. Default: AWSCURRENT
- ExampleMetadata:
infused
Example:
codebuild.BitBucketSourceCredentials(self, "CodeBuildBitBucketCreds", username=SecretValue.secrets_manager("my-bitbucket-creds", json_field="username"), password=SecretValue.secrets_manager("my-bitbucket-creds", json_field="password") )
Attributes
- json_field
The key of a JSON field to retrieve.
This can only be used if the secret stores a JSON object.
- Default:
returns all the content stored in the Secrets Manager secret.
- version_id
Specifies the unique identifier of the version of the secret you want to use.
Can specify at most one of
versionId
andversionStage
.- Default:
AWSCURRENT
- version_stage
Specifies the secret version that you want to retrieve by the staging label attached to the version.
Can specify at most one of
versionId
andversionStage
.- Default:
AWSCURRENT