aws-cdk-lib.aws_docdb.RotationMultiUserOptions

interface RotationMultiUserOptions

LanguageType name
.NETAmazon.CDK.AWS.DocDB.RotationMultiUserOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsdocdb#RotationMultiUserOptions
Javasoftware.amazon.awscdk.services.docdb.RotationMultiUserOptions
Pythonaws_cdk.aws_docdb.RotationMultiUserOptions
TypeScript (source)aws-cdk-lib » aws_docdb » RotationMultiUserOptions

Options to add the multi user rotation.

Example

import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';

declare const myImportedSecret: secretsmanager.Secret;
declare const cluster: docdb.DatabaseCluster;

cluster.addRotationMultiUser('MyUser', {
  secret: myImportedSecret, // This secret must have the `masterarn` key
});

Properties

NameTypeDescription
secretISecretThe secret to rotate.
automaticallyAfter?DurationSpecifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.

secret

Type: ISecret

The secret to rotate.

It must be a JSON string with the following format:

{
  "engine": <required: must be set to 'mongo'>,
  "host": <required: instance host name>,
  "username": <required: username>,
  "password": <required: password>,
  "dbname": <optional: database name>,
  "port": <optional: if not specified, default port 27017 will be used>,
  "masterarn": <required: the arn of the master secret which will be used to create users/change passwords>
  "ssl": <optional: if not specified, defaults to false. This must be true if being used for DocumentDB rotations
         where the cluster has TLS enabled>
}

automaticallyAfter?

Type: Duration (optional, default: Duration.days(30))

Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.