Class: AWSCDK::DocDB::RotationMultiUserOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DocDB::RotationMultiUserOptions
- Defined in:
- doc_db/rotation_multi_user_options.rb
Overview
Options to add the multi user rotation.
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.
-
#secret ⇒ AWSCDK::SecretsManager::ISecret
readonly
The secret to rotate.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(secret:, automatically_after: nil) ⇒ RotationMultiUserOptions
constructor
A new instance of RotationMultiUserOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(secret:, automatically_after: nil) ⇒ RotationMultiUserOptions
Returns a new instance of RotationMultiUserOptions.
9 10 11 12 13 14 |
# File 'doc_db/rotation_multi_user_options.rb', line 9 def initialize(secret:, automatically_after: nil) @secret = secret Jsii::Type.check_type(@secret, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VjcmV0c21hbmFnZXIuSVNlY3JldCJ9")), "secret") @automatically_after = automatically_after Jsii::Type.check_type(@automatically_after, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "automaticallyAfter") unless @automatically_after.nil? end |
Instance Attribute Details
#automatically_after ⇒ AWSCDK::Duration? (readonly)
Note:
Default: Duration.days(30)
Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.
40 41 42 |
# File 'doc_db/rotation_multi_user_options.rb', line 40 def automatically_after @automatically_after end |
#secret ⇒ AWSCDK::SecretsManager::ISecret (readonly)
The secret to rotate.
It must be a JSON string with the following format:
{
"engine": <required: must be set to 'mongo'>,
"host": <required: instance host name>,
"username": <required: username>,
"password": <required: password>,
"dbname": <optional: database name>,
"port": <optional: if not specified, default port 27017 will be used>,
"masterarn": <required: the arn of the master secret which will be used to create users/change passwords>
"ssl": <optional: if not specified, defaults to false. This must be true if being used for DocumentDB rotations
where the cluster has TLS enabled>
}
35 36 37 |
# File 'doc_db/rotation_multi_user_options.rb', line 35 def secret @secret end |
Class Method Details
.jsii_properties ⇒ Object
42 43 44 45 46 47 |
# File 'doc_db/rotation_multi_user_options.rb', line 42 def self.jsii_properties { :secret => "secret", :automatically_after => "automaticallyAfter", } end |
Instance Method Details
#to_jsii ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'doc_db/rotation_multi_user_options.rb', line 49 def to_jsii result = {} result.merge!({ "secret" => @secret, "automaticallyAfter" => @automatically_after, }) result.compact end |