Class RotationMultiUserOptions.Builder
java.lang.Object
software.amazon.awscdk.services.rds.RotationMultiUserOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<RotationMultiUserOptions>
- Enclosing interface:
RotationMultiUserOptions
@Stability(Stable)
public static final class RotationMultiUserOptions.Builder
extends Object
implements software.amazon.jsii.Builder<RotationMultiUserOptions>
A builder for
RotationMultiUserOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionautomaticallyAfter
(Duration automaticallyAfter) Sets the value ofCommonRotationUserOptions.getAutomaticallyAfter()
build()
Builds the configured instance.endpoint
(IInterfaceVpcEndpoint endpoint) Sets the value ofCommonRotationUserOptions.getEndpoint()
excludeCharacters
(String excludeCharacters) Sets the value ofCommonRotationUserOptions.getExcludeCharacters()
rotateImmediatelyOnUpdate
(Boolean rotateImmediatelyOnUpdate) Sets the value ofCommonRotationUserOptions.getRotateImmediatelyOnUpdate()
Sets the value ofRotationMultiUserOptions.getSecret()
securityGroup
(ISecurityGroup securityGroup) Sets the value ofCommonRotationUserOptions.getSecurityGroup()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofCommonRotationUserOptions.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
secret
Sets the value ofRotationMultiUserOptions.getSecret()
- Parameters:
secret
- The secret to rotate. This parameter is required. 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: the arn of the master secret which will be used to create users/change passwords> }
- Returns:
this
-
automaticallyAfter
@Stability(Stable) public RotationMultiUserOptions.Builder automaticallyAfter(Duration automaticallyAfter) Sets the value ofCommonRotationUserOptions.getAutomaticallyAfter()
- Parameters:
automaticallyAfter
- Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.- Returns:
this
-
endpoint
Sets the value ofCommonRotationUserOptions.getEndpoint()
- Parameters:
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. - Returns:
this
-
excludeCharacters
@Stability(Stable) public RotationMultiUserOptions.Builder excludeCharacters(String excludeCharacters) Sets the value ofCommonRotationUserOptions.getExcludeCharacters()
- Parameters:
excludeCharacters
- Specifies characters to not include in generated passwords.- Returns:
this
-
rotateImmediatelyOnUpdate
@Stability(Stable) public RotationMultiUserOptions.Builder rotateImmediatelyOnUpdate(Boolean rotateImmediatelyOnUpdate) Sets the value ofCommonRotationUserOptions.getRotateImmediatelyOnUpdate()
- Parameters:
rotateImmediatelyOnUpdate
- Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.- Returns:
this
-
securityGroup
@Stability(Stable) public RotationMultiUserOptions.Builder securityGroup(ISecurityGroup securityGroup) Sets the value ofCommonRotationUserOptions.getSecurityGroup()
- Parameters:
securityGroup
- The security group for the Lambda rotation function.- Returns:
this
-
vpcSubnets
Sets the value ofCommonRotationUserOptions.getVpcSubnets()
- Parameters:
vpcSubnets
- Where to place the rotation Lambda function.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<RotationMultiUserOptions>
- Returns:
- a new instance of
RotationMultiUserOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-