class CfnSecretPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.SecretsManager.Mixins.CfnSecretPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awssecretsmanager/mixins#CfnSecretPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.secretsmanager.mixins.CfnSecretPropsMixin |
Python | aws_cdk.mixins_preview.aws_secretsmanager.mixins.CfnSecretPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_secretsmanager » mixins » CfnSecretPropsMixin |
Implements
IMixin
Extends
Mixin
Creates a new secret.
A secret can be a password, a set of credentials such as a user name and password, an OAuth token, or other secret information that you store in an encrypted form in Secrets Manager.
For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret .
For Amazon Redshift admin user credentials, see AWS::Redshift::Cluster .
To retrieve a secret in a CloudFormation template, use a dynamic reference . For more information, see Retrieve a secret in an CloudFormation resource .
For information about creating a secret in the console, see Create a secret . For information about creating a secret using the CLI or SDK, see CreateSecret .
For information about retrieving a secret in code, see Retrieve secrets from Secrets Manager .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as secretsmanager_mixins } from '@aws-cdk/mixins-preview/aws-secretsmanager';
const cfnSecretPropsMixin = new secretsmanager_mixins.CfnSecretPropsMixin({
description: 'description',
generateSecretString: {
excludeCharacters: 'excludeCharacters',
excludeLowercase: false,
excludeNumbers: false,
excludePunctuation: false,
excludeUppercase: false,
generateStringKey: 'generateStringKey',
includeSpace: false,
passwordLength: 123,
requireEachIncludedType: false,
secretStringTemplate: 'secretStringTemplate',
},
kmsKeyId: 'kmsKeyId',
name: 'name',
replicaRegions: [{
kmsKeyId: 'kmsKeyId',
region: 'region',
}],
secretString: 'secretString',
tags: [{
key: 'key',
value: 'value',
}],
type: 'type',
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnSecretPropsMixin(props: CfnSecretMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Secret Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::SecretsManager::Secret.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript