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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 244f090031572eebf15b1f79f4833f57be83207d
|
4
|
+
data.tar.gz: 97e5f69b1bfe3f0300995ec6b6d20c1f2fee9c89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 123ab730b484f1f27366d984528b4edc71dffba7f3a234e0ea9773553b1f57177e051129563037346d0fac7df897594f5fe5ca356ad0c08f416fa8a13815ec3e
|
7
|
+
data.tar.gz: 3f29a413aaec93b3c343fc188d0a0b4b7d0ad263652db1d1317b13d9da315b936db002c0529ebc621b96c047054aac1149b161725503e9316ef7faf5e430da8c
|
data/lib/aws-sdk-glacier.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
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
|
@@ -49,6 +49,6 @@ require_relative 'aws-sdk-glacier/customizations'
|
|
49
49
|
# @service
|
50
50
|
module Aws::Glacier
|
51
51
|
|
52
|
-
GEM_VERSION = '1.0.0.
|
52
|
+
GEM_VERSION = '1.0.0.rc2'
|
53
53
|
|
54
54
|
end
|
@@ -1,143 +1,141 @@
|
|
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
|
-
end
|
8
|
+
module Aws::Glacier
|
9
|
+
class Account
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(id, options = {})
|
14
|
+
# @param [String] id
|
15
|
+
# @option options [Client] :client
|
16
|
+
# @overload def initialize(options = {})
|
17
|
+
# @option options [required, String] :id
|
18
|
+
# @option options [Client] :client
|
19
|
+
def initialize(*args)
|
20
|
+
options = Hash === args.last ? args.pop.dup : {}
|
21
|
+
@id = extract_id(args, options)
|
22
|
+
@data = Aws::EmptyStructure.new
|
23
|
+
@client = options.delete(:client) || Client.new(options)
|
24
|
+
end
|
26
25
|
|
27
|
-
|
26
|
+
# @!group Read-Only Attributes
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
# @return [String]
|
29
|
+
def id
|
30
|
+
@id
|
31
|
+
end
|
33
32
|
|
34
|
-
|
33
|
+
# @!endgroup
|
35
34
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
# @return [Client]
|
36
|
+
def client
|
37
|
+
@client
|
38
|
+
end
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
40
|
+
# @raise [NotImplementedError]
|
41
|
+
# @api private
|
42
|
+
def load
|
43
|
+
msg = "#load is not implemented, data only available via enumeration"
|
44
|
+
raise NotImplementedError, msg
|
45
|
+
end
|
46
|
+
alias :reload :load
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
48
|
+
# @api private
|
49
|
+
# @return [EmptyStructure]
|
50
|
+
def data
|
51
|
+
@data
|
52
|
+
end
|
54
53
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
54
|
+
# @return [Boolean]
|
55
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
56
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
57
|
+
def data_loaded?
|
58
|
+
!!@data
|
59
|
+
end
|
61
60
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
61
|
+
# @!group Actions
|
62
|
+
|
63
|
+
# @example Request syntax with placeholder values
|
64
|
+
#
|
65
|
+
# vault = account.create_vault({
|
66
|
+
# vault_name: "string", # required
|
67
|
+
# })
|
68
|
+
# @param [Hash] options ({})
|
69
|
+
# @option options [required, String] :vault_name
|
70
|
+
# The name of the vault.
|
71
|
+
# @return [Vault]
|
72
|
+
def create_vault(options = {})
|
73
|
+
options = options.merge(account_id: @id)
|
74
|
+
resp = @client.create_vault(options)
|
75
|
+
Vault.new(
|
76
|
+
account_id: @id,
|
77
|
+
name: options[:vault_name],
|
78
|
+
client: @client
|
79
|
+
)
|
80
|
+
end
|
82
81
|
|
83
|
-
|
82
|
+
# @!group Associations
|
84
83
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
84
|
+
# @param [String] name
|
85
|
+
# @return [Vault]
|
86
|
+
def vault(name)
|
87
|
+
Vault.new(
|
88
|
+
account_id: @id,
|
89
|
+
name: name,
|
90
|
+
client: @client
|
91
|
+
)
|
92
|
+
end
|
94
93
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
end
|
114
|
-
y.yield(batch)
|
94
|
+
# @example Request syntax with placeholder values
|
95
|
+
#
|
96
|
+
# account.vaults()
|
97
|
+
# @param [Hash] options ({})
|
98
|
+
# @return [Vault::Collection]
|
99
|
+
def vaults(options = {})
|
100
|
+
batches = Enumerator.new do |y|
|
101
|
+
options = options.merge(account_id: @id)
|
102
|
+
resp = @client.list_vaults(options)
|
103
|
+
resp.each_page do |page|
|
104
|
+
batch = []
|
105
|
+
page.data.vault_list.each do |v|
|
106
|
+
batch << Vault.new(
|
107
|
+
account_id: @id,
|
108
|
+
name: v.vault_name,
|
109
|
+
data: v,
|
110
|
+
client: @client
|
111
|
+
)
|
115
112
|
end
|
113
|
+
y.yield(batch)
|
116
114
|
end
|
117
|
-
Vault::Collection.new(batches)
|
118
115
|
end
|
116
|
+
Vault::Collection.new(batches)
|
117
|
+
end
|
119
118
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
end
|
119
|
+
# @deprecated
|
120
|
+
# @api private
|
121
|
+
def identifiers
|
122
|
+
{ id: @id }
|
123
|
+
end
|
124
|
+
deprecated(:identifiers)
|
125
|
+
|
126
|
+
private
|
127
|
+
|
128
|
+
def extract_id(args, options)
|
129
|
+
value = args[0] || options.delete(:id)
|
130
|
+
case value
|
131
|
+
when String then value
|
132
|
+
when nil then raise ArgumentError, "missing required option :id"
|
133
|
+
else
|
134
|
+
msg = "expected :id to be a String, got #{value.class}"
|
135
|
+
raise ArgumentError, msg
|
138
136
|
end
|
139
|
-
|
140
|
-
class Collection < Aws::Resources::Collection; end
|
141
137
|
end
|
138
|
+
|
139
|
+
class Collection < Aws::Resources::Collection; end
|
142
140
|
end
|
143
141
|
end
|
@@ -1,178 +1,176 @@
|
|
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
|
-
|
29
|
-
|
30
|
-
|
31
|
-
end
|
8
|
+
module Aws::Glacier
|
9
|
+
class Archive
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
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 = Aws::EmptyStructure.new
|
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
|
-
|
44
|
+
# @return [String]
|
45
|
+
def id
|
46
|
+
@id
|
47
|
+
end
|
49
48
|
|
50
|
-
|
49
|
+
# @!endgroup
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
51
|
+
# @return [Client]
|
52
|
+
def client
|
53
|
+
@client
|
54
|
+
end
|
56
55
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
56
|
+
# @raise [NotImplementedError]
|
57
|
+
# @api private
|
58
|
+
def load
|
59
|
+
msg = "#load is not implemented, data only available via enumeration"
|
60
|
+
raise NotImplementedError, msg
|
61
|
+
end
|
62
|
+
alias :reload :load
|
64
63
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
64
|
+
# @api private
|
65
|
+
# @return [EmptyStructure]
|
66
|
+
def data
|
67
|
+
@data
|
68
|
+
end
|
70
69
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
70
|
+
# @return [Boolean]
|
71
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
72
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
73
|
+
def data_loaded?
|
74
|
+
!!@data
|
75
|
+
end
|
77
76
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
77
|
+
# @!group Actions
|
78
|
+
|
79
|
+
# @example Request syntax with placeholder values
|
80
|
+
#
|
81
|
+
# archive.delete()
|
82
|
+
# @param [Hash] options ({})
|
83
|
+
# @return [EmptyStructure]
|
84
|
+
def delete(options = {})
|
85
|
+
options = options.merge(
|
86
|
+
account_id: @account_id,
|
87
|
+
vault_name: @vault_name,
|
88
|
+
archive_id: @id
|
89
|
+
)
|
90
|
+
resp = @client.delete_archive(options)
|
91
|
+
resp.data
|
92
|
+
end
|
94
93
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
94
|
+
# @example Request syntax with placeholder values
|
95
|
+
#
|
96
|
+
# archive.initiate_archive_retrieval()
|
97
|
+
# @param [Hash] options ({})
|
98
|
+
# @return [Job]
|
99
|
+
def initiate_archive_retrieval(options = {})
|
100
|
+
options = Aws::Util.deep_merge(options,
|
101
|
+
vault_name: @vault_name,
|
102
|
+
account_id: @account_id,
|
103
|
+
job_parameters: {
|
104
|
+
type: "archive-retrieval",
|
105
|
+
archive_id: @id
|
106
|
+
}
|
107
|
+
)
|
108
|
+
resp = @client.initiate_job(options)
|
109
|
+
Job.new(
|
110
|
+
id: resp.data.job_id,
|
111
|
+
account_id: @account_id,
|
112
|
+
vault_name: @vault_name,
|
113
|
+
client: @client
|
114
|
+
)
|
115
|
+
end
|
117
116
|
|
118
|
-
|
117
|
+
# @!group Associations
|
119
118
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
119
|
+
# @return [Vault]
|
120
|
+
def vault
|
121
|
+
Vault.new(
|
122
|
+
account_id: @account_id,
|
123
|
+
name: @vault_name,
|
124
|
+
client: @client
|
125
|
+
)
|
126
|
+
end
|
128
127
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
end
|
128
|
+
# @deprecated
|
129
|
+
# @api private
|
130
|
+
def identifiers
|
131
|
+
{
|
132
|
+
account_id: @account_id,
|
133
|
+
vault_name: @vault_name,
|
134
|
+
id: @id
|
135
|
+
}
|
136
|
+
end
|
137
|
+
deprecated(:identifiers)
|
138
|
+
|
139
|
+
private
|
140
|
+
|
141
|
+
def extract_account_id(args, options)
|
142
|
+
value = args[0] || options.delete(:account_id)
|
143
|
+
case value
|
144
|
+
when String then value
|
145
|
+
when nil then raise ArgumentError, "missing required option :account_id"
|
146
|
+
else
|
147
|
+
msg = "expected :account_id to be a String, got #{value.class}"
|
148
|
+
raise ArgumentError, msg
|
151
149
|
end
|
150
|
+
end
|
152
151
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
end
|
152
|
+
def extract_vault_name(args, options)
|
153
|
+
value = args[1] || options.delete(:vault_name)
|
154
|
+
case value
|
155
|
+
when String then value
|
156
|
+
when nil then raise ArgumentError, "missing required option :vault_name"
|
157
|
+
else
|
158
|
+
msg = "expected :vault_name to be a String, got #{value.class}"
|
159
|
+
raise ArgumentError, msg
|
162
160
|
end
|
161
|
+
end
|
163
162
|
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
end
|
163
|
+
def extract_id(args, options)
|
164
|
+
value = args[2] || options.delete(:id)
|
165
|
+
case value
|
166
|
+
when String then value
|
167
|
+
when nil then raise ArgumentError, "missing required option :id"
|
168
|
+
else
|
169
|
+
msg = "expected :id to be a String, got #{value.class}"
|
170
|
+
raise ArgumentError, msg
|
173
171
|
end
|
174
|
-
|
175
|
-
class Collection < Aws::Resources::Collection; end
|
176
172
|
end
|
173
|
+
|
174
|
+
class Collection < Aws::Resources::Collection; end
|
177
175
|
end
|
178
176
|
end
|