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
data/lib/aws-sdk-ec2/route.rb
CHANGED
@@ -1,266 +1,264 @@
|
|
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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
8
|
+
module Aws::EC2
|
9
|
+
class Route
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(route_table_id, destination_cidr_block, options = {})
|
14
|
+
# @param [String] route_table_id
|
15
|
+
# @param [String] destination_cidr_block
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :route_table_id
|
19
|
+
# @option options [required, String] :destination_cidr_block
|
20
|
+
# @option options [Client] :client
|
21
|
+
def initialize(*args)
|
22
|
+
options = Hash === args.last ? args.pop.dup : {}
|
23
|
+
@route_table_id = extract_route_table_id(args, options)
|
24
|
+
@destination_cidr_block = extract_destination_cidr_block(args, options)
|
25
|
+
@data = options.delete(:data)
|
26
|
+
@client = options.delete(:client) || Client.new(options)
|
27
|
+
end
|
29
28
|
|
30
|
-
|
29
|
+
# @!group Read-Only Attributes
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
# @return [String]
|
32
|
+
def route_table_id
|
33
|
+
@route_table_id
|
34
|
+
end
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
36
|
+
# @return [String]
|
37
|
+
def destination_cidr_block
|
38
|
+
@destination_cidr_block
|
39
|
+
end
|
41
40
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
# The prefix of the AWS service.
|
42
|
+
# @return [String]
|
43
|
+
def destination_prefix_list_id
|
44
|
+
data.destination_prefix_list_id
|
45
|
+
end
|
47
46
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
# The ID of a gateway attached to your VPC.
|
48
|
+
# @return [String]
|
49
|
+
def gateway_id
|
50
|
+
data.gateway_id
|
51
|
+
end
|
53
52
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
53
|
+
# The ID of a NAT instance in your VPC.
|
54
|
+
# @return [String]
|
55
|
+
def instance_id
|
56
|
+
data.instance_id
|
57
|
+
end
|
59
58
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
59
|
+
# The AWS account ID of the owner of the instance.
|
60
|
+
# @return [String]
|
61
|
+
def instance_owner_id
|
62
|
+
data.instance_owner_id
|
63
|
+
end
|
65
64
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
65
|
+
# The ID of the network interface.
|
66
|
+
# @return [String]
|
67
|
+
def network_interface_id
|
68
|
+
data.network_interface_id
|
69
|
+
end
|
71
70
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
# The ID of the VPC peering connection.
|
72
|
+
# @return [String]
|
73
|
+
def vpc_peering_connection_id
|
74
|
+
data.vpc_peering_connection_id
|
75
|
+
end
|
77
76
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
77
|
+
# The ID of a NAT gateway.
|
78
|
+
# @return [String]
|
79
|
+
def nat_gateway_id
|
80
|
+
data.nat_gateway_id
|
81
|
+
end
|
83
82
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
83
|
+
# The state of the route. The `blackhole` state indicates that the
|
84
|
+
# route's target isn't available (for example, the specified gateway
|
85
|
+
# isn't attached to the VPC, or the specified NAT instance has been
|
86
|
+
# terminated).
|
87
|
+
# @return [String]
|
88
|
+
def state
|
89
|
+
data.state
|
90
|
+
end
|
92
91
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
92
|
+
# Describes how the route was created.
|
93
|
+
#
|
94
|
+
# * `CreateRouteTable` - The route was automatically created when the
|
95
|
+
# route table was created.
|
96
|
+
#
|
97
|
+
# * `CreateRoute` - The route was manually added to the route table.
|
98
|
+
#
|
99
|
+
# * `EnableVgwRoutePropagation` - The route was propagated by route
|
100
|
+
# propagation.
|
101
|
+
# @return [String]
|
102
|
+
def origin
|
103
|
+
data.origin
|
104
|
+
end
|
106
105
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
106
|
+
# The IPv6 CIDR block used for the destination match.
|
107
|
+
# @return [String]
|
108
|
+
def destination_ipv_6_cidr_block
|
109
|
+
data.destination_ipv_6_cidr_block
|
110
|
+
end
|
112
111
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
112
|
+
# The ID of the egress-only Internet gateway.
|
113
|
+
# @return [String]
|
114
|
+
def egress_only_internet_gateway_id
|
115
|
+
data.egress_only_internet_gateway_id
|
116
|
+
end
|
118
117
|
|
119
|
-
|
118
|
+
# @!endgroup
|
120
119
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
120
|
+
# @return [Client]
|
121
|
+
def client
|
122
|
+
@client
|
123
|
+
end
|
125
124
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
125
|
+
# @raise [NotImplementedError]
|
126
|
+
# @api private
|
127
|
+
def load
|
128
|
+
msg = "#load is not implemented, data only available via enumeration"
|
129
|
+
raise NotImplementedError, msg
|
130
|
+
end
|
131
|
+
alias :reload :load
|
132
|
+
|
133
|
+
# @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
|
134
|
+
# @return [Types::Route]
|
135
|
+
# Returns the data for this {Route}.
|
136
|
+
def data
|
137
|
+
load unless @data
|
138
|
+
@data
|
139
|
+
end
|
141
140
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
141
|
+
# @return [Boolean]
|
142
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
143
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
144
|
+
def data_loaded?
|
145
|
+
!!@data
|
146
|
+
end
|
148
147
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
148
|
+
# @!group Actions
|
149
|
+
|
150
|
+
# @example Request syntax with placeholder values
|
151
|
+
#
|
152
|
+
# route.delete({
|
153
|
+
# dry_run: false,
|
154
|
+
# destination_ipv_6_cidr_block: "String",
|
155
|
+
# })
|
156
|
+
# @param [Hash] options ({})
|
157
|
+
# @option options [Boolean] :dry_run
|
158
|
+
# Checks whether you have the required permissions for the action,
|
159
|
+
# without actually making the request, and provides an error response.
|
160
|
+
# If you have the required permissions, the error response is
|
161
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
162
|
+
# @option options [String] :destination_ipv_6_cidr_block
|
163
|
+
# The IPv6 CIDR range for the route. The value you specify must match
|
164
|
+
# the CIDR for the route exactly.
|
165
|
+
# @return [EmptyStructure]
|
166
|
+
def delete(options = {})
|
167
|
+
options = options.merge(
|
168
|
+
route_table_id: @route_table_id,
|
169
|
+
destination_cidr_block: @destination_cidr_block
|
170
|
+
)
|
171
|
+
resp = @client.delete_route(options)
|
172
|
+
resp.data
|
173
|
+
end
|
175
174
|
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
175
|
+
# @example Request syntax with placeholder values
|
176
|
+
#
|
177
|
+
# route.replace({
|
178
|
+
# dry_run: false,
|
179
|
+
# gateway_id: "String",
|
180
|
+
# destination_ipv_6_cidr_block: "String",
|
181
|
+
# egress_only_internet_gateway_id: "String",
|
182
|
+
# instance_id: "String",
|
183
|
+
# network_interface_id: "String",
|
184
|
+
# vpc_peering_connection_id: "String",
|
185
|
+
# nat_gateway_id: "String",
|
186
|
+
# })
|
187
|
+
# @param [Hash] options ({})
|
188
|
+
# @option options [Boolean] :dry_run
|
189
|
+
# Checks whether you have the required permissions for the action,
|
190
|
+
# without actually making the request, and provides an error response.
|
191
|
+
# If you have the required permissions, the error response is
|
192
|
+
# `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
193
|
+
# @option options [String] :gateway_id
|
194
|
+
# The ID of an Internet gateway or virtual private gateway.
|
195
|
+
# @option options [String] :destination_ipv_6_cidr_block
|
196
|
+
# The IPv6 CIDR address block used for the destination match. The value
|
197
|
+
# you provide must match the CIDR of an existing route in the table.
|
198
|
+
# @option options [String] :egress_only_internet_gateway_id
|
199
|
+
# \[IPv6 traffic only\] The ID of an egress-only Internet gateway.
|
200
|
+
# @option options [String] :instance_id
|
201
|
+
# The ID of a NAT instance in your VPC.
|
202
|
+
# @option options [String] :network_interface_id
|
203
|
+
# The ID of a network interface.
|
204
|
+
# @option options [String] :vpc_peering_connection_id
|
205
|
+
# The ID of a VPC peering connection.
|
206
|
+
# @option options [String] :nat_gateway_id
|
207
|
+
# \[IPv4 traffic only\] The ID of a NAT gateway.
|
208
|
+
# @return [EmptyStructure]
|
209
|
+
def replace(options = {})
|
210
|
+
options = options.merge(
|
211
|
+
route_table_id: @route_table_id,
|
212
|
+
destination_cidr_block: @destination_cidr_block
|
213
|
+
)
|
214
|
+
resp = @client.replace_route(options)
|
215
|
+
resp.data
|
216
|
+
end
|
218
217
|
|
219
|
-
|
218
|
+
# @!group Associations
|
220
219
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
220
|
+
# @return [RouteTable]
|
221
|
+
def route_table
|
222
|
+
RouteTable.new(
|
223
|
+
id: @route_table_id,
|
224
|
+
client: @client
|
225
|
+
)
|
226
|
+
end
|
228
227
|
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
end
|
228
|
+
# @deprecated
|
229
|
+
# @api private
|
230
|
+
def identifiers
|
231
|
+
{
|
232
|
+
route_table_id: @route_table_id,
|
233
|
+
destination_cidr_block: @destination_cidr_block
|
234
|
+
}
|
235
|
+
end
|
236
|
+
deprecated(:identifiers)
|
237
|
+
|
238
|
+
private
|
239
|
+
|
240
|
+
def extract_route_table_id(args, options)
|
241
|
+
value = args[0] || options.delete(:route_table_id)
|
242
|
+
case value
|
243
|
+
when String then value
|
244
|
+
when nil then raise ArgumentError, "missing required option :route_table_id"
|
245
|
+
else
|
246
|
+
msg = "expected :route_table_id to be a String, got #{value.class}"
|
247
|
+
raise ArgumentError, msg
|
250
248
|
end
|
249
|
+
end
|
251
250
|
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
end
|
251
|
+
def extract_destination_cidr_block(args, options)
|
252
|
+
value = args[1] || options.delete(:destination_cidr_block)
|
253
|
+
case value
|
254
|
+
when String then value
|
255
|
+
when nil then raise ArgumentError, "missing required option :destination_cidr_block"
|
256
|
+
else
|
257
|
+
msg = "expected :destination_cidr_block to be a String, got #{value.class}"
|
258
|
+
raise ArgumentError, msg
|
261
259
|
end
|
262
|
-
|
263
|
-
class Collection < Aws::Resources::Collection; end
|
264
260
|
end
|
261
|
+
|
262
|
+
class Collection < Aws::Resources::Collection; end
|
265
263
|
end
|
266
264
|
end
|