Skip to content
v2.278.0

SingleUserHostedRotationOptions Struct ​

Single user hosted rotation options.

Example ​

ts
declare const myVpc: ec2.IVpc;
declare const dbConnections: ec2.Connections;
declare const secret: secretsmanager.Secret;

const myHostedRotation = secretsmanager.HostedRotation.mysqlSingleUser({ vpc: myVpc });
secret.addRotationSchedule('RotationSchedule', { hostedRotation: myHostedRotation });
dbConnections.allowDefaultPortFrom(myHostedRotation);
python
# my_vpc: ec2.IVpc
# db_connections: ec2.Connections
# secret: secretsmanager.Secret


my_hosted_rotation = secretsmanager.HostedRotation.mysql_single_user(vpc=my_vpc)
secret.add_rotation_schedule("RotationSchedule", hosted_rotation=my_hosted_rotation)
db_connections.allow_default_port_from(my_hosted_rotation)
java
IVpc myVpc;
Connections dbConnections;
Secret secret;


HostedRotation myHostedRotation = HostedRotation.mysqlSingleUser(SingleUserHostedRotationOptions.builder().vpc(myVpc).build());
secret.addRotationSchedule("RotationSchedule", RotationScheduleOptions.builder().hostedRotation(myHostedRotation).build());
dbConnections.allowDefaultPortFrom(myHostedRotation);
csharp
// Install: dotnet add package Amazon.CDK.Lib
IVpc myVpc;
Connections dbConnections;
Secret secret;


var myHostedRotation = HostedRotation.MysqlSingleUser(new SingleUserHostedRotationOptions { Vpc = myVpc });
secret.AddRotationSchedule("RotationSchedule", new RotationScheduleOptions { HostedRotation = myHostedRotation });
dbConnections.AllowDefaultPortFrom(myHostedRotation);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var myVpc IVpc
var dbConnections Connections
var secret Secret


myHostedRotation := secretsmanager.HostedRotation_MysqlSingleUser(&SingleUserHostedRotationOptions{
	Vpc: myVpc,
})
secret.addRotationSchedule(jsii.String("RotationSchedule"), &RotationScheduleOptions{
	HostedRotation: myHostedRotation,
})
dbConnections.AllowDefaultPortFrom(myHostedRotation)

Properties ​

excludeCharactersoptionalstringexclude_charactersoptionalstrexcludeCharactersoptionalStringExcludeCharactersoptionalstringExcludeCharactersoptional*string #
A string of the characters that you don't want in the password.

Default: the same exclude characters as the ones used for the secret or " %+~`#$&*()|[]{}:;<>?!'/@"\"

functionNameoptionalstringfunction_nameoptionalstrfunctionNameoptionalStringFunctionNameoptionalstringFunctionNameoptional*string #
A name for the Lambda created to rotate the secret.

Default: a CloudFormation generated name

securityGroupsoptionalISecurityGroup[]security_groupsoptionaltyping.List[ISecurityGroup]securityGroupsoptionalList<ISecurityGroup>SecurityGroupsoptionalISecurityGroup[]SecurityGroupsoptional*[]ISecurityGroup #
A list of security groups for the Lambda created to rotate the secret.

Default: a new security group is created

vpcoptionalIVpcvpcoptionalIVpcvpcoptionalIVpcVpcoptionalIVpcVpcoptionalIVpc #
The VPC where the Lambda rotation function will run.

Default: the Lambda is not deployed in a VPC

vpcSubnetsoptionalSubnetSelectionvpc_subnetsoptionalSubnetSelectionvpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelection #
The type of subnets in the VPC where the Lambda rotation function will run.

Default: the Vpc default strategy if not specified.