aws-sdk-glacier 1.26.0 → 1.31.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
@@ -6,6 +8,7 @@
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
8
10
  module Aws::Glacier
11
+
9
12
  class Vault
10
13
 
11
14
  extend Aws::Deprecations
@@ -24,6 +27,7 @@ module Aws::Glacier
24
27
  @name = extract_name(args, options)
25
28
  @data = options.delete(:data)
26
29
  @client = options.delete(:client) || Client.new(options)
30
+ @waiter_block_warned = false
27
31
  end
28
32
 
29
33
  # @!group Read-Only Attributes
@@ -120,7 +124,8 @@ module Aws::Glacier
120
124
  # Waiter polls an API operation until a resource enters a desired
121
125
  # state.
122
126
  #
123
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
127
+ # @note The waiting operation is performed on a copy. The original resource
128
+ # remains unchanged.
124
129
  #
125
130
  # ## Basic Usage
126
131
  #
@@ -133,13 +138,15 @@ module Aws::Glacier
133
138
  #
134
139
  # ## Example
135
140
  #
136
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
141
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
142
+ # instance.state.name == 'running'
143
+ # end
137
144
  #
138
145
  # ## Configuration
139
146
  #
140
147
  # You can configure the maximum number of polling attempts, and the
141
- # delay (in seconds) between each polling attempt. The waiting condition is set
142
- # by passing a block to {#wait_until}:
148
+ # delay (in seconds) between each polling attempt. The waiting condition is
149
+ # set by passing a block to {#wait_until}:
143
150
  #
144
151
  # # poll for ~25 seconds
145
152
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -170,17 +177,16 @@ module Aws::Glacier
170
177
  # # resource did not enter the desired state in time
171
178
  # end
172
179
  #
180
+ # @yieldparam [Resource] resource to be used in the waiting condition.
173
181
  #
174
- # @yield param [Resource] resource to be used in the waiting condition
175
- #
176
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
177
- # because the waiter has entered a state that it will not transition
178
- # out of, preventing success.
182
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
183
+ # terminates because the waiter has entered a state that it will not
184
+ # transition out of, preventing success.
179
185
  #
180
186
  # yet successful.
181
187
  #
182
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
183
- # while polling for a resource that is not expected.
188
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
189
+ # encountered while polling for a resource that is not expected.
184
190
  #
185
191
  # @raise [NotImplementedError] Raised when the resource does not
186
192
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
@@ -8,6 +10,68 @@
8
10
  require 'aws-sdk-core/waiters'
9
11
 
10
12
  module Aws::Glacier
13
+ # Waiters are utility methods that poll for a particular state to occur
14
+ # on a client. Waiters can fail after a number of attempts at a polling
15
+ # interval defined for the service client.
16
+ #
17
+ # For a list of operations that can be waited for and the
18
+ # client methods called for each operation, see the table below or the
19
+ # {Client#wait_until} field documentation for the {Client}.
20
+ #
21
+ # # Invoking a Waiter
22
+ # To invoke a waiter, call #wait_until on a {Client}. The first parameter
23
+ # is the waiter name, which is specific to the service client and indicates
24
+ # which operation is being waited for. The second parameter is a hash of
25
+ # parameters that are passed to the client method called by the waiter,
26
+ # which varies according to the waiter name.
27
+ #
28
+ # # Wait Failures
29
+ # To catch errors in a waiter, use WaiterFailed,
30
+ # as shown in the following example.
31
+ #
32
+ # rescue rescue Aws::Waiters::Errors::WaiterFailed => error
33
+ # puts "failed waiting for instance running: #{error.message}
34
+ # end
35
+ #
36
+ # # Configuring a Waiter
37
+ # Each waiter has a default polling interval and a maximum number of
38
+ # attempts it will make before returning control to your program.
39
+ # To set these values, use the `max_attempts` and `delay` parameters
40
+ # in your `#wait_until` call.
41
+ # The following example waits for up to 25 seconds, polling every five seconds.
42
+ #
43
+ # client.wait_until(...) do |w|
44
+ # w.max_attempts = 5
45
+ # w.delay = 5
46
+ # end
47
+ #
48
+ # To disable wait failures, set the value of either of these parameters
49
+ # to `nil`.
50
+ #
51
+ # # Extending a Waiter
52
+ # To modify the behavior of waiters, you can register callbacks that are
53
+ # triggered before each polling attempt and before waiting.
54
+ #
55
+ # The following example implements an exponential backoff in a waiter
56
+ # by doubling the amount of time to wait on every attempt.
57
+ #
58
+ # client.wait_until(...) do |w|
59
+ # w.interval = 0 # disable normal sleep
60
+ # w.before_wait do |n, resp|
61
+ # sleep(n ** 2)
62
+ # end
63
+ # end
64
+ #
65
+ # # Available Waiters
66
+ #
67
+ # The following table lists the valid waiter names, the operations they call,
68
+ # and the default `:delay` and `:max_attempts` values.
69
+ #
70
+ # | waiter_name | params | :delay | :max_attempts |
71
+ # | ---------------- | ----------------------- | -------- | ------------- |
72
+ # | vault_exists | {Client#describe_vault} | 3 | 15 |
73
+ # | vault_not_exists | {Client#describe_vault} | 3 | 15 |
74
+ #
11
75
  module Waiters
12
76
 
13
77
  class VaultExists
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-glacier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.26.0
4
+ version: 1.31.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: 2019-10-23 00:00:00.000000000 Z
11
+ date: 2020-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.71.0
22
+ version: 3.99.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.71.0
32
+ version: 3.99.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.5.2.3
95
+ rubygems_version: 2.7.6.2
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: AWS SDK for Ruby - Amazon Glacier