aws-sdk-ec2 1.0.0.rc2 → 1.0.0.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/aws-sdk-ec2.rb +2 -2
- data/lib/aws-sdk-ec2/classic_address.rb +198 -200
- data/lib/aws-sdk-ec2/client.rb +17169 -14563
- data/lib/aws-sdk-ec2/client_api.rb +6458 -6301
- data/lib/aws-sdk-ec2/dhcp_options.rb +158 -160
- data/lib/aws-sdk-ec2/errors.rb +4 -13
- data/lib/aws-sdk-ec2/image.rb +404 -406
- data/lib/aws-sdk-ec2/instance.rb +1423 -1422
- data/lib/aws-sdk-ec2/internet_gateway.rb +178 -180
- data/lib/aws-sdk-ec2/key_pair.rb +98 -100
- data/lib/aws-sdk-ec2/key_pair_info.rb +102 -104
- data/lib/aws-sdk-ec2/network_acl.rb +326 -328
- data/lib/aws-sdk-ec2/network_interface.rb +428 -430
- data/lib/aws-sdk-ec2/network_interface_association.rb +126 -128
- data/lib/aws-sdk-ec2/placement_group.rb +400 -399
- data/lib/aws-sdk-ec2/resource.rb +2696 -2659
- data/lib/aws-sdk-ec2/route.rb +229 -231
- data/lib/aws-sdk-ec2/route_table.rb +243 -245
- data/lib/aws-sdk-ec2/route_table_association.rb +148 -150
- data/lib/aws-sdk-ec2/security_group.rb +515 -517
- data/lib/aws-sdk-ec2/snapshot.rb +431 -433
- data/lib/aws-sdk-ec2/subnet.rb +981 -977
- data/lib/aws-sdk-ec2/tag.rb +185 -187
- data/lib/aws-sdk-ec2/types.rb +24081 -20965
- data/lib/aws-sdk-ec2/volume.rb +513 -512
- data/lib/aws-sdk-ec2/vpc.rb +1671 -1649
- data/lib/aws-sdk-ec2/vpc_address.rb +189 -191
- data/lib/aws-sdk-ec2/vpc_peering_connection.rb +219 -221
- data/lib/aws-sdk-ec2/waiters.rb +1252 -1210
- metadata +2 -2
@@ -1,284 +1,282 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
class RouteTable
|
8
|
+
module Aws::EC2
|
9
|
+
class RouteTable
|
11
10
|
|
12
|
-
|
11
|
+
extend Aws::Deprecations
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
13
|
+
# @overload def initialize(id, options = {})
|
14
|
+
# @param [String] id
|
15
|
+
# @option options [Client] :client
|
16
|
+
# @overload def initialize(options = {})
|
17
|
+
# @option options [required, String] :id
|
18
|
+
# @option options [Client] :client
|
19
|
+
def initialize(*args)
|
20
|
+
options = Hash === args.last ? args.pop.dup : {}
|
21
|
+
@id = extract_id(args, options)
|
22
|
+
@data = options.delete(:data)
|
23
|
+
@client = options.delete(:client) || Client.new(options)
|
24
|
+
end
|
26
25
|
|
27
|
-
|
26
|
+
# @!group Read-Only Attributes
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
# @return [String]
|
29
|
+
def id
|
30
|
+
@id
|
31
|
+
end
|
32
|
+
alias :route_table_id :id
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
34
|
+
# The ID of the VPC.
|
35
|
+
# @return [String]
|
36
|
+
def vpc_id
|
37
|
+
data.vpc_id
|
38
|
+
end
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
# Any tags assigned to the route table.
|
41
|
+
# @return [Array<Types::Tag>]
|
42
|
+
def tags
|
43
|
+
data.tags
|
44
|
+
end
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
# Any virtual private gateway (VGW) propagating routes.
|
47
|
+
# @return [Array<Types::PropagatingVgw>]
|
48
|
+
def propagating_vgws
|
49
|
+
data.propagating_vgws
|
50
|
+
end
|
52
51
|
|
53
|
-
|
52
|
+
# @!endgroup
|
54
53
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
54
|
+
# @return [Client]
|
55
|
+
def client
|
56
|
+
@client
|
57
|
+
end
|
59
58
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
59
|
+
# Loads, or reloads {#data} for the current {RouteTable}.
|
60
|
+
# Returns `self` making it possible to chain methods.
|
61
|
+
#
|
62
|
+
# route_table.reload.data
|
63
|
+
#
|
64
|
+
# @return [self]
|
65
|
+
def load
|
66
|
+
resp = @client.describe_route_tables(route_table_ids: [@id])
|
67
|
+
@data = resp.routetables[0]
|
68
|
+
self
|
69
|
+
end
|
70
|
+
alias :reload :load
|
72
71
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
72
|
+
# @return [Types::RouteTable]
|
73
|
+
# Returns the data for this {RouteTable}. Calls
|
74
|
+
# {Client#describe_route_tables} if {#data_loaded?} is `false`.
|
75
|
+
def data
|
76
|
+
load unless @data
|
77
|
+
@data
|
78
|
+
end
|
80
79
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
80
|
+
# @return [Boolean]
|
81
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
82
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
83
|
+
def data_loaded?
|
84
|
+
!!@data
|
85
|
+
end
|
87
86
|
|
88
|
-
|
87
|
+
# @!group Actions
|
89
88
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
89
|
+
# @example Request syntax with placeholder values
|
90
|
+
#
|
91
|
+
# routetableassociation = route_table.associate_with_subnet({
|
92
|
+
# dry_run: false,
|
93
|
+
# subnet_id: "String", # required
|
94
|
+
# })
|
95
|
+
# @param [Hash] options ({})
|
96
|
+
# @option options [Boolean] :dry_run
|
97
|
+
# Checks whether you have the required permissions for the action,
|
98
|
+
# without actually making the request, and provides an error response.
|
99
|
+
# If you have the required permissions, the error response is
|
100
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
101
|
+
# @option options [required, String] :subnet_id
|
102
|
+
# The ID of the subnet.
|
103
|
+
# @return [RouteTableAssociation]
|
104
|
+
def associate_with_subnet(options = {})
|
105
|
+
options = options.merge(route_table_id: @id)
|
106
|
+
resp = @client.associate_route_table(options)
|
107
|
+
RouteTableAssociation.new(
|
108
|
+
id: resp.data.association_id,
|
109
|
+
client: @client
|
110
|
+
)
|
111
|
+
end
|
113
112
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
113
|
+
# @example Request syntax with placeholder values
|
114
|
+
#
|
115
|
+
# route = route_table.create_route({
|
116
|
+
# dry_run: false,
|
117
|
+
# destination_cidr_block: "String",
|
118
|
+
# gateway_id: "String",
|
119
|
+
# destination_ipv_6_cidr_block: "String",
|
120
|
+
# egress_only_internet_gateway_id: "String",
|
121
|
+
# instance_id: "String",
|
122
|
+
# network_interface_id: "String",
|
123
|
+
# vpc_peering_connection_id: "String",
|
124
|
+
# nat_gateway_id: "String",
|
125
|
+
# })
|
126
|
+
# @param [Hash] options ({})
|
127
|
+
# @option options [Boolean] :dry_run
|
128
|
+
# Checks whether you have the required permissions for the action,
|
129
|
+
# without actually making the request, and provides an error response.
|
130
|
+
# If you have the required permissions, the error response is
|
131
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
132
|
+
# @option options [String] :destination_cidr_block
|
133
|
+
# The IPv4 CIDR address block used for the destination match. Routing
|
134
|
+
# decisions are based on the most specific match.
|
135
|
+
# @option options [String] :gateway_id
|
136
|
+
# The ID of an Internet gateway or virtual private gateway attached to
|
137
|
+
# your VPC.
|
138
|
+
# @option options [String] :destination_ipv_6_cidr_block
|
139
|
+
# The IPv6 CIDR block used for the destination match. Routing decisions
|
140
|
+
# are based on the most specific match.
|
141
|
+
# @option options [String] :egress_only_internet_gateway_id
|
142
|
+
# \[IPv6 traffic only\] The ID of an egress-only Internet gateway.
|
143
|
+
# @option options [String] :instance_id
|
144
|
+
# The ID of a NAT instance in your VPC. The operation fails if you
|
145
|
+
# specify an instance ID unless exactly one network interface is
|
146
|
+
# attached.
|
147
|
+
# @option options [String] :network_interface_id
|
148
|
+
# The ID of a network interface.
|
149
|
+
# @option options [String] :vpc_peering_connection_id
|
150
|
+
# The ID of a VPC peering connection.
|
151
|
+
# @option options [String] :nat_gateway_id
|
152
|
+
# \[IPv4 traffic only\] The ID of a NAT gateway.
|
153
|
+
# @return [Route]
|
154
|
+
def create_route(options = {})
|
155
|
+
options = options.merge(route_table_id: @id)
|
156
|
+
resp = @client.create_route(options)
|
157
|
+
Route.new(
|
158
|
+
route_table_id: @id,
|
159
|
+
destination_cidr_block: options[:destination_cidr_block],
|
160
|
+
client: @client
|
161
|
+
)
|
162
|
+
end
|
163
|
+
|
164
|
+
# @example Request syntax with placeholder values
|
165
|
+
#
|
166
|
+
# tag = route_table.create_tags({
|
167
|
+
# dry_run: false,
|
168
|
+
# tags: [ # required
|
169
|
+
# {
|
170
|
+
# key: "String",
|
171
|
+
# value: "String",
|
172
|
+
# },
|
173
|
+
# ],
|
174
|
+
# })
|
175
|
+
# @param [Hash] options ({})
|
176
|
+
# @option options [Boolean] :dry_run
|
177
|
+
# Checks whether you have the required permissions for the action,
|
178
|
+
# without actually making the request, and provides an error response.
|
179
|
+
# If you have the required permissions, the error response is
|
180
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
181
|
+
# @option options [required, Array<Types::Tag>] :tags
|
182
|
+
# One or more tags. The `value` parameter is required, but if you don't
|
183
|
+
# want the tag to have a value, specify the parameter with no value, and
|
184
|
+
# we set the value to an empty string.
|
185
|
+
# @return [Tag::Collection]
|
186
|
+
def create_tags(options = {})
|
187
|
+
batch = []
|
188
|
+
options = Aws::Util.deep_merge(options, resources: [@id])
|
189
|
+
resp = @client.create_tags(options)
|
190
|
+
options[:tags].each do |t|
|
191
|
+
batch << Tag.new(
|
192
|
+
resource_id: @id,
|
193
|
+
key: t[:key],
|
194
|
+
value: t[:value],
|
161
195
|
client: @client
|
162
196
|
)
|
163
197
|
end
|
198
|
+
Tag::Collection.new([batch], size: batch.size)
|
199
|
+
end
|
164
200
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
# @option options [required, Array<Types::Tag>] :tags
|
183
|
-
# One or more tags. The `value` parameter is required, but if you don't
|
184
|
-
# want the tag to have a value, specify the parameter with no value, and
|
185
|
-
# we set the value to an empty string.
|
186
|
-
# @return [Tag::Collection]
|
187
|
-
def create_tags(options = {})
|
188
|
-
batch = []
|
189
|
-
options = Aws::Util.deep_merge(options, resources: [@id])
|
190
|
-
resp = @client.create_tags(options)
|
191
|
-
options[:tags].each do |t|
|
192
|
-
batch << Tag.new(
|
193
|
-
resource_id: @id,
|
194
|
-
key: t[:key],
|
195
|
-
value: t[:value],
|
196
|
-
client: @client
|
197
|
-
)
|
198
|
-
end
|
199
|
-
Tag::Collection.new([batch], size: batch.size)
|
200
|
-
end
|
201
|
-
|
202
|
-
# @example Request syntax with placeholder values
|
203
|
-
#
|
204
|
-
# route_table.delete({
|
205
|
-
# dry_run: false,
|
206
|
-
# })
|
207
|
-
# @param [Hash] options ({})
|
208
|
-
# @option options [Boolean] :dry_run
|
209
|
-
# Checks whether you have the required permissions for the action,
|
210
|
-
# without actually making the request, and provides an error response.
|
211
|
-
# If you have the required permissions, the error response is
|
212
|
-
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
213
|
-
# @return [EmptyStructure]
|
214
|
-
def delete(options = {})
|
215
|
-
options = options.merge(route_table_id: @id)
|
216
|
-
resp = @client.delete_route_table(options)
|
217
|
-
resp.data
|
218
|
-
end
|
201
|
+
# @example Request syntax with placeholder values
|
202
|
+
#
|
203
|
+
# route_table.delete({
|
204
|
+
# dry_run: false,
|
205
|
+
# })
|
206
|
+
# @param [Hash] options ({})
|
207
|
+
# @option options [Boolean] :dry_run
|
208
|
+
# Checks whether you have the required permissions for the action,
|
209
|
+
# without actually making the request, and provides an error response.
|
210
|
+
# If you have the required permissions, the error response is
|
211
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
212
|
+
# @return [EmptyStructure]
|
213
|
+
def delete(options = {})
|
214
|
+
options = options.merge(route_table_id: @id)
|
215
|
+
resp = @client.delete_route_table(options)
|
216
|
+
resp.data
|
217
|
+
end
|
219
218
|
|
220
|
-
|
219
|
+
# @!group Associations
|
221
220
|
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
end
|
232
|
-
RouteTableAssociation::Collection.new([batch], size: batch.size)
|
221
|
+
# @return [RouteTableAssociation::Collection]
|
222
|
+
def associations
|
223
|
+
batch = []
|
224
|
+
data.associations.each do |a|
|
225
|
+
batch << RouteTableAssociation.new(
|
226
|
+
id: a.route_table_association_id,
|
227
|
+
data: a,
|
228
|
+
client: @client
|
229
|
+
)
|
233
230
|
end
|
231
|
+
RouteTableAssociation::Collection.new([batch], size: batch.size)
|
232
|
+
end
|
234
233
|
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
end
|
246
|
-
Route::Collection.new([batch], size: batch.size)
|
234
|
+
# @return [Route::Collection]
|
235
|
+
def routes
|
236
|
+
batch = []
|
237
|
+
data.routes.each do |r|
|
238
|
+
batch << Route.new(
|
239
|
+
route_table_id: @id,
|
240
|
+
destination_cidr_block: r.destination_cidr_block,
|
241
|
+
data: r,
|
242
|
+
client: @client
|
243
|
+
)
|
247
244
|
end
|
245
|
+
Route::Collection.new([batch], size: batch.size)
|
246
|
+
end
|
248
247
|
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
end
|
248
|
+
# @return [Vpc, nil]
|
249
|
+
def vpc
|
250
|
+
if data.vpc_id
|
251
|
+
Vpc.new(
|
252
|
+
id: data.vpc_id,
|
253
|
+
client: @client
|
254
|
+
)
|
255
|
+
else
|
256
|
+
nil
|
259
257
|
end
|
258
|
+
end
|
260
259
|
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
260
|
+
# @deprecated
|
261
|
+
# @api private
|
262
|
+
def identifiers
|
263
|
+
{ id: @id }
|
264
|
+
end
|
265
|
+
deprecated(:identifiers)
|
267
266
|
|
268
|
-
|
267
|
+
private
|
269
268
|
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
end
|
269
|
+
def extract_id(args, options)
|
270
|
+
value = args[0] || options.delete(:id)
|
271
|
+
case value
|
272
|
+
when String then value
|
273
|
+
when nil then raise ArgumentError, "missing required option :id"
|
274
|
+
else
|
275
|
+
msg = "expected :id to be a String, got #{value.class}"
|
276
|
+
raise ArgumentError, msg
|
279
277
|
end
|
280
|
-
|
281
|
-
class Collection < Aws::Resources::Collection; end
|
282
278
|
end
|
279
|
+
|
280
|
+
class Collection < Aws::Resources::Collection; end
|
283
281
|
end
|
284
282
|
end
|