@return [String] #destination_cidr_block
@return [String] #destination_cidr_block
@return [Instance,nil]
@return [InternetGateway,nil]
@return [NetworkInterface,nil]
@return [RouteTable]
@return [Symbol] Returns the state (:active or :blackhole).
@return [Gateway,Instance,NetworkInterface] Returns the target
of this route table. It will be a gateway id, instance or a network interface.
# File lib/aws/ec2/route_table/route.rb, line 29 def initialize route_table, details @route_table = route_table @destination_cidr_block = details.destination_cidr_block if details.respond_to?(:gateway_id) @internet_gateway = InternetGateway.new( details.gateway_id, :config => route_table.config) end if details.respond_to?(:instance_id) @instance = Instance.new(details.instance_id, :vpc_id => route_table.vpc_id, :owner_id => details.instance_owner_id, :config => route_table.config) end if details.respond_to?(:network_interface_id) @network_interface = NetworkInterface.new( details.network_interface_id, :vpc_id => route_table.vpc_id, :config => route_table.config) end @target = (internet_gateway || instance || network_interface) @state = details.state.to_sym end
Deletes this route. @return [nil]
# File lib/aws/ec2/route_table/route.rb, line 106 def delete route_table.delete_route(destination_cidr_block) end
@param [Hash] options
@option options [Gateway,String] :gateway A gateway (object or
string id) to attach the route to.
@option options [Instance,String] :instance An instance (object
or string id) to attach the route to.
@option options [NetworkInterface,String] :#network_interface
A network interface (object or string id) to attach the route to.
@return [nil]
# File lib/aws/ec2/route_table/route.rb, line 100 def replace options = {} route_table.replace_route(destination_cidr_block, options) end