aws-sdk-glacier 1.24.0 → 1.29.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9cf5613e3d46455d9b724302f7971f1042787c9f
4
- data.tar.gz: 1ee409d2e4a4060b8826cea07fa00c6a72400de4
2
+ SHA256:
3
+ metadata.gz: 906be1c26b697fd5d1e49928007019c350577fc9438296188367950bb824453a
4
+ data.tar.gz: fedc788e19abc705dc63662e0aa882d3840525b50d54d8b1d92a0ad432813304
5
5
  SHA512:
6
- metadata.gz: eba4f33e735864cb29a78c0f45f73f74c408426defc0d99d4b09f1af936e76d55799bd93805d9f55078cd56d3f3544e796a2640c8097320813db4734ff609b57
7
- data.tar.gz: 615d92bbb64f9d3f53769da9bc4b29f3e17bdb007acba097c4981c6b800c3708e59128cdb523e7abb2921f0ca2509109b4d8d15b3cc6ba1054daf6c89080b7bb
6
+ metadata.gz: 56f4542eadf5340cab3c8d5bec5c5d16c9487429351164c935656eb52e89e4ab6b2bdeb46d1e7f1a20ddde5a4c0dced681196d8bd523b56142835d28d986b68c
7
+ data.tar.gz: 9da0d07a2e7952fefe803cc8e828a12295808d2476f34656b1a7ec44581427480cd751c23b24f8c6c91cd809dbd5b527aef71aef716699e924f8601245729bcc
@@ -31,17 +31,20 @@ require_relative 'aws-sdk-glacier/customizations'
31
31
  # methods each accept a hash of request parameters and return a response
32
32
  # structure.
33
33
  #
34
+ # glacier = Aws::Glacier::Client.new
35
+ # resp = glacier.abort_multipart_upload(params)
36
+ #
34
37
  # See {Client} for more information.
35
38
  #
36
39
  # # Errors
37
40
  #
38
- # Errors returned from Amazon Glacier all
39
- # extend {Errors::ServiceError}.
41
+ # Errors returned from Amazon Glacier are defined in the
42
+ # {Errors} module and all extend {Errors::ServiceError}.
40
43
  #
41
44
  # begin
42
45
  # # do stuff
43
46
  # rescue Aws::Glacier::Errors::ServiceError
44
- # # rescues all service API errors
47
+ # # rescues all Amazon Glacier API errors
45
48
  # end
46
49
  #
47
50
  # See {Errors} for more information.
@@ -49,6 +52,6 @@ require_relative 'aws-sdk-glacier/customizations'
49
52
  # @service
50
53
  module Aws::Glacier
51
54
 
52
- GEM_VERSION = '1.24.0'
55
+ GEM_VERSION = '1.29.0'
53
56
 
54
57
  end
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::Glacier
9
+
9
10
  class Account
10
11
 
11
12
  extend Aws::Deprecations
@@ -21,6 +22,7 @@ module Aws::Glacier
21
22
  @id = extract_id(args, options)
22
23
  @data = Aws::EmptyStructure.new
23
24
  @client = options.delete(:client) || Client.new(options)
25
+ @waiter_block_warned = false
24
26
  end
25
27
 
26
28
  # @!group Read-Only Attributes
@@ -63,7 +65,8 @@ module Aws::Glacier
63
65
  # Waiter polls an API operation until a resource enters a desired
64
66
  # state.
65
67
  #
66
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
68
+ # @note The waiting operation is performed on a copy. The original resource
69
+ # remains unchanged.
67
70
  #
68
71
  # ## Basic Usage
69
72
  #
@@ -76,13 +79,15 @@ module Aws::Glacier
76
79
  #
77
80
  # ## Example
78
81
  #
79
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
82
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
83
+ # instance.state.name == 'running'
84
+ # end
80
85
  #
81
86
  # ## Configuration
82
87
  #
83
88
  # You can configure the maximum number of polling attempts, and the
84
- # delay (in seconds) between each polling attempt. The waiting condition is set
85
- # by passing a block to {#wait_until}:
89
+ # delay (in seconds) between each polling attempt. The waiting condition is
90
+ # set by passing a block to {#wait_until}:
86
91
  #
