Skip to content
v2.277.0

AttachedSecretOptions Struct ​

Options to add a secret attachment to a secret.

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';

declare const secretAttachmentTarget: secretsmanager.ISecretAttachmentTarget;
const attachedSecretOptions: secretsmanager.AttachedSecretOptions = {
  target: secretAttachmentTarget,
};
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: secretsmanager.ISecretAttachmentTarget

attached_secret_options = secretsmanager.AttachedSecretOptions(
    target=secret_attachment_target
)
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.*;

ISecretAttachmentTarget secretAttachmentTarget;

AttachedSecretOptions attachedSecretOptions = AttachedSecretOptions.builder()
        .target(secretAttachmentTarget)
        .build();
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;

ISecretAttachmentTarget secretAttachmentTarget;

var attachedSecretOptions = new AttachedSecretOptions {
    Target = secretAttachmentTarget
};
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"

var secretAttachmentTarget ISecretAttachmentTarget

attachedSecretOptions := &AttachedSecretOptions{
	Target: secretAttachmentTarget,
}

Properties ​