Class CfnRotationSchedule
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.secretsmanager.CfnRotationSchedule
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.97.0 (build 729de35)",
date="2024-04-18T17:54:24.640Z")
@Stability(Stable)
public class CfnRotationSchedule
extends CfnResource
implements IInspectable
Sets the rotation schedule and Lambda rotation function for a secret. For more information, see How rotation works .
For Amazon RDS master user credentials, see AWS::RDS::DBCluster MasterUserSecret .
For the rotation function, you have two options:
- You can create a new rotation function based on one of the Secrets Manager rotation function templates by using
HostedRotationLambda
. - You can choose an existing rotation function by using
RotationLambdaARN
.
For database secrets, if you define both the secret and the database or service in the AWS CloudFormation template, then you need to define the AWS::SecretsManager::SecretTargetAttachment resource to populate the secret with the connection details of the database or service before you attempt to configure rotation.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.secretsmanager.*; CfnRotationSchedule cfnRotationSchedule = CfnRotationSchedule.Builder.create(this, "MyCfnRotationSchedule") .secretId("secretId") // the properties below are optional .hostedRotationLambda(HostedRotationLambdaProperty.builder() .rotationType("rotationType") // the properties below are optional .excludeCharacters("excludeCharacters") .kmsKeyArn("kmsKeyArn") .masterSecretArn("masterSecretArn") .masterSecretKmsKeyArn("masterSecretKmsKeyArn") .rotationLambdaName("rotationLambdaName") .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()) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnRotationSchedule
.static interface
Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates .static interface
The rotation schedule and window.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnRotationSchedule
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnRotationSchedule
(software.amazon.jsii.JsiiObjectRef objRef) CfnRotationSchedule
(software.constructs.Construct scope, String id, CfnRotationScheduleProps props) -
Method Summary
Modifier and TypeMethodDescriptionCreates a new Lambda rotation function based on one of the Secrets Manager rotation function templates .Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.The ARN of an existing Lambda rotation function.A structure that defines the rotation configuration for this secret.The ARN or name of the secret to rotate.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates .void
Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates .void
Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.void
Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.void
setRotationLambdaArn
(String value) The ARN of an existing Lambda rotation function.void
setRotationRules
(IResolvable value) A structure that defines the rotation configuration for this secret.void
A structure that defines the rotation configuration for this secret.void
setSecretId
(String value) The ARN or name of the secret to rotate.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnRotationSchedule
protected CfnRotationSchedule(software.amazon.jsii.JsiiObjectRef objRef) -
CfnRotationSchedule
protected CfnRotationSchedule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnRotationSchedule
@Stability(Stable) public CfnRotationSchedule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnRotationScheduleProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getSecretId
The ARN or name of the secret to rotate. -
setSecretId
The ARN or name of the secret to rotate. -
getHostedRotationLambda
Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates . To use a rotation function that already exists, specifyRotationLambdaARN
instead. -
setHostedRotationLambda
Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates . To use a rotation function that already exists, specifyRotationLambdaARN
instead. -
setHostedRotationLambda
@Stability(Stable) public void setHostedRotationLambda(@Nullable CfnRotationSchedule.HostedRotationLambdaProperty value) Creates a new Lambda rotation function based on one of the Secrets Manager rotation function templates . To use a rotation function that already exists, specifyRotationLambdaARN
instead. -
getRotateImmediatelyOnUpdate
Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. -
setRotateImmediatelyOnUpdate
Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. -
setRotateImmediatelyOnUpdate
Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. -
getRotationLambdaArn
The ARN of an existing Lambda rotation function. -
setRotationLambdaArn
The ARN of an existing Lambda rotation function. -
getRotationRules
A structure that defines the rotation configuration for this secret. -
setRotationRules
A structure that defines the rotation configuration for this secret. -
setRotationRules
@Stability(Stable) public void setRotationRules(@Nullable CfnRotationSchedule.RotationRulesProperty value) A structure that defines the rotation configuration for this secret.
-