87
92
  # # poll for ~25 seconds
88
93
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -113,17 +118,16 @@ module Aws::Glacier
113
118
  # # resource did not enter the desired state in time
114
119
  # end
115
120
  #
121
+ # @yieldparam [Resource] resource to be used in the waiting condition.
116
122
  #
117
- # @yield param [Resource] resource to be used in the waiting condition
118
- #
119
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
120
- # because the waiter has entered a state that it will not transition
121
- # out of, preventing success.
123
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
124
+ # terminates because the waiter has entered a state that it will not
125
+ # transition out of, preventing success.
122
126
  #
123
127
  # yet successful.
124
128
  #
125
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
126
- # while polling for a resource that is not expected.
129
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
130
+ # encountered while polling for a resource that is not expected.
127
131
  #
128
132
  # @raise [NotImplementedError] Raised when the resource does not
129
133
  #
@@ -166,7 +170,7 @@ module Aws::Glacier
166
170
  # @return [Vault]
167
171
  def create_vault(options = {})
168
172
  options = options.merge(account_id: @id)
169
- resp = @client.create_vault(options)
173
+ @client.create_vault(options)
170
174
  Vault.new(
171
175
  account_id: @id,
172
176
  name: options[:vault_name],
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::Glacier
9
+
9
10
  class Archive
10
11
 
11
12
  extend Aws::Deprecations
@@ -27,6 +28,7 @@ module Aws::Glacier
27
28
  @id = extract_id(args, options)
28
29
  @data = Aws::EmptyStructure.new
29
30
  @client = options.delete(:client) || Client.new(options)
31
+ @waiter_block_warned = false
30
32
  end
31
33
 
32
34
  # @!group Read-Only Attributes
@@ -79,7 +81,8 @@ module Aws::Glacier
79
81
  # Waiter polls an API operation until a resource enters a desired
80
82
  # state.
81
83
  #
82
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
84
+ # @note The waiting operation is performed on a copy. The original resource
85
+ # remains unchanged.
83
86
  #
84
87
  # ## Basic Usage
85
88
  #
@@ -92,13 +95,15 @@ module Aws::Glacier
92
95
  #
93
96
  # ## Example
94
97
  #
95
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
98
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
99
+ # instance.state.name == 'running'
100
+ # end
96
101
  #
97
102
  # ## Configuration
98
103
  #
99
104
  # You can configure the maximum number of polling attempts, and the
100
- # delay (in seconds) between each polling attempt. The waiting condition is set
101
- # by passing a block to {#wait_until}:
105
+ # delay (in seconds) between each polling attempt. The waiting condition is
106
+ # set by passing a block to {#wait_until}:
102
107
  #
103
108
  # # poll for ~25 seconds
104
109
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -129,17 +134,16 @@ module Aws::Glacier
129
134
  # # resource did not enter the desired state in time
130
135
  # end
131
136
  #
137
+ # @yieldparam [Resource] resource to be used in the waiting condition.
132
138
  #
133
- # @yield param [Resource] resource to be used in the waiting condition
134
- #
135
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
136
- # because the waiter has entered a state that it will not transition
137
- # out of, preventing success.
139
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
140
+ # terminates because the waiter has entered a state that it will not
141
+ # transition out of, preventing success.
138
142
  #
139
143
  # yet successful.
140
144
  #
141
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
142
- # while polling for a resource that is not expected.
145
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
146
+ # encountered while polling for a resource that is not expected.
143
147
  #
144
148
  # @raise [NotImplementedError] Raised when the resource does not
145
149
  #
@@ -33,6 +33,18 @@ require 'aws-sdk-glacier/plugins/checksums.rb'
33
33
  Aws::Plugins::GlobalConfiguration.add_identifier(:glacier)
34
34
 
35
35
  module Aws::Glacier
36
+ # An API client for Glacier. To construct a client, you need to configure a `:region` and `:credentials`.
37
+ #
38
+ # client = Aws::Glacier::Client.new(
39
+ # region: region_name,
40
+ # credentials: credentials,
41
+ # # ...
42
+ # )
43
+ #
44
+ # For details on configuring region and credentials see
45
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
46
+ #
47
+ # See {#initialize} for a full list of supported configuration options.
36
48
  class Client < Seahorse::Client::Base
37
49
 
38
50
  include Aws::ClientStubs
@@ -99,7 +111,7 @@ module Aws::Glacier
99
111
  # @option options [required, String] :region
100
112
  # The AWS region to connect to. The configured `:region` is
101
113
  # used to determine the service `:endpoint`. When not passed,
102
- # a default `:region` is search for in the following locations:
114
+ # a default `:region` is searched for in the following locations:
103
115
  #
104
116
  # * `Aws.config[:region]`
105
117
  # * `ENV['AWS_REGION']`
@@ -119,6 +131,12 @@ module Aws::Glacier
119
131
  # When set to `true`, a thread polling for endpoints will be running in
120
132
  # the background every 60 secs (default). Defaults to `false`.
121
133
  #
134
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
135
+ # Used only in `adaptive` retry mode. When true, the request will sleep
136
+ # until there is sufficent client side capacity to retry the request.
137
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
138
+ # not retry instead of sleeping.
139
+ #
122
140
  # @option options [Boolean] :client_side_monitoring (false)
123
141
  # When `true`, client-side metrics will be collected for all API requests from
124
142
  # this client.
@@ -143,6 +161,10 @@ module Aws::Glacier
143
161
  # When `true`, an attempt is made to coerce request parameters into
144
162
  # the required types.
145
163
  #
164
+ # @option options [Boolean] :correct_clock_skew (true)
165
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
166
+ # a clock skew correction and retry requests with skewed client clocks.
167
+ #
146
168
  # @option options [Boolean] :disable_host_prefix_injection (false)
147
169
  # Set to true to disable SDK automatically adding host prefix
148
170
  # to default service endpoint when available.
@@ -150,7 +172,7 @@ module Aws::Glacier
150
172
  # @option options [String] :endpoint
151
173
  # The client endpoint is normally constructed from the `:region`
152
174
  # option. You should only configure an `:endpoint` when connecting
153
- # to test endpoints. This should be avalid HTTP(S) URI.
175
+ # to test endpoints. This should be a valid HTTP(S) URI.
154
176
  #
155
177
  # @option options [Integer] :endpoint_cache_max_entries (1000)
156
178
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -165,7 +187,7 @@ module Aws::Glacier
165
187
  # requests fetching endpoints information. Defaults to 60 sec.
166
188
  #
167
189
  # @option options [Boolean] :endpoint_discovery (false)
168
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
190
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
169
191
  #
170
192
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
171
193
  # The log formatter.
@@ -177,15 +199,29 @@ module Aws::Glacier
177
199
  # The Logger instance to send log messages to. If this option
178
200
  # is not set, logging will be disabled.
179
201
  #
202
+ # @option options [Integer] :max_attempts (3)
203
+ # An integer representing the maximum number attempts that will be made for
204
+ # a single request, including the initial attempt. For example,
205
+ # setting this value to 5 will result in a request being retried up to
206
+ # 4 times. Used in `standard` and `adaptive` retry modes.
207
+ #
180
208
  # @option options [String] :profile ("default")
181
209
  # Used when loading credentials from the shared credentials file
182
210
  # at HOME/.aws/credentials. When not specified, 'default' is used.
183
211
  #
212
+ # @option options [Proc] :retry_backoff
213
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
214
+ # This option is only used in the `legacy` retry mode.
215
+ #
184
216
  # @option options [Float] :retry_base_delay (0.3)
185
- # The base delay in seconds used by the default backoff function.
217
+ # The base delay in seconds used by the default backoff function. This option
218
+ # is only used in the `legacy` retry mode.
186
219
  #
187
220
  # @option options [Symbol] :retry_jitter (:none)
188
- # A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
221
+ # A delay randomiser function used by the default backoff function.
222
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
223
+ # otherwise a Proc that takes and returns a number. This option is only used
224
+ # in the `legacy` retry mode.
189
225
  #
190
226
  # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
191
227
  #
@@ -193,11 +229,30 @@ module Aws::Glacier
193
229
  # The maximum number of times to retry failed requests. Only
194
230
  # ~ 500 level server errors and certain ~ 400 level client errors
195
231
  # are retried. Generally, these are throttling errors, data
196
- # checksum errors, networking errors, timeout errors and auth
197
- # errors from expired credentials.
232
+ # checksum errors, networking errors, timeout errors, auth errors,
233
+ # endpoint discovery, and errors from expired credentials.
234
+ # This option is only used in the `legacy` retry mode.
198
235
  #
199
236
  # @option options [Integer] :retry_max_delay (0)
200
- # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
237
+ # The maximum number of seconds to delay between retries (0 for no limit)
238
+ # used by the default backoff function. This option is only used in the
239
+ # `legacy` retry mode.
240
+ #
241
+ # @option options [String] :retry_mode ("legacy")
242
+ # Specifies which retry algorithm to use. Values are:
243
+ #
244
+ # * `legacy` - The pre-existing retry behavior. This is default value if
245
+ # no retry mode is provided.
246
+ #
247
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
248
+ # This includes support for retry quotas, which limit the number of
249
+ # unsuccessful retries a client can make.
250
+ #
251
+ # * `adaptive` - An experimental retry mode that includes all the
252
+ # functionality of `standard` mode along with automatic client side
253
+ # throttling. This is a provisional mode that may change behavior
254
+ # in the future.
255
+ #
201
256
  #
202
257
  # @option options [String] :secret_access_key
203
258
  #
@@ -220,16 +275,15 @@ module Aws::Glacier
220
275
  # requests through. Formatted like 'http://proxy.com:123'.
221
276
  #
222
277
  # @option options [Float] :http_open_timeout (15) The number of
223
- # seconds to wait when opening a HTTP session before rasing a
278
+ # seconds to wait when opening a HTTP session before raising a
224
279
  # `Timeout::Error`.
225
280
  #
226
281
  # @option options [Integer] :http_read_timeout (60) The default
227
282
  # number of seconds to wait for response data. This value can
228
- # safely be set
229
- # per-request on the session yeidled by {#session_for}.
283
+ # safely be set per-request on the session.
230
284
  #
231
285
  # @option options [Float] :http_idle_timeout (5) The number of
232
- # seconds a connection is allowed to sit idble before it is
286
+ # seconds a connection is allowed to sit idle before it is
233
287
  # considered stale. Stale connections are closed and removed
234
288
  # from the pool before making a request.
235
289
  #
@@ -238,7 +292,7 @@ module Aws::Glacier
238
292
  # request body. This option has no effect unless the request has
239
293
  # "Expect" header set to "100-continue". Defaults to `nil` which
240
294
  # disables this behaviour. This value can safely be set per
241
- # request on the session yeidled by {#session_for}.
295
+ # request on the session.
242
296
  #
243
297
  # @option options [Boolean] :http_wire_trace (false) When `true`,
244
298
  # HTTP debug output will be sent to the `:logger`.
@@ -1232,6 +1286,12 @@ module Aws::Glacier
1232
1286
  # resp.number_of_archives #=> Integer
1233
1287
  # resp.size_in_bytes #=> Integer
1234
1288
  #
1289
+ #
1290
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
1291
+ #
1292
+ # * vault_exists
1293
+ # * vault_not_exists
1294
+ #
1235
1295
  # @overload describe_vault(params = {})
1236
1296
  # @param [Hash] params ({})
1237
1297
  def describe_vault(params = {}, options = {})
@@ -2119,6 +2179,8 @@ module Aws::Glacier
2119
2179
  # * {Types::ListJobsOutput#job_list #job_list} => Array&lt;Types::GlacierJobDescription&gt;
2120
2180
  # * {Types::ListJobsOutput#marker #marker} => String
2121
2181
  #
2182
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2183
+ #
2122
2184
  #
2123
2185
  # @example Example: To list jobs for a vault
2124
2186
  #
@@ -2304,6 +2366,8 @@ module Aws::Glacier
2304
2366
  # * {Types::ListMultipartUploadsOutput#uploads_list #uploads_list} => Array&lt;Types::UploadListElement&gt;
2305
2367
  # * {Types::ListMultipartUploadsOutput#marker #marker} => String
2306
2368
  #
2369
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2370
+ #
2307
2371
  #
2308
2372
  # @example Example: To list all the in-progress multipart uploads for a vault
2309
2373
  #
@@ -2436,6 +2500,8 @@ module Aws::Glacier
2436
2500
  # * {Types::ListPartsOutput#parts #parts} => Array&lt;Types::PartListElement&gt;
2437
2501
  # * {Types::ListPartsOutput#marker #marker} => String
2438
2502
  #
2503
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2504
+ #
2439
2505
  #
2440
2506
  # @example Example: To list the parts of an archive that have been uploaded in a multipart upload
2441
2507
  #
@@ -2666,6 +2732,8 @@ module Aws::Glacier
2666
2732
  # * {Types::ListVaultsOutput#vault_list #vault_list} => Array&lt;Types::DescribeVaultOutput&gt;
2667
2733
  # * {Types::ListVaultsOutput#marker #marker} => String
2668
2734
  #
2735
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2736
+ #
2669
2737
  #
2670
2738
  # @example Example: To list all vaults owned by the calling user's account
2671
2739
  #
@@ -3291,7 +3359,7 @@ module Aws::Glacier
3291
3359
  params: params,
3292
3360
  config: config)
