aws-sdk-ec2 1.151.0 → 1.152.0
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 +1 -1
- data/lib/aws-sdk-ec2/classic_address.rb +13 -11
- data/lib/aws-sdk-ec2/client.rb +451 -39
- data/lib/aws-sdk-ec2/client_api.rb +68 -0
- data/lib/aws-sdk-ec2/dhcp_options.rb +13 -11
- data/lib/aws-sdk-ec2/image.rb +16 -12
- data/lib/aws-sdk-ec2/instance.rb +16 -12
- data/lib/aws-sdk-ec2/internet_gateway.rb +13 -11
- data/lib/aws-sdk-ec2/key_pair.rb +13 -11
- data/lib/aws-sdk-ec2/key_pair_info.rb +13 -11
- data/lib/aws-sdk-ec2/nat_gateway.rb +13 -11
- data/lib/aws-sdk-ec2/network_acl.rb +13 -11
- data/lib/aws-sdk-ec2/network_interface.rb +13 -11
- data/lib/aws-sdk-ec2/network_interface_association.rb +13 -11
- data/lib/aws-sdk-ec2/placement_group.rb +13 -11
- data/lib/aws-sdk-ec2/resource.rb +6 -1
- data/lib/aws-sdk-ec2/route.rb +13 -11
- data/lib/aws-sdk-ec2/route_table.rb +13 -11
- data/lib/aws-sdk-ec2/route_table_association.rb +13 -11
- data/lib/aws-sdk-ec2/security_group.rb +13 -11
- data/lib/aws-sdk-ec2/snapshot.rb +16 -12
- data/lib/aws-sdk-ec2/subnet.rb +13 -11
- data/lib/aws-sdk-ec2/tag.rb +13 -11
- data/lib/aws-sdk-ec2/types.rb +257 -16
- data/lib/aws-sdk-ec2/volume.rb +13 -11
- data/lib/aws-sdk-ec2/vpc.rb +16 -12
- data/lib/aws-sdk-ec2/vpc_address.rb +13 -11
- data/lib/aws-sdk-ec2/vpc_peering_connection.rb +16 -12
- data/lib/aws-sdk-ec2/waiters.rb +92 -0
- metadata +4 -3
data/lib/aws-sdk-ec2/volume.rb
CHANGED
@@ -181,7 +181,8 @@ module Aws::EC2
|
|
181
181
|
# Waiter polls an API operation until a resource enters a desired
|
182
182
|
# state.
|
183
183
|
#
|
184
|
-
# @note The waiting operation is performed on a copy. The original resource
|
184
|
+
# @note The waiting operation is performed on a copy. The original resource
|
185
|
+
# remains unchanged.
|
185
186
|
#
|
186
187
|
# ## Basic Usage
|
187
188
|
#
|
@@ -194,13 +195,15 @@ module Aws::EC2
|
|
194
195
|
#
|
195
196
|
# ## Example
|
196
197
|
#
|
197
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
198
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
199
|
+
# instance.state.name == 'running'
|
200
|
+
# end
|
198
201
|
#
|
199
202
|
# ## Configuration
|
200
203
|
#
|
201
204
|
# You can configure the maximum number of polling attempts, and the
|
202
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
203
|
-
# by passing a block to {#wait_until}:
|
205
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
206
|
+
# set by passing a block to {#wait_until}:
|
204
207
|
#
|
205
208
|
# # poll for ~25 seconds
|
206
209
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -231,17 +234,16 @@ module Aws::EC2
|
|
231
234
|
# # resource did not enter the desired state in time
|
232
235
|
# end
|
233
236
|
#
|
237
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
234
238
|
#
|
235
|
-
# @
|
236
|
-
#
|
237
|
-
#
|
238
|
-
# because the waiter has entered a state that it will not transition
|
239
|
-
# out of, preventing success.
|
239
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
240
|
+
# terminates because the waiter has entered a state that it will not
|
241
|
+
# transition out of, preventing success.
|
240
242
|
#
|
241
243
|
# yet successful.
|
242
244
|
#
|
243
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
244
|
-
# while polling for a resource that is not expected.
|
245
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
246
|
+
# encountered while polling for a resource that is not expected.
|
245
247
|
#
|
246
248
|
# @raise [NotImplementedError] Raised when the resource does not
|
247
249
|
#
|
data/lib/aws-sdk-ec2/vpc.rb
CHANGED
@@ -176,7 +176,8 @@ module Aws::EC2
|
|
176
176
|
# Waiter polls an API operation until a resource enters a desired
|
177
177
|
# state.
|
178
178
|
#
|
179
|
-
# @note The waiting operation is performed on a copy. The original resource
|
179
|
+
# @note The waiting operation is performed on a copy. The original resource
|
180
|
+
# remains unchanged.
|
180
181
|
#
|
181
182
|
# ## Basic Usage
|
182
183
|
#
|
@@ -189,13 +190,15 @@ module Aws::EC2
|
|
189
190
|
#
|
190
191
|
# ## Example
|
191
192
|
#
|
192
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
193
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
194
|
+
# instance.state.name == 'running'
|
195
|
+
# end
|
193
196
|
#
|
194
197
|
# ## Configuration
|
195
198
|
#
|
196
199
|
# You can configure the maximum number of polling attempts, and the
|
197
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
198
|
-
# by passing a block to {#wait_until}:
|
200
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
201
|
+
# set by passing a block to {#wait_until}:
|
199
202
|
#
|
200
203
|
# # poll for ~25 seconds
|
201
204
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -226,17 +229,16 @@ module Aws::EC2
|
|
226
229
|
# # resource did not enter the desired state in time
|
227
230
|
# end
|
228
231
|
#
|
232
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
229
233
|
#
|
230
|
-
# @
|
231
|
-
#
|
232
|
-
#
|
233
|
-
# because the waiter has entered a state that it will not transition
|
234
|
-
# out of, preventing success.
|
234
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
235
|
+
# terminates because the waiter has entered a state that it will not
|
236
|
+
# transition out of, preventing success.
|
235
237
|
#
|
236
238
|
# yet successful.
|
237
239
|
#
|
238
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
239
|
-
# while polling for a resource that is not expected.
|
240
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
241
|
+
# encountered while polling for a resource that is not expected.
|
240
242
|
#
|
241
243
|
# @raise [NotImplementedError] Raised when the resource does not
|
242
244
|
#
|
@@ -1946,7 +1948,9 @@ module Aws::EC2
|
|
1946
1948
|
end
|
1947
1949
|
|
1948
1950
|
def separate_params_and_options(options)
|
1949
|
-
opts = Set.new(
|
1951
|
+
opts = Set.new(
|
1952
|
+
[:client, :max_attempts, :delay, :before_attempt, :before_wait]
|
1953
|
+
)
|
1950
1954
|
waiter_opts = {}
|
1951
1955
|
waiter_params = {}
|
1952
1956
|
options.each_pair do |key, value|
|
@@ -146,7 +146,8 @@ module Aws::EC2
|
|
146
146
|
# Waiter polls an API operation until a resource enters a desired
|
147
147
|
# state.
|
148
148
|
#
|
149
|
-
# @note The waiting operation is performed on a copy. The original resource
|
149
|
+
# @note The waiting operation is performed on a copy. The original resource
|
150
|
+
# remains unchanged.
|
150
151
|
#
|
151
152
|
# ## Basic Usage
|
152
153
|
#
|
@@ -159,13 +160,15 @@ module Aws::EC2
|
|
159
160
|
#
|
160
161
|
# ## Example
|
161
162
|
#
|
162
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
163
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
164
|
+
# instance.state.name == 'running'
|
165
|
+
# end
|
163
166
|
#
|
164
167
|
# ## Configuration
|
165
168
|
#
|
166
169
|
# You can configure the maximum number of polling attempts, and the
|
167
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
168
|
-
# by passing a block to {#wait_until}:
|
170
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
171
|
+
# set by passing a block to {#wait_until}:
|
169
172
|
#
|
170
173
|
# # poll for ~25 seconds
|
171
174
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -196,17 +199,16 @@ module Aws::EC2
|
|
196
199
|
# # resource did not enter the desired state in time
|
197
200
|
# end
|
198
201
|
#
|
202
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
199
203
|
#
|
200
|
-
# @
|
201
|
-
#
|
202
|
-
#
|
203
|
-
# because the waiter has entered a state that it will not transition
|
204
|
-
# out of, preventing success.
|
204
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
205
|
+
# terminates because the waiter has entered a state that it will not
|
206
|
+
# transition out of, preventing success.
|
205
207
|
#
|
206
208
|
# yet successful.
|
207
209
|
#
|
208
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
209
|
-
# while polling for a resource that is not expected.
|
210
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
211
|
+
# encountered while polling for a resource that is not expected.
|
210
212
|
#
|
211
213
|
# @raise [NotImplementedError] Raised when the resource does not
|
212
214
|
#
|
@@ -137,7 +137,8 @@ module Aws::EC2
|
|
137
137
|
# Waiter polls an API operation until a resource enters a desired
|
138
138
|
# state.
|
139
139
|
#
|
140
|
-
# @note The waiting operation is performed on a copy. The original resource
|
140
|
+
# @note The waiting operation is performed on a copy. The original resource
|
141
|
+
# remains unchanged.
|
141
142
|
#
|
142
143
|
# ## Basic Usage
|
143
144
|
#
|
@@ -150,13 +151,15 @@ module Aws::EC2
|
|
150
151
|
#
|
151
152
|
# ## Example
|
152
153
|
#
|
153
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
154
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
155
|
+
# instance.state.name == 'running'
|
156
|
+
# end
|
154
157
|
#
|
155
158
|
# ## Configuration
|
156
159
|
#
|
157
160
|
# You can configure the maximum number of polling attempts, and the
|
158
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
159
|
-
# by passing a block to {#wait_until}:
|
161
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
162
|
+
# set by passing a block to {#wait_until}:
|
160
163
|
#
|
161
164
|
# # poll for ~25 seconds
|
162
165
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -187,17 +190,16 @@ module Aws::EC2
|
|
187
190
|
# # resource did not enter the desired state in time
|
188
191
|
# end
|
189
192
|
#
|
193
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
190
194
|
#
|
191
|
-
# @
|
192
|
-
#
|
193
|
-
#
|
194
|
-
# because the waiter has entered a state that it will not transition
|
195
|
-
# out of, preventing success.
|
195
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
196
|
+
# terminates because the waiter has entered a state that it will not
|
197
|
+
# transition out of, preventing success.
|
196
198
|
#
|
197
199
|
# yet successful.
|
198
200
|
#
|
199
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
200
|
-
# while polling for a resource that is not expected.
|
201
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
202
|
+
# encountered while polling for a resource that is not expected.
|
201
203
|
#
|
202
204
|
# @raise [NotImplementedError] Raised when the resource does not
|
203
205
|
#
|
@@ -340,7 +342,9 @@ module Aws::EC2
|
|
340
342
|
end
|
341
343
|
|
342
344
|
def separate_params_and_options(options)
|
343
|
-
opts = Set.new(
|
345
|
+
opts = Set.new(
|
346
|
+
[:client, :max_attempts, :delay, :before_attempt, :before_wait]
|
347
|
+
)
|
344
348
|
waiter_opts = {}
|
345
349
|
waiter_params = {}
|
346
350
|
options.each_pair do |key, value|
|
data/lib/aws-sdk-ec2/waiters.rb
CHANGED
@@ -8,6 +8,98 @@
|
|
8
8
|
require 'aws-sdk-core/waiters'
|
9
9
|
|
10
10
|
module Aws::EC2
|
11
|
+
# Waiters are utility methods that poll for a particular state to occur
|
12
|
+
# on a client. Waiters can fail after a number of attempts at a polling
|
13
|
+
# interval defined for the service client.
|
14
|
+
#
|
15
|
+
# For a list of operations that can be waited for and the
|
16
|
+
# client methods called for each operation, see the table below or the
|
17
|
+
# {Client#wait_until} field documentation for the {Client}.
|
18
|
+
#
|
19
|
+
# # Invoking a Waiter
|
20
|
+
# To invoke a waiter, call #wait_until on a {Client}. The first parameter
|
21
|
+
# is the waiter name, which is specific to the service client and indicates
|
22
|
+
# which operation is being waited for. The second parameter is a hash of
|
23
|
+
# parameters that are passed to the client method called by the waiter,
|
24
|
+
# which varies according to the waiter name.
|
25
|
+
#
|
26
|
+
# # Wait Failures
|
27
|
+
# To catch errors in a waiter, use WaiterFailed,
|
28
|
+
# as shown in the following example.
|
29
|
+
#
|
30
|
+
# rescue rescue Aws::Waiters::Errors::WaiterFailed => error
|
31
|
+
# puts "failed waiting for instance running: #{error.message}
|
32
|
+
# end
|
33
|
+
#
|
34
|
+
# # Configuring a Waiter
|
35
|
+
# Each waiter has a default polling interval and a maximum number of
|
36
|
+
# attempts it will make before returning control to your program.
|
37
|
+
# To set these values, use the `max_attempts` and `delay` parameters
|
38
|
+
# in your `#wait_until` call.
|
39
|
+
# The following example waits for up to 25 seconds, polling every five seconds.
|
40
|
+
#
|
41
|
+
# client.wait_until(...) do |w|
|
42
|
+
# w.max_attempts = 5
|
43
|
+
# w.delay = 5
|
44
|
+
# end
|
45
|
+
#
|
46
|
+
# To disable wait failures, set the value of either of these parameters
|
47
|
+
# to `nil`.
|
48
|
+
#
|
49
|
+
# # Extending a Waiter
|
50
|
+
# To modify the behavior of waiters, you can register callbacks that are
|
51
|
+
# triggered before each polling attempt and before waiting.
|
52
|
+
#
|
53
|
+
# The following example implements an exponential backoff in a waiter
|
54
|
+
# by doubling the amount of time to wait on every attempt.
|
55
|
+
#
|
56
|
+
# client.wait_until(...) do |w|
|
57
|
+
# w.interval = 0 # disable normal sleep
|
58
|
+
# w.before_wait do |n, resp|
|
59
|
+
# sleep(n ** 2)
|
60
|
+
# end
|
61
|
+
# end
|
62
|
+
#
|
63
|
+
# # Available Waiters
|
64
|
+
#
|
65
|
+
# The following table lists the valid waiter names, the operations they call,
|
66
|
+
# and the default `:delay` and `:max_attempts` values.
|
67
|
+
#
|
68
|
+
# | waiter_name | params | :delay | :max_attempts |
|
69
|
+
# | ------------------------------- | ----------------------------------------- | -------- | ------------- |
|
70
|
+
# | bundle_task_complete | {Client#describe_bundle_tasks} | 15 | 40 |
|
71
|
+
# | conversion_task_cancelled | {Client#describe_conversion_tasks} | 15 | 40 |
|
72
|
+
# | conversion_task_completed | {Client#describe_conversion_tasks} | 15 | 40 |
|
73
|
+
# | conversion_task_deleted | {Client#describe_conversion_tasks} | 15 | 40 |
|
74
|
+
# | customer_gateway_available | {Client#describe_customer_gateways} | 15 | 40 |
|
75
|
+
# | export_task_cancelled | {Client#describe_export_tasks} | 15 | 40 |
|
76
|
+
# | export_task_completed | {Client#describe_export_tasks} | 15 | 40 |
|
77
|
+
# | image_available | {Client#describe_images} | 15 | 40 |
|
78
|
+
# | image_exists | {Client#describe_images} | 15 | 40 |
|
79
|
+
# | instance_exists | {Client#describe_instances} | 5 | 40 |
|
80
|
+
# | instance_running | {Client#describe_instances} | 15 | 40 |
|
81
|
+
# | instance_status_ok | {Client#describe_instance_status} | 15 | 40 |
|
82
|
+
# | instance_stopped | {Client#describe_instances} | 15 | 40 |
|
83
|
+
# | instance_terminated | {Client#describe_instances} | 15 | 40 |
|
84
|
+
# | key_pair_exists | {Client#describe_key_pairs} | 5 | 6 |
|
85
|
+
# | nat_gateway_available | {Client#describe_nat_gateways} | 15 | 40 |
|
86
|
+
# | network_interface_available | {Client#describe_network_interfaces} | 20 | 10 |
|
87
|
+
# | password_data_available | {Client#get_password_data} | 15 | 40 |
|
88
|
+
# | security_group_exists | {Client#describe_security_groups} | 5 | 6 |
|
89
|
+
# | snapshot_completed | {Client#describe_snapshots} | 15 | 40 |
|
90
|
+
# | spot_instance_request_fulfilled | {Client#describe_spot_instance_requests} | 15 | 40 |
|
91
|
+
# | subnet_available | {Client#describe_subnets} | 15 | 40 |
|
92
|
+
# | system_status_ok | {Client#describe_instance_status} | 15 | 40 |
|
93
|
+
# | volume_available | {Client#describe_volumes} | 15 | 40 |
|
94
|
+
# | volume_deleted | {Client#describe_volumes} | 15 | 40 |
|
95
|
+
# | volume_in_use | {Client#describe_volumes} | 15 | 40 |
|
96
|
+
# | vpc_available | {Client#describe_vpcs} | 15 | 40 |
|
97
|
+
# | vpc_exists | {Client#describe_vpcs} | 1 | 5 |
|
98
|
+
# | vpc_peering_connection_deleted | {Client#describe_vpc_peering_connections} | 15 | 40 |
|
99
|
+
# | vpc_peering_connection_exists | {Client#describe_vpc_peering_connections} | 15 | 40 |
|
100
|
+
# | vpn_connection_available | {Client#describe_vpn_connections} | 15 | 40 |
|
101
|
+
# | vpn_connection_deleted | {Client#describe_vpn_connections} | 15 | 40 |
|
102
|
+
#
|
11
103
|
module Waiters
|
12
104
|
|
13
105
|
class BundleTaskComplete
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-ec2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.152.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sigv4
|
@@ -108,7 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
|
111
|
+
rubyforge_project:
|
112
|
+
rubygems_version: 2.7.6.2
|
112
113
|
signing_key:
|
113
114
|
specification_version: 4
|
114
115
|
summary: AWS SDK for Ruby - Amazon EC2
|