Created
February 5, 2013 15:51
-
-
Save okochang/4715298 to your computer and use it in GitHub Desktop.
AWS SDK for Rubyでルーティングテーブルに設定したルートを削除する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require 'aws-sdk' | |
ACCESS_KEY = "set your access key id" | |
SECRET_KEY = "set your secret key" | |
REGION = 'ec2.ap-northeast-1.amazonaws.com' | |
ec2 = AWS::EC2.new( | |
:access_key_id => ACCESS_KEY, | |
:secret_access_key => SECRET_KEY, | |
:ec2_endpoint => REGION | |
).client | |
## ルートテーブル中のルーティングを削除する | |
ec2.delete_route(:route_table_id => "rtb-xxxxxxxx", :destination_cidr_block => "192.168.0.0/16") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment