public static final class SecretRotationProps.Builder
extends java.lang.Object
SecretRotationProps
Constructor and Description |
---|
Builder() |
public SecretRotationProps.Builder application(SecretRotationApplication application)
SecretRotationProps.getApplication()
application
- The serverless application for the rotation. This parameter is required.this
public SecretRotationProps.Builder secret(ISecret secret)
SecretRotationProps.getSecret()
secret
- The secret to rotate. It must be a JSON string with the following format:. This parameter is required.
{ "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 an ISecret
returned by the attach()
method of Secret
.
this
public SecretRotationProps.Builder target(IConnectable target)
SecretRotationProps.getTarget()
target
- The target service or database. This parameter is required.this
public SecretRotationProps.Builder vpc(IVpc vpc)
SecretRotationProps.getVpc()
vpc
- The VPC where the Lambda rotation function will run. This parameter is required.this
public SecretRotationProps.Builder automaticallyAfter(Duration automaticallyAfter)
SecretRotationProps.getAutomaticallyAfter()
automaticallyAfter
- Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.this
public SecretRotationProps.Builder endpoint(IInterfaceVpcEndpoint endpoint)
SecretRotationProps.getEndpoint()
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.this
public SecretRotationProps.Builder excludeCharacters(java.lang.String excludeCharacters)
SecretRotationProps.getExcludeCharacters()
excludeCharacters
- Characters which should not appear in the generated password.this
public SecretRotationProps.Builder masterSecret(ISecret masterSecret)
SecretRotationProps.getMasterSecret()
masterSecret
- The master secret for a multi user rotation scheme.this
public SecretRotationProps.Builder securityGroup(ISecurityGroup securityGroup)
SecretRotationProps.getSecurityGroup()
securityGroup
- The security group for the Lambda rotation function.this
public SecretRotationProps.Builder vpcSubnets(SubnetSelection vpcSubnets)
SecretRotationProps.getVpcSubnets()
vpcSubnets
- The type of subnets in the VPC where the Lambda rotation function will run.this
public SecretRotationProps build()
SecretRotationProps
java.lang.NullPointerException
- if any required attribute was not provided