# SecretRotationApplication

A secret rotation serverless application.

- Source: [`aws-secretsmanager/lib/secret-rotation.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-secretsmanager/lib/secret-rotation.ts#L33)
- Type last changed: v2.258.0 · 4 Jun 2026

## 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,
});
```

## Initializer

```ts
new SecretRotationApplication(applicationName: string, awsSemanticVersion: string, options?: SecretRotationApplicationOptions)
```

## Properties

- `DB2_ROTATION_MULTI_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for RDS Db2 using the multi user rotation scheme.

- `DB2_ROTATION_SINGLE_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for RDS Db2 using the single user rotation scheme.

- `isMultiUser`: boolean — Whether the rotation application uses the multi user scheme.

- `MARIADB_ROTATION_MULTI_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for RDS MariaDB using the multi user rotation scheme.

- `MARIADB_ROTATION_SINGLE_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for RDS MariaDB using the single user rotation scheme.

- `MONGODB_ROTATION_MULTI_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for MongoDB using the multi user rotation scheme.

- `MONGODB_ROTATION_SINGLE_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for MongoDB using the single user rotation scheme.

- `MYSQL_ROTATION_MULTI_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for RDS MySQL using the multi user rotation scheme.

- `MYSQL_ROTATION_SINGLE_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for RDS MySQL using the single user rotation scheme.

- `ORACLE_ROTATION_MULTI_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for RDS Oracle using the multi user rotation scheme.

- `ORACLE_ROTATION_SINGLE_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for RDS Oracle using the single user rotation scheme.

- `POSTGRES_ROTATION_MULTI_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for RDS PostgreSQL using the multi user rotation scheme.

- `POSTGRES_ROTATION_SINGLE_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for RDS PostgreSQL using the single user rotation scheme.

- `REDSHIFT_ROTATION_MULTI_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for Amazon Redshift using the multi user rotation scheme.

- `REDSHIFT_ROTATION_SINGLE_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for Amazon Redshift using the single user rotation scheme.

- `SQLSERVER_ROTATION_MULTI_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for RDS SQL Server using the multi user rotation scheme.

- `SQLSERVER_ROTATION_SINGLE_USER`: [SecretRotationApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.SecretRotationApplication.html) (static) — Conducts an AWS SecretsManager secret rotation for RDS SQL Server using the single user rotation scheme.

## Methods

- `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): 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.
