CfnSecretTargetAttachmentPropsMixin
- class aws_cdk.mixins_preview.aws_secretsmanager.mixins.CfnSecretTargetAttachmentPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::SecretsManager::SecretTargetAttachmentresource completes the final link between a Secrets Manager secret and the associated database by adding the database connection information to the secret JSON.If you want to turn on automatic rotation for a database credential secret, the secret must contain the database connection information. For more information, see JSON structure of Secrets Manager database credential secrets .
A single secret resource can only have one target attached to it.
When you remove a
SecretTargetAttachmentfrom a stack, Secrets Manager removes the database connection information from the secret with aPutSecretValuecall.For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret .
For Amazon Redshift admin user credentials, see AWS::Redshift::Cluster .
- See:
- CloudformationResource:
AWS::SecretsManager::SecretTargetAttachment
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_secretsmanager import mixins as secretsmanager_mixins cfn_secret_target_attachment_props_mixin = secretsmanager_mixins.CfnSecretTargetAttachmentPropsMixin(secretsmanager_mixins.CfnSecretTargetAttachmentMixinProps( secret_id="secretId", target_id="targetId", target_type="targetType" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::SecretsManager::SecretTargetAttachment.- Parameters:
props (
Union[CfnSecretTargetAttachmentMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['secretId', 'targetId', 'targetType']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental