Optional ReadonlydescriptionOptional ReadonlyencryptionThe customer-managed encryption key to use for encrypting the secret value.
Optional ReadonlygenerateConfiguration for how to generate a secret value.
Only one of secretString and generateSecretString can be provided.
Optional ReadonlyremovalPolicy to apply when the secret is removed from this stack.
Optional ReadonlyreplicaA list of regions where to replicate this secret.
Optional ReadonlysecretA name for the secret. Note that deleting secrets from SecretsManager does not happen immediately, but after a 7 to 30 days blackout period. During that period, it is not possible to create another secret that shares the same name.
Optional ReadonlysecretInitial value for a JSON secret
NOTE: *It is highly encouraged to leave this field undefined and allow SecretsManager to create the secret value. The secret object -- if provided -- will be included in the output of the cdk as part of synthesis, and will appear in the CloudFormation template in the console. This can be secure(-ish) if that value is merely reference to another resource (or one of its attributes), but if the value is a plaintext string, it will be visible to anyone with access to the CloudFormation template (via the AWS Console, SDKs, or CLI).
Specifies a JSON object that you want to encrypt and store in this new version of the secret.
To specify a simple string value instead, use SecretProps.secretStringValue
Only one of secretStringBeta1, secretStringValue, 'secretObjectValue', and generateSecretString can be provided.
declare const user: iam.User;
declare const accessKey: iam.AccessKey;
declare const stack: Stack;
new secretsmanager.Secret(stack, 'JSONSecret', {
secretObjectValue: {
username: SecretValue.unsafePlainText(user.userName), // intrinsic reference, not exposed as plaintext
database: SecretValue.unsafePlainText('foo'), // rendered as plain text, but not a secret
password: accessKey.secretAccessKey, // SecretValue
},
});
Optional ReadonlysecretInitial value for the secret
NOTE: *It is highly encouraged to leave this field undefined and allow SecretsManager to create the secret value. The secret string -- if provided -- will be included in the output of the cdk as part of synthesis, and will appear in the CloudFormation template in the console. This can be secure(-ish) if that value is merely reference to another resource (or one of its attributes), but if the value is a plaintext string, it will be visible to anyone with access to the CloudFormation template (via the AWS Console, SDKs, or CLI).
Specifies text data that you want to encrypt and store in this new version of the secret. May be a simple string value, or a string representation of a JSON structure.
Only one of secretStringBeta1, secretStringValue, and generateSecretString can be provided.
Optional ReadonlysecretInitial value for the secret
NOTE: *It is highly encouraged to leave this field undefined and allow SecretsManager to create the secret value. The secret string -- if provided -- will be included in the output of the cdk as part of synthesis, and will appear in the CloudFormation template in the console. This can be secure(-ish) if that value is merely reference to another resource (or one of its attributes), but if the value is a plaintext string, it will be visible to anyone with access to the CloudFormation template (via the AWS Console, SDKs, or CLI).
Specifies text data that you want to encrypt and store in this new version of the secret.
May be a simple string value. To provide a string representation of JSON structure, use SecretProps.secretObjectValue instead.
Only one of secretStringBeta1, secretStringValue, 'secretObjectValue', and generateSecretString can be provided.
An optional, human-friendly description of the secret.