Experimental
@aws-cdk/aws-redshift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
RotationMultiUserOptions Struct
Options to add the multi user rotation.
| Stability | Experimental |
|---|---|
| Source | lib/cluster.ts |
Example
ts
const user = new User(this, 'User', {
cluster: cluster,
databaseName: 'databaseName',
});
cluster.addRotationMultiUser('MultiUserRotation', {
secret: user.secret,
});
python
user = User(self, "User",
cluster=cluster,
database_name="databaseName"
)
cluster.add_rotation_multi_user("MultiUserRotation",
secret=user.secret
)
java
User user = User.Builder.create(this, "User")
.cluster(cluster)
.databaseName("databaseName")
.build();
cluster.addRotationMultiUser("MultiUserRotation", RotationMultiUserOptions.builder()
.secret(user.getSecret())
.build());
csharp
// Install: dotnet add package Amazon.CDK.AWS.Redshift.Alpha
var user = new User(this, "User", new UserProps {
Cluster = cluster,
DatabaseName = "databaseName"
});
cluster.AddRotationMultiUser("MultiUserRotation", new RotationMultiUserOptions {
Secret = user.Secret
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkredshiftalpha/v2
user := awscdkredshiftalpha.NewUser(this, jsii.String("User"), &UserProps{
Cluster: cluster,
DatabaseName: jsii.String("databaseName"),
})
cluster.AddRotationMultiUser(jsii.String("MultiUserRotation"), &RotationMultiUserOptions{
Secret: user.Secret,
})
Properties
automaticallyAfteroptionalDurationautomatically_afteroptionalDurationautomaticallyAfteroptionalDurationAutomaticallyAfteroptionalDurationAutomaticallyAfteroptionalDuration = Duration.days(30) #Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.
The secret to rotate.
notes
It must be a JSON string with the following format:
{
"engine": <required: database engine>,
"host": <required: instance host name>,
"username": <required: username>,
"password": <required: password>,
"dbname": <optional: database name>,
"port": <optional: if not specified, default port will be used>,
"masterarn": <required: the arn of the master secret which will be used to create users/change passwords>
}