Class: Aws::EC2::Route
- Inherits:
-
Object
- Object
- Aws::EC2::Route
- Extended by:
- Deprecations
- Defined in:
- lib/aws-sdk-ec2/route.rb
Defined Under Namespace
Classes: Collection
Read-Only Attributes collapse
- #destination_cidr_block ⇒ String
-
#destination_ipv_6_cidr_block ⇒ String
The IPv6 CIDR block used for the destination match.
-
#destination_prefix_list_id ⇒ String
The prefix of the AWS service.
-
#egress_only_internet_gateway_id ⇒ String
The ID of the egress-only Internet gateway.
-
#gateway_id ⇒ String
The ID of a gateway attached to your VPC.
-
#instance_id ⇒ String
The ID of a NAT instance in your VPC.
-
#instance_owner_id ⇒ String
The AWS account ID of the owner of the instance.
-
#nat_gateway_id ⇒ String
The ID of a NAT gateway.
-
#network_interface_id ⇒ String
The ID of the network interface.
-
#origin ⇒ String
Describes how the route was created.
- #route_table_id ⇒ String
-
#state ⇒ String
The state of the route.
-
#vpc_peering_connection_id ⇒ String
The ID of the VPC peering connection.
Actions collapse
Associations collapse
- #identifiers ⇒ Object deprecated private Deprecated.
- #route_table ⇒ RouteTable
Instance Method Summary collapse
- #client ⇒ Client
-
#data ⇒ Types::Route
Returns the data for this Route.
-
#data_loaded? ⇒ Boolean
Returns ‘true` if this resource is loaded.
-
#initialize(*args) ⇒ Route
constructor
A new instance of Route.
- #load ⇒ Object (also: #reload) private
Constructor Details
#initialize(route_table_id, destination_cidr_block, options = {}) ⇒ Route #initialize(options = {}) ⇒ Route
Returns a new instance of Route.
21 22 23 24 25 26 27 |
# File 'lib/aws-sdk-ec2/route.rb', line 21 def initialize(*args) = Hash === args.last ? args.pop.dup : {} @route_table_id = extract_route_table_id(args, ) @destination_cidr_block = extract_destination_cidr_block(args, ) @data = .delete(:data) @client = .delete(:client) || Client.new() end |
Instance Method Details
#data ⇒ Types::Route
Returns the data for this Aws::EC2::Route.
136 137 138 139 |
# File 'lib/aws-sdk-ec2/route.rb', line 136 def data load unless @data @data end |
#data_loaded? ⇒ Boolean
144 145 146 |
# File 'lib/aws-sdk-ec2/route.rb', line 144 def data_loaded? !!@data end |
#delete(options = {}) ⇒ EmptyStructure
166 167 168 169 170 171 172 173 |
# File 'lib/aws-sdk-ec2/route.rb', line 166 def delete( = {}) = .merge( route_table_id: @route_table_id, destination_cidr_block: @destination_cidr_block ) resp = @client.delete_route() resp.data end |
#destination_cidr_block ⇒ String
37 38 39 |
# File 'lib/aws-sdk-ec2/route.rb', line 37 def destination_cidr_block @destination_cidr_block end |
#destination_ipv_6_cidr_block ⇒ String
The IPv6 CIDR block used for the destination match.
43 44 45 |
# File 'lib/aws-sdk-ec2/route.rb', line 43 def destination_ipv_6_cidr_block data.destination_ipv_6_cidr_block end |
#destination_prefix_list_id ⇒ String
The prefix of the AWS service.
49 50 51 |
# File 'lib/aws-sdk-ec2/route.rb', line 49 def destination_prefix_list_id data.destination_prefix_list_id end |
#egress_only_internet_gateway_id ⇒ String
The ID of the egress-only Internet gateway.
55 56 57 |
# File 'lib/aws-sdk-ec2/route.rb', line 55 def egress_only_internet_gateway_id data.egress_only_internet_gateway_id end |
#gateway_id ⇒ String
The ID of a gateway attached to your VPC.
61 62 63 |
# File 'lib/aws-sdk-ec2/route.rb', line 61 def gateway_id data.gateway_id end |
#identifiers ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
230 231 232 233 234 235 |
# File 'lib/aws-sdk-ec2/route.rb', line 230 def identifiers { route_table_id: @route_table_id, destination_cidr_block: @destination_cidr_block } end |
#instance_id ⇒ String
The ID of a NAT instance in your VPC.
67 68 69 |
# File 'lib/aws-sdk-ec2/route.rb', line 67 def instance_id data.instance_id end |
#instance_owner_id ⇒ String
The AWS account ID of the owner of the instance.
73 74 75 |
# File 'lib/aws-sdk-ec2/route.rb', line 73 def instance_owner_id data.instance_owner_id end |
#load ⇒ Object Also known as: reload
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
127 128 129 130 |
# File 'lib/aws-sdk-ec2/route.rb', line 127 def load msg = "#load is not implemented, data only available via enumeration" raise NotImplementedError, msg end |
#nat_gateway_id ⇒ String
The ID of a NAT gateway.
79 80 81 |
# File 'lib/aws-sdk-ec2/route.rb', line 79 def nat_gateway_id data.nat_gateway_id end |
#network_interface_id ⇒ String
The ID of the network interface.
85 86 87 |
# File 'lib/aws-sdk-ec2/route.rb', line 85 def network_interface_id data.network_interface_id end |
#origin ⇒ String
Describes how the route was created.
-
‘CreateRouteTable` - The route was automatically created when the route table was created.
-
‘CreateRoute` - The route was manually added to the route table.
-
‘EnableVgwRoutePropagation` - The route was propagated by route propagation.
99 100 101 |
# File 'lib/aws-sdk-ec2/route.rb', line 99 def origin data.origin end |
#replace(options = {}) ⇒ EmptyStructure
209 210 211 212 213 214 215 216 |
# File 'lib/aws-sdk-ec2/route.rb', line 209 def replace( = {}) = .merge( route_table_id: @route_table_id, destination_cidr_block: @destination_cidr_block ) resp = @client.replace_route() resp.data end |
#route_table ⇒ RouteTable
221 222 223 224 225 226 |
# File 'lib/aws-sdk-ec2/route.rb', line 221 def route_table RouteTable.new( id: @route_table_id, client: @client ) end |
#route_table_id ⇒ String
32 33 34 |
# File 'lib/aws-sdk-ec2/route.rb', line 32 def route_table_id @route_table_id end |
#state ⇒ String
The state of the route. The ‘blackhole` state indicates that the route’s target isn’t available (for example, the specified gateway isn’t attached to the VPC, or the specified NAT instance has been terminated).
108 109 110 |
# File 'lib/aws-sdk-ec2/route.rb', line 108 def state data.state end |
#vpc_peering_connection_id ⇒ String
The ID of the VPC peering connection.
114 115 116 |
# File 'lib/aws-sdk-ec2/route.rb', line 114 def vpc_peering_connection_id data.vpc_peering_connection_id end |