Table of Contents

Class CfnSecretTargetAttachment

Namespace
Amazon.CDK.AWS.SecretsManager
Assembly
Amazon.CDK.AWS.SecretsManager.dll

A CloudFormation AWS::SecretsManager::SecretTargetAttachment.

public class CfnSecretTargetAttachment : CfnResource, IInspectable
Inheritance
CfnSecretTargetAttachment
Implements
IInspectable

Examples

// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.SecretsManager;

             var cfnSecretTargetAttachment = new CfnSecretTargetAttachment(this, "MyCfnSecretTargetAttachment", new CfnSecretTargetAttachmentProps {
                 SecretId = "secretId",
                 TargetId = "targetId",
                 TargetType = "targetType"
             });

Remarks

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 .

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

CloudformationResource: AWS::SecretsManager::SecretTargetAttachment

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

ExampleMetadata: fixture=_generated

Constructors

CfnSecretTargetAttachment(Construct, string, ICfnSecretTargetAttachmentProps)

Create a new AWS::SecretsManager::SecretTargetAttachment.

public CfnSecretTargetAttachment(Construct scope, string id, ICfnSecretTargetAttachmentProps props)

Parameters

scope Construct
  • scope in which this resource is defined.
id string
  • scoped id of the resource.
props ICfnSecretTargetAttachmentProps
  • resource properties.

Properties

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }

Property Value

string

CfnProperties

protected override IDictionary<string, object> CfnProperties { get; }

Property Value

IDictionary<string, object>

SecretId

The ARN or name of the secret.

public virtual string SecretId { get; set; }

Property Value

string

Remarks

TargetId

The ID of the database or cluster.

public virtual string TargetId { get; set; }

Property Value

string

Remarks

TargetType

A string that defines the type of service or database associated with the secret.

public virtual string TargetType { get; set; }

Property Value

string

Remarks

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:

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

    Methods

    Inspect(TreeInspector)

    Examines the CloudFormation resource and discloses attributes.

    public virtual void Inspect(TreeInspector inspector)

    Parameters

    inspector TreeInspector
    • tree inspector to collect and process attributes.

    RenderProperties(IDictionary<string, object>)

    protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)

    Parameters

    props IDictionary<string, object>

    Returns

    IDictionary<string, object>