Class CfnRotationSchedule.Builder

java.lang.Object
software.amazon.awscdk.services.secretsmanager.CfnRotationSchedule.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRotationSchedule>
Enclosing class:
CfnRotationSchedule

@Stability(Stable) public static final class CfnRotationSchedule.Builder extends Object implements software.amazon.jsii.Builder<CfnRotationSchedule>
A fluent builder for CfnRotationSchedule.
  • Method Details

    • create

      @Stability(Stable) public static CfnRotationSchedule.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnRotationSchedule.Builder.
    • secretId

      @Stability(Stable) public CfnRotationSchedule.Builder secretId(String secretId)
      The ARN or name of the secret to rotate.

      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 parameter is required.
      Returns:
      this
    • 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, specify RotationLambdaARN instead.

      For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret .

      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, specify RotationLambdaARN instead. This parameter is required.
      Returns:
      this
    • 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, specify RotationLambdaARN instead.

      For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret .

      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, specify RotationLambdaARN instead. This parameter is required.
      Returns:
      this
    • rotateImmediatelyOnUpdate

      @Stability(Stable) public CfnRotationSchedule.Builder rotateImmediatelyOnUpdate(Boolean rotateImmediatelyOnUpdate)
      Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.

      The rotation schedule is defined in RotationRules .

      If you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it.

      If you don't specify this value, then by default, Secrets Manager rotates the secret immediately.

      Rotation is an asynchronous process. For more information, see How rotation works .

      Parameters:
      rotateImmediatelyOnUpdate - Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. This parameter is required.
      Returns:
      this
    • rotateImmediatelyOnUpdate

      @Stability(Stable) public CfnRotationSchedule.Builder rotateImmediatelyOnUpdate(IResolvable rotateImmediatelyOnUpdate)
      Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.

      The rotation schedule is defined in RotationRules .

      If you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the testSecret step of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it.

      If you don't specify this value, then by default, Secrets Manager rotates the secret immediately.

      Rotation is an asynchronous process. For more information, see How rotation works .

      Parameters:
      rotateImmediatelyOnUpdate - Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. This parameter is required.
      Returns:
      this
    • rotationLambdaArn

      @Stability(Stable) public CfnRotationSchedule.Builder rotationLambdaArn(String 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 .

      To create a new rotation function based on one of the Secrets Manager rotation function templates , specify HostedRotationLambda instead.

      Parameters:
      rotationLambdaArn - The ARN of an existing Lambda rotation function. This parameter is required.
      Returns:
      this
    • rotationRules

      @Stability(Stable) public CfnRotationSchedule.Builder rotationRules(IResolvable 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
    • 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
    • build

      @Stability(Stable) public CfnRotationSchedule build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnRotationSchedule>
      Returns:
      a newly built instance of CfnRotationSchedule.