3293
3361
  context[:gem_name] = 'aws-sdk-glacier'
3294
- context[:gem_version] = '1.24.0'
3362
+ context[:gem_version] = '1.29.0'
3295
3363
  Seahorse::Client::Request.new(handlers, context)
3296
3364
  end
3297
3365
 
@@ -3357,10 +3425,10 @@ module Aws::Glacier
3357
3425
  # The following table lists the valid waiter names, the operations they call,
3358
3426
  # and the default `:delay` and `:max_attempts` values.
3359
3427
  #
3360
- # | waiter_name | params | :delay | :max_attempts |
3361
- # | ---------------- | ----------------- | -------- | ------------- |
3362
- # | vault_exists | {#describe_vault} | 3 | 15 |
3363
- # | vault_not_exists | {#describe_vault} | 3 | 15 |
3428
+ # | waiter_name | params | :delay | :max_attempts |
3429
+ # | ---------------- | ----------------------- | -------- | ------------- |
3430
+ # | vault_exists | {Client#describe_vault} | 3 | 15 |
3431
+ # | vault_not_exists | {Client#describe_vault} | 3 | 15 |
3364
3432
  #
3365
3433
  # @raise [Errors::FailureStateError] Raised when the waiter terminates
3366
3434
  # because the waiter has entered a state that it will not transition
@@ -6,6 +6,36 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::Glacier
9
+
10
+ # When Glacier returns an error response, the Ruby SDK constructs and raises an error.
11
+ # These errors all extend Aws::Glacier::Errors::ServiceError < {Aws::Errors::ServiceError}
12
+ #
13
+ # You can rescue all Glacier errors using ServiceError:
14
+ #
15
+ # begin
16
+ # # do stuff
17
+ # rescue Aws::Glacier::Errors::ServiceError
18
+ # # rescues all Glacier API errors
19
+ # end
20
+ #
21
+ #
22
+ # ## Request Context
23
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
24
+ # information about the request that generated the error.
25
+ # See {Seahorse::Client::RequestContext} for more information.
26
+ #
27
+ # ## Error Classes
28
+ # * {InsufficientCapacityException}
29
+ # * {InvalidParameterValueException}
30
+ # * {LimitExceededException}
31
+ # * {MissingParameterValueException}
32
+ # * {PolicyEnforcedException}
33
+ # * {RequestTimeoutException}
34
+ # * {ResourceNotFoundException}
35
+ # * {ServiceUnavailableException}
36
+ #
37
+ # Additionally, error classes are dynamically generated for service errors based on the error code
38
+ # if they are not defined above.
9
39
  module Errors
10
40
 
11
41
  extend Aws::Errors::DynamicErrors
@@ -33,7 +63,6 @@ module Aws::Glacier
33
63
  def message
34
64
  @message || @data[:message]
35
65
  end
36
-
37
66
  end
38
67
 
39
68
  class InvalidParameterValueException < ServiceError
@@ -59,7 +88,6 @@ module Aws::Glacier
59
88
  def message
60
89
  @message || @data[:message]
61
90
  end
62
-
63
91
  end
64
92
 
65
93
  class LimitExceededException < ServiceError
@@ -85,7 +113,6 @@ module Aws::Glacier
85
113
  def message
86
114
  @message || @data[:message]
87
115
  end
88
-
89
116
  end
90
117
 
91
118
  class MissingParameterValueException < ServiceError
@@ -111,7 +138,6 @@ module Aws::Glacier
111
138
  def message
112
139
  @message || @data[:message]
113
140
  end
114
-
115
141
  end
116
142
 
117
143
  class PolicyEnforcedException < ServiceError
@@ -137,7 +163,6 @@ module Aws::Glacier
137
163
  def message
138
164
  @message || @data[:message]
139
165
  end
140
-
141
166
  end
142
167
 
143
168
  class RequestTimeoutException < ServiceError
@@ -163,7 +188,6 @@ module Aws::Glacier
163
188
  def message
