Class: AWSCDK::APIGatewayv2::VPCLinkProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2::VPCLinkProps
- Defined in:
- api_gatewayv2/vpc_link_props.rb
Overview
Properties for a VpcLink.
Instance Attribute Summary collapse
-
#security_groups ⇒ Array<AWSCDK::Interfaces::AWSEC2::ISecurityGroupRef>?
readonly
A list of security groups for the VPC link.
-
#subnets ⇒ AWSCDK::EC2::SubnetSelection?
readonly
A list of subnets for the VPC link.
-
#vpc ⇒ AWSCDK::EC2::IVPC
readonly
The VPC in which the private resources reside.
-
#vpc_link_name ⇒ String?
readonly
The name used to label and identify the VPC link.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(vpc:, security_groups: nil, subnets: nil, vpc_link_name: nil) ⇒ VPCLinkProps
constructor
A new instance of VPCLinkProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(vpc:, security_groups: nil, subnets: nil, vpc_link_name: nil) ⇒ VPCLinkProps
Returns a new instance of VPCLinkProps.
11 12 13 14 15 16 17 18 19 20 |
# File 'api_gatewayv2/vpc_link_props.rb', line 11 def initialize(vpc:, security_groups: nil, subnets: nil, vpc_link_name: nil) @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") @security_groups = security_groups Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2VjMi5JU2VjdXJpdHlHcm91cFJlZiJ9LCJraW5kIjoiYXJyYXkifX0=")), "securityGroups") unless @security_groups.nil? @subnets = subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**subnets.transform_keys(&:to_sym)) : subnets Jsii::Type.check_type(@subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "subnets") unless @subnets.nil? @vpc_link_name = vpc_link_name Jsii::Type.check_type(@vpc_link_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vpcLinkName") unless @vpc_link_name.nil? end |
Instance Attribute Details
#security_groups ⇒ Array<AWSCDK::Interfaces::AWSEC2::ISecurityGroupRef>? (readonly)
Note:
Default: - no security groups. Use addSecurityGroups to add security groups
A list of security groups for the VPC link.
30 31 32 |
# File 'api_gatewayv2/vpc_link_props.rb', line 30 def security_groups @security_groups end |
#subnets ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Note:
Default: - private subnets of the provided VPC. Use addSubnets to add more subnets
A list of subnets for the VPC link.
35 36 37 |
# File 'api_gatewayv2/vpc_link_props.rb', line 35 def subnets @subnets end |
#vpc ⇒ AWSCDK::EC2::IVPC (readonly)
The VPC in which the private resources reside.
25 26 27 |
# File 'api_gatewayv2/vpc_link_props.rb', line 25 def vpc @vpc end |
#vpc_link_name ⇒ String? (readonly)
Note:
Default: - automatically generated name
The name used to label and identify the VPC link.
40 41 42 |
# File 'api_gatewayv2/vpc_link_props.rb', line 40 def vpc_link_name @vpc_link_name end |
Class Method Details
.jsii_properties ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'api_gatewayv2/vpc_link_props.rb', line 42 def self.jsii_properties { :vpc => "vpc", :security_groups => "securityGroups", :subnets => "subnets", :vpc_link_name => "vpcLinkName", } end |
Instance Method Details
#to_jsii ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'api_gatewayv2/vpc_link_props.rb', line 51 def to_jsii result = {} result.merge!({ "vpc" => @vpc, "securityGroups" => @security_groups, "subnets" => @subnets, "vpcLinkName" => @vpc_link_name, }) result.compact end |