Class CfnRotationSchedule.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRotationSchedule>
- Enclosing class:
CfnRotationSchedule
CfnRotationSchedule.-
Method Summary
Modifier and TypeMethodDescriptionbuild()static CfnRotationSchedule.BuilderexternalSecretRotationMetadata(List<? extends Object> externalSecretRotationMetadata) The list of metadata needed to successfully rotate a managed external secret.externalSecretRotationMetadata(IResolvable externalSecretRotationMetadata) The list of metadata needed to successfully rotate a managed external secret.externalSecretRotationRoleArn(String externalSecretRotationRoleArn) The ARN of the IAM role that is used by Secrets Manager to rotate a managed external secret.hostedRotationLambda(IResolvable hostedRotationLambda) Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates .hostedRotationLambda(CfnRotationSchedule.HostedRotationLambdaProperty hostedRotationLambda) Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates .rotateImmediatelyOnUpdate(Boolean rotateImmediatelyOnUpdate) Determines whether to rotate the secret immediately or wait until the next scheduled rotation window when the rotation schedule is updated.rotateImmediatelyOnUpdate(IResolvable rotateImmediatelyOnUpdate) Determines whether to rotate the secret immediately or wait until the next scheduled rotation window when the rotation schedule is updated.rotationLambdaArn(String rotationLambdaArn) The ARN of an existing Lambda rotation function.rotationRules(IResolvable rotationRules) A structure that defines the rotation configuration for this secret.rotationRules(CfnRotationSchedule.RotationRulesProperty rotationRules) A structure that defines the rotation configuration for this secret.The ARN or name of the secret to rotate.
-
Method Details
-
create
@Stability(Stable) public static CfnRotationSchedule.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnRotationSchedule.Builder.
-
secretId
The ARN or name of the secret to rotate. This is unique for each rotation schedule definition.To reference a secret also created in this template, use the Ref function with the secret's logical ID.
- Parameters:
secretId- The ARN or name of the secret to rotate. This is unique for each rotation schedule definition. This parameter is required.- Returns:
this- See Also:
-
externalSecretRotationMetadata
@Stability(Stable) public CfnRotationSchedule.Builder externalSecretRotationMetadata(IResolvable externalSecretRotationMetadata) The list of metadata needed to successfully rotate a managed external secret.- Parameters:
externalSecretRotationMetadata- The list of metadata needed to successfully rotate a managed external secret. This parameter is required.- Returns:
this- See Also:
-
externalSecretRotationMetadata
@Stability(Stable) public CfnRotationSchedule.Builder externalSecretRotationMetadata(List<? extends Object> externalSecretRotationMetadata) The list of metadata needed to successfully rotate a managed external secret.- Parameters:
externalSecretRotationMetadata- The list of metadata needed to successfully rotate a managed external secret. This parameter is required.- Returns:
this- See Also:
-
externalSecretRotationRoleArn
@Stability(Stable) public CfnRotationSchedule.Builder externalSecretRotationRoleArn(String externalSecretRotationRoleArn) The ARN of the IAM role that is used by Secrets Manager to rotate a managed external secret.- Parameters:
externalSecretRotationRoleArn- The ARN of the IAM role that is used by Secrets Manager to rotate a managed external secret. This parameter is required.- Returns:
this- See Also:
-
hostedRotationLambda
@Stability(Stable) public CfnRotationSchedule.Builder hostedRotationLambda(IResolvable hostedRotationLambda) Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates . To use a rotation function that already exists, specifyRotationLambdaARNinstead.You must specify
Transform: AWS::SecretsManager-2024-09-16at the beginning of the CloudFormation template. Transforms are macros hosted by AWS CloudFormation that help you create and manage complex infrastructure. TheTransform: AWS::SecretsManager-2024-09-16transform automatically extends the CloudFormation stack to include a nested stack (of typeAWS::CloudFormation::Stack), which then creates and updates on your behalf during subsequent stack operations, the appropriate rotation Lambda function for your database or service. For general information on transforms, see the AWS CloudFormation documentation.For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret .
For Amazon Redshift admin user credentials, see AWS::Redshift::Cluster .
- Parameters:
hostedRotationLambda- Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates . To use a rotation function that already exists, specifyRotationLambdaARNinstead. This parameter is required.- Returns:
this- See Also:
-
hostedRotationLambda
@Stability(Stable) public CfnRotationSchedule.Builder hostedRotationLambda(CfnRotationSchedule.HostedRotationLambdaProperty hostedRotationLambda) Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates . To use a rotation function that already exists, specifyRotationLambdaARNinstead.You must specify
Transform: AWS::SecretsManager-2024-09-16at the beginning of the CloudFormation template. Transforms are macros hosted by AWS CloudFormation that help you create and manage complex infrastructure. TheTransform: AWS::SecretsManager-2024-09-16transform automatically extends the CloudFormation stack to include a nested stack (of typeAWS::CloudFormation::Stack), which then creates and updates on your behalf during subsequent stack operations, the appropriate rotation Lambda function for your database or service. For general information on transforms, see the AWS CloudFormation documentation.For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret .
For Amazon Redshift admin user credentials, see AWS::Redshift::Cluster .
- Parameters:
hostedRotationLambda- Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates . To use a rotation function that already exists, specifyRotationLambdaARNinstead. This parameter is required.- Returns:
this- See Also:
-
rotateImmediatelyOnUpdate
@Stability(Stable) public CfnRotationSchedule.Builder rotateImmediatelyOnUpdate(Boolean rotateImmediatelyOnUpdate) Determines whether to rotate the secret immediately or wait until the next scheduled rotation window when the rotation schedule is updated.The rotation schedule is defined in
RotationRules.The default for
RotateImmediatelyOnUpdateistrue. If you don't specify this value, Secrets Manager rotates the secret immediately.If you set
RotateImmediatelyOnUpdatetofalse, Secrets Manager tests the rotation configuration by running thetestSecretstep of the Lambda rotation function. This test creates anAWSPENDINGversion of the secret and then removes it.When changing an existing rotation schedule and setting
RotateImmediatelyOnUpdatetofalse:- If using
AutomaticallyAfterDaysor aScheduleExpressionwithrate(), the previously scheduled rotation might still occur. - To prevent unintended rotations, use a
ScheduleExpressionwithcron()for granular control over rotation windows.
Rotation is an asynchronous process. For more information, see How rotation works .
- Parameters:
rotateImmediatelyOnUpdate- Determines whether to rotate the secret immediately or wait until the next scheduled rotation window when the rotation schedule is updated. This parameter is required.- Returns:
this- See Also:
- If using
-
rotateImmediatelyOnUpdate
@Stability(Stable) public CfnRotationSchedule.Builder rotateImmediatelyOnUpdate(IResolvable rotateImmediatelyOnUpdate) Determines whether to rotate the secret immediately or wait until the next scheduled rotation window when the rotation schedule is updated.The rotation schedule is defined in
RotationRules.The default for
RotateImmediatelyOnUpdateistrue. If you don't specify this value, Secrets Manager rotates the secret immediately.If you set
RotateImmediatelyOnUpdatetofalse, Secrets Manager tests the rotation configuration by running thetestSecretstep of the Lambda rotation function. This test creates anAWSPENDINGversion of the secret and then removes it.When changing an existing rotation schedule and setting
RotateImmediatelyOnUpdatetofalse:- If using
AutomaticallyAfterDaysor aScheduleExpressionwithrate(), the previously scheduled rotation might still occur. - To prevent unintended rotations, use a
ScheduleExpressionwithcron()for granular control over rotation windows.
Rotation is an asynchronous process. For more information, see How rotation works .
- Parameters:
rotateImmediatelyOnUpdate- Determines whether to rotate the secret immediately or wait until the next scheduled rotation window when the rotation schedule is updated. This parameter is required.- Returns:
this- See Also:
- If using
-
rotationLambdaArn
The ARN of an existing Lambda rotation function.To specify a rotation function that is also defined in this template, use the Ref function.
For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret .
For Amazon Redshift admin user credentials, see AWS::Redshift::Cluster .
To create a new rotation function based on one of the Secrets Manager rotation function templates , specify
HostedRotationLambdainstead.- Parameters:
rotationLambdaArn- The ARN of an existing Lambda rotation function. This parameter is required.- Returns:
this- See Also:
-
rotationRules
A structure that defines the rotation configuration for this secret.- Parameters:
rotationRules- A structure that defines the rotation configuration for this secret. This parameter is required.- Returns:
this- See Also:
-
rotationRules
@Stability(Stable) public CfnRotationSchedule.Builder rotationRules(CfnRotationSchedule.RotationRulesProperty rotationRules) A structure that defines the rotation configuration for this secret.- Parameters:
rotationRules- A structure that defines the rotation configuration for this secret. This parameter is required.- Returns:
this- See Also:
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnRotationSchedule>- Returns:
- a newly built instance of
CfnRotationSchedule.
-