Class CfnRotationScheduleMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRotationScheduleMixinProps>
- Enclosing interface:
CfnRotationScheduleMixinProps
CfnRotationScheduleMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.externalSecretRotationMetadata(List<? extends Object> externalSecretRotationMetadata) Sets the value ofCfnRotationScheduleMixinProps.getExternalSecretRotationMetadata()externalSecretRotationMetadata(IResolvable externalSecretRotationMetadata) Sets the value ofCfnRotationScheduleMixinProps.getExternalSecretRotationMetadata()externalSecretRotationRoleArn(String externalSecretRotationRoleArn) Sets the value ofCfnRotationScheduleMixinProps.getExternalSecretRotationRoleArn()hostedRotationLambda(CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty hostedRotationLambda) Sets the value ofCfnRotationScheduleMixinProps.getHostedRotationLambda()hostedRotationLambda(IResolvable hostedRotationLambda) Sets the value ofCfnRotationScheduleMixinProps.getHostedRotationLambda()rotateImmediatelyOnUpdate(Boolean rotateImmediatelyOnUpdate) Sets the value ofCfnRotationScheduleMixinProps.getRotateImmediatelyOnUpdate()rotateImmediatelyOnUpdate(IResolvable rotateImmediatelyOnUpdate) Sets the value ofCfnRotationScheduleMixinProps.getRotateImmediatelyOnUpdate()rotationLambdaArn(String rotationLambdaArn) Sets the value ofCfnRotationScheduleMixinProps.getRotationLambdaArn()rotationRules(CfnRotationSchedulePropsMixin.RotationRulesProperty rotationRules) Sets the value ofCfnRotationScheduleMixinProps.getRotationRules()rotationRules(IResolvable rotationRules) Sets the value ofCfnRotationScheduleMixinProps.getRotationRules()Sets the value ofCfnRotationScheduleMixinProps.getSecretId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
externalSecretRotationMetadata
@Stability(Stable) public CfnRotationScheduleMixinProps.Builder externalSecretRotationMetadata(IResolvable externalSecretRotationMetadata) Sets the value ofCfnRotationScheduleMixinProps.getExternalSecretRotationMetadata()- Parameters:
externalSecretRotationMetadata- The list of metadata needed to successfully rotate a managed external secret.- Returns:
this
-
externalSecretRotationMetadata
@Stability(Stable) public CfnRotationScheduleMixinProps.Builder externalSecretRotationMetadata(List<? extends Object> externalSecretRotationMetadata) Sets the value ofCfnRotationScheduleMixinProps.getExternalSecretRotationMetadata()- Parameters:
externalSecretRotationMetadata- The list of metadata needed to successfully rotate a managed external secret.- Returns:
this
-
externalSecretRotationRoleArn
@Stability(Stable) public CfnRotationScheduleMixinProps.Builder externalSecretRotationRoleArn(String externalSecretRotationRoleArn) Sets the value ofCfnRotationScheduleMixinProps.getExternalSecretRotationRoleArn()- Parameters:
externalSecretRotationRoleArn- The ARN of the IAM role that is used by Secrets Manager to rotate a managed external secret.- Returns:
this
-
hostedRotationLambda
@Stability(Stable) public CfnRotationScheduleMixinProps.Builder hostedRotationLambda(IResolvable hostedRotationLambda) Sets the value ofCfnRotationScheduleMixinProps.getHostedRotationLambda()- 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. You must specifyTransform: 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 .
- Returns:
this
-
hostedRotationLambda
@Stability(Stable) public CfnRotationScheduleMixinProps.Builder hostedRotationLambda(CfnRotationSchedulePropsMixin.HostedRotationLambdaProperty hostedRotationLambda) Sets the value ofCfnRotationScheduleMixinProps.getHostedRotationLambda()- 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. You must specifyTransform: 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 .
- Returns:
this
-
rotateImmediatelyOnUpdate
@Stability(Stable) public CfnRotationScheduleMixinProps.Builder rotateImmediatelyOnUpdate(Boolean rotateImmediatelyOnUpdate) Sets the value ofCfnRotationScheduleMixinProps.getRotateImmediatelyOnUpdate()- Parameters:
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 inRotationRules.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 .
- If using
- Returns:
this
-
rotateImmediatelyOnUpdate
@Stability(Stable) public CfnRotationScheduleMixinProps.Builder rotateImmediatelyOnUpdate(IResolvable rotateImmediatelyOnUpdate) Sets the value ofCfnRotationScheduleMixinProps.getRotateImmediatelyOnUpdate()- Parameters:
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 inRotationRules.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 .
- If using
- Returns:
this
-
rotationLambdaArn
@Stability(Stable) public CfnRotationScheduleMixinProps.Builder rotationLambdaArn(String rotationLambdaArn) Sets the value ofCfnRotationScheduleMixinProps.getRotationLambdaArn()- Parameters:
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.- Returns:
this
-
rotationRules
@Stability(Stable) public CfnRotationScheduleMixinProps.Builder rotationRules(IResolvable rotationRules) Sets the value ofCfnRotationScheduleMixinProps.getRotationRules()- Parameters:
rotationRules- A structure that defines the rotation configuration for this secret.- Returns:
this
-
rotationRules
@Stability(Stable) public CfnRotationScheduleMixinProps.Builder rotationRules(CfnRotationSchedulePropsMixin.RotationRulesProperty rotationRules) Sets the value ofCfnRotationScheduleMixinProps.getRotationRules()- Parameters:
rotationRules- A structure that defines the rotation configuration for this secret.- Returns:
this
-
secretId
Sets the value ofCfnRotationScheduleMixinProps.getSecretId()- Parameters:
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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnRotationScheduleMixinProps>- Returns:
- a new instance of
CfnRotationScheduleMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-