# SecretAttachmentTargetProps

Attachment target specifications.

Returned by: [ISecretAttachmentTarget.asSecretAttachmentTarget](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.ISecretAttachmentTarget.html#assecretattachmenttarget)

- Source: [`aws-secretsmanager/lib/secret.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-secretsmanager/lib/secret.ts#L849)

## 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 secretAttachmentTargetProps: secretsmanager.SecretAttachmentTargetProps = {
  targetId: 'targetId',
  targetType: secretsmanager.AttachmentTargetType.RDS_DB_INSTANCE,
};
```

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

secret_attachment_target_props = secretsmanager.SecretAttachmentTargetProps(
    target_id="targetId",
    target_type=secretsmanager.AttachmentTargetType.RDS_DB_INSTANCE
)
```

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.*;

SecretAttachmentTargetProps secretAttachmentTargetProps = SecretAttachmentTargetProps.builder()
        .targetId("targetId")
        .targetType(AttachmentTargetType.RDS_DB_INSTANCE)
        .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 secretAttachmentTargetProps = new SecretAttachmentTargetProps {
    TargetId = "targetId",
    TargetType = AttachmentTargetType.RDS_DB_INSTANCE
};
```

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"

secretAttachmentTargetProps := &SecretAttachmentTargetProps{
	TargetId: jsii.String("targetId"),
	TargetType: awscdk.Aws_secretsmanager.AttachmentTargetType_RDS_DB_INSTANCE,
}
```

## Properties

- `targetId`: string (required) — The id of the target to attach the secret to.

- `targetType`: [AttachmentTargetType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.AttachmentTargetType.html) (required) — The type of the target to attach the secret to.
