Class CfnRotationSchedulePropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.secretsmanager.CfnRotationSchedulePropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:20:05.305Z") @Stability(Stable) public class CfnRotationSchedulePropsMixin extends Mixin implements software.constructs.IMixin
Configure the rotation schedule and Lambda rotation function for a secret. For more information, see How rotation works .

For database credentials, refer to the following resources:

Choose one of the following options for the rotation function:

For database secrets defined in the same CloudFormation template as the database or service:

  • Use the AWS::SecretsManager::SecretTargetAttachment resource to populate the secret with connection details.
  • Add a DependsOn attribute to the RotationSchedule resource that uses a SecretTargetAttachment . This ensures the rotation is configured after the secret is populated with connection details. > You can define only one rotation schedule per secret.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.secretsmanager.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnRotationSchedulePropsMixin cfnRotationSchedulePropsMixin = CfnRotationSchedulePropsMixin.Builder.create(CfnRotationScheduleMixinProps.builder()
         .externalSecretRotationMetadata(List.of(ExternalSecretRotationMetadataItemProperty.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .externalSecretRotationRoleArn("externalSecretRotationRoleArn")
         .hostedRotationLambda(HostedRotationLambdaProperty.builder()
                 .excludeCharacters("excludeCharacters")
                 .kmsKeyArn("kmsKeyArn")
                 .masterSecretArn("masterSecretArn")
                 .masterSecretKmsKeyArn("masterSecretKmsKeyArn")
                 .rotationLambdaName("rotationLambdaName")
                 .rotationType("rotationType")
                 .runtime("runtime")
                 .superuserSecretArn("superuserSecretArn")
                 .superuserSecretKmsKeyArn("superuserSecretKmsKeyArn")
                 .vpcSecurityGroupIds("vpcSecurityGroupIds")
                 .vpcSubnetIds("vpcSubnetIds")
                 .build())
         .rotateImmediatelyOnUpdate(false)
         .rotationLambdaArn("rotationLambdaArn")
         .rotationRules(RotationRulesProperty.builder()
                 .automaticallyAfterDays(123)
                 .duration("duration")
                 .scheduleExpression("scheduleExpression")
                 .build())
         .secretId("secretId")
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnRotationSchedulePropsMixin

      protected CfnRotationSchedulePropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnRotationSchedulePropsMixin

      protected CfnRotationSchedulePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnRotationSchedulePropsMixin

      @Stability(Stable) public CfnRotationSchedulePropsMixin(@NotNull CfnRotationScheduleMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::SecretsManager::RotationSchedule.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnRotationSchedulePropsMixin

      @Stability(Stable) public CfnRotationSchedulePropsMixin(@NotNull CfnRotationScheduleMixinProps props)
      Create a mixin to apply properties to AWS::SecretsManager::RotationSchedule.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnRotationScheduleMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()