Class: AWSCDK::RDS::DatabaseProxyEndpointProps

Inherits:
DatabaseProxyEndpointOptions
  • Object
show all
Defined in:
rds/database_proxy_endpoint_props.rb

Overview

Construction properties for a DatabaseProxyEndpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vpc:, db_proxy_endpoint_name: nil, security_groups: nil, target_role: nil, vpc_subnets: nil, db_proxy:) ⇒ DatabaseProxyEndpointProps

Returns a new instance of DatabaseProxyEndpointProps.

Parameters:



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'rds/database_proxy_endpoint_props.rb', line 13

def initialize(vpc:, db_proxy_endpoint_name: nil, security_groups: nil, target_role: nil, vpc_subnets: nil, db_proxy:)
  @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?
  @db_proxy = db_proxy
  Jsii::Type.check_type(@db_proxy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19yZHMuSURCUHJveHlSZWYifQ==")), "dbProxy")
end

Instance Attribute Details

#db_proxyAWSCDK::Interfaces::AWSRDS::IDBProxyRef (readonly)

The DB proxy associated with the DB proxy endpoint.



55
56
57
# File 'rds/database_proxy_endpoint_props.rb', line 55

def db_proxy
  @db_proxy
end

#db_proxy_endpoint_nameString? (readonly)

Note:

Default: - a CDK generated name

The name of the DB proxy endpoint.

Returns:

  • (String, nil)


36
37
38
# File 'rds/database_proxy_endpoint_props.rb', line 36

def db_proxy_endpoint_name
  @db_proxy_endpoint_name
end

#security_groupsArray<AWSCDK::EC2::ISecurityGroup>? (readonly)

Note:

Default: - Default security group for the VPC

The VPC security groups to associate with the new proxy endpoint.

Returns:



41
42
43
# File 'rds/database_proxy_endpoint_props.rb', line 41

def security_groups
  @security_groups
end

#target_roleAWSCDK::RDS::ProxyEndpointTargetRole? (readonly)

Note:

Default: - ProxyEndpointTargetRole.READ_WRITE

A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations.



46
47
48
# File 'rds/database_proxy_endpoint_props.rb', line 46

def target_role
  @target_role
end

#vpcAWSCDK::EC2::IVPC (readonly)

The VPC of the DB proxy endpoint.

Returns:



31
32
33
# File 'rds/database_proxy_endpoint_props.rb', line 31

def vpc
  @vpc
end

#vpc_subnetsAWSCDK::EC2::SubnetSelection? (readonly)

Note:

Default: - the VPC default strategy if not specified.

The subnets of DB proxy endpoint.



51
52
53
# File 'rds/database_proxy_endpoint_props.rb', line 51

def vpc_subnets
  @vpc_subnets
end

Class Method Details

.jsii_propertiesObject



57
58
59
60
61
62
63
64
65
66
# File 'rds/database_proxy_endpoint_props.rb', line 57

def self.jsii_properties
  {
    :vpc => "vpc",
    :db_proxy_endpoint_name => "dbProxyEndpointName",
    :security_groups => "securityGroups",
    :target_role => "targetRole",
    :vpc_subnets => "vpcSubnets",
    :db_proxy => "dbProxy",
  }
end

Instance Method Details

#to_jsiiObject



68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'rds/database_proxy_endpoint_props.rb', line 68

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "vpc" => @vpc,
    "dbProxyEndpointName" => @db_proxy_endpoint_name,
    "securityGroups" => @security_groups,
    "targetRole" => @target_role,
    "vpcSubnets" => @vpc_subnets,
    "dbProxy" => @db_proxy,
  })
  result.compact
end