Class: AWSCDK::EC2::CfnVPCGatewayAttachmentProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_vpc_gateway_attachment_props.rb

Overview

Properties for defining a CfnVPCGatewayAttachment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vpc_id:, internet_gateway_id: nil, vpn_gateway_id: nil) ⇒ CfnVPCGatewayAttachmentProps

Returns a new instance of CfnVPCGatewayAttachmentProps.

Parameters:



12
13
14
15
16
17
18
19
# File 'ec2/cfn_vpc_gateway_attachment_props.rb', line 12

def initialize(vpc_id:, internet_gateway_id: nil, vpn_gateway_id: nil)
  @vpc_id = vpc_id
  Jsii::Type.check_type(@vpc_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVZQQ1JlZiJ9XX19")), "vpcId")
  @internet_gateway_id = internet_gateway_id
  Jsii::Type.check_type(@internet_gateway_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSUludGVybmV0R2F0ZXdheVJlZiJ9XX19")), "internetGatewayId") unless @internet_gateway_id.nil?
  @vpn_gateway_id = vpn_gateway_id
  Jsii::Type.check_type(@vpn_gateway_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVZQTkdhdGV3YXlSZWYifV19fQ==")), "vpnGatewayId") unless @vpn_gateway_id.nil?
end

Instance Attribute Details

#internet_gateway_idString, ... (readonly)

The ID of the internet gateway.

You must specify either InternetGatewayId or VpnGatewayId , but not both.



32
33
34
# File 'ec2/cfn_vpc_gateway_attachment_props.rb', line 32

def internet_gateway_id
  @internet_gateway_id
end

#vpc_idString, AWSCDK::Interfaces::AWSEC2::IVPCRef (readonly)

The ID of the VPC.



25
26
27
# File 'ec2/cfn_vpc_gateway_attachment_props.rb', line 25

def vpc_id
  @vpc_id
end

#vpn_gateway_idString, ... (readonly)

The ID of the virtual private gateway.

You must specify either InternetGatewayId or VpnGatewayId , but not both.



39
40
41
# File 'ec2/cfn_vpc_gateway_attachment_props.rb', line 39

def vpn_gateway_id
  @vpn_gateway_id
end

Class Method Details

.jsii_propertiesObject



41
42
43
44
45
46
47
# File 'ec2/cfn_vpc_gateway_attachment_props.rb', line 41

def self.jsii_properties
  {
    :vpc_id => "vpcId",
    :internet_gateway_id => "internetGatewayId",
    :vpn_gateway_id => "vpnGatewayId",
  }
end

Instance Method Details

#to_jsiiObject



49
50
51
52
53
54
55
56
57
# File 'ec2/cfn_vpc_gateway_attachment_props.rb', line 49

def to_jsii
  result = {}
  result.merge!({
    "vpcId" => @vpc_id,
    "internetGatewayId" => @internet_gateway_id,
    "vpnGatewayId" => @vpn_gateway_id,
  })
  result.compact
end