Class: AWSCDK::APIGatewayv2::VPCLinkProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gatewayv2/vpc_link_props.rb

Overview

Properties for a VpcLink.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vpc:, security_groups: nil, subnets: nil, vpc_link_name: nil) ⇒ VPCLinkProps

Returns a new instance of VPCLinkProps.

Parameters:



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_groupsArray<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

#subnetsAWSCDK::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

#vpcAWSCDK::EC2::IVPC (readonly)

The VPC in which the private resources reside.

Returns:



25
26
27
# File 'api_gatewayv2/vpc_link_props.rb', line 25

def vpc
  @vpc
end
Note:

Default: - automatically generated name

The name used to label and identify the VPC link.

Returns:

  • (String, nil)


40
41
42
# File 'api_gatewayv2/vpc_link_props.rb', line 40

def vpc_link_name
  @vpc_link_name
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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