SingleUserHostedRotationOptions
- class aws_cdk.aws_secretsmanager.SingleUserHostedRotationOptions(*, function_name=None, security_groups=None, vpc=None, vpc_subnets=None)
Bases:
object
Single user hosted rotation options.
- Parameters:
function_name (
Optional
[str
]) – A name for the Lambda created to rotate the secret. Default: - a CloudFormation generated namesecurity_groups (
Optional
[Sequence
[ISecurityGroup
]]) – A list of security groups for the Lambda created to rotate the secret. Default: - a new security group is createdvpc (
Optional
[IVpc
]) – The VPC where the Lambda rotation function will run. Default: - the Lambda is not deployed in a VPCvpc_subnets (
Union
[SubnetSelection
,Dict
[str
,Any
],None
]) – The type of subnets in the VPC where the Lambda rotation function will run. Default: - the Vpc default strategy if not specified.
- ExampleMetadata:
infused
Example:
# my_vpc: ec2.Vpc # 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)
Attributes
- function_name
A name for the Lambda created to rotate the secret.
- Default:
a CloudFormation generated name
- security_groups
A list of security groups for the Lambda created to rotate the secret.
- Default:
a new security group is created
- vpc
The VPC where the Lambda rotation function will run.
- Default:
the Lambda is not deployed in a VPC
- vpc_subnets
The type of subnets in the VPC where the Lambda rotation function will run.
- Default:
the Vpc default strategy if not specified.