164
189
  @message || @data[:message]
165
190
  end
166
-
167
191
  end
168
192
 
169
193
  class ResourceNotFoundException < ServiceError
@@ -189,7 +213,6 @@ module Aws::Glacier
189
213
  def message
190
214
  @message || @data[:message]
191
215
  end
192
-
193
216
  end
194
217
 
195
218
  class ServiceUnavailableException < ServiceError
@@ -215,7 +238,6 @@ module Aws::Glacier
215
238
  def message
216
239
  @message || @data[:message]
217
240
  end
218
-
219
241
  end
220
242
 
221
243
  end
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::Glacier
9
+
9
10
  class Job
10
11
 
11
12
  extend Aws::Deprecations
@@ -27,6 +28,7 @@ module Aws::Glacier
27
28
  @id = extract_id(args, options)
28
29
  @data = options.delete(:data)
29
30
  @client = options.delete(:client) || Client.new(options)
31
+ @waiter_block_warned = false
30
32
  end
31
33
 
32
34
  # @!group Read-Only Attributes
@@ -256,7 +258,8 @@ module Aws::Glacier
256
258
  # Waiter polls an API operation until a resource enters a desired
257
259
  # state.
258
260
  #
259
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
261
+ # @note The waiting operation is performed on a copy. The original resource
262
+ # remains unchanged.
260
263
  #
261
264
  # ## Basic Usage
262
265
  #
@@ -269,13 +272,15 @@ module Aws::Glacier
269
272
  #
270
273
  # ## Example
271
274
  #
272
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
275
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
276
+ # instance.state.name == 'running'
277
+ # end
273
278
  #
274
279
  # ## Configuration
275
280
  #
276
281
  # You can configure the maximum number of polling attempts, and the
277
- # delay (in seconds) between each polling attempt. The waiting condition is set
278
- # by passing a block to {#wait_until}:
282
+ # delay (in seconds) between each polling attempt. The waiting condition is
283
+ # set by passing a block to {#wait_until}:
279
284
  #
280
285
  # # poll for ~25 seconds
281
286
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -306,17 +311,16 @@ module Aws::Glacier
306
311
  # # resource did not enter the desired state in time
307
312
  # end
308
313
  #
314
+ # @yieldparam [Resource] resource to be used in the waiting condition.
309
315
  #
310
- # @yield param [Resource] resource to be used in the waiting condition
311
- #
312
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
313
- # because the waiter has entered a state that it will not transition
314
- # out of, preventing success.
316
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
317
+ # terminates because the waiter has entered a state that it will not
318
+ # transition out of, preventing success.
315
319
  #
316
320
  # yet successful.
317
321
  #
318
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
319
- # while polling for a resource that is not expected.
322
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
323
+ # encountered while polling for a resource that is not expected.
320
324
  #
321
325
  # @raise [NotImplementedError] Raised when the resource does not
