Class: AWSCDK::EC2::CfnRouteProps

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

Overview

Properties for defining a CfnRoute.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(route_table_id:, carrier_gateway_id: nil, core_network_arn: nil, destination_cidr_block: nil, destination_ipv6_cidr_block: nil, destination_prefix_list_id: nil, egress_only_internet_gateway_id: nil, gateway_id: nil, instance_id: nil, local_gateway_id: nil, nat_gateway_id: nil, network_interface_id: nil, odb_network_arn: nil, transit_gateway_id: nil, vpc_endpoint_id: nil, vpc_peering_connection_id: nil) ⇒ CfnRouteProps

Returns a new instance of CfnRouteProps.

Parameters:



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'ec2/cfn_route_props.rb', line 25

def initialize(route_table_id:, carrier_gateway_id: nil, core_network_arn: nil, destination_cidr_block: nil, destination_ipv6_cidr_block: nil, destination_prefix_list_id: nil, egress_only_internet_gateway_id: nil, gateway_id: nil, instance_id: nil, local_gateway_id: nil, nat_gateway_id: nil, network_interface_id: nil, odb_network_arn: nil, transit_gateway_id: nil, vpc_endpoint_id: nil, vpc_peering_connection_id: nil)
  @route_table_id = route_table_id
  Jsii::Type.check_type(@route_table_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVJvdXRlVGFibGVSZWYifV19fQ==")), "routeTableId")
  @carrier_gateway_id = carrier_gateway_id
  Jsii::Type.check_type(@carrier_gateway_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSUNhcnJpZXJHYXRld2F5UmVmIn1dfX0=")), "carrierGatewayId") unless @carrier_gateway_id.nil?
  @core_network_arn = core_network_arn
  Jsii::Type.check_type(@core_network_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "coreNetworkArn") unless @core_network_arn.nil?
  @destination_cidr_block = destination_cidr_block
  Jsii::Type.check_type(@destination_cidr_block, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationCidrBlock") unless @destination_cidr_block.nil?
  @destination_ipv6_cidr_block = destination_ipv6_cidr_block
  Jsii::Type.check_type(@destination_ipv6_cidr_block, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationIpv6CidrBlock") unless @destination_ipv6_cidr_block.nil?
  @destination_prefix_list_id = destination_prefix_list_id
  Jsii::Type.check_type(@destination_prefix_list_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationPrefixListId") unless @destination_prefix_list_id.nil?
  @egress_only_internet_gateway_id = egress_only_internet_gateway_id
  Jsii::Type.check_type(@egress_only_internet_gateway_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSUVncmVzc09ubHlJbnRlcm5ldEdhdGV3YXlSZWYifV19fQ==")), "egressOnlyInternetGatewayId") unless @egress_only_internet_gateway_id.nil?
  @gateway_id = gateway_id
  Jsii::Type.check_type(@gateway_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSUludGVybmV0R2F0ZXdheVJlZiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuaW50ZXJmYWNlcy5hd3NfZWMyLklWUE5HYXRld2F5UmVmIn1dfX0=")), "gatewayId") unless @gateway_id.nil?
  @instance_id = instance_id
  Jsii::Type.check_type(@instance_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSUluc3RhbmNlUmVmIn1dfX0=")), "instanceId") unless @instance_id.nil?
  @local_gateway_id = local_gateway_id
  Jsii::Type.check_type(@local_gateway_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "localGatewayId") unless @local_gateway_id.nil?
  @nat_gateway_id = nat_gateway_id
  Jsii::Type.check_type(@nat_gateway_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSU5hdEdhdGV3YXlSZWYifV19fQ==")), "natGatewayId") unless @nat_gateway_id.nil?
  @network_interface_id = network_interface_id
  Jsii::Type.check_type(@network_interface_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "networkInterfaceId") unless @network_interface_id.nil?
  @odb_network_arn = odb_network_arn
  Jsii::Type.check_type(@odb_network_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "odbNetworkArn") unless @odb_network_arn.nil?
  @transit_gateway_id = transit_gateway_id
  Jsii::Type.check_type(@transit_gateway_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVRyYW5zaXRHYXRld2F5UmVmIn1dfX0=")), "transitGatewayId") unless @transit_gateway_id.nil?
  @vpc_endpoint_id = vpc_endpoint_id
  Jsii::Type.check_type(@vpc_endpoint_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vpcEndpointId") unless @vpc_endpoint_id.nil?
  @vpc_peering_connection_id = vpc_peering_connection_id
  Jsii::Type.check_type(@vpc_peering_connection_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVZQQ1BlZXJpbmdDb25uZWN0aW9uUmVmIn1dfX0=")), "vpcPeeringConnectionId") unless @vpc_peering_connection_id.nil?
end

Instance Attribute Details

#carrier_gateway_idString, ... (readonly)

The ID of the carrier gateway.

You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.



71
72
73
# File 'ec2/cfn_route_props.rb', line 71

def carrier_gateway_id
  @carrier_gateway_id
end

#core_network_arnString? (readonly)

The Amazon Resource Name (ARN) of the core network.



76
77
78
# File 'ec2/cfn_route_props.rb', line 76

def core_network_arn
  @core_network_arn
end

#destination_cidr_blockString? (readonly)

The IPv4 CIDR address block used for the destination match.

Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .



83
84
85
# File 'ec2/cfn_route_props.rb', line 83

def destination_cidr_block
  @destination_cidr_block
end

#destination_ipv6_cidr_blockString? (readonly)

The IPv6 CIDR block used for the destination match.

Routing decisions are based on the most specific match.



90
91
92
# File 'ec2/cfn_route_props.rb', line 90

def destination_ipv6_cidr_block
  @destination_ipv6_cidr_block
end

#destination_prefix_list_idString? (readonly)

The ID of a prefix list used for the destination match.



95
96
97
# File 'ec2/cfn_route_props.rb', line 95

def destination_prefix_list_id
  @destination_prefix_list_id
end

#egress_only_internet_gateway_idString, ... (readonly)

[IPv6 traffic only] The ID of an egress-only internet gateway.



100
101
102
# File 'ec2/cfn_route_props.rb', line 100

def egress_only_internet_gateway_id
  @egress_only_internet_gateway_id
end

#gateway_idString, ... (readonly)

The ID of an internet gateway or virtual private gateway attached to your VPC.



105
106
107
# File 'ec2/cfn_route_props.rb', line 105

def gateway_id
  @gateway_id
end

#instance_idString, ... (readonly)

The ID of a NAT instance in your VPC.

The operation fails if you specify an instance ID unless exactly one network interface is attached.



112
113
114
# File 'ec2/cfn_route_props.rb', line 112

def instance_id
  @instance_id
end

#local_gateway_idString? (readonly)

The ID of the local gateway.



117
118
119
# File 'ec2/cfn_route_props.rb', line 117

def local_gateway_id
  @local_gateway_id
end

#nat_gateway_idString, ... (readonly)

[IPv4 traffic only] The ID of a NAT gateway.



122
123
124
# File 'ec2/cfn_route_props.rb', line 122

def nat_gateway_id
  @nat_gateway_id
end

#network_interface_idString? (readonly)

The ID of a network interface.



127
128
129
# File 'ec2/cfn_route_props.rb', line 127

def network_interface_id
  @network_interface_id
end

#odb_network_arnString? (readonly)

The Amazon Resource Name (ARN) of the ODB network.



132
133
134
# File 'ec2/cfn_route_props.rb', line 132

def odb_network_arn
  @odb_network_arn
end

#route_table_idString, AWSCDK::Interfaces::AWSEC2::IRouteTableRef (readonly)

The ID of the route table for the route.



64
65
66
# File 'ec2/cfn_route_props.rb', line 64

def route_table_id
  @route_table_id
end

#transit_gateway_idString, ... (readonly)

The ID of a transit gateway.



137
138
139
# File 'ec2/cfn_route_props.rb', line 137

def transit_gateway_id
  @transit_gateway_id
end

#vpc_endpoint_idString? (readonly)

The ID of a VPC endpoint.

Supported for Gateway Load Balancer endpoints only.



144
145
146
# File 'ec2/cfn_route_props.rb', line 144

def vpc_endpoint_id
  @vpc_endpoint_id
end

#vpc_peering_connection_idString, ... (readonly)

The ID of a VPC peering connection.



149
150
151
# File 'ec2/cfn_route_props.rb', line 149

def vpc_peering_connection_id
  @vpc_peering_connection_id
end

Class Method Details

.jsii_propertiesObject



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'ec2/cfn_route_props.rb', line 151

def self.jsii_properties
  {
    :route_table_id => "routeTableId",
    :carrier_gateway_id => "carrierGatewayId",
    :core_network_arn => "coreNetworkArn",
    :destination_cidr_block => "destinationCidrBlock",
    :destination_ipv6_cidr_block => "destinationIpv6CidrBlock",
    :destination_prefix_list_id => "destinationPrefixListId",
    :egress_only_internet_gateway_id => "egressOnlyInternetGatewayId",
    :gateway_id => "gatewayId",
    :instance_id => "instanceId",
    :local_gateway_id => "localGatewayId",
    :nat_gateway_id => "natGatewayId",
    :network_interface_id => "networkInterfaceId",
    :odb_network_arn => "odbNetworkArn",
    :transit_gateway_id => "transitGatewayId",
    :vpc_endpoint_id => "vpcEndpointId",
    :vpc_peering_connection_id => "vpcPeeringConnectionId",
  }
end

Instance Method Details

#to_jsiiObject



172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'ec2/cfn_route_props.rb', line 172

def to_jsii
  result = {}
  result.merge!({
    "routeTableId" => @route_table_id,
    "carrierGatewayId" => @carrier_gateway_id,
    "coreNetworkArn" => @core_network_arn,
    "destinationCidrBlock" => @destination_cidr_block,
    "destinationIpv6CidrBlock" => @destination_ipv6_cidr_block,
    "destinationPrefixListId" => @destination_prefix_list_id,
    "egressOnlyInternetGatewayId" => @egress_only_internet_gateway_id,
    "gatewayId" => @gateway_id,
    "instanceId" => @instance_id,
    "localGatewayId" => @local_gateway_id,
    "natGatewayId" => @nat_gateway_id,
    "networkInterfaceId" => @network_interface_id,
    "odbNetworkArn" => @odb_network_arn,
    "transitGatewayId" => @transit_gateway_id,
    "vpcEndpointId" => @vpc_endpoint_id,
    "vpcPeeringConnectionId" => @vpc_peering_connection_id,
  })
  result.compact
end