aws-sdk-glacier 1.25.0 → 1.30.1

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: ad4ad8f73b753841b94356f7f8b069c64a4c8360
4
- data.tar.gz: 42bf341c786cfd4ca5c14a20ec0e81b13b5cb801
2
+ SHA256:
3
+ metadata.gz: 7a5acbad81087c4ceb44e467f2a4e25fc56a44f4f8453b4860cad1f531b981b5
4
+ data.tar.gz: 9d4c6c2f7394d85c3bf58d09303be93f094a4c9a02537f829138aa4469ca3871
5
5
  SHA512:
6
- metadata.gz: 202340922bec9bcf101a03f7b94ab0a2a5c12a02d2704b552bd33e0c523d05c8141b123e2a3dfef8f3259029cfc1b415ab00e3a412ac3d73ffa4639b6c5dc814
7
- data.tar.gz: 380634b14b1d9d998f2771d93f306b6ca487baff188b62d869f7d0ecc373b92683c7896ecd15e2ea94963fb218ed0b203afe54b92ba83bf47cbe669bf16dac91
6
+ metadata.gz: 59789de60ad2d43bdcc0ca68600075b36ed269de53badacf8a84c79fe09fef9a77480844f0d5c39e806f0fb4524bc84aa6f84f410eb25a21de443e56383cd14f
7
+ data.tar.gz: fe11ce1af3e89b5de1962bfb7b5a5576c20d2dcaa6c18f443e7062e9eb7b1a818dc018d517764fc74c406c3ca30b1e78f33bbd3a60ed0553e423d039463c9d5e
@@ -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.25.0'
55
+ GEM_VERSION = '1.30.1'
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
  #
@@ -24,6 +24,7 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
24
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
25
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
26
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
27
+ require 'aws-sdk-core/plugins/http_checksum.rb'
27
28
  require 'aws-sdk-core/plugins/signature_v4.rb'
28
29
  require 'aws-sdk-core/plugins/protocols/rest_json.rb'
29
30
  require 'aws-sdk-glacier/plugins/account_id.rb'
@@ -33,6 +34,18 @@ require 'aws-sdk-glacier/plugins/checksums.rb'
33
34
  Aws::Plugins::GlobalConfiguration.add_identifier(:glacier)
34
35
 
35
36
  module Aws::Glacier
37
+ # An API client for Glacier. To construct a client, you need to configure a `:region` and `:credentials`.
38
+ #
39
+ # client = Aws::Glacier::Client.new(
40
+ # region: region_name,
41
+ # credentials: credentials,
42
+ # # ...
43
+ # )
44
+ #
45
+ # For details on configuring region and credentials see
46
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
47
+ #
48
+ # See {#initialize} for a full list of supported configuration options.
36
49
  class Client < Seahorse::Client::Base
37
50
 
38
51
  include Aws::ClientStubs
@@ -60,6 +73,7 @@ module Aws::Glacier
60
73
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
61
74
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
62
75
  add_plugin(Aws::Plugins::TransferEncoding)
76
+ add_plugin(Aws::Plugins::HttpChecksum)
63
77
  add_plugin(Aws::Plugins::SignatureV4)
64
78
  add_plugin(Aws::Plugins::Protocols::RestJson)
65
79
  add_plugin(Aws::Glacier::Plugins::AccountId)
@@ -99,7 +113,7 @@ module Aws::Glacier
99
113
  # @option options [required, String] :region
100
114
  # The AWS region to connect to. The configured `:region` is
101
115
  # used to determine the service `:endpoint`. When not passed,
102
- # a default `:region` is search for in the following locations:
116
+ # a default `:region` is searched for in the following locations:
103
117
  #
104
118
  # * `Aws.config[:region]`
105
119
  # * `ENV['AWS_REGION']`
@@ -119,6 +133,12 @@ module Aws::Glacier
119
133
  # When set to `true`, a thread polling for endpoints will be running in
120
134
  # the background every 60 secs (default). Defaults to `false`.
121
135
  #
136
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
137
+ # Used only in `adaptive` retry mode. When true, the request will sleep
138
+ # until there is sufficent client side capacity to retry the request.
139
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
140
+ # not retry instead of sleeping.
141
+ #
122
142
  # @option options [Boolean] :client_side_monitoring (false)
123
143
  # When `true`, client-side metrics will be collected for all API requests from
124
144
  # this client.
@@ -143,6 +163,10 @@ module Aws::Glacier
143
163
  # When `true`, an attempt is made to coerce request parameters into
144
164
  # the required types.
145
165
  #
166
+ # @option options [Boolean] :correct_clock_skew (true)
167
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
168
+ # a clock skew correction and retry requests with skewed client clocks.
169
+ #
146
170
  # @option options [Boolean] :disable_host_prefix_injection (false)
147
171
  # Set to true to disable SDK automatically adding host prefix
148
172
  # to default service endpoint when available.
@@ -150,7 +174,7 @@ module Aws::Glacier
150
174
  # @option options [String] :endpoint
151
175
  # The client endpoint is normally constructed from the `:region`
152
176
  # option. You should only configure an `:endpoint` when connecting
153
- # to test endpoints. This should be avalid HTTP(S) URI.
177
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
154
178
  #
155
179
  # @option options [Integer] :endpoint_cache_max_entries (1000)
156
180
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -165,7 +189,7 @@ module Aws::Glacier
165
189
  # requests fetching endpoints information. Defaults to 60 sec.
166
190
  #
167
191
  # @option options [Boolean] :endpoint_discovery (false)
168
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
192
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
169
193
  #
170
194
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
171
195
  # The log formatter.
@@ -177,15 +201,29 @@ module Aws::Glacier
177
201
  # The Logger instance to send log messages to. If this option
178
202
  # is not set, logging will be disabled.
179
203
  #
204
+ # @option options [Integer] :max_attempts (3)
205
+ # An integer representing the maximum number attempts that will be made for
206
+ # a single request, including the initial attempt. For example,
207
+ # setting this value to 5 will result in a request being retried up to
208
+ # 4 times. Used in `standard` and `adaptive` retry modes.
209
+ #
180
210
  # @option options [String] :profile ("default")
181
211
  # Used when loading credentials from the shared credentials file
182
212
  # at HOME/.aws/credentials. When not specified, 'default' is used.
183
213
  #
214
+ # @option options [Proc] :retry_backoff
215
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
216
+ # This option is only used in the `legacy` retry mode.
217
+ #
184
218
  # @option options [Float] :retry_base_delay (0.3)
185
- # The base delay in seconds used by the default backoff function.
219
+ # The base delay in seconds used by the default backoff function. This option
220
+ # is only used in the `legacy` retry mode.
186
221
  #
187
222
  # @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.
223
+ # A delay randomiser function used by the default backoff function.
224
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
225
+ # otherwise a Proc that takes and returns a number. This option is only used
226
+ # in the `legacy` retry mode.
189
227
  #
190
228
  # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
191
229
  #
@@ -193,11 +231,30 @@ module Aws::Glacier
193
231
  # The maximum number of times to retry failed requests. Only
194
232
  # ~ 500 level server errors and certain ~ 400 level client errors
195
233
  # are retried. Generally, these are throttling errors, data
196
- # checksum errors, networking errors, timeout errors and auth
197
- # errors from expired credentials.
234
+ # checksum errors, networking errors, timeout errors, auth errors,
235
+ # endpoint discovery, and errors from expired credentials.
236
+ # This option is only used in the `legacy` retry mode.
198
237
  #
199
238
  # @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.
239
+ # The maximum number of seconds to delay between retries (0 for no limit)
240
+ # used by the default backoff function. This option is only used in the
241
+ # `legacy` retry mode.
242
+ #
243
+ # @option options [String] :retry_mode ("legacy")
244
+ # Specifies which retry algorithm to use. Values are:
245
+ #
246
+ # * `legacy` - The pre-existing retry behavior. This is default value if
247
+ # no retry mode is provided.
248
+ #
249
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
250
+ # This includes support for retry quotas, which limit the number of
251
+ # unsuccessful retries a client can make.
252
+ #
253
+ # * `adaptive` - An experimental retry mode that includes all the
254
+ # functionality of `standard` mode along with automatic client side
255
+ # throttling. This is a provisional mode that may change behavior
256
+ # in the future.
257
+ #
201
258
  #
202
259
  # @option options [String] :secret_access_key
203
260
  #
@@ -220,16 +277,15 @@ module Aws::Glacier
220
277
  # requests through. Formatted like 'http://proxy.com:123'.
221
278
  #
222
279
  # @option options [Float] :http_open_timeout (15) The number of
223
- # seconds to wait when opening a HTTP session before rasing a
280
+ # seconds to wait when opening a HTTP session before raising a
224
281
  # `Timeout::Error`.
225
282
  #
226
283
  # @option options [Integer] :http_read_timeout (60) The default
227
284
  # 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}.
285
+ # safely be set per-request on the session.
230
286
  #
231
287
  # @option options [Float] :http_idle_timeout (5) The number of
