Interface CfnRotationSchedule.HostedRotationLambdaProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnRotationSchedule.HostedRotationLambdaProperty.Jsii$Proxy
- Enclosing class:
- CfnRotationSchedule
You must specify Transform: AWS::SecretsManager-2020-07-23 at the beginning of the CloudFormation template.
For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.secretsmanager.*;
HostedRotationLambdaProperty hostedRotationLambdaProperty = HostedRotationLambdaProperty.builder()
.rotationType("rotationType")
// the properties below are optional
.excludeCharacters("excludeCharacters")
.kmsKeyArn("kmsKeyArn")
.masterSecretArn("masterSecretArn")
.masterSecretKmsKeyArn("masterSecretKmsKeyArn")
.rotationLambdaName("rotationLambdaName")
.runtime("runtime")
.superuserSecretArn("superuserSecretArn")
.superuserSecretKmsKeyArn("superuserSecretKmsKeyArn")
.vpcSecurityGroupIds("vpcSecurityGroupIds")
.vpcSubnetIds("vpcSubnetIds")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnRotationSchedule.HostedRotationLambdaPropertystatic final classAn implementation forCfnRotationSchedule.HostedRotationLambdaProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringA string of the characters that you don't want in the password.default StringThe ARN of the KMS key that Secrets Manager uses to encrypt the secret.default StringThe ARN of the secret that contains superuser credentials, if you use the Alternating users rotation strategy .default StringThe 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.default StringThe name of the Lambda rotation function.The rotation template to base the rotation function on, one of the following:.default StringBy default, CloudFormation deploys Python 3.9 binaries for the rotation function.default StringThe ARN of the secret that contains superuser credentials, if you use the Alternating users rotation strategy .default StringThe 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.default StringA comma-separated list of security group IDs applied to the target database.default StringA comma separated list of VPC subnet IDs of the target database network.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getRotationType
The rotation template to base the rotation function on, one of the following:.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 .
-
getExcludeCharacters
A string of the characters that you don't want in the password. -
getKmsKeyArn
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 key
aws/secretsmanager. Ifaws/secretsmanagerdoesn't yet exist, then Secrets Manager creates it for you automatically the first time it encrypts the secret value. -
getMasterSecretArn
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. -
getMasterSecretKmsKeyArn
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 specify
MasterSecretKmsKeyArnorSuperuserSecretKmsKeyArnbut not both. They represent the same superuser secret KMS key . -
getRotationLambdaName
The name of the Lambda rotation function. -
getRuntime
By default, CloudFormation deploys Python 3.9 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.7, enter python3.7
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 .
-
getSuperuserSecretArn
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. -
getSuperuserSecretKmsKeyArn
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 specify
MasterSecretKmsKeyArnorSuperuserSecretKmsKeyArnbut not both. They represent the same superuser secret KMS key . -
getVpcSecurityGroupIds
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.
-
getVpcSubnetIds
A comma separated list of VPC subnet IDs of the target database network.The Lambda rotation function is in the same subnet group.
-
builder
-