Skip to content
v2.275.0

CfnSecretTargetAttachmentProps Struct ​

Properties for defining a CfnSecretTargetAttachment.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_secretsmanager as secretsmanager } from 'aws-cdk-lib';
const cfnSecretTargetAttachmentProps: secretsmanager.CfnSecretTargetAttachmentProps = {
  secretId: 'secretId',
  targetId: 'targetId',
  targetType: 'targetType',
};

Properties ​

secretIdstringsecret_idstrsecretIdStringSecretIdstringSecretId*stringrequired#
The ARN or name of the secret.
notes

To reference a secret also created in this template, use the see Ref function with the secret's logical ID. This field is unique for each target attachment definition.

targetIdstringtarget_idstrtargetIdStringTargetIdstringTargetId*stringrequired#
The ID of the database or cluster.
targetTypestringtarget_typestrtargetTypeStringTargetTypestringTargetType*stringrequired#
A string that defines the type of service or database associated with the secret.
notes

This value instructs Secrets Manager how to update the secret with the details of the service or database. This value must be one of the following:

  • AWS::RDS::DBInstance
  • AWS::RDS::DBCluster
  • AWS::Redshift::Cluster
  • AWS::RedshiftServerless::Namespace
  • AWS::DocDB::DBInstance
  • AWS::DocDB::DBCluster
  • AWS::DocDBElastic::Cluster