232
- # seconds a connection is allowed to sit idble before it is
288
+ # seconds a connection is allowed to sit idle before it is
233
289
  # considered stale. Stale connections are closed and removed
234
290
  # from the pool before making a request.
235
291
  #
@@ -238,7 +294,7 @@ module Aws::Glacier
238
294
  # request body. This option has no effect unless the request has
239
295
  # "Expect" header set to "100-continue". Defaults to `nil` which
240
296
  # disables this behaviour. This value can safely be set per
241
- # request on the session yeidled by {#session_for}.
297
+ # request on the session.
242
298
  #
243
299
  # @option options [Boolean] :http_wire_trace (false) When `true`,
244
300
  # HTTP debug output will be sent to the `:logger`.
@@ -1232,6 +1288,12 @@ module Aws::Glacier
1232
1288
  # resp.number_of_archives #=> Integer
1233
1289
  # resp.size_in_bytes #=> Integer
1234
1290
  #
1291
+ #
1292
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
1293
+ #
1294
+ # * vault_exists
1295
+ # * vault_not_exists
1296
+ #
1235
1297
  # @overload describe_vault(params = {})
1236
1298
  # @param [Hash] params ({})
1237
1299
  def describe_vault(params = {}, options = {})
@@ -2119,6 +2181,8 @@ module Aws::Glacier
2119
2181
  # * {Types::ListJobsOutput#job_list #job_list} => Array&lt;Types::GlacierJobDescription&gt;
2120
2182
  # * {Types::ListJobsOutput#marker #marker} => String
2121
2183
  #
2184
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2185
+ #
2122
2186
  #
2123
2187
  # @example Example: To list jobs for a vault
2124
2188
  #
@@ -2304,6 +2368,8 @@ module Aws::Glacier
2304
2368
  # * {Types::ListMultipartUploadsOutput#uploads_list #uploads_list} => Array&lt;Types::UploadListElement&gt;
2305
2369
  # * {Types::ListMultipartUploadsOutput#marker #marker} => String
2306
2370
  #
2371
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2372
+ #
2307
2373
  #
2308
2374
  # @example Example: To list all the in-progress multipart uploads for a vault
2309
2375
  #
@@ -2436,6 +2502,8 @@ module Aws::Glacier
2436
2502
  # * {Types::ListPartsOutput#parts #parts} => Array&lt;Types::PartListElement&gt;
2437
2503
  # * {Types::ListPartsOutput#marker #marker} => String
2438
2504
  #
2505
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2506
+ #
2439
2507
  #
2440
2508
  # @example Example: To list the parts of an archive that have been uploaded in a multipart upload
2441
2509
  #
@@ -2666,6 +2734,8 @@ module Aws::Glacier
2666
2734
  # * {Types::ListVaultsOutput#vault_list #vault_list} => Array&lt;Types::DescribeVaultOutput&gt;
2667
2735
  # * {Types::ListVaultsOutput#marker #marker} => String
2668
2736
  #
2737
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2738
+ #
2669
2739
  #
2670
2740
  # @example Example: To list all vaults owned by the calling user's account
2671
2741
  #
@@ -3291,7 +3361,7 @@ module Aws::Glacier
3291
3361
  params: params,
3292
3362
  config: config)
3293
3363
  context[:gem_name] = 'aws-sdk-glacier'
3294
- context[:gem_version] = '1.25.0'
3364
+ context[:gem_version] = '1.30.1'
3295
3365
  Seahorse::Client::Request.new(handlers, context)
3296
3366
  end
3297
3367
 
@@ -3357,10 +3427,10 @@ module Aws::Glacier
3357
3427
  # The following table lists the valid waiter names, the operations they call,
3358
3428
  # and the default `:delay` and `:max_attempts` values.
3359
3429
  #
3360
- # | waiter_name | params | :delay | :max_attempts |
3361
- # | ---------------- | ----------------- | -------- | ------------- |
3362
- # | vault_exists | {#describe_vault} | 3 | 15 |
3363
- # | vault_not_exists | {#describe_vault} | 3 | 15 |
3430
+ # | waiter_name | params | :delay | :max_attempts |
3431
+ # | ---------------- | ----------------------- | -------- | ------------- |
3432
+ # | vault_exists | {Client#describe_vault} | 3 | 15 |
3433
+ # | vault_not_exists | {Client#describe_vault} | 3 | 15 |
3364
3434
  #
3365
3435
  # @raise [Errors::FailureStateError] Raised when the waiter terminates
3366
3436
  # 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.25.0
4
+ version: 1.30.1
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-25 00:00:00.000000000 Z
11
+ date: 2020-06-11 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.61.1
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.61.1
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