Interface RotationScheduleOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
RotationScheduleProps
All Known Implementing Classes:
RotationScheduleOptions.Jsii$Proxy, RotationScheduleProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:24.673Z") @Stability(Stable) public interface RotationScheduleOptions extends software.amazon.jsii.JsiiSerializable
Options to add a rotation schedule to a secret.

Example:

 import software.amazon.awscdk.services.lambda.*;
 Function fn;
 Secret secret = new Secret(this, "Secret");
 secret.addRotationSchedule("RotationSchedule", RotationScheduleOptions.builder()
         .rotationLambda(fn)
         .automaticallyAfter(Duration.days(15))
         .rotateImmediatelyOnUpdate(false)
         .build());
 
  • Method Details

    • getAutomaticallyAfter

      @Stability(Stable) @Nullable default Duration getAutomaticallyAfter()
      Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.

      The minimum value is 4 hours. The maximum value is 1000 days.

      A value of zero (Duration.days(0)) will not create RotationRules.

      Default: Duration.days(30)

    • getHostedRotation

      @Stability(Stable) @Nullable default HostedRotation getHostedRotation()
      Hosted rotation.

      Default: - either `rotationLambda` or `hostedRotation` must be specified

    • getRotateImmediatelyOnUpdate

      @Stability(Stable) @Nullable default Boolean getRotateImmediatelyOnUpdate()
      Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.

      Default: true

    • getRotationLambda

      @Stability(Stable) @Nullable default IFunction getRotationLambda()
      A Lambda function that can rotate the secret.

      Default: - either `rotationLambda` or `hostedRotation` must be specified

    • builder

      @Stability(Stable) static RotationScheduleOptions.Builder builder()
      Returns:
      a RotationScheduleOptions.Builder of RotationScheduleOptions