aws-sdk-glacier 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- 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,269 +1,267 @@
|
|
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
|
-
class MultipartUpload
|
8
|
+
module Aws::Glacier
|
9
|
+
class MultipartUpload
|
11
10
|
|
12
|
-
|
11
|
+
extend Aws::Deprecations
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
13
|
+
# @overload def initialize(account_id, vault_name, id, options = {})
|
14
|
+
# @param [String] account_id
|
15
|
+
# @param [String] vault_name
|
16
|
+
# @param [String] id
|
17
|
+
# @option options [Client] :client
|
18
|
+
# @overload def initialize(options = {})
|
19
|
+
# @option options [required, String] :account_id
|
20
|
+
# @option options [required, String] :vault_name
|
21
|
+
# @option options [required, String] :id
|
22
|
+
# @option options [Client] :client
|
23
|
+
def initialize(*args)
|
24
|
+
options = Hash === args.last ? args.pop.dup : {}
|
25
|
+
@account_id = extract_account_id(args, options)
|
26
|
+
@vault_name = extract_vault_name(args, options)
|
27
|
+
@id = extract_id(args, options)
|
28
|
+
@data = options.delete(:data)
|
29
|
+
@client = options.delete(:client) || Client.new(options)
|
30
|
+
end
|
32
31
|
|
33
|
-
|
32
|
+
# @!group Read-Only Attributes
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
# @return [String]
|
35
|
+
def account_id
|
36
|
+
@account_id
|
37
|
+
end
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
# @return [String]
|
40
|
+
def vault_name
|
41
|
+
@vault_name
|
42
|
+
end
|
44
43
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
44
|
+
# @return [String]
|
45
|
+
def id
|
46
|
+
@id
|
47
|
+
end
|
48
|
+
alias :multipart_upload_id :id
|
50
49
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
50
|
+
# The Amazon Resource Name (ARN) of the vault that contains the archive.
|
51
|
+
# @return [String]
|
52
|
+
def vault_arn
|
53
|
+
data.vault_arn
|
54
|
+
end
|
56
55
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
56
|
+
# The description of the archive that was specified in the Initiate
|
57
|
+
# Multipart Upload request.
|
58
|
+
# @return [String]
|
59
|
+
def archive_description
|
60
|
+
data.archive_description
|
61
|
+
end
|
63
62
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
63
|
+
# The part size, in bytes, specified in the Initiate Multipart Upload
|
64
|
+
# request. This is the size of all the parts in the upload except the
|
65
|
+
# last part, which may be smaller than this size.
|
66
|
+
# @return [Integer]
|
67
|
+
def part_size_in_bytes
|
68
|
+
data.part_size_in_bytes
|
69
|
+
end
|
71
70
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
# The UTC time at which the multipart upload was initiated.
|
72
|
+
# @return [Time]
|
73
|
+
def creation_date
|
74
|
+
data.creation_date
|
75
|
+
end
|
77
76
|
|
78
|
-
|
77
|
+
# @!endgroup
|
79
78
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
79
|
+
# @return [Client]
|
80
|
+
def client
|
81
|
+
@client
|
82
|
+
end
|
84
83
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
84
|
+
# @raise [NotImplementedError]
|
85
|
+
# @api private
|
86
|
+
def load
|
87
|
+
msg = "#load is not implemented, data only available via enumeration"
|
88
|
+
raise NotImplementedError, msg
|
89
|
+
end
|
90
|
+
alias :reload :load
|
92
91
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
92
|
+
# @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
|
93
|
+
# @return [Types::UploadListElement]
|
94
|
+
# Returns the data for this {MultipartUpload}.
|
95
|
+
def data
|
96
|
+
load unless @data
|
97
|
+
@data
|
98
|
+
end
|
100
99
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
100
|
+
# @return [Boolean]
|
101
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
102
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
103
|
+
def data_loaded?
|
104
|
+
!!@data
|
105
|
+
end
|
107
106
|
|
108
|
-
|
107
|
+
# @!group Actions
|
109
108
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
109
|
+
# @example Request syntax with placeholder values
|
110
|
+
#
|
111
|
+
# multipart_upload.abort()
|
112
|
+
# @param [Hash] options ({})
|
113
|
+
# @return [EmptyStructure]
|
114
|
+
def abort(options = {})
|
115
|
+
options = options.merge(
|
116
|
+
account_id: @account_id,
|
117
|
+
vault_name: @vault_name,
|
118
|
+
upload_id: @id
|
119
|
+
)
|
120
|
+
resp = @client.abort_multipart_upload(options)
|
121
|
+
resp.data
|
122
|
+
end
|
124
123
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
124
|
+
# @example Request syntax with placeholder values
|
125
|
+
#
|
126
|
+
# multipart_upload.complete({
|
127
|
+
# archive_size: 1,
|
128
|
+
# checksum: "string",
|
129
|
+
# })
|
130
|
+
# @param [Hash] options ({})
|
131
|
+
# @option options [Integer] :archive_size
|
132
|
+
# The total size, in bytes, of the entire archive. This value should be
|
133
|
+
# the sum of all the sizes of the individual parts that you uploaded.
|
134
|
+
# @option options [String] :checksum
|
135
|
+
# The SHA256 tree hash of the entire archive. It is the tree hash of
|
136
|
+
# SHA256 tree hash of the individual parts. If the value you specify in
|
137
|
+
# the request does not match the SHA256 tree hash of the final assembled
|
138
|
+
# archive as computed by Amazon Glacier, Amazon Glacier returns an error
|
139
|
+
# and the request fails.
|
140
|
+
# @return [Types::ArchiveCreationOutput]
|
141
|
+
def complete(options = {})
|
142
|
+
options = options.merge(
|
143
|
+
account_id: @account_id,
|
144
|
+
vault_name: @vault_name,
|
145
|
+
upload_id: @id
|
146
|
+
)
|
147
|
+
resp = @client.complete_multipart_upload(options)
|
148
|
+
resp.data
|
149
|
+
end
|
151
150
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
151
|
+
# @example Request syntax with placeholder values
|
152
|
+
#
|
153
|
+
# multipart_upload.parts({
|
154
|
+
# marker: "string",
|
155
|
+
# limit: 1,
|
156
|
+
# })
|
157
|
+
# @param [Hash] options ({})
|
158
|
+
# @option options [String] :marker
|
159
|
+
# An opaque string used for pagination. This value specifies the part at
|
160
|
+
# which the listing of parts should begin. Get the marker value from the
|
161
|
+
# response of a previous List Parts response. You need only include the
|
162
|
+
# marker if you are continuing the pagination of results started in a
|
163
|
+
# previous List Parts request.
|
164
|
+
# @option options [Integer] :limit
|
165
|
+
# The maximum number of parts to be returned. The default limit is 1000.
|
166
|
+
# The number of parts returned might be fewer than the specified limit,
|
167
|
+
# but the number of returned parts never exceeds the limit.
|
168
|
+
# @return [Types::ListPartsOutput]
|
169
|
+
def parts(options = {})
|
170
|
+
options = options.merge(
|
171
|
+
account_id: @account_id,
|
172
|
+
vault_name: @vault_name,
|
173
|
+
upload_id: @id
|
174
|
+
)
|
175
|
+
resp = @client.list_parts(options)
|
176
|
+
resp.data
|
177
|
+
end
|
179
178
|
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
179
|
+
# @example Request syntax with placeholder values
|
180
|
+
#
|
181
|
+
# multipart_upload.upload_part({
|
182
|
+
# checksum: "string",
|
183
|
+
# range: "string",
|
184
|
+
# body: "data",
|
185
|
+
# })
|
186
|
+
# @param [Hash] options ({})
|
187
|
+
# @option options [String] :checksum
|
188
|
+
# The SHA256 tree hash of the data being uploaded.
|
189
|
+
# @option options [String] :range
|
190
|
+
# Identifies the range of bytes in the assembled archive that will be
|
191
|
+
# uploaded in this part. Amazon Glacier uses this information to
|
192
|
+
# assemble the archive in the proper sequence. The format of this header
|
193
|
+
# follows RFC 2616. An example header is Content-Range:bytes
|
194
|
+
# 0-4194303/*.
|
195
|
+
# @option options [String, IO] :body
|
196
|
+
# The data to upload.
|
197
|
+
# @return [Types::UploadMultipartPartOutput]
|
198
|
+
def upload_part(options = {})
|
199
|
+
options = options.merge(
|
200
|
+
account_id: @account_id,
|
201
|
+
vault_name: @vault_name,
|
202
|
+
upload_id: @id
|
203
|
+
)
|
204
|
+
resp = @client.upload_multipart_part(options)
|
205
|
+
resp.data
|
206
|
+
end
|
208
207
|
|
209
|
-
|
208
|
+
# @!group Associations
|
210
209
|
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
210
|
+
# @return [Vault]
|
211
|
+
def vault
|
212
|
+
Vault.new(
|
213
|
+
account_id: @account_id,
|
214
|
+
name: @vault_name,
|
215
|
+
client: @client
|
216
|
+
)
|
217
|
+
end
|
219
218
|
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
219
|
+
# @deprecated
|
220
|
+
# @api private
|
221
|
+
def identifiers
|
222
|
+
{
|
223
|
+
account_id: @account_id,
|
224
|
+
vault_name: @vault_name,
|
225
|
+
id: @id
|
226
|
+
}
|
227
|
+
end
|
228
|
+
deprecated(:identifiers)
|
230
229
|
|
231
|
-
|
230
|
+
private
|
232
231
|
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
end
|
232
|
+
def extract_account_id(args, options)
|
233
|
+
value = args[0] || options.delete(:account_id)
|
234
|
+
case value
|
235
|
+
when String then value
|
236
|
+
when nil then raise ArgumentError, "missing required option :account_id"
|
237
|
+
else
|
238
|
+
msg = "expected :account_id to be a String, got #{value.class}"
|
239
|
+
raise ArgumentError, msg
|
242
240
|
end
|
241
|
+
end
|
243
242
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
end
|
243
|
+
def extract_vault_name(args, options)
|
244
|
+
value = args[1] || options.delete(:vault_name)
|
245
|
+
case value
|
246
|
+
when String then value
|
247
|
+
when nil then raise ArgumentError, "missing required option :vault_name"
|
248
|
+
else
|
249
|
+
msg = "expected :vault_name to be a String, got #{value.class}"
|
250
|
+
raise ArgumentError, msg
|
253
251
|
end
|
252
|
+
end
|
254
253
|
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
end
|
254
|
+
def extract_id(args, options)
|
255
|
+
value = args[2] || options.delete(:id)
|
256
|
+
case value
|
257
|
+
when String then value
|
258
|
+
when nil then raise ArgumentError, "missing required option :id"
|
259
|
+
else
|
260
|
+
msg = "expected :id to be a String, got #{value.class}"
|
261
|
+
raise ArgumentError, msg
|
264
262
|
end
|
265
|
-
|
266
|
-
class Collection < Aws::Resources::Collection; end
|
267
263
|
end
|
264
|
+
|
265
|
+
class Collection < Aws::Resources::Collection; end
|
268
266
|
end
|
269
267
|
end
|