322
326
  #
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::Glacier
9
+
9
10
  class MultipartUpload
10
11
 
11
12
  extend Aws::Deprecations
@@ -27,6 +28,7 @@ module Aws::Glacier
27
28
  @id = extract_id(args, options)
28
29
  @data = options.delete(:data)
29
30
  @client = options.delete(:client) || Client.new(options)
31
+ @waiter_block_warned = false
30
32
  end
31
33
 
32
34
  # @!group Read-Only Attributes
@@ -109,7 +111,8 @@ module Aws::Glacier
109
111
  # Waiter polls an API operation until a resource enters a desired
110
112
  # state.
111
113
  #
112
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
114
+ # @note The waiting operation is performed on a copy. The original resource
115
+ # remains unchanged.
113
116
  #
114
117
  # ## Basic Usage
115
118
  #
@@ -122,13 +125,15 @@ module Aws::Glacier
122
125
  #
123
126
  # ## Example
124
127
  #
125
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
128
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
129
+ # instance.state.name == 'running'
130
+ # end
126
131
  #
127
132
  # ## Configuration
128
133
  #
129
134
  # You can configure the maximum number of polling attempts, and the
130
- # delay (in seconds) between each polling attempt. The waiting condition is set
131
- # by passing a block to {#wait_until}:
135
+ # delay (in seconds) between each polling attempt. The waiting condition is
136
+ # set by passing a block to {#wait_until}:
132
137
  #
133
138
  # # poll for ~25 seconds
134
139
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -159,17 +164,16 @@ module Aws::Glacier
159
164
  # # resource did not enter the desired state in time
160
165
  # end
161
166
  #
167
+ # @yieldparam [Resource] resource to be used in the waiting condition.
162
168
  #
163
- # @yield param [Resource] resource to be used in the waiting condition
164
- #
165
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
166
- # because the waiter has entered a state that it will not transition
167
- # out of, preventing success.
169
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
170
+ # terminates because the waiter has entered a state that it will not
171
+ # transition out of, preventing success.
168
172
  #
169
173
  # yet successful.
170
174
  #
171
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
172
- # while polling for a resource that is not expected.
175
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
176
+ # encountered while polling for a resource that is not expected.
173
177
  #
174
178
  # @raise [NotImplementedError] Raised when the resource does not
175
179
  #
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::Glacier
9
+
9
10
  class Notification
10
11
 
11
12
  extend Aws::Deprecations
@@ -24,6 +25,7 @@ module Aws::Glacier
24
25
  @vault_name = extract_vault_name(args, options)
25
26
  @data = options.delete(:data)
26
27
  @client = options.delete(:client) || Client.new(options)
28
+ @waiter_block_warned = false
27
29
  end
28
30
 
29
31
  # @!group Read-Only Attributes
@@ -95,7 +97,8 @@ module Aws::Glacier
95
97
  # Waiter polls an API operation until a resource enters a desired
96
98
  # state.
97
99
  #
98
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
100
+ # @note The waiting operation is performed on a copy. The original resource
101
+ # remains unchanged.
99
102
  #
100
103
  # ## Basic Usage
101
104
  #
@@ -108,13 +111,15 @@ module Aws::Glacier
108
111
  #
109
112
  # ## Example
110
113
  #
111
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
114
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
115
+ # instance.state.name == 'running'
116
+ # end
112
117
  #
113
118
  # ## Configuration
114
119
  #
115
120
  # You can configure the maximum number of polling attempts, and the
116
- # delay (in seconds) between each polling attempt. The waiting condition is set
117
- # by passing a block to {#wait_until}:
121
+ # delay (in seconds) between each polling attempt. The waiting condition is
122
+ # set by passing a block to {#wait_until}:
118
123
  #
119
124
  # # poll for ~25 seconds
120
125
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -145,17 +150,16 @@ module Aws::Glacier
145
150
  # # resource did not enter the desired state in time
146
151
  # end
147
152
  #
153
+ # @yieldparam [Resource] resource to be used in the waiting condition.
148
154
  #
