Class: AWSCDK::SecretsManager::RotationScheduleOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SecretsManager::RotationScheduleOptions
- Defined in:
- secrets_manager/rotation_schedule_options.rb
Overview
Options to add a rotation schedule to a secret.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#automatically_after ⇒ AWSCDK::Duration?
readonly
Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.
-
#hosted_rotation ⇒ AWSCDK::SecretsManager::HostedRotation?
readonly
Hosted rotation.
-
#rotate_immediately_on_update ⇒ Boolean?
readonly
Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.
-
#rotation_lambda ⇒ AWSCDK::Lambda::IFunction?
readonly
A Lambda function that can rotate the secret.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(automatically_after: nil, hosted_rotation: nil, rotate_immediately_on_update: nil, rotation_lambda: nil) ⇒ RotationScheduleOptions
constructor
A new instance of RotationScheduleOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(automatically_after: nil, hosted_rotation: nil, rotate_immediately_on_update: nil, rotation_lambda: nil) ⇒ RotationScheduleOptions
Returns a new instance of RotationScheduleOptions.
11 12 13 14 15 16 17 18 19 20 |
# File 'secrets_manager/rotation_schedule_options.rb', line 11 def initialize(automatically_after: nil, hosted_rotation: nil, rotate_immediately_on_update: nil, rotation_lambda: nil) @automatically_after = automatically_after Jsii::Type.check_type(@automatically_after, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "automaticallyAfter") unless @automatically_after.nil? @hosted_rotation = hosted_rotation Jsii::Type.check_type(@hosted_rotation, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VjcmV0c21hbmFnZXIuSG9zdGVkUm90YXRpb24ifQ==")), "hostedRotation") unless @hosted_rotation.nil? @rotate_immediately_on_update = rotate_immediately_on_update Jsii::Type.check_type(@rotate_immediately_on_update, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "rotateImmediatelyOnUpdate") unless @rotate_immediately_on_update.nil? @rotation_lambda = rotation_lambda Jsii::Type.check_type(@rotation_lambda, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "rotationLambda") unless @rotation_lambda.nil? end |
Instance Attribute Details
#automatically_after ⇒ AWSCDK::Duration? (readonly)
Default: Duration.days(30)
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.
31 32 33 |
# File 'secrets_manager/rotation_schedule_options.rb', line 31 def automatically_after @automatically_after end |
#hosted_rotation ⇒ AWSCDK::SecretsManager::HostedRotation? (readonly)
Default: - either rotationLambda or hostedRotation must be specified
Hosted rotation.
36 37 38 |
# File 'secrets_manager/rotation_schedule_options.rb', line 36 def hosted_rotation @hosted_rotation end |
#rotate_immediately_on_update ⇒ Boolean? (readonly)
Default: true
Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.
41 42 43 |
# File 'secrets_manager/rotation_schedule_options.rb', line 41 def rotate_immediately_on_update @rotate_immediately_on_update end |
#rotation_lambda ⇒ AWSCDK::Lambda::IFunction? (readonly)
Default: - either rotationLambda or hostedRotation must be specified
A Lambda function that can rotate the secret.
46 47 48 |
# File 'secrets_manager/rotation_schedule_options.rb', line 46 def rotation_lambda @rotation_lambda end |
Class Method Details
.jsii_properties ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'secrets_manager/rotation_schedule_options.rb', line 48 def self.jsii_properties { :automatically_after => "automaticallyAfter", :hosted_rotation => "hostedRotation", :rotate_immediately_on_update => "rotateImmediatelyOnUpdate", :rotation_lambda => "rotationLambda", } end |
Instance Method Details
#to_jsii ⇒ Object
57 58 59 60 61 62 63 64 65 66 |
# File 'secrets_manager/rotation_schedule_options.rb', line 57 def to_jsii result = {} result.merge!({ "automaticallyAfter" => @automatically_after, "hostedRotation" => @hosted_rotation, "rotateImmediatelyOnUpdate" => @rotate_immediately_on_update, "rotationLambda" => @rotation_lambda, }) result.compact end |