Skip to content
v2.274.0

SecretRotationApplication Class ​

A secret rotation serverless application.

Example ​

ts
declare const myUserSecret: secretsmanager.Secret;
declare const myMasterSecret: secretsmanager.Secret;
declare const myDatabase: ec2.IConnectable;
declare const myVpc: ec2.Vpc;

new secretsmanager.SecretRotation(this, 'SecretRotation', {
  application: secretsmanager.SecretRotationApplication.MYSQL_ROTATION_MULTI_USER,
  secret: myUserSecret, // The secret that will be rotated
  masterSecret: myMasterSecret, // The secret used for the rotation
  target: myDatabase,
  vpc: myVpc,
});
python
# my_user_secret: secretsmanager.Secret
# my_master_secret: secretsmanager.Secret
# my_database: ec2.IConnectable
# my_vpc: ec2.Vpc


secretsmanager.SecretRotation(self, "SecretRotation",
    application=secretsmanager.SecretRotationApplication.MYSQL_ROTATION_MULTI_USER,
    secret=my_user_secret,  # The secret that will be rotated
    master_secret=my_master_secret,  # The secret used for the rotation
    target=my_database,
    vpc=my_vpc
)
java
Secret myUserSecret;
Secret myMasterSecret;
IConnectable myDatabase;
Vpc myVpc;


SecretRotation.Builder.create(this, "SecretRotation")
        .application(SecretRotationApplication.MYSQL_ROTATION_MULTI_USER)
        .secret(myUserSecret) // The secret that will be rotated
        .masterSecret(myMasterSecret) // The secret used for the rotation
        .target(myDatabase)
        .vpc(myVpc)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Secret myUserSecret;
Secret myMasterSecret;
IConnectable myDatabase;
Vpc myVpc;