149
- # @yield param [Resource] resource to be used in the waiting condition
150
- #
151
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
152
- # because the waiter has entered a state that it will not transition
153
- # out of, preventing success.
155
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
156
+ # terminates because the waiter has entered a state that it will not
157
+ # transition out of, preventing success.
154
158
  #
155
159
  # yet successful.
156
160
  #
157
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
158
- # while polling for a resource that is not expected.
161
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
162
+ # encountered while polling for a resource that is not expected.
159
163
  #
160
164
  # @raise [NotImplementedError] Raised when the resource does not
161
165
  #
@@ -6,6 +6,18 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::Glacier
9
+
10
+ # This class provides a resource oriented interface for Glacier.
11
+ # To create a resource object:
12
+ #
13
+ # resource = Aws::Glacier::Resource.new(region: 'us-west-2')
14
+ #
15
+ # You can supply a client object with custom configuration that will be used for all resource operations.
16
+ # If you do not pass `:client`, a default client will be constructed.
17
+ #
18
+ # client = Aws::Glacier::Client.new(region: 'us-west-2')
19
+ # resource = Aws::Glacier::Resource.new(client: client)
20
+ #
9
21
  class Resource
10
22
 
11
23
  # @param options ({})
@@ -32,7 +44,7 @@ module Aws::Glacier
32
44
  # @return [Vault]
33
45
  def create_vault(options = {})
34
46
  options = options.merge(account_id: "-")
35
- resp = @client.create_vault(options)
47
+ @client.create_vault(options)
36
48
  Vault.new(
37
49
  account_id: options[:account_id],
38
50
  name: options[:vault_name],
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::Glacier
9
+
9
10
  class Vault
10
11
 
11
12
  extend Aws::Deprecations
@@ -24,6 +25,7 @@ module Aws::Glacier
24
25
  @name = extract_name(args, options)
25
26
  @data = options.delete(:data)
26
27
  @client = options.delete(:client) || Client.new(options)
28
+ @waiter_block_warned = false
27
29
  end
28
30
 
29
31
  # @!group Read-Only Attributes
@@ -120,7 +122,8 @@ module Aws::Glacier
120
122
  # Waiter polls an API operation until a resource enters a desired
121
123
  # state.
122
124
  #
123
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
125
+ # @note The waiting operation is performed on a copy. The original resource
126
+ # remains unchanged.
124
127
  #
125
128
  # ## Basic Usage
126
129
  #
@@ -133,13 +136,15 @@ module Aws::Glacier
133
136
  #
134
137
  # ## Example
135
138
  #
136
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
139
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
140
+ # instance.state.name == 'running'
141
+ # end
137
142
  #
138
143
  # ## Configuration
139
144
  #
140
145
  # 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}:
146
+ # delay (in seconds) between each polling attempt. The waiting condition is
147
+ # set by passing a block to {#wait_until}:
143
148
  #
144
149
  # # poll for ~25 seconds
145
150
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -170,17 +175,16 @@ module Aws::Glacier
170
175
  # # resource did not enter the desired state in time
171
176
  # end
172
177
  #
178
+ # @yieldparam [Resource] resource to be used in the waiting condition.
173
179
  #
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.
180
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
181
+ # terminates because the waiter has entered a state that it will not
182
+ # transition out of, preventing success.
179
183
  #
180
184
  # yet successful.
181
185
  #
182
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
183
- # while polling for a resource that is not expected.
186
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
187
+ # encountered while polling for a resource that is not expected.
184
188
  #
185
189
  # @raise [NotImplementedError] Raised when the resource does not
186
190
  #
@@ -8,6 +8,68 @@
8
8
  require 'aws-sdk-core/waiters'
9
9
 
10
10
  module Aws::Glacier
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
+ # | vault_exists | {Client#describe_vault} | 3 | 15 |
71
+ # | vault_not_exists | {Client#describe_vault} | 3 | 15 |
72
+ #
11
73
  module Waiters
12
74
 
13
75
  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.24.0
4
+ version: 1.29.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-07-10 00:00:00.000000000 Z
11
+ date: 2020-05-28 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.58.0
22
+ version: 3.71.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.58.0
32
+ version: 3.71.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