Class SecretRotation.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SecretRotation>
- Enclosing class:
SecretRotation
SecretRotation
.-
Method Summary
Modifier and TypeMethodDescriptionapplication
(SecretRotationApplication application) The serverless application for the rotation.automaticallyAfter
(Duration automaticallyAfter) Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.build()
static SecretRotation.Builder
endpoint
(IInterfaceVpcEndpoint endpoint) The VPC interface endpoint to use for the Secrets Manager API.excludeCharacters
(String excludeCharacters) Characters which should not appear in the generated password.masterSecret
(ISecret masterSecret) The master secret for a multi user rotation scheme.rotateImmediatelyOnUpdate
(Boolean rotateImmediatelyOnUpdate) Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.The secret to rotate.securityGroup
(ISecurityGroup securityGroup) The security group for the Lambda rotation function.target
(IConnectable target) The target service or database.The VPC where the Lambda rotation function will run.vpcSubnets
(SubnetSelection vpcSubnets) The type of subnets in the VPC where the Lambda rotation function will run.
-
Method Details
-
create
@Stability(Stable) public static SecretRotation.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
SecretRotation.Builder
.
-
application
The serverless application for the rotation.- Parameters:
application
- The serverless application for the rotation. This parameter is required.- Returns:
this
-
secret
The secret to rotate. It must be a JSON string with the following format:.{ "engine": <required: database engine>, "host": <required: instance host name>, "username": <required: username>, "password": <required: password>, "dbname": <optional: database name>, "port": <optional: if not specified, default port will be used>, "masterarn": <required for multi user rotation: the arn of the master secret which will be used to create users/change passwords> }
This is typically the case for a secret referenced from an
AWS::SecretsManager::SecretTargetAttachment
or anISecret
returned by theattach()
method ofSecret
.- Parameters:
secret
- The secret to rotate. It must be a JSON string with the following format:. This parameter is required.- Returns:
this
- See Also:
-
target
The target service or database.- Parameters:
target
- The target service or database. This parameter is required.- Returns:
this
-
vpc
The VPC where the Lambda rotation function will run.- Parameters:
vpc
- The VPC where the Lambda rotation function will run. This parameter is required.- Returns:
this
-
automaticallyAfter
Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.Default: Duration.days(30)
- Parameters:
automaticallyAfter
- Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation. This parameter is required.- Returns:
this
-
endpoint
The VPC interface endpoint to use for the Secrets Manager API.If you enable private DNS hostnames for your VPC private endpoint (the default), you don't need to specify an endpoint. The standard Secrets Manager DNS hostname the Secrets Manager CLI and SDKs use by default (https://secretsmanager.
.amazonaws.com) automatically resolves to your VPC endpoint. Default: https://secretsmanager.
.amazonaws.com - Parameters:
endpoint
- The VPC interface endpoint to use for the Secrets Manager API. This parameter is required.- Returns:
this
-
excludeCharacters
Characters which should not appear in the generated password.Default: - no additional characters are explicitly excluded
- Parameters:
excludeCharacters
- Characters which should not appear in the generated password. This parameter is required.- Returns:
this
-
masterSecret
The master secret for a multi user rotation scheme.Default: - single user rotation scheme
- Parameters:
masterSecret
- The master secret for a multi user rotation scheme. This parameter is required.- Returns:
this
-
rotateImmediatelyOnUpdate
@Stability(Stable) public SecretRotation.Builder rotateImmediatelyOnUpdate(Boolean rotateImmediatelyOnUpdate) Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.Default: true
- Parameters:
rotateImmediatelyOnUpdate
- Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. This parameter is required.- Returns:
this
-
securityGroup
The security group for the Lambda rotation function.Default: - a new security group is created
- Parameters:
securityGroup
- The security group for the Lambda rotation function. This parameter is required.- Returns:
this
-
vpcSubnets
The type of subnets in the VPC where the Lambda rotation function will run.Default: - the Vpc default strategy if not specified.
- Parameters:
vpcSubnets
- The type of subnets in the VPC where the Lambda rotation function will run. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<SecretRotation>
- Returns:
- a newly built instance of
SecretRotation
.
-