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:
- Amazon RDS master user credentials: AWS::RDS::DBCluster MasterUserSecret
- Amazon Redshift admin user credentials: AWS::Redshift::Cluster
Choose one of the following options for the rotation function:
- Create a new rotation function using
HostedRotationLambdabased on a Secrets Manager rotation function template . - Use an existing rotation function by specifying its ARN with
RotationLambdaARN.
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
DependsOnattribute to theRotationScheduleresource that uses aSecretTargetAttachment. 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnRotationSchedulePropsMixin.static interfaceThe metadata needed to successfully rotate a managed external secret.static interfaceCreates a new Lambda rotation function based on one of the Secrets Manager rotation function templates .static interfaceThe rotation schedule and window.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::SecretsManager::RotationSchedule.Create a mixin to apply properties toAWS::SecretsManager::RotationSchedule.protectedCfnRotationSchedulePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnRotationSchedulePropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnRotationScheduleMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 toAWS::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 toAWS::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. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-