Class CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty>
- Enclosing interface:
CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.excludeCharacters(String excludeCharacters) masterSecretArn(String masterSecretArn) masterSecretKmsKeyArn(String masterSecretKmsKeyArn) rotationLambdaName(String rotationLambdaName) rotationType(String rotationType) Sets the value ofCfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.getRuntime()superuserSecretArn(String superuserSecretArn) superuserSecretKmsKeyArn(String superuserSecretKmsKeyArn) vpcSecurityGroupIds(String vpcSecurityGroupIds) vpcSubnetIds(String vpcSubnetIds)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
excludeCharacters
@Stability(Stable) public CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.Builder excludeCharacters(String excludeCharacters) - Parameters:
excludeCharacters- A string of the characters that you don't want in the password.- Returns:
this
-
kmsKeyArn
@Stability(Stable) public CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.Builder kmsKeyArn(String kmsKeyArn) - Parameters:
kmsKeyArn- The ARN of the KMS key that Secrets Manager uses to encrypt the secret. If you don't specify this value, then Secrets Manager uses the keyaws/secretsmanager. Ifaws/secretsmanagerdoesn't yet exist, then Secrets Manager creates it for you automatically the first time it encrypts the secret value.- Returns:
this
-
masterSecretArn
@Stability(Stable) public CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.Builder masterSecretArn(String masterSecretArn) - Parameters:
masterSecretArn- The ARN of the secret that contains superuser credentials, if you use the Alternating users rotation strategy . CloudFormation grants the execution role for the Lambda rotation functionGetSecretValuepermission to the secret in this property. For more information, see Lambda rotation function execution role permissions for Secrets Manager . You must create the superuser secret before you can set this property.You must also include the superuser secret ARN as a key in the JSON of the rotating secret so that the Lambda rotation function can find it. CloudFormation does not hardcode secret ARNs in the Lambda rotation function, so you can use the function to rotate multiple secrets. For more information, see JSON structure of Secrets Manager secrets .
You can specify
MasterSecretArnorSuperuserSecretArnbut not both. They represent the same superuser secret.- Returns:
this
-
masterSecretKmsKeyArn
@Stability(Stable) public CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.Builder masterSecretKmsKeyArn(String masterSecretKmsKeyArn) Sets the value ofCfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.getMasterSecretKmsKeyArn()- Parameters:
masterSecretKmsKeyArn- The ARN of the KMS key that Secrets Manager used to encrypt the superuser secret, if you use the alternating users strategy and the superuser secret is encrypted with a customer managed key. You don't need to specify this property if the superuser secret is encrypted using the keyaws/secretsmanager. CloudFormation grants the execution role for the Lambda rotation functionDecrypt,DescribeKey, andGenerateDataKeypermission to the key in this property. For more information, see Lambda rotation function execution role permissions for Secrets Manager . You can specifyMasterSecretKmsKeyArnorSuperuserSecretKmsKeyArnbut not both. They represent the same superuser secret KMS key .- Returns:
this
-
rotationLambdaName
@Stability(Stable) public CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.Builder rotationLambdaName(String rotationLambdaName) Sets the value ofCfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.getRotationLambdaName()- Parameters:
rotationLambdaName- The name of the Lambda rotation function.- Returns:
this
-
rotationType
@Stability(Stable) public CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.Builder rotationType(String rotationType) - Parameters:
rotationType- The rotation template to base the rotation function on, one of the following:.Db2SingleUserto use the template SecretsManagerRDSDb2RotationSingleUser .Db2MultiUserto use the template SecretsManagerRDSDb2RotationMultiUser .MySQLSingleUserto use the template SecretsManagerRDSMySQLRotationSingleUser .MySQLMultiUserto use the template SecretsManagerRDSMySQLRotationMultiUser .PostgreSQLSingleUserto use the template SecretsManagerRDSPostgreSQLRotationSingleUserPostgreSQLMultiUserto use the template SecretsManagerRDSPostgreSQLRotationMultiUser .OracleSingleUserto use the template SecretsManagerRDSOracleRotationSingleUser .OracleMultiUserto use the template SecretsManagerRDSOracleRotationMultiUser .MariaDBSingleUserto use the template SecretsManagerRDSMariaDBRotationSingleUser .MariaDBMultiUserto use the template SecretsManagerRDSMariaDBRotationMultiUser .SQLServerSingleUserto use the template SecretsManagerRDSSQLServerRotationSingleUser .SQLServerMultiUserto use the template SecretsManagerRDSSQLServerRotationMultiUser .RedshiftSingleUserto use the template SecretsManagerRedshiftRotationSingleUsr .RedshiftMultiUserto use the template SecretsManagerRedshiftRotationMultiUser .MongoDBSingleUserto use the template SecretsManagerMongoDBRotationSingleUser .MongoDBMultiUserto use the template SecretsManagerMongoDBRotationMultiUser .
- Returns:
this
-
runtime
@Stability(Stable) public CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.Builder runtime(String runtime) Sets the value ofCfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.getRuntime()- Parameters:
runtime-
Over time, the updated rotation lambda artifacts vended by AWS may not be compatible with the code or shared object files defined in the rotation function deployment package.Do not set this value if you are using
Transform: AWS::SecretsManager-2024-09-16.Only define the
Runtimekey if:- You are using
Transform: AWS::SecretsManager-2020-07-23. - The code or shared object files defined in the rotation function deployment package are incompatible with Python 3.10.
The Python Runtime version for with the rotation function. By default, CloudFormation deploys Python 3.10 binaries for the rotation function. To use a different version of Python, you must do the following two steps:
- Deploy the matching version Python binaries with your rotation function.
- Set the version number in this field. For example, for Python 3.10, enter python3.10 .
If you only do one of the steps, your rotation function will be incompatible with the binaries. For more information, see Why did my Lambda rotation function fail with a "pg module not found" error .
- You are using
- Returns:
this
-
superuserSecretArn
@Stability(Stable) public CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.Builder superuserSecretArn(String superuserSecretArn) Sets the value ofCfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.getSuperuserSecretArn()- Parameters:
superuserSecretArn- The ARN of the secret that contains superuser credentials, if you use the Alternating users rotation strategy . CloudFormation grants the execution role for the Lambda rotation functionGetSecretValuepermission to the secret in this property. For more information, see Lambda rotation function execution role permissions for Secrets Manager . You must create the superuser secret before you can set this property.You must also include the superuser secret ARN as a key in the JSON of the rotating secret so that the Lambda rotation function can find it. CloudFormation does not hardcode secret ARNs in the Lambda rotation function, so you can use the function to rotate multiple secrets. For more information, see JSON structure of Secrets Manager secrets .
You can specify
MasterSecretArnorSuperuserSecretArnbut not both. They represent the same superuser secret.- Returns:
this
-
superuserSecretKmsKeyArn
@Stability(Stable) public CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.Builder superuserSecretKmsKeyArn(String superuserSecretKmsKeyArn) Sets the value ofCfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.getSuperuserSecretKmsKeyArn()- Parameters:
superuserSecretKmsKeyArn- The ARN of the KMS key that Secrets Manager used to encrypt the superuser secret, if you use the alternating users strategy and the superuser secret is encrypted with a customer managed key. You don't need to specify this property if the superuser secret is encrypted using the keyaws/secretsmanager. CloudFormation grants the execution role for the Lambda rotation functionDecrypt,DescribeKey, andGenerateDataKeypermission to the key in this property. For more information, see Lambda rotation function execution role permissions for Secrets Manager . You can specifyMasterSecretKmsKeyArnorSuperuserSecretKmsKeyArnbut not both. They represent the same superuser secret KMS key .- Returns:
this
-
vpcSecurityGroupIds
@Stability(Stable) public CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.Builder vpcSecurityGroupIds(String vpcSecurityGroupIds) Sets the value ofCfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.getVpcSecurityGroupIds()- Parameters:
vpcSecurityGroupIds- A comma-separated list of security group IDs applied to the target database. The template applies the same security groups as on the Lambda rotation function that is created as part of this stack.- Returns:
this
-
vpcSubnetIds
@Stability(Stable) public CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty.Builder vpcSubnetIds(String vpcSubnetIds) - Parameters:
vpcSubnetIds- A comma separated list of VPC subnet IDs of the target database network. The Lambda rotation function is in the same subnet group.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty>- Returns:
- a new instance of
CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty - Throws:
NullPointerException- if any required attribute was not provided
-