amazon-ec2 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/.yardopts +1 -0
- data/ChangeLog +3 -0
- data/LICENSE +1 -1
- data/README.rdoc +13 -1
- data/Rakefile +6 -16
- data/VERSION +1 -1
- data/amazon-ec2.gemspec +4 -4
- data/lib/AWS.rb +59 -11
- data/lib/AWS/EC2.rb +6 -40
- data/lib/AWS/EC2/availability_zones.rb +4 -26
- data/lib/AWS/EC2/console.rb +5 -28
- data/lib/AWS/EC2/elastic_ips.rb +7 -80
- data/lib/AWS/EC2/image_attributes.rb +10 -45
- data/lib/AWS/EC2/images.rb +5 -40
- data/lib/AWS/EC2/instances.rb +15 -56
- data/lib/AWS/EC2/keypairs.rb +3 -38
- data/lib/AWS/EC2/products.rb +3 -27
- data/lib/AWS/EC2/security_groups.rb +19 -70
- data/lib/AWS/EC2/snapshots.rb +4 -41
- data/lib/AWS/EC2/volumes.rb +15 -72
- data/lib/AWS/ELB.rb +5 -40
- data/lib/AWS/ELB/load_balancers.rb +27 -47
- data/lib/AWS/exceptions.rb +78 -122
- data/lib/AWS/responses.rb +6 -46
- data/test/test_helper.rb +4 -0
- metadata +6 -3
@@ -1,20 +1,7 @@
|
|
1
|
-
#--
|
2
|
-
# Amazon Web Services EC2 Query API Ruby library
|
3
|
-
#
|
4
|
-
# Ruby Gem Name:: amazon-ec2
|
5
|
-
# Author:: Glenn Rempe (mailto:glenn@rempe.us)
|
6
|
-
# Copyright:: Copyright (c) 2007-2008 Glenn Rempe
|
7
|
-
# License:: Distributes under the same terms as Ruby
|
8
|
-
# Home:: http://github.com/grempe/amazon-ec2/tree/master
|
9
|
-
#++
|
10
|
-
|
11
1
|
module AWS
|
12
2
|
module EC2
|
13
|
-
|
14
3
|
class Base < AWS::Base
|
15
4
|
|
16
|
-
#Amazon Developer Guide Docs:
|
17
|
-
#
|
18
5
|
# The ModifyImageAttribute operation modifies an attribute of an AMI. The following attributes may
|
19
6
|
# currently be modified:
|
20
7
|
#
|
@@ -25,17 +12,12 @@ module AWS
|
|
25
12
|
# for using the AMIs. productCodes is a write once attribute - once it has been set it can not be
|
26
13
|
# changed or removed. Currently only one product code is supported per AMI.
|
27
14
|
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#Optional Arguments:
|
35
|
-
#
|
36
|
-
# :user_id => Array (default : [])
|
37
|
-
# :group => Array (default : [])
|
38
|
-
# :product_code => Array (default : [])
|
15
|
+
# @option options [String] :image_id ("")
|
16
|
+
# @option options [String] :attribute ("launchPermission") An attribute to modify, "launchPermission" or "productCodes"
|
17
|
+
# @option options [String] :operation_type ("")
|
18
|
+
# @option options [optional, Array] :user_id ([])
|
19
|
+
# @option options [optional, Array] :group ([])
|
20
|
+
# @option options [optional, Array] :product_code ([])
|
39
21
|
#
|
40
22
|
def modify_image_attribute( options = {} )
|
41
23
|
|
@@ -87,18 +69,10 @@ module AWS
|
|
87
69
|
|
88
70
|
end
|
89
71
|
|
90
|
-
#Amazon Developer Guide Docs:
|
91
|
-
#
|
92
72
|
# The DescribeImageAttribute operation returns information about an attribute of an AMI.
|
93
73
|
#
|
94
|
-
#
|
95
|
-
#
|
96
|
-
# :image_id => String (default : "")
|
97
|
-
# :attribute => String ("launchPermission" or "productCodes", default : "launchPermission")
|
98
|
-
#
|
99
|
-
#Optional Arguments:
|
100
|
-
#
|
101
|
-
# none
|
74
|
+
# @option options [String] :image_id ("")
|
75
|
+
# @option options [String] :attribute ("launchPermission") An attribute to describe, "launchPermission" or "productCodes"
|
102
76
|
#
|
103
77
|
def describe_image_attribute( options = {} )
|
104
78
|
|
@@ -125,18 +99,10 @@ module AWS
|
|
125
99
|
end
|
126
100
|
|
127
101
|
|
128
|
-
#Amazon Developer Guide Docs:
|
129
|
-
#
|
130
102
|
# The ResetImageAttribute operation resets an attribute of an AMI to its default value.
|
131
103
|
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
# :image_id => String (default : "")
|
135
|
-
# :attribute => String (default : "launchPermission")
|
136
|
-
#
|
137
|
-
#Optional Arguments:
|
138
|
-
#
|
139
|
-
# none
|
104
|
+
# @option options [String] :image_id ("")
|
105
|
+
# @option options [String] :attribute ("launchPermission") An attribute to reset
|
140
106
|
#
|
141
107
|
def reset_image_attribute( options = {} )
|
142
108
|
|
@@ -163,6 +129,5 @@ module AWS
|
|
163
129
|
end
|
164
130
|
|
165
131
|
end
|
166
|
-
|
167
132
|
end
|
168
133
|
end
|
data/lib/AWS/EC2/images.rb
CHANGED
@@ -1,20 +1,8 @@
|
|
1
|
-
#--
|
2
|
-
# Amazon Web Services EC2 Query API Ruby library
|
3
|
-
#
|
4
|
-
# Ruby Gem Name:: amazon-ec2
|
5
|
-
# Author:: Glenn Rempe (mailto:glenn@rempe.us)
|
6
|
-
# Copyright:: Copyright (c) 2007-2008 Glenn Rempe
|
7
|
-
# License:: Distributes under the same terms as Ruby
|
8
|
-
# Home:: http://github.com/grempe/amazon-ec2/tree/master
|
9
|
-
#++
|
10
|
-
|
11
1
|
module AWS
|
12
2
|
module EC2
|
13
3
|
|
14
4
|
class Base < AWS::Base
|
15
5
|
|
16
|
-
#Amazon Developer Guide Docs:
|
17
|
-
#
|
18
6
|
# The RegisterImage operation registers an AMI with Amazon EC2. Images must be registered before
|
19
7
|
# they can be launched. Each AMI is associated with an unique ID which is provided by the EC2
|
20
8
|
# service via the Registerimage operation. As part of the registration process, Amazon EC2 will
|
@@ -24,13 +12,7 @@ module AWS
|
|
24
12
|
# If you do have to make changes and upload a new image deregister the previous image and register
|
25
13
|
# the new image.
|
26
14
|
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
# :image_location => String (default : "")
|
30
|
-
#
|
31
|
-
#Optional Arguments:
|
32
|
-
#
|
33
|
-
# none
|
15
|
+
# @option options [String] :image_location ("")
|
34
16
|
#
|
35
17
|
def register_image( options = {} )
|
36
18
|
|
@@ -44,8 +26,6 @@ module AWS
|
|
44
26
|
|
45
27
|
end
|
46
28
|
|
47
|
-
#Amazon Developer Guide Docs:
|
48
|
-
#
|
49
29
|
# The DescribeImages operation returns information about AMIs available for use by the user. This
|
50
30
|
# includes both public AMIs (those available for any user to launch) and private AMIs (those owned by
|
51
31
|
# the user making the request and those owned by other users that the user making the request has explicit
|
@@ -82,15 +62,9 @@ module AWS
|
|
82
62
|
# Deregistered images will be included in the returned results for an unspecified interval subsequent to
|
83
63
|
# deregistration.
|
84
64
|
#
|
85
|
-
#
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#
|
89
|
-
#Optional Arguments:
|
90
|
-
#
|
91
|
-
# :image_id => Array (default : [])
|
92
|
-
# :owner_id => Array (default : [])
|
93
|
-
# :executable_by => Array (default : [])
|
65
|
+
# @option options [Array] :image_id ([])
|
66
|
+
# @option options [Array] :owner_id ([])
|
67
|
+
# @option options [Array] :executable_by ([])
|
94
68
|
#
|
95
69
|
def describe_images( options = {} )
|
96
70
|
|
@@ -104,22 +78,13 @@ module AWS
|
|
104
78
|
|
105
79
|
end
|
106
80
|
|
107
|
-
#Amazon Developer Guide Docs:
|
108
|
-
#
|
109
81
|
# The DeregisterImage operation deregisters an AMI. Once deregistered, instances of the AMI may no
|
110
82
|
# longer be launched.
|
111
83
|
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
# :image_id => String (default : "")
|
115
|
-
#
|
116
|
-
#Optional Arguments:
|
117
|
-
#
|
118
|
-
# none
|
84
|
+
# @option options [String] :image_id ("")
|
119
85
|
#
|
120
86
|
def deregister_image( options = {} )
|
121
87
|
|
122
|
-
# defaults
|
123
88
|
options = { :image_id => "" }.merge(options)
|
124
89
|
|
125
90
|
raise ArgumentError, "No :image_id provided" if options[:image_id].nil? || options[:image_id].empty?
|
data/lib/AWS/EC2/instances.rb
CHANGED
@@ -1,20 +1,8 @@
|
|
1
|
-
#--
|
2
|
-
# Amazon Web Services EC2 Query API Ruby library
|
3
|
-
#
|
4
|
-
# Ruby Gem Name:: amazon-ec2
|
5
|
-
# Author:: Glenn Rempe (mailto:glenn@rempe.us)
|
6
|
-
# Copyright:: Copyright (c) 2007-2008 Glenn Rempe
|
7
|
-
# License:: Distributes under the same terms as Ruby
|
8
|
-
# Home:: http://github.com/grempe/amazon-ec2/tree/master
|
9
|
-
#++
|
10
|
-
|
11
1
|
module AWS
|
12
2
|
module EC2
|
13
3
|
|
14
4
|
class Base < AWS::Base
|
15
5
|
|
16
|
-
#Amazon Developer Guide Docs:
|
17
|
-
#
|
18
6
|
# The RunInstances operation launches a specified number of instances.
|
19
7
|
#
|
20
8
|
# Note : The Query version of RunInstances only allows instances of a single AMI to be launched in
|
@@ -52,22 +40,17 @@ module AWS
|
|
52
40
|
# If any of the AMIs have product codes attached for which the user has not subscribed,
|
53
41
|
# the RunInstances call will fail.
|
54
42
|
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
# :addressing_type => String (default : "public")
|
67
|
-
# :instance_type => String (default : "m1.small")
|
68
|
-
# :kernel_id => String (default : nil)
|
69
|
-
# :availability_zone => String (default : nil)
|
70
|
-
# :base64_encoded => Boolean (default : false)
|
43
|
+
# @option options [String] :image_id ("")
|
44
|
+
# @option options [Integer] :min_count (1)
|
45
|
+
# @option options [Integer] :max_count (1)
|
46
|
+
# @option options [optional, String] :key_name (nil)
|
47
|
+
# @option options [optional, Array] :group_id ([])
|
48
|
+
# @option options [optional, String] :user_data (nil)
|
49
|
+
# @option options [optional, String] :addressing_type ("public")
|
50
|
+
# @option options [optional, String] :instance_type ("m1.small")
|
51
|
+
# @option options [optional, String] :kernel_id (nil)
|
52
|
+
# @option options [optional, String] :availability_zone (nil)
|
53
|
+
# @option options [optional, Boolean] :base64_encoded (false)
|
71
54
|
#
|
72
55
|
def run_instances( options = {} )
|
73
56
|
|
@@ -113,7 +96,7 @@ module AWS
|
|
113
96
|
# If :user_data is passed in then URL escape and Base64 encode it
|
114
97
|
# as needed. Need for URL Escape + Base64 encoding is determined
|
115
98
|
# by :base64_encoded param.
|
116
|
-
def extract_user_data(options)
|
99
|
+
def extract_user_data( options = {} )
|
117
100
|
return unless options[:user_data]
|
118
101
|
if options[:user_data]
|
119
102
|
if options[:base64_encoded]
|
@@ -125,8 +108,6 @@ module AWS
|
|
125
108
|
end
|
126
109
|
|
127
110
|
|
128
|
-
#Amazon Developer Guide Docs:
|
129
|
-
#
|
130
111
|
# The DescribeInstances operation returns information about instances owned by the user
|
131
112
|
# making the request.
|
132
113
|
#
|
@@ -138,13 +119,7 @@ module AWS
|
|
138
119
|
# Recently terminated instances will be included in the returned results for a small interval subsequent to
|
139
120
|
# their termination. This interval is typically of the order of one hour
|
140
121
|
#
|
141
|
-
#
|
142
|
-
#
|
143
|
-
# none
|
144
|
-
#
|
145
|
-
#Optional Arguments:
|
146
|
-
#
|
147
|
-
# :instance_id => Array (default : [])
|
122
|
+
# @option options [Array] :instance_id ([])
|
148
123
|
#
|
149
124
|
def describe_instances( options = {} )
|
150
125
|
|
@@ -157,19 +132,11 @@ module AWS
|
|
157
132
|
end
|
158
133
|
|
159
134
|
|
160
|
-
#Amazon Developer Guide Docs:
|
161
|
-
#
|
162
135
|
# The RebootInstances operation requests a reboot of one or more instances. This operation is
|
163
136
|
# asynchronous; it only queues a request to reboot the specified instance(s). The operation will succeed
|
164
137
|
# provided the instances are valid and belong to the user. Terminated instances will be ignored.
|
165
138
|
#
|
166
|
-
#
|
167
|
-
#
|
168
|
-
# :instance_id => Array (default : [])
|
169
|
-
#
|
170
|
-
#Optional Arguments:
|
171
|
-
#
|
172
|
-
# none
|
139
|
+
# @option options [Array] :instance_id ([])
|
173
140
|
#
|
174
141
|
def reboot_instances( options = {} )
|
175
142
|
|
@@ -185,20 +152,12 @@ module AWS
|
|
185
152
|
end
|
186
153
|
|
187
154
|
|
188
|
-
#Amazon Developer Guide Docs:
|
189
|
-
#
|
190
155
|
# The TerminateInstances operation shuts down one or more instances. This operation is idempotent
|
191
156
|
# and terminating an instance that is in the process of shutting down (or already terminated) will succeed.
|
192
157
|
# Terminated instances remain visible for a short period of time (approximately one hour) after
|
193
158
|
# termination, after which their instance ID is invalidated.
|
194
159
|
#
|
195
|
-
#
|
196
|
-
#
|
197
|
-
# :instance_id => Array (default : [])
|
198
|
-
#
|
199
|
-
#Optional Arguments:
|
200
|
-
#
|
201
|
-
# none
|
160
|
+
# @option options [Array] :instance_id ([])
|
202
161
|
#
|
203
162
|
def terminate_instances( options = {} )
|
204
163
|
|
data/lib/AWS/EC2/keypairs.rb
CHANGED
@@ -1,35 +1,16 @@
|
|
1
|
-
#--
|
2
|
-
# Amazon Web Services EC2 Query API Ruby library
|
3
|
-
#
|
4
|
-
# Ruby Gem Name:: amazon-ec2
|
5
|
-
# Author:: Glenn Rempe (mailto:glenn@rempe.us)
|
6
|
-
# Copyright:: Copyright (c) 2007-2008 Glenn Rempe
|
7
|
-
# License:: Distributes under the same terms as Ruby
|
8
|
-
# Home:: http://github.com/grempe/amazon-ec2/tree/master
|
9
|
-
#++
|
10
|
-
|
11
1
|
module AWS
|
12
2
|
module EC2
|
13
3
|
|
14
4
|
class Base < AWS::Base
|
15
5
|
|
16
6
|
|
17
|
-
#Amazon Developer Guide Docs:
|
18
|
-
#
|
19
7
|
# The CreateKeyPair operation creates a new 2048 bit RSA keypair and returns a unique ID that can be
|
20
8
|
# used to reference this keypair when launching new instances.
|
21
9
|
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
# :key_name => String (default : "")
|
25
|
-
#
|
26
|
-
#Optional Arguments:
|
27
|
-
#
|
28
|
-
# none
|
10
|
+
# @option options [String] :key_name ("")
|
29
11
|
#
|
30
12
|
def create_keypair( options = {} )
|
31
13
|
|
32
|
-
# defaults
|
33
14
|
options = { :key_name => "" }.merge(options)
|
34
15
|
|
35
16
|
raise ArgumentError, "No :key_name provided" if options[:key_name].nil? || options[:key_name].empty?
|
@@ -41,19 +22,11 @@ module AWS
|
|
41
22
|
end
|
42
23
|
|
43
24
|
|
44
|
-
#Amazon Developer Guide Docs:
|
45
|
-
#
|
46
25
|
# The DescribeKeyPairs operation returns information about keypairs available for use by the user
|
47
26
|
# making the request. Selected keypairs may be specified or the list may be left empty if information for
|
48
27
|
# all registered keypairs is required.
|
49
28
|
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
# :key_name => Array (default : [])
|
53
|
-
#
|
54
|
-
#Optional Arguments:
|
55
|
-
#
|
56
|
-
# none
|
29
|
+
# @option options [Array] :key_name ([])
|
57
30
|
#
|
58
31
|
def describe_keypairs( options = {} )
|
59
32
|
|
@@ -66,17 +39,9 @@ module AWS
|
|
66
39
|
end
|
67
40
|
|
68
41
|
|
69
|
-
#Amazon Developer Guide Docs:
|
70
|
-
#
|
71
42
|
# The DeleteKeyPair operation deletes a keypair.
|
72
43
|
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
# :key_name => String (default : "")
|
76
|
-
#
|
77
|
-
#Optional Arguments:
|
78
|
-
#
|
79
|
-
# none
|
44
|
+
# @option options [String] :key_name ("")
|
80
45
|
#
|
81
46
|
def delete_keypair( options = {} )
|
82
47
|
|
data/lib/AWS/EC2/products.rb
CHANGED
@@ -1,45 +1,21 @@
|
|
1
|
-
#--
|
2
|
-
# Amazon Web Services EC2 Query API Ruby library
|
3
|
-
#
|
4
|
-
# Ruby Gem Name:: amazon-ec2
|
5
|
-
# Author:: Glenn Rempe (mailto:glenn@rempe.us)
|
6
|
-
# Copyright:: Copyright (c) 2007-2008 Glenn Rempe
|
7
|
-
# License:: Distributes under the same terms as Ruby
|
8
|
-
# Home:: http://github.com/grempe/amazon-ec2/tree/master
|
9
|
-
#++
|
10
|
-
|
11
1
|
module AWS
|
12
2
|
module EC2
|
13
|
-
|
14
3
|
class Base < AWS::Base
|
15
4
|
|
16
|
-
#Amazon Developer Guide Docs:
|
17
|
-
#
|
18
5
|
# The ConfirmProductInstance operation returns true if the given product code is attached to the instance
|
19
6
|
# with the given instance id. False is returned if the product code is not attached to the instance.
|
20
7
|
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
# :product_code => String (default : "")
|
24
|
-
# :instance_id => String (default : "")
|
25
|
-
#
|
26
|
-
#Optional Arguments:
|
27
|
-
#
|
28
|
-
# none
|
8
|
+
# @option options [String] :product_code ("")
|
9
|
+
# @option options [String] :instance_id ("")
|
29
10
|
#
|
30
11
|
def confirm_product_instance( options ={} )
|
31
|
-
|
32
12
|
options = {:product_code => "", :instance_id => ""}.merge(options)
|
33
|
-
|
34
13
|
raise ArgumentError, "No product code provided" if options[:product_code].nil? || options[:product_code].empty?
|
35
14
|
raise ArgumentError, "No instance ID provided" if options[:instance_id].nil? || options[:instance_id].empty?
|
36
|
-
|
37
15
|
params = { "ProductCode" => options[:product_code], "InstanceId" => options[:instance_id] }
|
38
|
-
|
39
16
|
return response_generator(:action => "ConfirmProductInstance", :params => params)
|
40
|
-
|
41
17
|
end
|
42
|
-
end
|
43
18
|
|
19
|
+
end
|
44
20
|
end
|
45
21
|
end
|
@@ -1,21 +1,7 @@
|
|
1
|
-
#--
|
2
|
-
# Amazon Web Services EC2 Query API Ruby library
|
3
|
-
#
|
4
|
-
# Ruby Gem Name:: amazon-ec2
|
5
|
-
# Author:: Glenn Rempe (mailto:glenn@rempe.us)
|
6
|
-
# Copyright:: Copyright (c) 2007-2008 Glenn Rempe
|
7
|
-
# License:: Distributes under the same terms as Ruby
|
8
|
-
# Home:: http://github.com/grempe/amazon-ec2/tree/master
|
9
|
-
#++
|
10
|
-
|
11
1
|
module AWS
|
12
2
|
module EC2
|
13
|
-
|
14
3
|
class Base < AWS::Base
|
15
4
|
|
16
|
-
|
17
|
-
#Amazon Developer Guide Docs:
|
18
|
-
#
|
19
5
|
# The CreateSecurityGroup operation creates a new security group. Every instance is launched
|
20
6
|
# in a security group. If none is specified as part of the launch request then instances
|
21
7
|
# are launched in the default security group. Instances within the same security group have
|
@@ -23,14 +9,8 @@ module AWS
|
|
23
9
|
# instances in a different security group. As the owner of instances you may grant or revoke specific
|
24
10
|
# permissions using the AuthorizeSecurityGroupIngress and RevokeSecurityGroupIngress operations.
|
25
11
|
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
# :group_name => String (default : "")
|
29
|
-
# :group_description => String (default : "")
|
30
|
-
#
|
31
|
-
#Optional Arguments:
|
32
|
-
#
|
33
|
-
# none
|
12
|
+
# @option options [String] :group_name ("")
|
13
|
+
# @option options [String] :group_description ("")
|
34
14
|
#
|
35
15
|
def create_security_group( options = {} )
|
36
16
|
|
@@ -51,22 +31,14 @@ module AWS
|
|
51
31
|
end
|
52
32
|
|
53
33
|
|
54
|
-
#Amazon Developer Guide Docs:
|
55
|
-
#
|
56
34
|
# The DescribeSecurityGroups operation returns information about security groups owned by the
|
57
35
|
# user making the request.
|
58
36
|
#
|
59
37
|
# An optional list of security group names may be provided to request information for those security
|
60
38
|
# groups only. If no security group names are provided, information of all security groups will be
|
61
|
-
# returned. If a group is specified that does not exist
|
62
|
-
#
|
63
|
-
#Required Arguments:
|
39
|
+
# returned. If a group is specified that does not exist an exception is returned.
|
64
40
|
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#Optional Arguments:
|
68
|
-
#
|
69
|
-
# :group_name => Array (default : [])
|
41
|
+
# @option options [optional, Array] :group_name ([])
|
70
42
|
#
|
71
43
|
def describe_security_groups( options = {} )
|
72
44
|
|
@@ -79,20 +51,12 @@ module AWS
|
|
79
51
|
end
|
80
52
|
|
81
53
|
|
82
|
-
#Amazon Developer Guide Docs:
|
83
|
-
#
|
84
54
|
# The DeleteSecurityGroup operation deletes a security group.
|
85
55
|
#
|
86
56
|
# If an attempt is made to delete a security group and any instances exist that are members of that group a
|
87
57
|
# fault is returned.
|
88
58
|
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
# :group_name => String (default : "")
|
92
|
-
#
|
93
|
-
#Optional Arguments:
|
94
|
-
#
|
95
|
-
# none
|
59
|
+
# @option options [String] :group_name ("")
|
96
60
|
#
|
97
61
|
def delete_security_group( options = {} )
|
98
62
|
|
@@ -107,8 +71,6 @@ module AWS
|
|
107
71
|
end
|
108
72
|
|
109
73
|
|
110
|
-
#Amazon Developer Guide Docs:
|
111
|
-
#
|
112
74
|
# The AuthorizeSecurityGroupIngress operation adds permissions to a security group.
|
113
75
|
#
|
114
76
|
# Permissions are specified in terms of the IP protocol (TCP, UDP or ICMP), the source of the request (by
|
@@ -125,18 +87,13 @@ module AWS
|
|
125
87
|
# GroupName, IpProtocol, FromPort, ToPort and CidrIp must be specified. Mixing these two types
|
126
88
|
# of parameters is not allowed.
|
127
89
|
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
#
|
135
|
-
# :from_port => Integer (default : nil) : Required when authorizing CIDR IP permission
|
136
|
-
# :to_port => Integer (default : nil) : Required when authorizing CIDR IP permission
|
137
|
-
# :cidr_ip => String (default : nil): Required when authorizing CIDR IP permission
|
138
|
-
# :source_security_group_name => String (default : nil) : Required when authorizing user group pair permissions
|
139
|
-
# :source_security_group_owner_id => String (default : nil) : Required when authorizing user group pair permissions
|
90
|
+
# @option options [String] :group_name ("")
|
91
|
+
# @option options [optional, String] :ip_protocol (nil) Required when authorizing CIDR IP permission
|
92
|
+
# @option options [optional, Integer] :from_port (nil) Required when authorizing CIDR IP permission
|
93
|
+
# @option options [optional, Integer] :to_port (nil) Required when authorizing CIDR IP permission
|
94
|
+
# @option options [optional, String] :cidr_ip (nil) Required when authorizing CIDR IP permission
|
95
|
+
# @option options [optional, String] :source_security_group_name (nil) Required when authorizing user group pair permissions
|
96
|
+
# @option options [optional, String] :source_security_group_owner_id (nil) Required when authorizing user group pair permissions
|
140
97
|
#
|
141
98
|
def authorize_security_group_ingress( options = {} )
|
142
99
|
|
@@ -167,8 +124,6 @@ module AWS
|
|
167
124
|
end
|
168
125
|
|
169
126
|
|
170
|
-
#Amazon Developer Guide Docs:
|
171
|
-
#
|
172
127
|
# The RevokeSecurityGroupIngress operation revokes existing permissions that were previously
|
173
128
|
# granted to a security group. The permissions to revoke must be specified using the same values
|
174
129
|
# originally used to grant the permission.
|
@@ -187,18 +142,13 @@ module AWS
|
|
187
142
|
# GroupName, IpProtocol, FromPort, ToPort and CidrIp must be specified. Mixing these two types
|
188
143
|
# of parameters is not allowed.
|
189
144
|
#
|
190
|
-
#
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
194
|
-
#
|
195
|
-
#
|
196
|
-
#
|
197
|
-
# :from_port => Integer (default : nil) : Required when revoking CIDR IP permission
|
198
|
-
# :to_port => Integer (default : nil) : Required when revoking CIDR IP permission
|
199
|
-
# :cidr_ip => String (default : nil): Required when revoking CIDR IP permission
|
200
|
-
# :source_security_group_name => String (default : nil) : Required when revoking user group pair permissions
|
201
|
-
# :source_security_group_owner_id => String (default : nil) : Required when revoking user group pair permissions
|
145
|
+
# @option options [String] :group_name ("")
|
146
|
+
# @option options [optional, String] :ip_protocol (nil) Required when revoking CIDR IP permission
|
147
|
+
# @option options [optional, Integer] :from_port (nil) Required when revoking CIDR IP permission
|
148
|
+
# @option options [optional, Integer] :to_port (nil) Required when revoking CIDR IP permission
|
149
|
+
# @option options [optional, String] :cidr_ip (nil) Required when revoking CIDR IP permission
|
150
|
+
# @option options [optional, String] :source_security_group_name (nil) Required when revoking user group pair permissions
|
151
|
+
# @option options [optional, String] :source_security_group_owner_id (nil) Required when revoking user group pair permissions
|
202
152
|
#
|
203
153
|
def revoke_security_group_ingress( options = {} )
|
204
154
|
|
@@ -229,6 +179,5 @@ module AWS
|
|
229
179
|
end
|
230
180
|
|
231
181
|
end
|
232
|
-
|
233
182
|
end
|
234
183
|
end
|