# HostedRotation

A hosted rotation.

Implements: [IConnectable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IConnectable.html)
Obtainable from: HostedRotation.mariaDbMultiUser, HostedRotation.mariaDbSingleUser, HostedRotation.mongoDbMultiUser, HostedRotation.mongoDbSingleUser, HostedRotation.mysqlMultiUser, HostedRotation.mysqlSingleUser, HostedRotation.oracleMultiUser, HostedRotation.oracleSingleUser, HostedRotation.postgreSqlMultiUser, HostedRotation.postgreSqlSingleUser, HostedRotation.redshiftMultiUser, HostedRotation.redshiftSingleUser, HostedRotation.sqlServerMultiUser, HostedRotation.sqlServerSingleUser

- Source: [`aws-secretsmanager/lib/rotation-schedule.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-secretsmanager/lib/rotation-schedule.ts#L231)

## Example

TypeScript:

```ts
const secret = new secretsmanager.Secret(this, 'Secret');

secret.addRotationSchedule('RotationSchedule', {
  hostedRotation: secretsmanager.HostedRotation.mysqlSingleUser(),
});
```

Python:

```python
secret = secretsmanager.Secret(self, "Secret")

secret.add_rotation_schedule("RotationSchedule",
    hosted_rotation=secretsmanager.HostedRotation.mysql_single_user()
)
```

Java:

```java
Secret secret = new Secret(this, "Secret");

secret.addRotationSchedule("RotationSchedule", RotationScheduleOptions.builder()
        .hostedRotation(HostedRotation.mysqlSingleUser())
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
var secret = new Secret(this, "Secret");

secret.AddRotationSchedule("RotationSchedule", new RotationScheduleOptions {
    HostedRotation = HostedRotation.MysqlSingleUser()
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
secret := secretsmanager.NewSecret(this, jsii.String("Secret"))

secret.addRotationSchedule(jsii.String("RotationSchedule"), &RotationScheduleOptions{
	HostedRotation: secretsmanager.HostedRotation_MysqlSingleUser(),
})
```

## Properties

- `connections`: [Connections](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Connections.html) — Security group connections for this hosted rotation.

## Methods

- `bind(secret: ISecret, scope: Construct): CfnRotationSchedule.HostedRotationLambdaProperty` — Binds this hosted rotation to a secret.

- `mariaDbMultiUser(options: MultiUserHostedRotationOptions): HostedRotation // chainable` (static) — MariaDB Multi User.

- `mariaDbSingleUser(options?: SingleUserHostedRotationOptions): HostedRotation // chainable` (static) — MariaDB Single User.

- `mongoDbMultiUser(options: MultiUserHostedRotationOptions): HostedRotation // chainable` (static) — MongoDB Multi User.

- `mongoDbSingleUser(options?: SingleUserHostedRotationOptions): HostedRotation // chainable` (static) — MongoDB Single User.

- `mysqlMultiUser(options: MultiUserHostedRotationOptions): HostedRotation // chainable` (static) — MySQL Multi User.

- `mysqlSingleUser(options?: SingleUserHostedRotationOptions): HostedRotation // chainable` (static) — MySQL Single User.

- `oracleMultiUser(options: MultiUserHostedRotationOptions): HostedRotation // chainable` (static) — Oracle Multi User.

- `oracleSingleUser(options?: SingleUserHostedRotationOptions): HostedRotation // chainable` (static) — Oracle Single User.

- `postgreSqlMultiUser(options: MultiUserHostedRotationOptions): HostedRotation // chainable` (static) — PostgreSQL Multi User.

- `postgreSqlSingleUser(options?: SingleUserHostedRotationOptions): HostedRotation // chainable` (static) — PostgreSQL Single User.

- `redshiftMultiUser(options: MultiUserHostedRotationOptions): HostedRotation // chainable` (static) — Redshift Multi User.

- `redshiftSingleUser(options?: SingleUserHostedRotationOptions): HostedRotation // chainable` (static) — Redshift Single User.

- `sqlServerMultiUser(options: MultiUserHostedRotationOptions): HostedRotation // chainable` (static) — SQL Server Multi User.

- `sqlServerSingleUser(options?: SingleUserHostedRotationOptions): HostedRotation // chainable` (static) — SQL Server Single User.
