aws-sdk-glacier 1.0.0.rc1 → 1.0.0.rc2
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-glacier.rb +2 -2
- data/lib/aws-sdk-glacier/account.rb +116 -118
- data/lib/aws-sdk-glacier/archive.rb +148 -150
- data/lib/aws-sdk-glacier/client.rb +2657 -2425
- data/lib/aws-sdk-glacier/client_api.rb +896 -898
- data/lib/aws-sdk-glacier/errors.rb +4 -13
- data/lib/aws-sdk-glacier/job.rb +300 -302
- data/lib/aws-sdk-glacier/multipart_upload.rb +228 -230
- data/lib/aws-sdk-glacier/notification.rb +151 -153
- data/lib/aws-sdk-glacier/resource.rb +61 -63
- data/lib/aws-sdk-glacier/types.rb +2207 -2045
- data/lib/aws-sdk-glacier/vault.rb +454 -456
- data/lib/aws-sdk-glacier/waiters.rb +76 -77
- metadata +2 -2
@@ -1,524 +1,522 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
8
|
+
module Aws::Glacier
|
9
|
+
class Vault
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(account_id, name, options = {})
|
14
|
+
# @param [String] account_id
|
15
|
+
# @param [String] name
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :account_id
|
19
|
+
# @option options [required, String] :name
|
20
|
+
# @option options [Client] :client
|
21
|
+
def initialize(*args)
|
22
|
+
options = Hash === args.last ? args.pop.dup : {}
|
23
|
+
@account_id = extract_account_id(args, options)
|
24
|
+
@name = extract_name(args, options)
|
25
|
+
@data = options.delete(:data)
|
26
|
+
@client = options.delete(:client) || Client.new(options)
|
27
|
+
end
|
29
28
|
|
30
|
-
|
29
|
+
# @!group Read-Only Attributes
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
# @return [String]
|
32
|
+
def account_id
|
33
|
+
@account_id
|
34
|
+
end
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
# @return [String]
|
37
|
+
def name
|
38
|
+
@name
|
39
|
+
end
|
40
|
+
alias :vault_name :name
|
42
41
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
# The Amazon Resource Name (ARN) of the vault.
|
43
|
+
# @return [String]
|
44
|
+
def vault_arn
|
45
|
+
data.vault_arn
|
46
|
+
end
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
48
|
+
# The Universal Coordinated Time (UTC) date when the vault was created.
|
49
|
+
# This value should be a string in the ISO 8601 date format, for example
|
50
|
+
# `2012-03-20T17:03:43.221Z`.
|
51
|
+
# @return [Time]
|
52
|
+
def creation_date
|
53
|
+
data.creation_date
|
54
|
+
end
|
56
55
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
56
|
+
# The Universal Coordinated Time (UTC) date when Amazon Glacier
|
57
|
+
# completed the last vault inventory. This value should be a string in
|
58
|
+
# the ISO 8601 date format, for example `2012-03-20T17:03:43.221Z`.
|
59
|
+
# @return [Time]
|
60
|
+
def last_inventory_date
|
61
|
+
data.last_inventory_date
|
62
|
+
end
|
64
63
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
64
|
+
# The number of archives in the vault as of the last inventory date.
|
65
|
+
# This field will return `null` if an inventory has not yet run on the
|
66
|
+
# vault, for example if you just created the vault.
|
67
|
+
# @return [Integer]
|
68
|
+
def number_of_archives
|
69
|
+
data.number_of_archives
|
70
|
+
end
|
72
71
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
72
|
+
# Total size, in bytes, of the archives in the vault as of the last
|
73
|
+
# inventory date. This field will return null if an inventory has not
|
74
|
+
# yet run on the vault, for example if you just created the vault.
|
75
|
+
# @return [Integer]
|
76
|
+
def size_in_bytes
|
77
|
+
data.size_in_bytes
|
78
|
+
end
|
80
79
|
|
81
|
-
|
80
|
+
# @!endgroup
|
82
81
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
82
|
+
# @return [Client]
|
83
|
+
def client
|
84
|
+
@client
|
85
|
+
end
|
87
86
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
87
|
+
# Loads, or reloads {#data} for the current {Vault}.
|
88
|
+
# Returns `self` making it possible to chain methods.
|
89
|
+
#
|
90
|
+
# vault.reload.data
|
91
|
+
#
|
92
|
+
# @return [self]
|
93
|
+
def load
|
94
|
+
resp = @client.describe_vault(
|
95
|
+
vault_name: @name,
|
96
|
+
account_id: @account_id
|
97
|
+
)
|
98
|
+
@data = resp.data
|
99
|
+
self
|
100
|
+
end
|
101
|
+
alias :reload :load
|
102
|
+
|
103
|
+
# @return [Types::DescribeVaultOutput]
|
104
|
+
# Returns the data for this {Vault}. Calls
|
105
|
+
# {Client#describe_vault} if {#data_loaded?} is `false`.
|
106
|
+
def data
|
107
|
+
load unless @data
|
108
|
+
@data
|
109
|
+
end
|
111
110
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
111
|
+
# @return [Boolean]
|
112
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
113
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
114
|
+
def data_loaded?
|
115
|
+
!!@data
|
116
|
+
end
|
117
|
+
|
118
|
+
# @!group Actions
|
119
|
+
|
120
|
+
# @example Request syntax with placeholder values
|
121
|
+
#
|
122
|
+
# vault.create()
|
123
|
+
# @param [Hash] options ({})
|
124
|
+
# @return [Types::CreateVaultOutput]
|
125
|
+
def create(options = {})
|
126
|
+
options = options.merge(
|
127
|
+
vault_name: @name,
|
128
|
+
account_id: @account_id
|
129
|
+
)
|
130
|
+
resp = @client.create_vault(options)
|
131
|
+
resp.data
|
132
|
+
end
|
118
133
|
|
119
|
-
|
134
|
+
# @example Request syntax with placeholder values
|
135
|
+
#
|
136
|
+
# vault.delete()
|
137
|
+
# @param [Hash] options ({})
|
138
|
+
# @return [EmptyStructure]
|
139
|
+
def delete(options = {})
|
140
|
+
options = options.merge(
|
141
|
+
vault_name: @name,
|
142
|
+
account_id: @account_id
|
143
|
+
)
|
144
|
+
resp = @client.delete_vault(options)
|
145
|
+
resp.data
|
146
|
+
end
|
120
147
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
148
|
+
# @example Request syntax with placeholder values
|
149
|
+
#
|
150
|
+
# vault.initiate_inventory_retrieval()
|
151
|
+
# @param [Hash] options ({})
|
152
|
+
# @return [Job]
|
153
|
+
def initiate_inventory_retrieval(options = {})
|
154
|
+
options = Aws::Util.deep_merge(options,
|
155
|
+
vault_name: @name,
|
156
|
+
account_id: @account_id,
|
157
|
+
job_parameters: {
|
158
|
+
type: "inventory-retrieval"
|
159
|
+
}
|
160
|
+
)
|
161
|
+
resp = @client.initiate_job(options)
|
162
|
+
Job.new(
|
163
|
+
id: resp.data.job_id,
|
164
|
+
account_id: @account_id,
|
165
|
+
vault_name: @name,
|
166
|
+
client: @client
|
167
|
+
)
|
168
|
+
end
|
134
169
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
170
|
+
# @example Request syntax with placeholder values
|
171
|
+
#
|
172
|
+
# multipartupload = vault.initiate_multipart_upload({
|
173
|
+
# archive_description: "string",
|
174
|
+
# part_size: 1,
|
175
|
+
# })
|
176
|
+
# @param [Hash] options ({})
|
177
|
+
# @option options [String] :archive_description
|
178
|
+
# The archive description that you are uploading in parts.
|
179
|
+
#
|
180
|
+
# The part size must be a megabyte (1024 KB) multiplied by a power of 2,
|
181
|
+
# for example 1048576 (1 MB), 2097152 (2 MB), 4194304 (4 MB), 8388608 (8
|
182
|
+
# MB), and so on. The minimum allowable part size is 1 MB, and the
|
183
|
+
# maximum is 4 GB (4096 MB).
|
184
|
+
# @option options [Integer] :part_size
|
185
|
+
# The size of each part except the last, in bytes. The last part can be
|
186
|
+
# smaller than this part size.
|
187
|
+
# @return [MultipartUpload]
|
188
|
+
def initiate_multipart_upload(options = {})
|
189
|
+
options = options.merge(
|
190
|
+
vault_name: @name,
|
191
|
+
account_id: @account_id
|
192
|
+
)
|
193
|
+
resp = @client.initiate_multipart_upload(options)
|
194
|
+
MultipartUpload.new(
|
195
|
+
id: resp.data.upload_id,
|
196
|
+
account_id: @account_id,
|
197
|
+
vault_name: @name,
|
198
|
+
client: @client
|
199
|
+
)
|
200
|
+
end
|
148
201
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
202
|
+
# @example Request syntax with placeholder values
|
203
|
+
#
|
204
|
+
# archive = vault.upload_archive({
|
205
|
+
# archive_description: "string",
|
206
|
+
# checksum: "string",
|
207
|
+
# body: "data",
|
208
|
+
# })
|
209
|
+
# @param [Hash] options ({})
|
210
|
+
# @option options [String] :archive_description
|
211
|
+
# The optional description of the archive you are uploading.
|
212
|
+
# @option options [String] :checksum
|
213
|
+
# The SHA256 tree hash of the data being uploaded.
|
214
|
+
# @option options [String, IO] :body
|
215
|
+
# The data to upload.
|
216
|
+
# @return [Archive]
|
217
|
+
def upload_archive(options = {})
|
218
|
+
options = options.merge(
|
219
|
+
vault_name: @name,
|
220
|
+
account_id: @account_id
|
221
|
+
)
|
222
|
+
resp = @client.upload_archive(options)
|
223
|
+
Archive.new(
|
224
|
+
id: resp.data.archive_id,
|
225
|
+
account_id: @account_id,
|
226
|
+
vault_name: @name,
|
227
|
+
client: @client
|
228
|
+
)
|
229
|
+
end
|
230
|
+
|
231
|
+
# @!group Associations
|
232
|
+
|
233
|
+
# @return [Account]
|
234
|
+
def account
|
235
|
+
Account.new(
|
236
|
+
id: @account_id,
|
237
|
+
client: @client
|
238
|
+
)
|
239
|
+
end
|
240
|
+
|
241
|
+
# @param [String] id
|
242
|
+
# @return [Archive]
|
243
|
+
def archive(id)
|
244
|
+
Archive.new(
|
245
|
+
account_id: @account_id,
|
246
|
+
vault_name: @name,
|
247
|
+
id: id,
|
248
|
+
client: @client
|
249
|
+
)
|
250
|
+
end
|
170
251
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
# MB), and so on. The minimum allowable part size is 1 MB, and the
|
184
|
-
# maximum is 4 GB (4096 MB).
|
185
|
-
# @option options [Integer] :part_size
|
186
|
-
# The size of each part except the last, in bytes. The last part can be
|
187
|
-
# smaller than this part size.
|
188
|
-
# @return [MultipartUpload]
|
189
|
-
def initiate_multipart_upload(options = {})
|
252
|
+
# @example Request syntax with placeholder values
|
253
|
+
#
|
254
|
+
# completed_jobs = vault.completed_jobs({
|
255
|
+
# statuscode: "string",
|
256
|
+
# })
|
257
|
+
# @param [Hash] options ({})
|
258
|
+
# @option options [String] :statuscode
|
259
|
+
# The type of job status to return. You can specify the following
|
260
|
+
# values: `InProgress`, `Succeeded`, or `Failed`.
|
261
|
+
# @return [Job::Collection]
|
262
|
+
def completed_jobs(options = {})
|
263
|
+
batches = Enumerator.new do |y|
|
190
264
|
options = options.merge(
|
191
|
-
vault_name: @name,
|
192
|
-
account_id: @account_id
|
193
|
-
)
|
194
|
-
resp = @client.initiate_multipart_upload(options)
|
195
|
-
MultipartUpload.new(
|
196
|
-
id: resp.data.upload_id,
|
197
265
|
account_id: @account_id,
|
198
266
|
vault_name: @name,
|
199
|
-
|
267
|
+
completed: "true"
|
200
268
|
)
|
269
|
+
resp = @client.list_jobs(options)
|
270
|
+
resp.each_page do |page|
|
271
|
+
batch = []
|
272
|
+
page.data.job_list.each do |j|
|
273
|
+
batch << Job.new(
|
274
|
+
account_id: @account_id,
|
275
|
+
vault_name: @name,
|
276
|
+
id: j.job_id,
|
277
|
+
data: j,
|
278
|
+
client: @client
|
279
|
+
)
|
280
|
+
end
|
281
|
+
y.yield(batch)
|
282
|
+
end
|
201
283
|
end
|
284
|
+
Job::Collection.new(batches)
|
285
|
+
end
|
202
286
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
# The SHA256 tree hash of the data being uploaded.
|
215
|
-
# @option options [String, IO] :body
|
216
|
-
# The data to upload.
|
217
|
-
# @return [Archive]
|
218
|
-
def upload_archive(options = {})
|
287
|
+
# @example Request syntax with placeholder values
|
288
|
+
#
|
289
|
+
# failed_jobs = vault.failed_jobs({
|
290
|
+
# completed: "string",
|
291
|
+
# })
|
292
|
+
# @param [Hash] options ({})
|
293
|
+
# @option options [String] :completed
|
294
|
+
# The state of the jobs to return. You can specify `true` or `false`.
|
295
|
+
# @return [Job::Collection]
|
296
|
+
def failed_jobs(options = {})
|
297
|
+
batches = Enumerator.new do |y|
|
219
298
|
options = options.merge(
|
220
|
-
vault_name: @name,
|
221
|
-
account_id: @account_id
|
222
|
-
)
|
223
|
-
resp = @client.upload_archive(options)
|
224
|
-
Archive.new(
|
225
|
-
id: resp.data.archive_id,
|
226
299
|
account_id: @account_id,
|
227
300
|
vault_name: @name,
|
228
|
-
|
301
|
+
statuscode: "Failed"
|
229
302
|
)
|
303
|
+
resp = @client.list_jobs(options)
|
304
|
+
resp.each_page do |page|
|
305
|
+
batch = []
|
306
|
+
page.data.job_list.each do |j|
|
307
|
+
batch << Job.new(
|
308
|
+
account_id: @account_id,
|
309
|
+
vault_name: @name,
|
310
|
+
id: j.job_id,
|
311
|
+
data: j,
|
312
|
+
client: @client
|
313
|
+
)
|
314
|
+
end
|
315
|
+
y.yield(batch)
|
316
|
+
end
|
230
317
|
end
|
318
|
+
Job::Collection.new(batches)
|
319
|
+
end
|
231
320
|
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
321
|
+
# @param [String] id
|
322
|
+
# @return [Job]
|
323
|
+
def job(id)
|
324
|
+
Job.new(
|
325
|
+
account_id: @account_id,
|
326
|
+
vault_name: @name,
|
327
|
+
id: id,
|
328
|
+
client: @client
|
329
|
+
)
|
330
|
+
end
|
241
331
|
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
332
|
+
# @example Request syntax with placeholder values
|
333
|
+
#
|
334
|
+
# jobs = vault.jobs({
|
335
|
+
# statuscode: "string",
|
336
|
+
# completed: "string",
|
337
|
+
# })
|
338
|
+
# @param [Hash] options ({})
|
339
|
+
# @option options [String] :statuscode
|
340
|
+
# The type of job status to return. You can specify the following
|
341
|
+
# values: `InProgress`, `Succeeded`, or `Failed`.
|
342
|
+
# @option options [String] :completed
|
343
|
+
# The state of the jobs to return. You can specify `true` or `false`.
|
344
|
+
# @return [Job::Collection]
|
345
|
+
def jobs(options = {})
|
346
|
+
batches = Enumerator.new do |y|
|
347
|
+
options = options.merge(
|
246
348
|
account_id: @account_id,
|
247
|
-
vault_name: @name
|
248
|
-
id: id,
|
249
|
-
client: @client
|
349
|
+
vault_name: @name
|
250
350
|
)
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
# @return [Job::Collection]
|
263
|
-
def completed_jobs(options = {})
|
264
|
-
batches = Enumerator.new do |y|
|
265
|
-
options = options.merge(
|
266
|
-
account_id: @account_id,
|
267
|
-
vault_name: @name,
|
268
|
-
completed: "true"
|
269
|
-
)
|
270
|
-
resp = @client.list_jobs(options)
|
271
|
-
resp.each_page do |page|
|
272
|
-
batch = []
|
273
|
-
page.data.job_list.each do |j|
|
274
|
-
batch << Job.new(
|
275
|
-
account_id: @account_id,
|
276
|
-
vault_name: @name,
|
277
|
-
id: j.job_id,
|
278
|
-
data: j,
|
279
|
-
client: @client
|
280
|
-
)
|
281
|
-
end
|
282
|
-
y.yield(batch)
|
283
|
-
end
|
284
|
-
end
|
285
|
-
Job::Collection.new(batches)
|
286
|
-
end
|
287
|
-
|
288
|
-
# @example Request syntax with placeholder values
|
289
|
-
#
|
290
|
-
# failedjobs = vault.failed_jobs({
|
291
|
-
# completed: "string",
|
292
|
-
# })
|
293
|
-
# @param [Hash] options ({})
|
294
|
-
# @option options [String] :completed
|
295
|
-
# The state of the jobs to return. You can specify `true` or `false`.
|
296
|
-
# @return [Job::Collection]
|
297
|
-
def failed_jobs(options = {})
|
298
|
-
batches = Enumerator.new do |y|
|
299
|
-
options = options.merge(
|
300
|
-
account_id: @account_id,
|
301
|
-
vault_name: @name,
|
302
|
-
statuscode: "Failed"
|
303
|
-
)
|
304
|
-
resp = @client.list_jobs(options)
|
305
|
-
resp.each_page do |page|
|
306
|
-
batch = []
|
307
|
-
page.data.job_list.each do |j|
|
308
|
-
batch << Job.new(
|
309
|
-
account_id: @account_id,
|
310
|
-
vault_name: @name,
|
311
|
-
id: j.job_id,
|
312
|
-
data: j,
|
313
|
-
client: @client
|
314
|
-
)
|
315
|
-
end
|
316
|
-
y.yield(batch)
|
351
|
+
resp = @client.list_jobs(options)
|
352
|
+
resp.each_page do |page|
|
353
|
+
batch = []
|
354
|
+
page.data.job_list.each do |j|
|
355
|
+
batch << Job.new(
|
356
|
+
account_id: @account_id,
|
357
|
+
vault_name: @name,
|
358
|
+
id: j.job_id,
|
359
|
+
data: j,
|
360
|
+
client: @client
|
361
|
+
)
|
317
362
|
end
|
363
|
+
y.yield(batch)
|
318
364
|
end
|
319
|
-
Job::Collection.new(batches)
|
320
365
|
end
|
366
|
+
Job::Collection.new(batches)
|
367
|
+
end
|
321
368
|
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
369
|
+
# @example Request syntax with placeholder values
|
370
|
+
#
|
371
|
+
# jobs_in_progress = vault.jobs_in_progress({
|
372
|
+
# completed: "string",
|
373
|
+
# })
|
374
|
+
# @param [Hash] options ({})
|
375
|
+
# @option options [String] :completed
|
376
|
+
# The state of the jobs to return. You can specify `true` or `false`.
|
377
|
+
# @return [Job::Collection]
|
378
|
+
def jobs_in_progress(options = {})
|
379
|
+
batches = Enumerator.new do |y|
|
380
|
+
options = options.merge(
|
326
381
|
account_id: @account_id,
|
327
382
|
vault_name: @name,
|
328
|
-
|
329
|
-
client: @client
|
383
|
+
statuscode: "InProgress"
|
330
384
|
)
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
# values: `InProgress`, `Succeeded`, or `Failed`.
|
343
|
-
# @option options [String] :completed
|
344
|
-
# The state of the jobs to return. You can specify `true` or `false`.
|
345
|
-
# @return [Job::Collection]
|
346
|
-
def jobs(options = {})
|
347
|
-
batches = Enumerator.new do |y|
|
348
|
-
options = options.merge(
|
349
|
-
account_id: @account_id,
|
350
|
-
vault_name: @name
|
351
|
-
)
|
352
|
-
resp = @client.list_jobs(options)
|
353
|
-
resp.each_page do |page|
|
354
|
-
batch = []
|
355
|
-
page.data.job_list.each do |j|
|
356
|
-
batch << Job.new(
|
357
|
-
account_id: @account_id,
|
358
|
-
vault_name: @name,
|
359
|
-
id: j.job_id,
|
360
|
-
data: j,
|
361
|
-
client: @client
|
362
|
-
)
|
363
|
-
end
|
364
|
-
y.yield(batch)
|
385
|
+
resp = @client.list_jobs(options)
|
386
|
+
resp.each_page do |page|
|
387
|
+
batch = []
|
388
|
+
page.data.job_list.each do |j|
|
389
|
+
batch << Job.new(
|
390
|
+
account_id: @account_id,
|
391
|
+
vault_name: @name,
|
392
|
+
id: j.job_id,
|
393
|
+
data: j,
|
394
|
+
client: @client
|
395
|
+
)
|
365
396
|
end
|
397
|
+
y.yield(batch)
|
366
398
|
end
|
367
|
-
Job::Collection.new(batches)
|
368
399
|
end
|
400
|
+
Job::Collection.new(batches)
|
401
|
+
end
|
369
402
|
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
vault_name: @name,
|
393
|
-
id: j.job_id,
|
394
|
-
data: j,
|
395
|
-
client: @client
|
396
|
-
)
|
397
|
-
end
|
398
|
-
y.yield(batch)
|
403
|
+
# @example Request syntax with placeholder values
|
404
|
+
#
|
405
|
+
# vault.multipart_uplaods()
|
406
|
+
# @param [Hash] options ({})
|
407
|
+
# @return [MultipartUpload::Collection]
|
408
|
+
def multipart_uplaods(options = {})
|
409
|
+
batches = Enumerator.new do |y|
|
410
|
+
options = options.merge(
|
411
|
+
vault_name: @name,
|
412
|
+
account_id: @account_id
|
413
|
+
)
|
414
|
+
resp = @client.list_multipart_uploads(options)
|
415
|
+
resp.each_page do |page|
|
416
|
+
batch = []
|
417
|
+
page.data.uploads_list.each do |u|
|
418
|
+
batch << MultipartUpload.new(
|
419
|
+
account_id: @account_id,
|
420
|
+
vault_name: @name,
|
421
|
+
id: u.multipart_upload_id,
|
422
|
+
data: u,
|
423
|
+
client: @client
|
424
|
+
)
|
399
425
|
end
|
426
|
+
y.yield(batch)
|
400
427
|
end
|
401
|
-
Job::Collection.new(batches)
|
402
428
|
end
|
429
|
+
MultipartUpload::Collection.new(batches)
|
430
|
+
end
|
403
431
|
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
)
|
415
|
-
resp = @client.list_multipart_uploads(options)
|
416
|
-
resp.each_page do |page|
|
417
|
-
batch = []
|
418
|
-
page.data.uploads_list.each do |u|
|
419
|
-
batch << MultipartUpload.new(
|
420
|
-
account_id: @account_id,
|
421
|
-
vault_name: @name,
|
422
|
-
id: u.multipart_upload_id,
|
423
|
-
data: u,
|
424
|
-
client: @client
|
425
|
-
)
|
426
|
-
end
|
427
|
-
y.yield(batch)
|
428
|
-
end
|
429
|
-
end
|
430
|
-
MultipartUpload::Collection.new(batches)
|
431
|
-
end
|
432
|
+
# @param [String] id
|
433
|
+
# @return [MultipartUpload]
|
434
|
+
def multipart_upload(id)
|
435
|
+
MultipartUpload.new(
|
436
|
+
account_id: @account_id,
|
437
|
+
vault_name: @name,
|
438
|
+
id: id,
|
439
|
+
client: @client
|
440
|
+
)
|
441
|
+
end
|
432
442
|
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
)
|
442
|
-
end
|
443
|
+
# @return [Notification]
|
444
|
+
def notification
|
445
|
+
Notification.new(
|
446
|
+
account_id: @account_id,
|
447
|
+
vault_name: @name,
|
448
|
+
client: @client
|
449
|
+
)
|
450
|
+
end
|
443
451
|
|
444
|
-
|
445
|
-
|
446
|
-
|
452
|
+
# @example Request syntax with placeholder values
|
453
|
+
#
|
454
|
+
# succeeded_jobs = vault.succeeded_jobs({
|
455
|
+
# completed: "string",
|
456
|
+
# })
|
457
|
+
# @param [Hash] options ({})
|
458
|
+
# @option options [String] :completed
|
459
|
+
# The state of the jobs to return. You can specify `true` or `false`.
|
460
|
+
# @return [Job::Collection]
|
461
|
+
def succeeded_jobs(options = {})
|
462
|
+
batches = Enumerator.new do |y|
|
463
|
+
options = options.merge(
|
447
464
|
account_id: @account_id,
|
448
465
|
vault_name: @name,
|
449
|
-
|
466
|
+
statuscode: "Succeeded"
|
450
467
|
)
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
def succeeded_jobs(options = {})
|
463
|
-
batches = Enumerator.new do |y|
|
464
|
-
options = options.merge(
|
465
|
-
account_id: @account_id,
|
466
|
-
vault_name: @name,
|
467
|
-
statuscode: "Succeeded"
|
468
|
-
)
|
469
|
-
resp = @client.list_jobs(options)
|
470
|
-
resp.each_page do |page|
|
471
|
-
batch = []
|
472
|
-
page.data.job_list.each do |j|
|
473
|
-
batch << Job.new(
|
474
|
-
account_id: @account_id,
|
475
|
-
vault_name: @name,
|
476
|
-
id: j.job_id,
|
477
|
-
data: j,
|
478
|
-
client: @client
|
479
|
-
)
|
480
|
-
end
|
481
|
-
y.yield(batch)
|
468
|
+
resp = @client.list_jobs(options)
|
469
|
+
resp.each_page do |page|
|
470
|
+
batch = []
|
471
|
+
page.data.job_list.each do |j|
|
472
|
+
batch << Job.new(
|
473
|
+
account_id: @account_id,
|
474
|
+
vault_name: @name,
|
475
|
+
id: j.job_id,
|
476
|
+
data: j,
|
477
|
+
client: @client
|
478
|
+
)
|
482
479
|
end
|
480
|
+
y.yield(batch)
|
483
481
|
end
|
484
|
-
Job::Collection.new(batches)
|
485
482
|
end
|
483
|
+
Job::Collection.new(batches)
|
484
|
+
end
|
486
485
|
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
end
|
486
|
+
# @deprecated
|
487
|
+
# @api private
|
488
|
+
def identifiers
|
489
|
+
{
|
490
|
+
account_id: @account_id,
|
491
|
+
name: @name
|
492
|
+
}
|
493
|
+
end
|
494
|
+
deprecated(:identifiers)
|
495
|
+
|
496
|
+
private
|
497
|
+
|
498
|
+
def extract_account_id(args, options)
|
499
|
+
value = args[0] || options.delete(:account_id)
|
500
|
+
case value
|
501
|
+
when String then value
|
502
|
+
when nil then raise ArgumentError, "missing required option :account_id"
|
503
|
+
else
|
504
|
+
msg = "expected :account_id to be a String, got #{value.class}"
|
505
|
+
raise ArgumentError, msg
|
508
506
|
end
|
507
|
+
end
|
509
508
|
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
end
|
509
|
+
def extract_name(args, options)
|
510
|
+
value = args[1] || options.delete(:name)
|
511
|
+
case value
|
512
|
+
when String then value
|
513
|
+
when nil then raise ArgumentError, "missing required option :name"
|
514
|
+
else
|
515
|
+
msg = "expected :name to be a String, got #{value.class}"
|
516
|
+
raise ArgumentError, msg
|
519
517
|
end
|
520
|
-
|
521
|
-
class Collection < Aws::Resources::Collection; end
|
522
518
|
end
|
519
|
+
|
520
|
+
class Collection < Aws::Resources::Collection; end
|
523
521
|
end
|
524
522
|
end
|