lib/ec2/right_ec2_vpc2.rb
# Creates a new route in a route table within a VPC. The route's target can be either a gateway attached to 
# the VPC or a NAT instance in the VPC.
# Options: :gateway_id, :instance_id
# 
#  ec2.create_route("rtb-be3006d7",  "0.0.0.1/32", :gateway_id => 'igw-6585c10c') #=> true
#
# P.S. http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateRoute.html
#
Creates a new route in a route table within a VPC. The route's target can be either a gateway attached to
the VPC or a NAT instance in the VPC.




Creates a new route in a route table within a VPC . The route ' s target can be either a gateway attached to the VPC or a NAT instance in the VPC .
def create_route(route_table_id, destination_cidr_block, options = {})
      request_hash = { 'RouteTableId'         => route_table_id,
                       'DestinationCidrBlock' => destination_cidr_block }
      request_hash['GatewayId']  = options[:gateway_id]  unless options[:gateway_id].right_blank?
      request_hash['InstanceId'] = options[:instance_id] unless options[:instance_id].right_blank?      
      link = generate_request("CreateRoute", request_hash)
      request_info(link, RightHttp2xxParser.new(:logger => @logger))
    rescue Exception
      on_exception
    end
def create_route ( route_table_id , destination_cidr_block , options = { } ) request_hash = { 'RouteTableId' => route_table_id , 'DestinationCidrBlock' => destination_cidr_block } request_hash [ 'GatewayId' ] = options [ :gateway_id ] unless options [ :gateway_id ] . right_blank? request_hash [ 'InstanceId' ] = options [ :instance_id ] unless options [ :instance_id ] . right_blank? link = generate_request ( "CreateRoute" , request_hash ) request_info ( link , RightHttp2xxParser . new ( :logger => @logger ) ) rescue Exception on_exception end
Creates a new route in a route table within a VPC.
Creates a new route in a route table within a VPC .
route_table_id
<not_specific>
destination_cidr_block
<not_specific>
options
<not_specific>