interface SecretsManagerSecretOptions
| Language | Type name |
|---|---|
.NET | Amazon.CDK.SecretsManagerSecretOptions |
Java | software.amazon.awscdk.core.SecretsManagerSecretOptions |
Python | aws_cdk.core.SecretsManagerSecretOptions |
TypeScript (source) | @aws-cdk/core » SecretsManagerSecretOptions |
Options for referencing a secret value from Secrets Manager.
Example
new codebuild.BitBucketSourceCredentials(this, 'CodeBuildBitBucketCreds', {
username: SecretValue.secretsManager('my-bitbucket-creds', { jsonField: 'username' }),
password: SecretValue.secretsManager('my-bitbucket-creds', { jsonField: 'password' }),
});
Properties
| Name | Type | Description |
|---|---|---|
| json | string | The key of a JSON field to retrieve. |
| version | string | Specifies the unique identifier of the version of the secret you want to use. |
| version | string | Specifies the secret version that you want to retrieve by the staging label attached to the version. |
jsonField?
Type:
string
(optional, default: returns all the content stored in the Secrets Manager secret.)
The key of a JSON field to retrieve.
This can only be used if the secret stores a JSON object.
versionId?
Type:
string
(optional, default: AWSCURRENT)
Specifies the unique identifier of the version of the secret you want to use.
Can specify at most one of versionId and versionStage.
versionStage?
Type:
string
(optional, default: AWSCURRENT)
Specifies the secret version that you want to retrieve by the staging label attached to the version.
Can specify at most one of versionId and versionStage.

.NET
Java
Python
TypeScript (