Class: AWSCDK::RDS::DatabaseProxyEndpointOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::RDS::DatabaseProxyEndpointOptions
- Defined in:
- rds/database_proxy_endpoint_options.rb
Overview
Options for a new DatabaseProxyEndpoint.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#db_proxy_endpoint_name ⇒ String?
readonly
The name of the DB proxy endpoint.
-
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>?
readonly
The VPC security groups to associate with the new proxy endpoint.
-
#target_role ⇒ AWSCDK::RDS::ProxyEndpointTargetRole?
readonly
A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations.
-
#vpc ⇒ AWSCDK::EC2::IVPC
readonly
The VPC of the DB proxy endpoint.
-
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
The subnets of DB proxy endpoint.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(vpc:, db_proxy_endpoint_name: nil, security_groups: nil, target_role: nil, vpc_subnets: nil) ⇒ DatabaseProxyEndpointOptions
constructor
A new instance of DatabaseProxyEndpointOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(vpc:, db_proxy_endpoint_name: nil, security_groups: nil, target_role: nil, vpc_subnets: nil) ⇒ DatabaseProxyEndpointOptions
Returns a new instance of DatabaseProxyEndpointOptions.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'rds/database_proxy_endpoint_options.rb', line 12 def initialize(vpc:, db_proxy_endpoint_name: nil, security_groups: nil, target_role: nil, vpc_subnets: nil) @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") @db_proxy_endpoint_name = db_proxy_endpoint_name Jsii::Type.check_type(@db_proxy_endpoint_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dbProxyEndpointName") unless @db_proxy_endpoint_name.nil? @security_groups = security_groups Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil? @target_role = target_role Jsii::Type.check_type(@target_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLlByb3h5RW5kcG9pbnRUYXJnZXRSb2xlIn0=")), "targetRole") unless @target_role.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? end |
Instance Attribute Details
#db_proxy_endpoint_name ⇒ String? (readonly)
Default: - a CDK generated name
The name of the DB proxy endpoint.
33 34 35 |
# File 'rds/database_proxy_endpoint_options.rb', line 33 def db_proxy_endpoint_name @db_proxy_endpoint_name end |
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>? (readonly)
Default: - Default security group for the VPC
The VPC security groups to associate with the new proxy endpoint.
38 39 40 |
# File 'rds/database_proxy_endpoint_options.rb', line 38 def security_groups @security_groups end |
#target_role ⇒ AWSCDK::RDS::ProxyEndpointTargetRole? (readonly)
Default: - ProxyEndpointTargetRole.READ_WRITE
A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations.
43 44 45 |
# File 'rds/database_proxy_endpoint_options.rb', line 43 def target_role @target_role end |
#vpc ⇒ AWSCDK::EC2::IVPC (readonly)
The VPC of the DB proxy endpoint.
28 29 30 |
# File 'rds/database_proxy_endpoint_options.rb', line 28 def vpc @vpc end |
#vpc_subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Default: - the VPC default strategy if not specified.
The subnets of DB proxy endpoint.
48 49 50 |
# File 'rds/database_proxy_endpoint_options.rb', line 48 def vpc_subnets @vpc_subnets end |
Class Method Details
.jsii_properties ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'rds/database_proxy_endpoint_options.rb', line 50 def self.jsii_properties { :vpc => "vpc", :db_proxy_endpoint_name => "dbProxyEndpointName", :security_groups => "securityGroups", :target_role => "targetRole", :vpc_subnets => "vpcSubnets", } end |
Instance Method Details
#to_jsii ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 |
# File 'rds/database_proxy_endpoint_options.rb', line 60 def to_jsii result = {} result.merge!({ "vpc" => @vpc, "dbProxyEndpointName" => @db_proxy_endpoint_name, "securityGroups" => @security_groups, "targetRole" => @target_role, "vpcSubnets" => @vpc_subnets, }) result.compact end |