Class: AWSCDK::RDS::RotationMultiUserOptions
- Inherits:
-
CommonRotationUserOptions
- Object
- CommonRotationUserOptions
- AWSCDK::RDS::RotationMultiUserOptions
- Defined in:
- rds/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.
-
#endpoint ⇒ AWSCDK::EC2::IInterfaceVPCEndpoint?
readonly
The VPC interface endpoint to use for the Secrets Manager API.
-
#exclude_characters ⇒ String?
readonly
Specifies characters to not include in generated passwords.
-
#rotate_immediately_on_update ⇒ Boolean?
readonly
Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.
-
#secret ⇒ AWSCDK::SecretsManager::ISecret
readonly
The secret to rotate.
-
#security_group ⇒ AWSCDK::EC2::ISecurityGroup?
readonly
The security group for the Lambda rotation function.
-
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
Where to place the rotation Lambda function.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(automatically_after: nil, endpoint: nil, exclude_characters: nil, rotate_immediately_on_update: nil, security_group: nil, vpc_subnets: nil, secret:) ⇒ RotationMultiUserOptions
constructor
A new instance of RotationMultiUserOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(automatically_after: nil, endpoint: nil, exclude_characters: nil, rotate_immediately_on_update: nil, security_group: nil, vpc_subnets: nil, secret:) ⇒ RotationMultiUserOptions
Returns a new instance of RotationMultiUserOptions.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'rds/rotation_multi_user_options.rb', line 14 def initialize(automatically_after: nil, endpoint: nil, exclude_characters: nil, rotate_immediately_on_update: nil, security_group: nil, vpc_subnets: nil, secret:) @automatically_after = automatically_after Jsii::Type.check_type(@automatically_after, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "automaticallyAfter") unless @automatically_after.nil? @endpoint = endpoint Jsii::Type.check_type(@endpoint, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklJbnRlcmZhY2VWcGNFbmRwb2ludCJ9")), "endpoint") unless @endpoint.nil? @exclude_characters = exclude_characters Jsii::Type.check_type(@exclude_characters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "excludeCharacters") unless @exclude_characters.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? @security_group = security_group Jsii::Type.check_type(@security_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklTZWN1cml0eUdyb3VwIn0=")), "securityGroup") unless @security_group.nil? @vpc_subnets = vpc_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**vpc_subnets.transform_keys(&:to_sym)) : vpc_subnets Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "vpcSubnets") unless @vpc_subnets.nil? @secret = secret Jsii::Type.check_type(@secret, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VjcmV0c21hbmFnZXIuSVNlY3JldCJ9")), "secret") end |
Instance Attribute Details
#automatically_after ⇒ AWSCDK::Duration? (readonly)
Default: - 30 days
Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.
35 36 37 |
# File 'rds/rotation_multi_user_options.rb', line 35 def automatically_after @automatically_after end |
#endpoint ⇒ AWSCDK::EC2::IInterfaceVPCEndpoint? (readonly)
Default: https://secretsmanager.
The VPC interface endpoint to use for the Secrets Manager API.
If you enable private DNS hostnames for your VPC private endpoint (the default), you don't
need to specify an endpoint. The standard Secrets Manager DNS hostname the Secrets Manager
CLI and SDKs use by default (https://secretsmanager.
45 46 47 |
# File 'rds/rotation_multi_user_options.rb', line 45 def endpoint @endpoint end |
#exclude_characters ⇒ String? (readonly)
Default: " %+~`#$&*()|[]{}:;<>?!'/@\"\"
Specifies characters to not include in generated passwords.
50 51 52 |
# File 'rds/rotation_multi_user_options.rb', line 50 def exclude_characters @exclude_characters end |
#rotate_immediately_on_update ⇒ Boolean? (readonly)
Default: true
Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window.
55 56 57 |
# File 'rds/rotation_multi_user_options.rb', line 55 def rotate_immediately_on_update @rotate_immediately_on_update end |
#secret ⇒ AWSCDK::SecretsManager::ISecret (readonly)
The secret to rotate.
It must be a JSON string with the following format:
{
"engine": <required: database engine>,
"host": <required: instance host name>,
"username": <required: username>,
"password": <required: password>,
"dbname": <optional: database name>,
"port": <optional: if not specified, default port will be used>,
"masterarn": <required: the arn of the master secret which will be used to create users/change passwords>
}
83 84 85 |
# File 'rds/rotation_multi_user_options.rb', line 83 def secret @secret end |
#security_group ⇒ AWSCDK::EC2::ISecurityGroup? (readonly)
Default: - a new security group is created
The security group for the Lambda rotation function.
60 61 62 |
# File 'rds/rotation_multi_user_options.rb', line 60 def security_group @security_group end |
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Default: - same placement as instance or cluster
Where to place the rotation Lambda function.
65 66 67 |
# File 'rds/rotation_multi_user_options.rb', line 65 def vpc_subnets @vpc_subnets end |
Class Method Details
.jsii_properties ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 |
# File 'rds/rotation_multi_user_options.rb', line 85 def self.jsii_properties { :automatically_after => "automaticallyAfter", :endpoint => "endpoint", :exclude_characters => "excludeCharacters", :rotate_immediately_on_update => "rotateImmediatelyOnUpdate", :security_group => "securityGroup", :vpc_subnets => "vpcSubnets", :secret => "secret", } end |
Instance Method Details
#to_jsii ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'rds/rotation_multi_user_options.rb', line 97 def to_jsii result = {} result.merge!(super) result.merge!({ "automaticallyAfter" => @automatically_after, "endpoint" => @endpoint, "excludeCharacters" => @exclude_characters, "rotateImmediatelyOnUpdate" => @rotate_immediately_on_update, "securityGroup" => @security_group, "vpcSubnets" => @vpc_subnets, "secret" => @secret, }) result.compact end |