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
ExampleMetadata: fixture=_generated
Constructors
CfnSecretTargetAttachment(Construct, string, ICfnSecretTargetAttachmentProps)
Create a new AWS::SecretsManager::SecretTargetAttachment.
public CfnSecretTargetAttachment(Construct scope, string id, ICfnSecretTargetAttachmentProps props)
Parameters
scopeConstruct- scope in which this resource is defined.
idstring- scoped id of the resource.
propsICfnSecretTargetAttachmentProps- 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
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
SecretId
The ARN or name of the secret.
public virtual string SecretId { get; set; }
Property Value
Remarks
To reference a secret also created in this template, use the see Ref function with the secret's logical ID.
TargetId
The ID of the database or cluster.
public virtual string TargetId { get; set; }
Property Value
Remarks
TargetType
A string that defines the type of service or database associated with the secret.
public virtual string TargetType { get; set; }
Property Value
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:
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
inspectorTreeInspector- tree inspector to collect and process attributes.
RenderProperties(IDictionary<string, object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
propsIDictionary<string, object>