new SecretRotation(this, "SecretRotation", new SecretRotationProps {
    Application = SecretRotationApplication.MYSQL_ROTATION_MULTI_USER,
    Secret = myUserSecret,  // The secret that will be rotated
    MasterSecret = myMasterSecret,  // The secret used for the rotation
    Target = myDatabase,
    Vpc = myVpc
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var myUserSecret Secret
var myMasterSecret Secret
var myDatabase IConnectable
var myVpc Vpc


secretsmanager.NewSecretRotation(this, jsii.String("SecretRotation"), &SecretRotationProps{
	Application: secretsmanager.SecretRotationApplication_MYSQL_ROTATION_MULTI_USER(),
	Secret: myUserSecret,
	 // The secret that will be rotated
	MasterSecret: myMasterSecret,
	 // The secret used for the rotation
	Target: myDatabase,
	Vpc: myVpc,
})

Initializer ​

ts
new SecretRotationApplication(applicationName: string, awsSemanticVersion: string, options?: SecretRotationApplicationOptions)
python
SecretRotationApplication(application_name: str, aws_semantic_version: str, options: typing.Optional[SecretRotationApplicationOptions] = None)
java
new SecretRotationApplication(String applicationName, String awsSemanticVersion, SecretRotationApplicationOptions options)
csharp
new SecretRotationApplication(string applicationName, string awsSemanticVersion, SecretRotationApplicationOptions? options = null)
go
NewSecretRotationApplication(ApplicationName *string, AwsSemanticVersion *string, Options SecretRotationApplicationOptions)

Properties ​

DB2_ROTATION_MULTI_USERSecretRotationApplicationdb2_rotation_multi_userSecretRotationApplicationDB2_ROTATION_MULTI_USERSecretRotationApplicationDB2_ROTATION_MULTI_USERSecretRotationApplicationDB2_ROTATION_MULTI_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for RDS Db2 using the multi user rotation scheme.
DB2_ROTATION_SINGLE_USERSecretRotationApplicationdb2_rotation_single_userSecretRotationApplicationDB2_ROTATION_SINGLE_USERSecretRotationApplicationDB2_ROTATION_SINGLE_USERSecretRotationApplicationDB2_ROTATION_SINGLE_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for RDS Db2 using the single user rotation scheme.
isMultiUsermay be undefinedbooleanis_multi_usermay be undefinedboolisMultiUsermay be undefinedBooleanIsMultiUsermay be undefinedboolIsMultiUsermay be undefined*bool#
Whether the rotation application uses the multi user scheme.
MARIADB_ROTATION_MULTI_USERSecretRotationApplicationmariadb_rotation_multi_userSecretRotationApplicationMARIADB_ROTATION_MULTI_USERSecretRotationApplicationMARIADB_ROTATION_MULTI_USERSecretRotationApplicationMARIADB_ROTATION_MULTI_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for RDS MariaDB using the multi user rotation scheme.
MARIADB_ROTATION_SINGLE_USERSecretRotationApplicationmariadb_rotation_single_userSecretRotationApplicationMARIADB_ROTATION_SINGLE_USERSecretRotationApplicationMARIADB_ROTATION_SINGLE_USERSecretRotationApplicationMARIADB_ROTATION_SINGLE_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for RDS MariaDB using the single user rotation scheme.
MONGODB_ROTATION_MULTI_USERSecretRotationApplicationmongodb_rotation_multi_userSecretRotationApplicationMONGODB_ROTATION_MULTI_USERSecretRotationApplicationMONGODB_ROTATION_MULTI_USERSecretRotationApplicationMONGODB_ROTATION_MULTI_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for MongoDB using the multi user rotation scheme.
MONGODB_ROTATION_SINGLE_USERSecretRotationApplicationmongodb_rotation_single_userSecretRotationApplicationMONGODB_ROTATION_SINGLE_USERSecretRotationApplicationMONGODB_ROTATION_SINGLE_USERSecretRotationApplicationMONGODB_ROTATION_SINGLE_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for MongoDB using the single user rotation scheme.
MYSQL_ROTATION_MULTI_USERSecretRotationApplicationmysql_rotation_multi_userSecretRotationApplicationMYSQL_ROTATION_MULTI_USERSecretRotationApplicationMYSQL_ROTATION_MULTI_USERSecretRotationApplicationMYSQL_ROTATION_MULTI_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for RDS MySQL using the multi user rotation scheme.
MYSQL_ROTATION_SINGLE_USERSecretRotationApplicationmysql_rotation_single_userSecretRotationApplicationMYSQL_ROTATION_SINGLE_USERSecretRotationApplicationMYSQL_ROTATION_SINGLE_USERSecretRotationApplicationMYSQL_ROTATION_SINGLE_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for RDS MySQL using the single user rotation scheme.
ORACLE_ROTATION_MULTI_USERSecretRotationApplicationoracle_rotation_multi_userSecretRotationApplicationORACLE_ROTATION_MULTI_USERSecretRotationApplicationORACLE_ROTATION_MULTI_USERSecretRotationApplicationORACLE_ROTATION_MULTI_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for RDS Oracle using the multi user rotation scheme.
ORACLE_ROTATION_SINGLE_USERSecretRotationApplicationoracle_rotation_single_userSecretRotationApplicationORACLE_ROTATION_SINGLE_USERSecretRotationApplicationORACLE_ROTATION_SINGLE_USERSecretRotationApplicationORACLE_ROTATION_SINGLE_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for RDS Oracle using the single user rotation scheme.
POSTGRES_ROTATION_MULTI_USERSecretRotationApplicationpostgres_rotation_multi_userSecretRotationApplicationPOSTGRES_ROTATION_MULTI_USERSecretRotationApplicationPOSTGRES_ROTATION_MULTI_USERSecretRotationApplicationPOSTGRES_ROTATION_MULTI_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for RDS PostgreSQL using the multi user rotation scheme.
POSTGRES_ROTATION_SINGLE_USERSecretRotationApplicationpostgres_rotation_single_userSecretRotationApplicationPOSTGRES_ROTATION_SINGLE_USERSecretRotationApplicationPOSTGRES_ROTATION_SINGLE_USERSecretRotationApplicationPOSTGRES_ROTATION_SINGLE_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for RDS PostgreSQL using the single user rotation scheme.
REDSHIFT_ROTATION_MULTI_USERSecretRotationApplicationredshift_rotation_multi_userSecretRotationApplicationREDSHIFT_ROTATION_MULTI_USERSecretRotationApplicationREDSHIFT_ROTATION_MULTI_USERSecretRotationApplicationREDSHIFT_ROTATION_MULTI_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for Amazon Redshift using the multi user rotation scheme.
REDSHIFT_ROTATION_SINGLE_USERSecretRotationApplicationredshift_rotation_single_userSecretRotationApplicationREDSHIFT_ROTATION_SINGLE_USERSecretRotationApplicationREDSHIFT_ROTATION_SINGLE_USERSecretRotationApplicationREDSHIFT_ROTATION_SINGLE_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for Amazon Redshift using the single user rotation scheme.
SQLSERVER_ROTATION_MULTI_USERSecretRotationApplicationsqlserver_rotation_multi_userSecretRotationApplicationSQLSERVER_ROTATION_MULTI_USERSecretRotationApplicationSQLSERVER_ROTATION_MULTI_USERSecretRotationApplicationSQLSERVER_ROTATION_MULTI_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for RDS SQL Server using the multi user rotation scheme.
SQLSERVER_ROTATION_SINGLE_USERSecretRotationApplicationsqlserver_rotation_single_userSecretRotationApplicationSQLSERVER_ROTATION_SINGLE_USERSecretRotationApplicationSQLSERVER_ROTATION_SINGLE_USERSecretRotationApplicationSQLSERVER_ROTATION_SINGLE_USERSecretRotationApplicationrequiredstatic#
Conducts an AWS SecretsManager secret rotation for RDS SQL Server using the single user rotation scheme.

Methods ​

applicationArnForPartition(partition: string): stringdef application_arn_for_partition(self, partition: str) -> strpublic String applicationArnForPartition(String partition)public string ApplicationArnForPartition(string partition)func ApplicationArnForPartition(Partition *string) *string#
Returns the application ARN for the current partition.

Can be used in combination with a CfnMapping to automatically select the correct ARN based on the current partition.

semanticVersionForPartition(partition: string): stringdef semantic_version_for_partition(self, partition: str) -> strpublic String semanticVersionForPartition(String partition)public string SemanticVersionForPartition(string partition)func SemanticVersionForPartition(Partition *string) *string#
The semantic version of the app for the current partition.

Can be used in combination with a CfnMapping to automatically select the correct version based on the current partition.