CfnSecretTargetAttachmentPropsMixin

class aws_cdk.mixins_preview.aws_secretsmanager.mixins.CfnSecretTargetAttachmentPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::SecretsManager::SecretTargetAttachment resource 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 SecretTargetAttachment from a stack, Secrets Manager removes the database connection information from the secret with a PutSecretValue call.

For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret .

For Amazon Redshift admin user credentials, see AWS::Redshift::Cluster .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-secrettargetattachment.html

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:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

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 x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental