# CfnSecretTargetAttachmentProps

Properties for defining a `CfnSecretTargetAttachment`.

Used as props by: [CfnSecretTargetAttachment](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.CfnSecretTargetAttachment.html)

- Source: Generated at build time

## Example

TypeScript:

```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',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_secretsmanager as secretsmanager

cfn_secret_target_attachment_props = secretsmanager.CfnSecretTargetAttachmentProps(
    secret_id="secretId",
    target_id="targetId",
    target_type="targetType"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.secretsmanager.*;

CfnSecretTargetAttachmentProps cfnSecretTargetAttachmentProps = CfnSecretTargetAttachmentProps.builder()
        .secretId("secretId")
        .targetId("targetId")
        .targetType("targetType")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 cfnSecretTargetAttachmentProps = new CfnSecretTargetAttachmentProps {
    SecretId = "secretId",
    TargetId = "targetId",
    TargetType = "targetType"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnSecretTargetAttachmentProps := &CfnSecretTargetAttachmentProps{
	SecretId: jsii.String("secretId"),
	TargetId: jsii.String("targetId"),
	TargetType: jsii.String("targetType"),
}
```

## Properties

- `secretId`: string (required) — The ARN or name of the secret.

  To reference a secret also created in this template, use the see [Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html) function with the secret's logical ID. This field is unique for each target attachment definition.

- `targetId`: string (required) — The ID of the database or cluster.

- `targetType`: string (required) — A string that defines the type of service or database associated with the secret.

  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
