Table of Contents

Class SecretsManagerSecretOptions

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll

Options for referencing a secret value from Secrets Manager.

public class SecretsManagerSecretOptions : ISecretsManagerSecretOptions
Inheritance
SecretsManagerSecretOptions
Implements
Inherited Members

Examples

new BitBucketSourceCredentials(this, "CodeBuildBitBucketCreds", new BitBucketSourceCredentialsProps {
                Username = SecretValue.SecretsManager("my-bitbucket-creds", new SecretsManagerSecretOptions { JsonField = "username" }),
                Password = SecretValue.SecretsManager("my-bitbucket-creds", new SecretsManagerSecretOptions { JsonField = "password" })
            });

Remarks

ExampleMetadata: infused

Constructors

SecretsManagerSecretOptions()

public SecretsManagerSecretOptions()

Properties

JsonField

The key of a JSON field to retrieve.

public string? JsonField { get; set; }

Property Value

string

Remarks

This can only be used if the secret stores a JSON object.

Default: - returns all the content stored in the Secrets Manager secret.

VersionId

Specifies the unique identifier of the version of the secret you want to use.

public string? VersionId { get; set; }

Property Value

string

Remarks

Can specify at most one of versionId and versionStage.

Default: AWSCURRENT

VersionStage

Specifies the secret version that you want to retrieve by the staging label attached to the version.

public string? VersionStage { get; set; }

Property Value

string

Remarks

Can specify at most one of versionId and versionStage.

Default: AWSCURRENT