aws-sdk-glacier 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b99c4c5df56d148602591c4922abec21ef28f685
4
+ data.tar.gz: b970d8023975603b298abed1a5b8762784177e3f
5
+ SHA512:
6
+ metadata.gz: 206e3f5982cca8e37e1dcfd509ac618ea2e39ee22e0a242ba2fc0c3c0dc2db4f824135866c81ece56f39efb5e7a77c978df6c7724d8f62bd5b7ed28340d17057
7
+ data.tar.gz: ff55b7c455b54aad6f14125962331dee4ec1f23d7433e6d240fb246ea137d5d9581e689394e7cac5b091e84accb03387fdc459ef1f8586dcb4711b8373247d43
@@ -0,0 +1,54 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-glacier/types'
12
+ require_relative 'aws-sdk-glacier/client_api'
13
+ require_relative 'aws-sdk-glacier/client'
14
+ require_relative 'aws-sdk-glacier/errors'
15
+ require_relative 'aws-sdk-glacier/waiters'
16
+ require_relative 'aws-sdk-glacier/resource'
17
+ require_relative 'aws-sdk-glacier/account'
18
+ require_relative 'aws-sdk-glacier/archive'
19
+ require_relative 'aws-sdk-glacier/job'
20
+ require_relative 'aws-sdk-glacier/multipart_upload'
21
+ require_relative 'aws-sdk-glacier/notification'
22
+ require_relative 'aws-sdk-glacier/vault'
23
+ require_relative 'aws-sdk-glacier/customizations'
24
+
25
+ # This module provides support for Amazon Glacier. This module is available in the
26
+ # `aws-sdk-glacier` gem.
27
+ #
28
+ # # Client
29
+ #
30
+ # The {Client} class provides one method for each API operation. Operation
31
+ # methods each accept a hash of request parameters and return a response
32
+ # structure.
33
+ #
34
+ # See {Client} for more information.
35
+ #
36
+ # # Errors
37
+ #
38
+ # Errors returned from Amazon Glacier all
39
+ # extend {Errors::ServiceError}.
40
+ #
41
+ # begin
42
+ # # do stuff
43
+ # rescue Aws::Glacier::Errors::ServiceError
44
+ # # rescues all service API errors
45
+ # end
46
+ #
47
+ # See {Errors} for more information.
48
+ #
49
+ # @service
50
+ module Aws::Glacier
51
+
52
+ GEM_VERSION = '1.0.0.rc1'
53
+
54
+ end
@@ -0,0 +1,143 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module Glacier
10
+ class Account
11
+
12
+ extend Aws::Deprecations
13
+
14
+ # @overload def initialize(id, options = {})
15
+ # @param [String] id
16
+ # @option options [Client] :client
17
+ # @overload def initialize(options = {})
18
+ # @option options [required, String] :id
19
+ # @option options [Client] :client
20
+ def initialize(*args)
21
+ options = Hash === args.last ? args.pop.dup : {}
22
+ @id = extract_id(args, options)
23
+ @data = Aws::EmptyStructure.new
24
+ @client = options.delete(:client) || Client.new(options)
25
+ end
26
+
27
+ # @!group Read-Only Attributes
28
+
29
+ # @return [String]
30
+ def id
31
+ @id
32
+ end
33
+
34
+ # @!endgroup
35
+
36
+ # @return [Client]
37
+ def client
38
+ @client
39
+ end
40
+
41
+ # @raise [Errors::ResourceNotLoadable]
42
+ # @api private
43
+ def load
44
+ msg = "#load is not implemented, data only available via enumeration"
45
+ raise Errors::ResourceNotLoadable, msg
46
+ end
47
+ alias :reload :load
48
+
49
+ # @api private
50
+ # @return [EmptyStructure]
51
+ def data
52
+ @data
53
+ end
54
+
55
+ # @return [Boolean]
56
+ # Returns `true` if this resource is loaded. Accessing attributes or
57
+ # {#data} on an unloaded resource will trigger a call to {#load}.
58
+ def data_loaded?
59
+ !!@data
60
+ end
61
+
62
+ # @!group Actions
63
+
64
+ # @example Request syntax with placeholder values
65
+ #
66
+ # vault = account.create_vault({
67
+ # vault_name: "string", # required
68
+ # })
69
+ # @param [Hash] options ({})
70
+ # @option options [required, String] :vault_name
71
+ # The name of the vault.
72
+ # @return [Vault]
73
+ def create_vault(options = {})
74
+ options = options.merge(account_id: @id)
75
+ resp = @client.create_vault(options)
76
+ Vault.new(
77
+ account_id: @id,
78
+ name: options[:vault_name],
79
+ client: @client
80
+ )
81
+ end
82
+
83
+ # @!group Associations
84
+
85
+ # @param [String] name
86
+ # @return [Vault]
87
+ def vault(name)
88
+ Vault.new(
89
+ account_id: @id,
90
+ name: name,
91
+ client: @client
92
+ )
93
+ end
94
+
95
+ # @example Request syntax with placeholder values
96
+ #
97
+ # vaults = account.vaults()
98
+ # @param [Hash] options ({})
99
+ # @return [Vault::Collection]
100
+ def vaults(options = {})
101
+ batches = Enumerator.new do |y|
102
+ options = options.merge(account_id: @id)
103
+ resp = @client.list_vaults(options)
104
+ resp.each_page do |page|
105
+ batch = []
106
+ page.data.vault_list.each do |v|
107
+ batch << Vault.new(
108
+ account_id: @id,
109
+ name: v.vault_name,
110
+ data: v,
111
+ client: @client
112
+ )
113
+ end
114
+ y.yield(batch)
115
+ end
116
+ end
117
+ Vault::Collection.new(batches)
118
+ end
119
+
120
+ # @deprecated
121
+ # @api private
122
+ def identifiers
123
+ { id: @id }
124
+ end
125
+ deprecated(:identifiers)
126
+
127
+ private
128
+
129
+ def extract_id(args, options)
130
+ value = args[0] || options.delete(:id)
131
+ case value
132
+ when String then value
133
+ when nil then raise ArgumentError, "missing required option :id"
134
+ else
135
+ msg = "expected :id to be a String, got #{value.class}"
136
+ raise ArgumentError, msg
137
+ end
138
+ end
139
+
140
+ class Collection < Aws::Resources::Collection; end
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,178 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module Glacier
10
+ class Archive
11
+
12
+ extend Aws::Deprecations
13
+
14
+ # @overload def initialize(account_id, vault_name, id, options = {})
15
+ # @param [String] account_id
16
+ # @param [String] vault_name
17
+ # @param [String] id
18
+ # @option options [Client] :client
19
+ # @overload def initialize(options = {})
20
+ # @option options [required, String] :account_id
21
+ # @option options [required, String] :vault_name
22
+ # @option options [required, String] :id
23
+ # @option options [Client] :client
24
+ def initialize(*args)
25
+ options = Hash === args.last ? args.pop.dup : {}
26
+ @account_id = extract_account_id(args, options)
27
+ @vault_name = extract_vault_name(args, options)
28
+ @id = extract_id(args, options)
29
+ @data = Aws::EmptyStructure.new
30
+ @client = options.delete(:client) || Client.new(options)
31
+ end
32
+
33
+ # @!group Read-Only Attributes
34
+
35
+ # @return [String]
36
+ def account_id
37
+ @account_id
38
+ end
39
+
40
+ # @return [String]
41
+ def vault_name
42
+ @vault_name
43
+ end
44
+
45
+ # @return [String]
46
+ def id
47
+ @id
48
+ end
49
+
50
+ # @!endgroup
51
+
52
+ # @return [Client]
53
+ def client
54
+ @client
55
+ end
56
+
57
+ # @raise [Errors::ResourceNotLoadable]
58
+ # @api private
59
+ def load
60
+ msg = "#load is not implemented, data only available via enumeration"
61
+ raise Errors::ResourceNotLoadable, msg
62
+ end
63
+ alias :reload :load
64
+
65
+ # @api private
66
+ # @return [EmptyStructure]
67
+ def data
68
+ @data
69
+ end
70
+
71
+ # @return [Boolean]
72
+ # Returns `true` if this resource is loaded. Accessing attributes or
73
+ # {#data} on an unloaded resource will trigger a call to {#load}.
74
+ def data_loaded?
75
+ !!@data
76
+ end
77
+
78
+ # @!group Actions
79
+
80
+ # @example Request syntax with placeholder values
81
+ #
82
+ # archive.delete()
83
+ # @param [Hash] options ({})
84
+ # @return [EmptyStructure]
85
+ def delete(options = {})
86
+ options = options.merge(
87
+ account_id: @account_id,
88
+ vault_name: @vault_name,
89
+ archive_id: @id
90
+ )
91
+ resp = @client.delete_archive(options)
92
+ resp.data
93
+ end
94
+
95
+ # @example Request syntax with placeholder values
96
+ #
97
+ # job = archive.initiate_archive_retrieval()
98
+ # @param [Hash] options ({})
99
+ # @return [Job]
100
+ def initiate_archive_retrieval(options = {})
101
+ options = Aws::Util.deep_merge(options,
102
+ vault_name: @vault_name,
103
+ account_id: @account_id,
104
+ job_parameters: {
105
+ type: "archive-retrieval",
106
+ archive_id: @id
107
+ }
108
+ )
109
+ resp = @client.initiate_job(options)
110
+ Job.new(
111
+ id: resp.data.job_id,
112
+ account_id: @account_id,
113
+ vault_name: @vault_name,
114
+ client: @client
115
+ )
116
+ end
117
+
118
+ # @!group Associations
119
+
120
+ # @return [Vault]
121
+ def vault
122
+ Vault.new(
123
+ account_id: @account_id,
124
+ name: @vault_name,
125
+ client: @client
126
+ )
127
+ end
128
+
129
+ # @deprecated
130
+ # @api private
131
+ def identifiers
132
+ {
133
+ account_id: @account_id,
134
+ vault_name: @vault_name,
135
+ id: @id
136
+ }
137
+ end
138
+ deprecated(:identifiers)
139
+
140
+ private
141
+
142
+ def extract_account_id(args, options)
143
+ value = args[0] || options.delete(:account_id)
144
+ case value
145
+ when String then value
146
+ when nil then raise ArgumentError, "missing required option :account_id"
147
+ else
148
+ msg = "expected :account_id to be a String, got #{value.class}"
149
+ raise ArgumentError, msg
150
+ end
151
+ end
152
+
153
+ def extract_vault_name(args, options)
154
+ value = args[1] || options.delete(:vault_name)
155
+ case value
156
+ when String then value
157
+ when nil then raise ArgumentError, "missing required option :vault_name"
158
+ else
159
+ msg = "expected :vault_name to be a String, got #{value.class}"
160
+ raise ArgumentError, msg
161
+ end
162
+ end
163
+
164
+ def extract_id(args, options)
165
+ value = args[2] || options.delete(:id)
166
+ case value
167
+ when String then value
168
+ when nil then raise ArgumentError, "missing required option :id"
169
+ else
170
+ msg = "expected :id to be a String, got #{value.class}"
171
+ raise ArgumentError, msg
172
+ end
173
+ end
174
+
175
+ class Collection < Aws::Resources::Collection; end
176
+ end
177
+ end
178
+ end
@@ -0,0 +1,2506 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/signature_v4.rb'
22
+ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
23
+ require 'aws-sdk-glacier/plugins/account_id.rb'
24
+ require 'aws-sdk-glacier/plugins/api_version.rb'
25
+ require 'aws-sdk-glacier/plugins/checksums.rb'
26
+
27
+ Aws::Plugins::GlobalConfiguration.add_identifier(:glacier)
28
+
29
+ module Aws
30
+ module Glacier
31
+ class Client < Seahorse::Client::Base
32
+
33
+ include Aws::ClientStubs
34
+
35
+ @identifier = :glacier
36
+
37
+ set_api(ClientApi::API)
38
+
39
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
40
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
41
+ add_plugin(Aws::Plugins::Logging)
42
+ add_plugin(Aws::Plugins::ParamConverter)
43
+ add_plugin(Aws::Plugins::ParamValidator)
44
+ add_plugin(Aws::Plugins::UserAgent)
45
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
46
+ add_plugin(Aws::Plugins::RetryErrors)
47
+ add_plugin(Aws::Plugins::GlobalConfiguration)
48
+ add_plugin(Aws::Plugins::RegionalEndpoint)
49
+ add_plugin(Aws::Plugins::ResponsePaging)
50
+ add_plugin(Aws::Plugins::StubResponses)
51
+ add_plugin(Aws::Plugins::IdempotencyToken)
52
+ add_plugin(Aws::Plugins::SignatureV4)
53
+ add_plugin(Aws::Plugins::Protocols::RestJson)
54
+ add_plugin(Aws::Glacier::Plugins::AccountId)
55
+ add_plugin(Aws::Glacier::Plugins::ApiVersion)
56
+ add_plugin(Aws::Glacier::Plugins::Checksums)
57
+
58
+ # @option options [required, Aws::CredentialProvider] :credentials
59
+ # Your AWS credentials. This can be an instance of any one of the
60
+ # following classes:
61
+ #
62
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
63
+ # credentials.
64
+ #
65
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
66
+ # from an EC2 IMDS on an EC2 instance.
67
+ #
68
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
69
+ # shared file, such as `~/.aws/config`.
70
+ #
71
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
72
+ #
73
+ # When `:credentials` are not configured directly, the following
74
+ # locations will be searched for credentials:
75
+ #
76
+ # * `Aws.config[:credentials]`
77
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
78
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
79
+ # * `~/.aws/credentials`
80
+ # * `~/.aws/config`
81
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
82
+ # very aggressive. Construct and pass an instance of
83
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
84
+ # timeouts.
85
+ # @option options [required, String] :region
86
+ # The AWS region to connect to. The configured `:region` is
87
+ # used to determine the service `:endpoint`. When not passed,
88
+ # a default `:region` is search for in the following locations:
89
+ #
90
+ # * `Aws.config[:region]`
91
+ # * `ENV['AWS_REGION']`
92
+ # * `ENV['AMAZON_REGION']`
93
+ # * `ENV['AWS_DEFAULT_REGION']`
94
+ # * `~/.aws/credentials`
95
+ # * `~/.aws/config`
96
+ # @option options [String] :access_key_id
97
+ # @option options [String] :account_id ("-")
98
+ # The default Glacier AWS account ID to use for all glacier
99
+ # operations. The default value of `-` uses the account
100
+ # your `:credentials` belong to.
101
+ # @option options [Boolean] :convert_params (true)
102
+ # When `true`, an attempt is made to coerce request parameters into
103
+ # the required types.
104
+ # @option options [String] :endpoint
105
+ # The client endpoint is normally constructed from the `:region`
106
+ # option. You should only configure an `:endpoint` when connecting
107
+ # to test endpoints. This should be avalid HTTP(S) URI.
108
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
109
+ # The log formatter.
110
+ # @option options [Symbol] :log_level (:info)
111
+ # The log level to send messages to the `:logger` at.
112
+ # @option options [Logger] :logger
113
+ # The Logger instance to send log messages to. If this option
114
+ # is not set, logging will be disabled.
115
+ # @option options [String] :profile ("default")
116
+ # Used when loading credentials from the shared credentials file
117
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
118
+ # @option options [Integer] :retry_limit (3)
119
+ # The maximum number of times to retry failed requests. Only
120
+ # ~ 500 level server errors and certain ~ 400 level client errors
121
+ # are retried. Generally, these are throttling errors, data
122
+ # checksum errors, networking errors, timeout errors and auth
123
+ # errors from expired credentials.
124
+ # @option options [String] :secret_access_key
125
+ # @option options [String] :session_token
126
+ # @option options [Boolean] :stub_responses (false)
127
+ # Causes the client to return stubbed responses. By default
128
+ # fake responses are generated and returned. You can specify
129
+ # the response data to return or errors to raise by calling
130
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
131
+ #
132
+ # ** Please note ** When response stubbing is enabled, no HTTP
133
+ # requests are made, and retries are disabled.
134
+ # @option options [Boolean] :validate_params (true)
135
+ # When `true`, request parameters are validated before
136
+ # sending the request.
137
+ def initialize(*args)
138
+ super
139
+ end
140
+
141
+ # @!group API Operations
142
+
143
+ # This operation aborts a multipart upload identified by the upload ID.
144
+ #
145
+ # After the Abort Multipart Upload request succeeds, you cannot upload
146
+ # any more parts to the multipart upload or complete the multipart
147
+ # upload. Aborting a completed upload fails. However, aborting an
148
+ # already-aborted upload will succeed, for a short time. For more
149
+ # information about uploading a part and completing a multipart upload,
150
+ # see UploadMultipartPart and CompleteMultipartUpload.
151
+ #
152
+ # This operation is idempotent.
153
+ #
154
+ # An AWS account has full permission to perform all operations
155
+ # (actions). However, AWS Identity and Access Management (IAM) users
156
+ # don't have any permissions by default. You must grant them explicit
157
+ # permission to perform specific actions. For more information, see
158
+ # [Access Control Using AWS Identity and Access Management (IAM)][1].
159
+ #
160
+ # For conceptual information and underlying REST API, see [Working with
161
+ # Archives in Amazon Glacier][2] and [Abort Multipart Upload][3] in the
162
+ # *Amazon Glacier Developer Guide*.
163
+ #
164
+ #
165
+ #
166
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
167
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html
168
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-abort-upload.html
169
+ # @option params [required, String] :account_id
170
+ # The `AccountId` value is the AWS account ID of the account that owns
171
+ # the vault. You can either specify an AWS account ID or optionally a
172
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
173
+ # account ID associated with the credentials used to sign the request.
174
+ # If you use an account ID, do not include any hyphens ('-') in the
175
+ # ID.
176
+ # @option params [required, String] :vault_name
177
+ # The name of the vault.
178
+ # @option params [required, String] :upload_id
179
+ # The upload ID of the multipart upload to delete.
180
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
181
+ #
182
+ # @example Request syntax with placeholder values
183
+ # resp = client.abort_multipart_upload({
184
+ # account_id: "string", # required
185
+ # vault_name: "string", # required
186
+ # upload_id: "string", # required
187
+ # })
188
+ # @overload abort_multipart_upload(params = {})
189
+ # @param [Hash] params ({})
190
+ def abort_multipart_upload(params = {}, options = {})
191
+ req = build_request(:abort_multipart_upload, params)
192
+ req.send_request(options)
193
+ end
194
+
195
+ # This operation aborts the vault locking process if the vault lock is
196
+ # not in the `Locked` state. If the vault lock is in the `Locked` state
197
+ # when this operation is requested, the operation returns an
198
+ # `AccessDeniedException` error. Aborting the vault locking process
199
+ # removes the vault lock policy from the specified vault.
200
+ #
201
+ # A vault lock is put into the `InProgress` state by calling
202
+ # InitiateVaultLock. A vault lock is put into the `Locked` state by
203
+ # calling CompleteVaultLock. You can get the state of a vault lock by
204
+ # calling GetVaultLock. For more information about the vault locking
205
+ # process, see [Amazon Glacier Vault Lock][1]. For more information
206
+ # about vault lock policies, see [Amazon Glacier Access Control with
207
+ # Vault Lock Policies][2].
208
+ #
209
+ # This operation is idempotent. You can successfully invoke this
210
+ # operation multiple times, if the vault lock is in the `InProgress`
211
+ # state or if there is no policy associated with the vault.
212
+ #
213
+ #
214
+ #
215
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html
216
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html
217
+ # @option params [required, String] :account_id
218
+ # The `AccountId` value is the AWS account ID. This value must match the
219
+ # AWS account ID associated with the credentials used to sign the
220
+ # request. You can either specify an AWS account ID or optionally a
221
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
222
+ # account ID associated with the credentials used to sign the request.
223
+ # If you specify your account ID, do not include any hyphens ('-') in
224
+ # the ID.
225
+ # @option params [required, String] :vault_name
226
+ # The name of the vault.
227
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
228
+ #
229
+ # @example Request syntax with placeholder values
230
+ # resp = client.abort_vault_lock({
231
+ # account_id: "string", # required
232
+ # vault_name: "string", # required
233
+ # })
234
+ # @overload abort_vault_lock(params = {})
235
+ # @param [Hash] params ({})
236
+ def abort_vault_lock(params = {}, options = {})
237
+ req = build_request(:abort_vault_lock, params)
238
+ req.send_request(options)
239
+ end
240
+
241
+ # This operation adds the specified tags to a vault. Each tag is
242
+ # composed of a key and a value. Each vault can have up to 10 tags. If
243
+ # your request would cause the tag limit for the vault to be exceeded,
244
+ # the operation throws the `LimitExceededException` error. If a tag
245
+ # already exists on the vault under a specified key, the existing key
246
+ # value will be overwritten. For more information about tags, see
247
+ # [Tagging Amazon Glacier Resources][1].
248
+ #
249
+ #
250
+ #
251
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html
252
+ # @option params [required, String] :account_id
253
+ # The `AccountId` value is the AWS account ID of the account that owns
254
+ # the vault. You can either specify an AWS account ID or optionally a
255
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
256
+ # account ID associated with the credentials used to sign the request.
257
+ # If you use an account ID, do not include any hyphens ('-') in the
258
+ # ID.
259
+ # @option params [required, String] :vault_name
260
+ # The name of the vault.
261
+ # @option params [Hash<String,String>] :tags
262
+ # The tags to add to the vault. Each tag is composed of a key and a
263
+ # value. The value can be an empty string.
264
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
265
+ #
266
+ # @example Request syntax with placeholder values
267
+ # resp = client.add_tags_to_vault({
268
+ # account_id: "string", # required
269
+ # vault_name: "string", # required
270
+ # tags: {
271
+ # "TagKey" => "TagValue",
272
+ # },
273
+ # })
274
+ # @overload add_tags_to_vault(params = {})
275
+ # @param [Hash] params ({})
276
+ def add_tags_to_vault(params = {}, options = {})
277
+ req = build_request(:add_tags_to_vault, params)
278
+ req.send_request(options)
279
+ end
280
+
281
+ # You call this operation to inform Amazon Glacier that all the archive
282
+ # parts have been uploaded and that Amazon Glacier can now assemble the
283
+ # archive from the uploaded parts. After assembling and saving the
284
+ # archive to the vault, Amazon Glacier returns the URI path of the newly
285
+ # created archive resource. Using the URI path, you can then access the
286
+ # archive. After you upload an archive, you should save the archive ID
287
+ # returned to retrieve the archive at a later point. You can also get
288
+ # the vault inventory to obtain a list of archive IDs in a vault. For
289
+ # more information, see InitiateJob.
290
+ #
291
+ # In the request, you must include the computed SHA256 tree hash of the
292
+ # entire archive you have uploaded. For information about computing a
293
+ # SHA256 tree hash, see [Computing Checksums][1]. On the server side,
294
+ # Amazon Glacier also constructs the SHA256 tree hash of the assembled
295
+ # archive. If the values match, Amazon Glacier saves the archive to the
296
+ # vault; otherwise, it returns an error, and the operation fails. The
297
+ # ListParts operation returns a list of parts uploaded for a specific
298
+ # multipart upload. It includes checksum information for each uploaded
299
+ # part that can be used to debug a bad checksum issue.
300
+ #
301
+ # Additionally, Amazon Glacier also checks for any missing content
302
+ # ranges when assembling the archive, if missing content ranges are
303
+ # found, Amazon Glacier returns an error and the operation fails.
304
+ #
305
+ # Complete Multipart Upload is an idempotent operation. After your first
306
+ # successful complete multipart upload, if you call the operation again
307
+ # within a short period, the operation will succeed and return the same
308
+ # archive ID. This is useful in the event you experience a network issue
309
+ # that causes an aborted connection or receive a 500 server error, in
310
+ # which case you can repeat your Complete Multipart Upload request and
311
+ # get the same archive ID without creating duplicate archives. Note,
312
+ # however, that after the multipart upload completes, you cannot call
313
+ # the List Parts operation and the multipart upload will not appear in
314
+ # List Multipart Uploads response, even if idempotent complete is
315
+ # possible.
316
+ #
317
+ # An AWS account has full permission to perform all operations
318
+ # (actions). However, AWS Identity and Access Management (IAM) users
319
+ # don't have any permissions by default. You must grant them explicit
320
+ # permission to perform specific actions. For more information, see
321
+ # [Access Control Using AWS Identity and Access Management (IAM)][2].
322
+ #
323
+ # For conceptual information and underlying REST API, see [Uploading
324
+ # Large Archives in Parts (Multipart Upload)][3] and [Complete Multipart
325
+ # Upload][4] in the *Amazon Glacier Developer Guide*.
326
+ #
327
+ #
328
+ #
329
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html
330
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
331
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html
332
+ # [4]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-complete-upload.html
333
+ # @option params [required, String] :account_id
334
+ # The `AccountId` value is the AWS account ID of the account that owns
335
+ # the vault. You can either specify an AWS account ID or optionally a
336
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
337
+ # account ID associated with the credentials used to sign the request.
338
+ # If you use an account ID, do not include any hyphens ('-') in the
339
+ # ID.
340
+ # @option params [required, String] :vault_name
341
+ # The name of the vault.
342
+ # @option params [required, String] :upload_id
343
+ # The upload ID of the multipart upload.
344
+ # @option params [Integer] :archive_size
345
+ # The total size, in bytes, of the entire archive. This value should be
346
+ # the sum of all the sizes of the individual parts that you uploaded.
347
+ # @option params [String] :checksum
348
+ # The SHA256 tree hash of the entire archive. It is the tree hash of
349
+ # SHA256 tree hash of the individual parts. If the value you specify in
350
+ # the request does not match the SHA256 tree hash of the final assembled
351
+ # archive as computed by Amazon Glacier, Amazon Glacier returns an error
352
+ # and the request fails.
353
+ # @return [Types::ArchiveCreationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
354
+ #
355
+ # * {Types::ArchiveCreationOutput#location #location} => String
356
+ # * {Types::ArchiveCreationOutput#checksum #checksum} => String
357
+ # * {Types::ArchiveCreationOutput#archive_id #archiveId} => String
358
+ #
359
+ # @example Request syntax with placeholder values
360
+ # resp = client.complete_multipart_upload({
361
+ # account_id: "string", # required
362
+ # vault_name: "string", # required
363
+ # upload_id: "string", # required
364
+ # archive_size: 1,
365
+ # checksum: "string",
366
+ # })
367
+ #
368
+ # @example Response structure
369
+ # resp.location #=> String
370
+ # resp.checksum #=> String
371
+ # resp.archive_id #=> String
372
+ # @overload complete_multipart_upload(params = {})
373
+ # @param [Hash] params ({})
374
+ def complete_multipart_upload(params = {}, options = {})
375
+ req = build_request(:complete_multipart_upload, params)
376
+ req.send_request(options)
377
+ end
378
+
379
+ # This operation completes the vault locking process by transitioning
380
+ # the vault lock from the `InProgress` state to the `Locked` state,
381
+ # which causes the vault lock policy to become unchangeable. A vault
382
+ # lock is put into the `InProgress` state by calling InitiateVaultLock.
383
+ # You can obtain the state of the vault lock by calling GetVaultLock.
384
+ # For more information about the vault locking process, [Amazon Glacier
385
+ # Vault Lock][1].
386
+ #
387
+ # This operation is idempotent. This request is always successful if the
388
+ # vault lock is in the `Locked` state and the provided lock ID matches
389
+ # the lock ID originally used to lock the vault.
390
+ #
391
+ # If an invalid lock ID is passed in the request when the vault lock is
392
+ # in the `Locked` state, the operation returns an
393
+ # `AccessDeniedException` error. If an invalid lock ID is passed in the
394
+ # request when the vault lock is in the `InProgress` state, the
395
+ # operation throws an `InvalidParameter` error.
396
+ #
397
+ #
398
+ #
399
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html
400
+ # @option params [required, String] :account_id
401
+ # The `AccountId` value is the AWS account ID. This value must match the
402
+ # AWS account ID associated with the credentials used to sign the
403
+ # request. You can either specify an AWS account ID or optionally a
404
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
405
+ # account ID associated with the credentials used to sign the request.
406
+ # If you specify your account ID, do not include any hyphens ('-') in
407
+ # the ID.
408
+ # @option params [required, String] :vault_name
409
+ # The name of the vault.
410
+ # @option params [required, String] :lock_id
411
+ # The `lockId` value is the lock ID obtained from a InitiateVaultLock
412
+ # request.
413
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
414
+ #
415
+ # @example Request syntax with placeholder values
416
+ # resp = client.complete_vault_lock({
417
+ # account_id: "string", # required
418
+ # vault_name: "string", # required
419
+ # lock_id: "string", # required
420
+ # })
421
+ # @overload complete_vault_lock(params = {})
422
+ # @param [Hash] params ({})
423
+ def complete_vault_lock(params = {}, options = {})
424
+ req = build_request(:complete_vault_lock, params)
425
+ req.send_request(options)
426
+ end
427
+
428
+ # This operation creates a new vault with the specified name. The name
429
+ # of the vault must be unique within a region for an AWS account. You
430
+ # can create up to 1,000 vaults per account. If you need to create more
431
+ # vaults, contact Amazon Glacier.
432
+ #
433
+ # You must use the following guidelines when naming a vault.
434
+ #
435
+ # * Names can be between 1 and 255 characters long.
436
+ #
437
+ # * Allowed characters are a-z, A-Z, 0-9, '\_' (underscore), '-'
438
+ # (hyphen), and '.' (period).
439
+ #
440
+ # This operation is idempotent.
441
+ #
442
+ # An AWS account has full permission to perform all operations
443
+ # (actions). However, AWS Identity and Access Management (IAM) users
444
+ # don't have any permissions by default. You must grant them explicit
445
+ # permission to perform specific actions. For more information, see
446
+ # [Access Control Using AWS Identity and Access Management (IAM)][1].
447
+ #
448
+ # For conceptual information and underlying REST API, see [Creating a
449
+ # Vault in Amazon Glacier][2] and [Create Vault ][3] in the *Amazon
450
+ # Glacier Developer Guide*.
451
+ #
452
+ #
453
+ #
454
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
455
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/creating-vaults.html
456
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-put.html
457
+ # @option params [required, String] :account_id
458
+ # The `AccountId` value is the AWS account ID. This value must match the
459
+ # AWS account ID associated with the credentials used to sign the
460
+ # request. You can either specify an AWS account ID or optionally a
461
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
462
+ # account ID associated with the credentials used to sign the request.
463
+ # If you specify your account ID, do not include any hyphens ('-') in
464
+ # the ID.
465
+ # @option params [required, String] :vault_name
466
+ # The name of the vault.
467
+ # @return [Types::CreateVaultOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
468
+ #
469
+ # * {Types::CreateVaultOutput#location #location} => String
470
+ #
471
+ # @example Request syntax with placeholder values
472
+ # resp = client.create_vault({
473
+ # account_id: "string", # required
474
+ # vault_name: "string", # required
475
+ # })
476
+ #
477
+ # @example Response structure
478
+ # resp.location #=> String
479
+ # @overload create_vault(params = {})
480
+ # @param [Hash] params ({})
481
+ def create_vault(params = {}, options = {})
482
+ req = build_request(:create_vault, params)
483
+ req.send_request(options)
484
+ end
485
+
486
+ # This operation deletes an archive from a vault. Subsequent requests to
487
+ # initiate a retrieval of this archive will fail. Archive retrievals
488
+ # that are in progress for this archive ID may or may not succeed
489
+ # according to the following scenarios:
490
+ #
491
+ # * If the archive retrieval job is actively preparing the data for
492
+ # download when Amazon Glacier receives the delete archive request,
493
+ # the archival retrieval operation might fail.
494
+ #
495
+ # * If the archive retrieval job has successfully prepared the archive
496
+ # for download when Amazon Glacier receives the delete archive
497
+ # request, you will be able to download the output.
498
+ #
499
+ # This operation is idempotent. Attempting to delete an already-deleted
500
+ # archive does not result in an error.
501
+ #
502
+ # An AWS account has full permission to perform all operations
503
+ # (actions). However, AWS Identity and Access Management (IAM) users
504
+ # don't have any permissions by default. You must grant them explicit
505
+ # permission to perform specific actions. For more information, see
506
+ # [Access Control Using AWS Identity and Access Management (IAM)][1].
507
+ #
508
+ # For conceptual information and underlying REST API, see [Deleting an
509
+ # Archive in Amazon Glacier][2] and [Delete Archive][3] in the *Amazon
510
+ # Glacier Developer Guide*.
511
+ #
512
+ #
513
+ #
514
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
515
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/deleting-an-archive.html
516
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-delete.html
517
+ # @option params [required, String] :account_id
518
+ # The `AccountId` value is the AWS account ID of the account that owns
519
+ # the vault. You can either specify an AWS account ID or optionally a
520
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
521
+ # account ID associated with the credentials used to sign the request.
522
+ # If you use an account ID, do not include any hyphens ('-') in the
523
+ # ID.
524
+ # @option params [required, String] :vault_name
525
+ # The name of the vault.
526
+ # @option params [required, String] :archive_id
527
+ # The ID of the archive to delete.
528
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
529
+ #
530
+ # @example Request syntax with placeholder values
531
+ # resp = client.delete_archive({
532
+ # account_id: "string", # required
533
+ # vault_name: "string", # required
534
+ # archive_id: "string", # required
535
+ # })
536
+ # @overload delete_archive(params = {})
537
+ # @param [Hash] params ({})
538
+ def delete_archive(params = {}, options = {})
539
+ req = build_request(:delete_archive, params)
540
+ req.send_request(options)
541
+ end
542
+
543
+ # This operation deletes a vault. Amazon Glacier will delete a vault
544
+ # only if there are no archives in the vault as of the last inventory
545
+ # and there have been no writes to the vault since the last inventory.
546
+ # If either of these conditions is not satisfied, the vault deletion
547
+ # fails (that is, the vault is not removed) and Amazon Glacier returns
548
+ # an error. You can use DescribeVault to return the number of archives
549
+ # in a vault, and you can use [Initiate a Job (POST jobs)][1] to
550
+ # initiate a new inventory retrieval for a vault. The inventory contains
551
+ # the archive IDs you use to delete archives using [Delete Archive
552
+ # (DELETE archive)][2].
553
+ #
554
+ # This operation is idempotent.
555
+ #
556
+ # An AWS account has full permission to perform all operations
557
+ # (actions). However, AWS Identity and Access Management (IAM) users
558
+ # don't have any permissions by default. You must grant them explicit
559
+ # permission to perform specific actions. For more information, see
560
+ # [Access Control Using AWS Identity and Access Management (IAM)][3].
561
+ #
562
+ # For conceptual information and underlying REST API, see [Deleting a
563
+ # Vault in Amazon Glacier][4] and [Delete Vault ][5] in the *Amazon
564
+ # Glacier Developer Guide*.
565
+ #
566
+ #
567
+ #
568
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html
569
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-delete.html
570
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
571
+ # [4]: http://docs.aws.amazon.com/amazonglacier/latest/dev/deleting-vaults.html
572
+ # [5]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-delete.html
573
+ # @option params [required, String] :account_id
574
+ # The `AccountId` value is the AWS account ID of the account that owns
575
+ # the vault. You can either specify an AWS account ID or optionally a
576
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
577
+ # account ID associated with the credentials used to sign the request.
578
+ # If you use an account ID, do not include any hyphens ('-') in the
579
+ # ID.
580
+ # @option params [required, String] :vault_name
581
+ # The name of the vault.
582
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
583
+ #
584
+ # @example Request syntax with placeholder values
585
+ # resp = client.delete_vault({
586
+ # account_id: "string", # required
587
+ # vault_name: "string", # required
588
+ # })
589
+ # @overload delete_vault(params = {})
590
+ # @param [Hash] params ({})
591
+ def delete_vault(params = {}, options = {})
592
+ req = build_request(:delete_vault, params)
593
+ req.send_request(options)
594
+ end
595
+
596
+ # This operation deletes the access policy associated with the specified
597
+ # vault. The operation is eventually consistent; that is, it might take
598
+ # some time for Amazon Glacier to completely remove the access policy,
599
+ # and you might still see the effect of the policy for a short time
600
+ # after you send the delete request.
601
+ #
602
+ # This operation is idempotent. You can invoke delete multiple times,
603
+ # even if there is no policy associated with the vault. For more
604
+ # information about vault access policies, see [Amazon Glacier Access
605
+ # Control with Vault Access Policies][1].
606
+ #
607
+ #
608
+ #
609
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html
610
+ # @option params [required, String] :account_id
611
+ # The `AccountId` value is the AWS account ID of the account that owns
612
+ # the vault. You can either specify an AWS account ID or optionally a
613
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
614
+ # account ID associated with the credentials used to sign the request.
615
+ # If you use an account ID, do not include any hyphens ('-') in the
616
+ # ID.
617
+ # @option params [required, String] :vault_name
618
+ # The name of the vault.
619
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
620
+ #
621
+ # @example Request syntax with placeholder values
622
+ # resp = client.delete_vault_access_policy({
623
+ # account_id: "string", # required
624
+ # vault_name: "string", # required
625
+ # })
626
+ # @overload delete_vault_access_policy(params = {})
627
+ # @param [Hash] params ({})
628
+ def delete_vault_access_policy(params = {}, options = {})
629
+ req = build_request(:delete_vault_access_policy, params)
630
+ req.send_request(options)
631
+ end
632
+
633
+ # This operation deletes the notification configuration set for a vault.
634
+ # The operation is eventually consistent; that is, it might take some
635
+ # time for Amazon Glacier to completely disable the notifications and
636
+ # you might still receive some notifications for a short time after you
637
+ # send the delete request.
638
+ #
639
+ # An AWS account has full permission to perform all operations
640
+ # (actions). However, AWS Identity and Access Management (IAM) users
641
+ # don't have any permissions by default. You must grant them explicit
642
+ # permission to perform specific actions. For more information, see
643
+ # [Access Control Using AWS Identity and Access Management (IAM)][1].
644
+ #
645
+ # For conceptual information and underlying REST API, see [Configuring
646
+ # Vault Notifications in Amazon Glacier][2] and [Delete Vault
647
+ # Notification Configuration ][3] in the Amazon Glacier Developer Guide.
648
+ #
649
+ #
650
+ #
651
+ # [1]: http://docs.aws.amazon.com/latest/dev/using-iam-with-amazon-glacier.html
652
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html
653
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-delete.html
654
+ # @option params [required, String] :account_id
655
+ # The `AccountId` value is the AWS account ID of the account that owns
656
+ # the vault. You can either specify an AWS account ID or optionally a
657
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
658
+ # account ID associated with the credentials used to sign the request.
659
+ # If you use an account ID, do not include any hyphens ('-') in the
660
+ # ID.
661
+ # @option params [required, String] :vault_name
662
+ # The name of the vault.
663
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
664
+ #
665
+ # @example Request syntax with placeholder values
666
+ # resp = client.delete_vault_notifications({
667
+ # account_id: "string", # required
668
+ # vault_name: "string", # required
669
+ # })
670
+ # @overload delete_vault_notifications(params = {})
671
+ # @param [Hash] params ({})
672
+ def delete_vault_notifications(params = {}, options = {})
673
+ req = build_request(:delete_vault_notifications, params)
674
+ req.send_request(options)
675
+ end
676
+
677
+ # This operation returns information about a job you previously
678
+ # initiated, including the job initiation date, the user who initiated
679
+ # the job, the job status code/message and the Amazon SNS topic to
680
+ # notify after Amazon Glacier completes the job. For more information
681
+ # about initiating a job, see InitiateJob.
682
+ #
683
+ # <note markdown="1"> This operation enables you to check the status of your job. However,
684
+ # it is strongly recommended that you set up an Amazon SNS topic and
685
+ # specify it in your initiate job request so that Amazon Glacier can
686
+ # notify the topic after it completes the job.
687
+ #
688
+ # </note>
689
+ #
690
+ # A job ID will not expire for at least 24 hours after Amazon Glacier
691
+ # completes the job.
692
+ #
693
+ # An AWS account has full permission to perform all operations
694
+ # (actions). However, AWS Identity and Access Management (IAM) users
695
+ # don't have any permissions by default. You must grant them explicit
696
+ # permission to perform specific actions. For more information, see
697
+ # [Access Control Using AWS Identity and Access Management (IAM)][1].
698
+ #
699
+ # For information about the underlying REST API, see [Working with
700
+ # Archives in Amazon Glacier][2] in the *Amazon Glacier Developer
701
+ # Guide*.
702
+ #
703
+ #
704
+ #
705
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
706
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-describe-job-get.html
707
+ # @option params [required, String] :account_id
708
+ # The `AccountId` value is the AWS account ID of the account that owns
709
+ # the vault. You can either specify an AWS account ID or optionally a
710
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
711
+ # account ID associated with the credentials used to sign the request.
712
+ # If you use an account ID, do not include any hyphens ('-') in the
713
+ # ID.
714
+ # @option params [required, String] :vault_name
715
+ # The name of the vault.
716
+ # @option params [required, String] :job_id
717
+ # The ID of the job to describe.
718
+ # @return [Types::GlacierJobDescription] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
719
+ #
720
+ # * {Types::GlacierJobDescription#job_id #JobId} => String
721
+ # * {Types::GlacierJobDescription#job_description #JobDescription} => String
722
+ # * {Types::GlacierJobDescription#action #Action} => String
723
+ # * {Types::GlacierJobDescription#archive_id #ArchiveId} => String
724
+ # * {Types::GlacierJobDescription#vault_arn #VaultARN} => String
725
+ # * {Types::GlacierJobDescription#creation_date #CreationDate} => Time
726
+ # * {Types::GlacierJobDescription#completed #Completed} => Boolean
727
+ # * {Types::GlacierJobDescription#status_code #StatusCode} => String
728
+ # * {Types::GlacierJobDescription#status_message #StatusMessage} => String
729
+ # * {Types::GlacierJobDescription#archive_size_in_bytes #ArchiveSizeInBytes} => Integer
730
+ # * {Types::GlacierJobDescription#inventory_size_in_bytes #InventorySizeInBytes} => Integer
731
+ # * {Types::GlacierJobDescription#sns_topic #SNSTopic} => String
732
+ # * {Types::GlacierJobDescription#completion_date #CompletionDate} => Time
733
+ # * {Types::GlacierJobDescription#sha256_tree_hash #SHA256TreeHash} => String
734
+ # * {Types::GlacierJobDescription#archive_sha256_tree_hash #ArchiveSHA256TreeHash} => String
735
+ # * {Types::GlacierJobDescription#retrieval_byte_range #RetrievalByteRange} => String
736
+ # * {Types::GlacierJobDescription#tier #Tier} => String
737
+ # * {Types::GlacierJobDescription#inventory_retrieval_parameters #InventoryRetrievalParameters} => Types::InventoryRetrievalJobDescription
738
+ #
739
+ # @example Request syntax with placeholder values
740
+ # resp = client.describe_job({
741
+ # account_id: "string", # required
742
+ # vault_name: "string", # required
743
+ # job_id: "string", # required
744
+ # })
745
+ #
746
+ # @example Response structure
747
+ # resp.job_id #=> String
748
+ # resp.job_description #=> String
749
+ # resp.action #=> String, one of "ArchiveRetrieval", "InventoryRetrieval"
750
+ # resp.archive_id #=> String
751
+ # resp.vault_arn #=> String
752
+ # resp.creation_date #=> Time
753
+ # resp.completed #=> Boolean
754
+ # resp.status_code #=> String, one of "InProgress", "Succeeded", "Failed"
755
+ # resp.status_message #=> String
756
+ # resp.archive_size_in_bytes #=> Integer
757
+ # resp.inventory_size_in_bytes #=> Integer
758
+ # resp.sns_topic #=> String
759
+ # resp.completion_date #=> Time
760
+ # resp.sha256_tree_hash #=> String
761
+ # resp.archive_sha256_tree_hash #=> String
762
+ # resp.retrieval_byte_range #=> String
763
+ # resp.tier #=> String
764
+ # resp.inventory_retrieval_parameters.format #=> String
765
+ # resp.inventory_retrieval_parameters.start_date #=> Time
766
+ # resp.inventory_retrieval_parameters.end_date #=> Time
767
+ # resp.inventory_retrieval_parameters.limit #=> String
768
+ # resp.inventory_retrieval_parameters.marker #=> String
769
+ # @overload describe_job(params = {})
770
+ # @param [Hash] params ({})
771
+ def describe_job(params = {}, options = {})
772
+ req = build_request(:describe_job, params)
773
+ req.send_request(options)
774
+ end
775
+
776
+ # This operation returns information about a vault, including the
777
+ # vault's Amazon Resource Name (ARN), the date the vault was created,
778
+ # the number of archives it contains, and the total size of all the
779
+ # archives in the vault. The number of archives and their total size are
780
+ # as of the last inventory generation. This means that if you add or
781
+ # remove an archive from a vault, and then immediately use Describe
782
+ # Vault, the change in contents will not be immediately reflected. If
783
+ # you want to retrieve the latest inventory of the vault, use
784
+ # InitiateJob. Amazon Glacier generates vault inventories approximately
785
+ # daily. For more information, see [Downloading a Vault Inventory in
786
+ # Amazon Glacier][1].
787
+ #
788
+ # An AWS account has full permission to perform all operations
789
+ # (actions). However, AWS Identity and Access Management (IAM) users
790
+ # don't have any permissions by default. You must grant them explicit
791
+ # permission to perform specific actions. For more information, see
792
+ # [Access Control Using AWS Identity and Access Management (IAM)][2].
793
+ #
794
+ # For conceptual information and underlying REST API, see [Retrieving
795
+ # Vault Metadata in Amazon Glacier][3] and [Describe Vault ][4] in the
796
+ # *Amazon Glacier Developer Guide*.
797
+ #
798
+ #
799
+ #
800
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html
801
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
802
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/retrieving-vault-info.html
803
+ # [4]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-get.html
804
+ # @option params [required, String] :account_id
805
+ # The `AccountId` value is the AWS account ID of the account that owns
806
+ # the vault. You can either specify an AWS account ID or optionally a
807
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
808
+ # account ID associated with the credentials used to sign the request.
809
+ # If you use an account ID, do not include any hyphens ('-') in the
810
+ # ID.
811
+ # @option params [required, String] :vault_name
812
+ # The name of the vault.
813
+ # @return [Types::DescribeVaultOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
814
+ #
815
+ # * {Types::DescribeVaultOutput#vault_arn #VaultARN} => String
816
+ # * {Types::DescribeVaultOutput#vault_name #VaultName} => String
817
+ # * {Types::DescribeVaultOutput#creation_date #CreationDate} => Time
818
+ # * {Types::DescribeVaultOutput#last_inventory_date #LastInventoryDate} => Time
819
+ # * {Types::DescribeVaultOutput#number_of_archives #NumberOfArchives} => Integer
820
+ # * {Types::DescribeVaultOutput#size_in_bytes #SizeInBytes} => Integer
821
+ #
822
+ # @example Request syntax with placeholder values
823
+ # resp = client.describe_vault({
824
+ # account_id: "string", # required
825
+ # vault_name: "string", # required
826
+ # })
827
+ #
828
+ # @example Response structure
829
+ # resp.vault_arn #=> String
830
+ # resp.vault_name #=> String
831
+ # resp.creation_date #=> Time
832
+ # resp.last_inventory_date #=> Time
833
+ # resp.number_of_archives #=> Integer
834
+ # resp.size_in_bytes #=> Integer
835
+ # @overload describe_vault(params = {})
836
+ # @param [Hash] params ({})
837
+ def describe_vault(params = {}, options = {})
838
+ req = build_request(:describe_vault, params)
839
+ req.send_request(options)
840
+ end
841
+
842
+ # This operation returns the current data retrieval policy for the
843
+ # account and region specified in the GET request. For more information
844
+ # about data retrieval policies, see [Amazon Glacier Data Retrieval
845
+ # Policies][1].
846
+ #
847
+ #
848
+ #
849
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html
850
+ # @option params [required, String] :account_id
851
+ # The `AccountId` value is the AWS account ID. This value must match the
852
+ # AWS account ID associated with the credentials used to sign the
853
+ # request. You can either specify an AWS account ID or optionally a
854
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
855
+ # account ID associated with the credentials used to sign the request.
856
+ # If you specify your account ID, do not include any hyphens ('-') in
857
+ # the ID.
858
+ # @return [Types::GetDataRetrievalPolicyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
859
+ #
860
+ # * {Types::GetDataRetrievalPolicyOutput#policy #Policy} => Types::DataRetrievalPolicy
861
+ #
862
+ # @example Request syntax with placeholder values
863
+ # resp = client.get_data_retrieval_policy({
864
+ # account_id: "string", # required
865
+ # })
866
+ #
867
+ # @example Response structure
868
+ # resp.policy.rules #=> Array
869
+ # resp.policy.rules[0].strategy #=> String
870
+ # resp.policy.rules[0].bytes_per_hour #=> Integer
871
+ # @overload get_data_retrieval_policy(params = {})
872
+ # @param [Hash] params ({})
873
+ def get_data_retrieval_policy(params = {}, options = {})
874
+ req = build_request(:get_data_retrieval_policy, params)
875
+ req.send_request(options)
876
+ end
877
+
878
+ # This operation downloads the output of the job you initiated using
879
+ # InitiateJob. Depending on the job type you specified when you
880
+ # initiated the job, the output will be either the content of an archive
881
+ # or a vault inventory.
882
+ #
883
+ # You can download all the job output or download a portion of the
884
+ # output by specifying a byte range. In the case of an archive retrieval
885
+ # job, depending on the byte range you specify, Amazon Glacier returns
886
+ # the checksum for the portion of the data. You can compute the checksum
887
+ # on the client and verify that the values match to ensure the portion
888
+ # you downloaded is the correct data.
889
+ #
890
+ # A job ID will not expire for at least 24 hours after Amazon Glacier
891
+ # completes the job. That a byte range. For both archive and inventory
892
+ # retrieval jobs, you should verify the downloaded size against the size
893
+ # returned in the headers from the **Get Job Output** response.
894
+ #
895
+ # For archive retrieval jobs, you should also verify that the size is
896
+ # what you expected. If you download a portion of the output, the
897
+ # expected size is based on the range of bytes you specified. For
898
+ # example, if you specify a range of `bytes=0-1048575`, you should
899
+ # verify your download size is 1,048,576 bytes. If you download an
900
+ # entire archive, the expected size is the size of the archive when you
901
+ # uploaded it to Amazon Glacier The expected size is also returned in
902
+ # the headers from the **Get Job Output** response.
903
+ #
904
+ # In the case of an archive retrieval job, depending on the byte range
905
+ # you specify, Amazon Glacier returns the checksum for the portion of
906
+ # the data. To ensure the portion you downloaded is the correct data,
907
+ # compute the checksum on the client, verify that the values match, and
908
+ # verify that the size is what you expected.
909
+ #
910
+ # A job ID does not expire for at least 24 hours after Amazon Glacier
911
+ # completes the job. That is, you can download the job output within the
912
+ # 24 hours period after Amazon Glacier completes the job.
913
+ #
914
+ # An AWS account has full permission to perform all operations
915
+ # (actions). However, AWS Identity and Access Management (IAM) users
916
+ # don't have any permissions by default. You must grant them explicit
917
+ # permission to perform specific actions. For more information, see
918
+ # [Access Control Using AWS Identity and Access Management (IAM)][1].
919
+ #
920
+ # For conceptual information and the underlying REST API, see
921
+ # [Downloading a Vault Inventory][2], [Downloading an Archive][3], and
922
+ # [Get Job Output ][4]
923
+ #
924
+ #
925
+ #
926
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
927
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html
928
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/downloading-an-archive.html
929
+ # [4]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-job-output-get.html
930
+ # @option params [required, String] :account_id
931
+ # The `AccountId` value is the AWS account ID of the account that owns
932
+ # the vault. You can either specify an AWS account ID or optionally a
933
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
934
+ # account ID associated with the credentials used to sign the request.
935
+ # If you use an account ID, do not include any hyphens ('-') in the
936
+ # ID.
937
+ # @option params [required, String] :vault_name
938
+ # The name of the vault.
939
+ # @option params [required, String] :job_id
940
+ # The job ID whose data is downloaded.
941
+ # @option params [String] :range
942
+ # The range of bytes to retrieve from the output. For example, if you
943
+ # want to download the first 1,048,576 bytes, specify the range as
944
+ # `bytes=0-1048575`. By default, this operation downloads the entire
945
+ # output.
946
+ #
947
+ # If the job output is large, then you can use a range to retrieve a
948
+ # portion of the output. This allows you to download the entire output
949
+ # in smaller chunks of bytes. For example, suppose you have 1 GB of job
950
+ # output you want to download and you decide to download 128 MB chunks
951
+ # of data at a time, which is a total of eight Get Job Output requests.
952
+ # You use the following process to download the job output:
953
+ #
954
+ # 1. Download a 128 MB chunk of output by specifying the appropriate
955
+ # byte range. Verify that all 128 MB of data was received.
956
+ #
957
+ # 2. Along with the data, the response includes a SHA256 tree hash of
958
+ # the payload. You compute the checksum of the payload on the client
959
+ # and compare it with the checksum you received in the response to
960
+ # ensure you received all the expected data.
961
+ #
962
+ # 3. Repeat steps 1 and 2 for all the eight 128 MB chunks of output
963
+ # data, each time specifying the appropriate byte range.
964
+ #
965
+ # 4. After downloading all the parts of the job output, you have a list
966
+ # of eight checksum values. Compute the tree hash of these values to
967
+ # find the checksum of the entire output. Using the DescribeJob API,
968
+ # obtain job information of the job that provided you the output.
969
+ # The response includes the checksum of the entire archive stored in
970
+ # Amazon Glacier. You compare this value with the checksum you
971
+ # computed to ensure you have downloaded the entire archive content
972
+ # with no errors.
973
+ # @return [Types::GetJobOutputOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
974
+ #
975
+ # * {Types::GetJobOutputOutput#body #body} => IO
976
+ # * {Types::GetJobOutputOutput#checksum #checksum} => String
977
+ # * {Types::GetJobOutputOutput#status #status} => Integer
978
+ # * {Types::GetJobOutputOutput#content_range #contentRange} => String
979
+ # * {Types::GetJobOutputOutput#accept_ranges #acceptRanges} => String
980
+ # * {Types::GetJobOutputOutput#content_type #contentType} => String
981
+ # * {Types::GetJobOutputOutput#archive_description #archiveDescription} => String
982
+ #
983
+ # @example Request syntax with placeholder values
984
+ # resp = client.get_job_output({
985
+ # account_id: "string", # required
986
+ # vault_name: "string", # required
987
+ # job_id: "string", # required
988
+ # range: "string",
989
+ # })
990
+ #
991
+ # @example Response structure
992
+ # resp.body #=> IO
993
+ # resp.checksum #=> String
994
+ # resp.status #=> Integer
995
+ # resp.content_range #=> String
996
+ # resp.accept_ranges #=> String
997
+ # resp.content_type #=> String
998
+ # resp.archive_description #=> String
999
+ # @overload get_job_output(params = {})
1000
+ # @param [Hash] params ({})
1001
+ def get_job_output(params = {}, options = {})
1002
+ req = build_request(:get_job_output, params)
1003
+ req.send_request(options)
1004
+ end
1005
+
1006
+ # This operation retrieves the `access-policy` subresource set on the
1007
+ # vault; for more information on setting this subresource, see [Set
1008
+ # Vault Access Policy (PUT access-policy)][1]. If there is no access
1009
+ # policy set on the vault, the operation returns a `404 Not found`
1010
+ # error. For more information about vault access policies, see [Amazon
1011
+ # Glacier Access Control with Vault Access Policies][2].
1012
+ #
1013
+ #
1014
+ #
1015
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-SetVaultAccessPolicy.html
1016
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html
1017
+ # @option params [required, String] :account_id
1018
+ # The `AccountId` value is the AWS account ID of the account that owns
1019
+ # the vault. You can either specify an AWS account ID or optionally a
1020
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
1021
+ # account ID associated with the credentials used to sign the request.
1022
+ # If you use an account ID, do not include any hyphens ('-') in the
1023
+ # ID.
1024
+ # @option params [required, String] :vault_name
1025
+ # The name of the vault.
1026
+ # @return [Types::GetVaultAccessPolicyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1027
+ #
1028
+ # * {Types::GetVaultAccessPolicyOutput#policy #policy} => Types::VaultAccessPolicy
1029
+ #
1030
+ # @example Request syntax with placeholder values
1031
+ # resp = client.get_vault_access_policy({
1032
+ # account_id: "string", # required
1033
+ # vault_name: "string", # required
1034
+ # })
1035
+ #
1036
+ # @example Response structure
1037
+ # resp.policy.policy #=> String
1038
+ # @overload get_vault_access_policy(params = {})
1039
+ # @param [Hash] params ({})
1040
+ def get_vault_access_policy(params = {}, options = {})
1041
+ req = build_request(:get_vault_access_policy, params)
1042
+ req.send_request(options)
1043
+ end
1044
+
1045
+ # This operation retrieves the following attributes from the
1046
+ # `lock-policy` subresource set on the specified vault:
1047
+ #
1048
+ # * The vault lock policy set on the vault.
1049
+ #
1050
+ # * The state of the vault lock, which is either `InProgess` or
1051
+ # `Locked`.
1052
+ #
1053
+ # * When the lock ID expires. The lock ID is used to complete the vault
1054
+ # locking process.
1055
+ #
1056
+ # * When the vault lock was initiated and put into the `InProgress`
1057
+ # state.
1058
+ #
1059
+ # A vault lock is put into the `InProgress` state by calling
1060
+ # InitiateVaultLock. A vault lock is put into the `Locked` state by
1061
+ # calling CompleteVaultLock. You can abort the vault locking process by
1062
+ # calling AbortVaultLock. For more information about the vault locking
1063
+ # process, [Amazon Glacier Vault Lock][1].
1064
+ #
1065
+ # If there is no vault lock policy set on the vault, the operation
1066
+ # returns a `404 Not found` error. For more information about vault lock
1067
+ # policies, [Amazon Glacier Access Control with Vault Lock Policies][2].
1068
+ #
1069
+ #
1070
+ #
1071
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html
1072
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html
1073
+ # @option params [required, String] :account_id
1074
+ # The `AccountId` value is the AWS account ID of the account that owns
1075
+ # the vault. You can either specify an AWS account ID or optionally a
1076
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
1077
+ # account ID associated with the credentials used to sign the request.
1078
+ # If you use an account ID, do not include any hyphens ('-') in the
1079
+ # ID.
1080
+ # @option params [required, String] :vault_name
1081
+ # The name of the vault.
1082
+ # @return [Types::GetVaultLockOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1083
+ #
1084
+ # * {Types::GetVaultLockOutput#policy #Policy} => String
1085
+ # * {Types::GetVaultLockOutput#state #State} => String
1086
+ # * {Types::GetVaultLockOutput#expiration_date #ExpirationDate} => Time
1087
+ # * {Types::GetVaultLockOutput#creation_date #CreationDate} => Time
1088
+ #
1089
+ # @example Request syntax with placeholder values
1090
+ # resp = client.get_vault_lock({
1091
+ # account_id: "string", # required
1092
+ # vault_name: "string", # required
1093
+ # })
1094
+ #
1095
+ # @example Response structure
1096
+ # resp.policy #=> String
1097
+ # resp.state #=> String
1098
+ # resp.expiration_date #=> Time
1099
+ # resp.creation_date #=> Time
1100
+ # @overload get_vault_lock(params = {})
1101
+ # @param [Hash] params ({})
1102
+ def get_vault_lock(params = {}, options = {})
1103
+ req = build_request(:get_vault_lock, params)
1104
+ req.send_request(options)
1105
+ end
1106
+
1107
+ # This operation retrieves the `notification-configuration` subresource
1108
+ # of the specified vault.
1109
+ #
1110
+ # For information about setting a notification configuration on a vault,
1111
+ # see SetVaultNotifications. If a notification configuration for a vault
1112
+ # is not set, the operation returns a `404 Not Found` error. For more
1113
+ # information about vault notifications, see [Configuring Vault
1114
+ # Notifications in Amazon Glacier][1].
1115
+ #
1116
+ # An AWS account has full permission to perform all operations
1117
+ # (actions). However, AWS Identity and Access Management (IAM) users
1118
+ # don't have any permissions by default. You must grant them explicit
1119
+ # permission to perform specific actions. For more information, see
1120
+ # [Access Control Using AWS Identity and Access Management (IAM)][2].
1121
+ #
1122
+ # For conceptual information and underlying REST API, see [Configuring
1123
+ # Vault Notifications in Amazon Glacier][1] and [Get Vault Notification
1124
+ # Configuration ][3] in the *Amazon Glacier Developer Guide*.
1125
+ #
1126
+ #
1127
+ #
1128
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html
1129
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
1130
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-get.html
1131
+ # @option params [required, String] :account_id
1132
+ # The `AccountId` value is the AWS account ID of the account that owns
1133
+ # the vault. You can either specify an AWS account ID or optionally a
1134
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
1135
+ # account ID associated with the credentials used to sign the request.
1136
+ # If you use an account ID, do not include any hyphens ('-') in the
1137
+ # ID.
1138
+ # @option params [required, String] :vault_name
1139
+ # The name of the vault.
1140
+ # @return [Types::GetVaultNotificationsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1141
+ #
1142
+ # * {Types::GetVaultNotificationsOutput#vault_notification_config #vaultNotificationConfig} => Types::VaultNotificationConfig
1143
+ #
1144
+ # @example Request syntax with placeholder values
1145
+ # resp = client.get_vault_notifications({
1146
+ # account_id: "string", # required
1147
+ # vault_name: "string", # required
1148
+ # })
1149
+ #
1150
+ # @example Response structure
1151
+ # resp.vault_notification_config.sns_topic #=> String
1152
+ # resp.vault_notification_config.events #=> Array
1153
+ # resp.vault_notification_config.events[0] #=> String
1154
+ # @overload get_vault_notifications(params = {})
1155
+ # @param [Hash] params ({})
1156
+ def get_vault_notifications(params = {}, options = {})
1157
+ req = build_request(:get_vault_notifications, params)
1158
+ req.send_request(options)
1159
+ end
1160
+
1161
+ # This operation initiates a job of the specified type. In this release,
1162
+ # you can initiate a job to retrieve either an archive or a vault
1163
+ # inventory (a list of archives in a vault).
1164
+ #
1165
+ # Retrieving data from Amazon Glacier is a two-step process:
1166
+ #
1167
+ # 1. Initiate a retrieval job.
1168
+ #
1169
+ # <note markdown="1"> A data retrieval policy can cause your initiate retrieval job
1170
+ # request to fail with a PolicyEnforcedException exception. For more
1171
+ # information about data retrieval policies, see [Amazon Glacier
1172
+ # Data Retrieval Policies][1]. For more information about the
1173
+ # PolicyEnforcedException exception, see [Error Responses][2].
1174
+ #
1175
+ # </note>
1176
+ #
1177
+ # 2. After the job completes, download the bytes.
1178
+ #
1179
+ # The retrieval request is executed asynchronously. When you initiate a
1180
+ # retrieval job, Amazon Glacier creates a job and returns a job ID in
1181
+ # the response. When Amazon Glacier completes the job, you can get the
1182
+ # job output (archive or inventory data). For information about getting
1183
+ # job output, see GetJobOutput operation.
1184
+ #
1185
+ # The job must complete before you can get its output. To determine when
1186
+ # a job is complete, you have the following options:
1187
+ #
1188
+ # * **Use Amazon SNS Notification** You can specify an Amazon Simple
1189
+ # Notification Service (Amazon SNS) topic to which Amazon Glacier can
1190
+ # post a notification after the job is completed. You can specify an
1191
+ # SNS topic per job request. The notification is sent only after
1192
+ # Amazon Glacier completes the job. In addition to specifying an SNS
1193
+ # topic per job request, you can configure vault notifications for a
1194
+ # vault so that job notifications are always sent. For more
1195
+ # information, see SetVaultNotifications.
1196
+ #
1197
+ # * **Get job details** You can make a DescribeJob request to obtain job
1198
+ # status information while a job is in progress. However, it is more
1199
+ # efficient to use an Amazon SNS notification to determine when a job
1200
+ # is complete.
1201
+ #
1202
+ # <note markdown="1"> The information you get via notification is same that you get by
1203
+ # calling DescribeJob.
1204
+ #
1205
+ # </note>
1206
+ #
1207
+ # If for a specific event, you add both the notification configuration
1208
+ # on the vault and also specify an SNS topic in your initiate job
1209
+ # request, Amazon Glacier sends both notifications. For more
1210
+ # information, see SetVaultNotifications.
1211
+ #
1212
+ # An AWS account has full permission to perform all operations
1213
+ # (actions). However, AWS Identity and Access Management (IAM) users
1214
+ # don't have any permissions by default. You must grant them explicit
1215
+ # permission to perform specific actions. For more information, see
1216
+ # [Access Control Using AWS Identity and Access Management (IAM)][3].
1217
+ #
1218
+ # **About the Vault Inventory**
1219
+ #
1220
+ # Amazon Glacier prepares an inventory for each vault periodically,
1221
+ # every 24 hours. When you initiate a job for a vault inventory, Amazon
1222
+ # Glacier returns the last inventory for the vault. The inventory data
1223
+ # you get might be up to a day or two days old. Also, the initiate
1224
+ # inventory job might take some time to complete before you can download
1225
+ # the vault inventory. So you do not want to retrieve a vault inventory
1226
+ # for each vault operation. However, in some scenarios, you might find
1227
+ # the vault inventory useful. For example, when you upload an archive,
1228
+ # you can provide an archive description but not an archive name. Amazon
1229
+ # Glacier provides you a unique archive ID, an opaque string of
1230
+ # characters. So, you might maintain your own database that maps archive
1231
+ # names to their corresponding Amazon Glacier assigned archive IDs. You
1232
+ # might find the vault inventory useful in the event you need to
1233
+ # reconcile information in your database with the actual vault
1234
+ # inventory.
1235
+ #
1236
+ # **Range Inventory Retrieval**
1237
+ #
1238
+ # You can limit the number of inventory items retrieved by filtering on
1239
+ # the archive creation date or by setting a limit.
1240
+ #
1241
+ # *Filtering by Archive Creation Date*
1242
+ #
1243
+ # You can retrieve inventory items for archives created between
1244
+ # `StartDate` and `EndDate` by specifying values for these parameters in
1245
+ # the **InitiateJob** request. Archives created on or after the
1246
+ # `StartDate` and before the `EndDate` will be returned. If you only
1247
+ # provide the `StartDate` without the `EndDate`, you will retrieve the
1248
+ # inventory for all archives created on or after the `StartDate`. If you
1249
+ # only provide the `EndDate` without the `StartDate`, you will get back
1250
+ # the inventory for all archives created before the `EndDate`.
1251
+ #
1252
+ # *Limiting Inventory Items per Retrieval*
1253
+ #
1254
+ # You can limit the number of inventory items returned by setting the
1255
+ # `Limit` parameter in the **InitiateJob** request. The inventory job
1256
+ # output will contain inventory items up to the specified `Limit`. If
1257
+ # there are more inventory items available, the result is paginated.
1258
+ # After a job is complete you can use the DescribeJob operation to get a
1259
+ # marker that you use in a subsequent **InitiateJob** request. The
1260
+ # marker will indicate the starting point to retrieve the next set of
1261
+ # inventory items. You can page through your entire inventory by
1262
+ # repeatedly making **InitiateJob** requests with the marker from the
1263
+ # previous **DescribeJob** output, until you get a marker from
1264
+ # **DescribeJob** that returns null, indicating that there are no more
1265
+ # inventory items available.
1266
+ #
1267
+ # You can use the `Limit` parameter together with the date range
1268
+ # parameters.
1269
+ #
1270
+ # **About Ranged Archive Retrieval**
1271
+ #
1272
+ # You can initiate an archive retrieval for the whole archive or a range
1273
+ # of the archive. In the case of ranged archive retrieval, you specify a
1274
+ # byte range to return or the whole archive. The range specified must be
1275
+ # megabyte (MB) aligned, that is the range start value must be divisible
1276
+ # by 1 MB and range end value plus 1 must be divisible by 1 MB or equal
1277
+ # the end of the archive. If the ranged archive retrieval is not
1278
+ # megabyte aligned, this operation returns a 400 response. Furthermore,
1279
+ # to ensure you get checksum values for data you download using Get Job
1280
+ # Output API, the range must be tree hash aligned.
1281
+ #
1282
+ # An AWS account has full permission to perform all operations
1283
+ # (actions). However, AWS Identity and Access Management (IAM) users
1284
+ # don't have any permissions by default. You must grant them explicit
1285
+ # permission to perform specific actions. For more information, see
1286
+ # [Access Control Using AWS Identity and Access Management (IAM)][3].
1287
+ #
1288
+ # For conceptual information and the underlying REST API, see [Initiate
1289
+ # a Job][4] and [Downloading a Vault Inventory][5]
1290
+ #
1291
+ # **Expedited and Bulk Archive Retrievals**
1292
+ #
1293
+ # When retrieving an archive, you can specify one of the following
1294
+ # options in the `Tier` field of the request body:
1295
+ #
1296
+ # * **Standard** The default type of retrieval, which allows access to
1297
+ # any of your archives within several hours. Standard retrievals
1298
+ # typically complete within 3–5 hours.
1299
+ #
1300
+ # * **Bulk** Amazon Glacier’s lowest-cost retrieval option, which
1301
+ # enables you to retrieve large amounts of data inexpensively in a
1302
+ # day. Bulk retrieval requests typically complete within 5–12 hours.
1303
+ #
1304
+ # * **Expedited** Amazon Glacier’s option for the fastest retrievals.
1305
+ # Archives requested using the expedited retrievals typically become
1306
+ # accessible within 1–5 minutes.
1307
+ #
1308
+ # For more information about expedited and bulk retrievals, see
1309
+ # [Retrieving Amazon Glacier Archives][6].
1310
+ #
1311
+ #
1312
+ #
1313
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html
1314
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-error-responses.html
1315
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
1316
+ # [4]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html
1317
+ # [5]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html
1318
+ # [6]: http://docs.aws.amazon.com/amazonglacier/latest/dev/downloading-an-archive-two-steps.html
1319
+ # @option params [required, String] :account_id
1320
+ # The `AccountId` value is the AWS account ID of the account that owns
1321
+ # the vault. You can either specify an AWS account ID or optionally a
1322
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
1323
+ # account ID associated with the credentials used to sign the request.
1324
+ # If you use an account ID, do not include any hyphens ('-') in the
1325
+ # ID.
1326
+ # @option params [required, String] :vault_name
1327
+ # The name of the vault.
1328
+ # @option params [Types::JobParameters] :job_parameters
1329
+ # Provides options for specifying job information.
1330
+ # @return [Types::InitiateJobOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1331
+ #
1332
+ # * {Types::InitiateJobOutput#location #location} => String
1333
+ # * {Types::InitiateJobOutput#job_id #jobId} => String
1334
+ #
1335
+ # @example Request syntax with placeholder values
1336
+ # resp = client.initiate_job({
1337
+ # account_id: "string", # required
1338
+ # vault_name: "string", # required
1339
+ # job_parameters: {
1340
+ # format: "string",
1341
+ # type: "string",
1342
+ # archive_id: "string",
1343
+ # description: "string",
1344
+ # sns_topic: "string",
1345
+ # retrieval_byte_range: "string",
1346
+ # tier: "string",
1347
+ # inventory_retrieval_parameters: {
1348
+ # start_date: Time.now,
1349
+ # end_date: Time.now,
1350
+ # limit: "string",
1351
+ # marker: "string",
1352
+ # },
1353
+ # },
1354
+ # })
1355
+ #
1356
+ # @example Response structure
1357
+ # resp.location #=> String
1358
+ # resp.job_id #=> String
1359
+ # @overload initiate_job(params = {})
1360
+ # @param [Hash] params ({})
1361
+ def initiate_job(params = {}, options = {})
1362
+ req = build_request(:initiate_job, params)
1363
+ req.send_request(options)
1364
+ end
1365
+
1366
+ # This operation initiates a multipart upload. Amazon Glacier creates a
1367
+ # multipart upload resource and returns its ID in the response. The
1368
+ # multipart upload ID is used in subsequent requests to upload parts of
1369
+ # an archive (see UploadMultipartPart).
1370
+ #
1371
+ # When you initiate a multipart upload, you specify the part size in
1372
+ # number of bytes. The part size must be a megabyte (1024 KB) multiplied
1373
+ # by a power of 2-for example, 1048576 (1 MB), 2097152 (2 MB), 4194304
1374
+ # (4 MB), 8388608 (8 MB), and so on. The minimum allowable part size is
1375
+ # 1 MB, and the maximum is 4 GB.
1376
+ #
1377
+ # Every part you upload to this resource (see UploadMultipartPart),
1378
+ # except the last one, must have the same size. The last one can be the
1379
+ # same size or smaller. For example, suppose you want to upload a 16.2
1380
+ # MB file. If you initiate the multipart upload with a part size of 4
1381
+ # MB, you will upload four parts of 4 MB each and one part of 0.2 MB.
1382
+ #
1383
+ # <note markdown="1"> You don't need to know the size of the archive when you start a
1384
+ # multipart upload because Amazon Glacier does not require you to
1385
+ # specify the overall archive size.
1386
+ #
1387
+ # </note>
1388
+ #
1389
+ # After you complete the multipart upload, Amazon Glacier removes the
1390
+ # multipart upload resource referenced by the ID. Amazon Glacier also
1391
+ # removes the multipart upload resource if you cancel the multipart
1392
+ # upload or it may be removed if there is no activity for a period of 24
1393
+ # hours.
1394
+ #
1395
+ # An AWS account has full permission to perform all operations
1396
+ # (actions). However, AWS Identity and Access Management (IAM) users
1397
+ # don't have any permissions by default. You must grant them explicit
1398
+ # permission to perform specific actions. For more information, see
1399
+ # [Access Control Using AWS Identity and Access Management (IAM)][1].
1400
+ #
1401
+ # For conceptual information and underlying REST API, see [Uploading
1402
+ # Large Archives in Parts (Multipart Upload)][2] and [Initiate Multipart
1403
+ # Upload][3] in the *Amazon Glacier Developer Guide*.
1404
+ #
1405
+ #
1406
+ #
1407
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
1408
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html
1409
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-initiate-upload.html
1410
+ # @option params [required, String] :account_id
1411
+ # The `AccountId` value is the AWS account ID of the account that owns
1412
+ # the vault. You can either specify an AWS account ID or optionally a
1413
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
1414
+ # account ID associated with the credentials used to sign the request.
1415
+ # If you use an account ID, do not include any hyphens ('-') in the
1416
+ # ID.
1417
+ # @option params [required, String] :vault_name
1418
+ # The name of the vault.
1419
+ # @option params [String] :archive_description
1420
+ # The archive description that you are uploading in parts.
1421
+ #
1422
+ # The part size must be a megabyte (1024 KB) multiplied by a power of 2,
1423
+ # for example 1048576 (1 MB), 2097152 (2 MB), 4194304 (4 MB), 8388608 (8
1424
+ # MB), and so on. The minimum allowable part size is 1 MB, and the
1425
+ # maximum is 4 GB (4096 MB).
1426
+ # @option params [Integer] :part_size
1427
+ # The size of each part except the last, in bytes. The last part can be
1428
+ # smaller than this part size.
1429
+ # @return [Types::InitiateMultipartUploadOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1430
+ #
1431
+ # * {Types::InitiateMultipartUploadOutput#location #location} => String
1432
+ # * {Types::InitiateMultipartUploadOutput#upload_id #uploadId} => String
1433
+ #
1434
+ # @example Request syntax with placeholder values
1435
+ # resp = client.initiate_multipart_upload({
1436
+ # account_id: "string", # required
1437
+ # vault_name: "string", # required
1438
+ # archive_description: "string",
1439
+ # part_size: 1,
1440
+ # })
1441
+ #
1442
+ # @example Response structure
1443
+ # resp.location #=> String
1444
+ # resp.upload_id #=> String
1445
+ # @overload initiate_multipart_upload(params = {})
1446
+ # @param [Hash] params ({})
1447
+ def initiate_multipart_upload(params = {}, options = {})
1448
+ req = build_request(:initiate_multipart_upload, params)
1449
+ req.send_request(options)
1450
+ end
1451
+
1452
+ # This operation initiates the vault locking process by doing the
1453
+ # following:
1454
+ #
1455
+ # * Installing a vault lock policy on the specified vault.
1456
+ #
1457
+ # * Setting the lock state of vault lock to `InProgress`.
1458
+ #
1459
+ # * Returning a lock ID, which is used to complete the vault locking
1460
+ # process.
1461
+ #
1462
+ # You can set one vault lock policy for each vault and this policy can
1463
+ # be up to 20 KB in size. For more information about vault lock
1464
+ # policies, see [Amazon Glacier Access Control with Vault Lock
1465
+ # Policies][1].
1466
+ #
1467
+ # You must complete the vault locking process within 24 hours after the
1468
+ # vault lock enters the `InProgress` state. After the 24 hour window
1469
+ # ends, the lock ID expires, the vault automatically exits the
1470
+ # `InProgress` state, and the vault lock policy is removed from the
1471
+ # vault. You call CompleteVaultLock to complete the vault locking
1472
+ # process by setting the state of the vault lock to `Locked`.
1473
+ #
1474
+ # After a vault lock is in the `Locked` state, you cannot initiate a new
1475
+ # vault lock for the vault.
1476
+ #
1477
+ # You can abort the vault locking process by calling AbortVaultLock. You
1478
+ # can get the state of the vault lock by calling GetVaultLock. For more
1479
+ # information about the vault locking process, [Amazon Glacier Vault
1480
+ # Lock][2].
1481
+ #
1482
+ # If this operation is called when the vault lock is in the `InProgress`
1483
+ # state, the operation returns an `AccessDeniedException` error. When
1484
+ # the vault lock is in the `InProgress` state you must call
1485
+ # AbortVaultLock before you can initiate a new vault lock policy.
1486
+ #
1487
+ #
1488
+ #
1489
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html
1490
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html
1491
+ # @option params [required, String] :account_id
1492
+ # The `AccountId` value is the AWS account ID. This value must match the
1493
+ # AWS account ID associated with the credentials used to sign the
1494
+ # request. You can either specify an AWS account ID or optionally a
1495
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
1496
+ # account ID associated with the credentials used to sign the request.
1497
+ # If you specify your account ID, do not include any hyphens ('-') in
1498
+ # the ID.
1499
+ # @option params [required, String] :vault_name
1500
+ # The name of the vault.
1501
+ # @option params [Types::VaultLockPolicy] :policy
1502
+ # The vault lock policy as a JSON string, which uses "\\" as an escape
1503
+ # character.
1504
+ # @return [Types::InitiateVaultLockOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1505
+ #
1506
+ # * {Types::InitiateVaultLockOutput#lock_id #lockId} => String
1507
+ #
1508
+ # @example Request syntax with placeholder values
1509
+ # resp = client.initiate_vault_lock({
1510
+ # account_id: "string", # required
1511
+ # vault_name: "string", # required
1512
+ # policy: {
1513
+ # policy: "string",
1514
+ # },
1515
+ # })
1516
+ #
1517
+ # @example Response structure
1518
+ # resp.lock_id #=> String
1519
+ # @overload initiate_vault_lock(params = {})
1520
+ # @param [Hash] params ({})
1521
+ def initiate_vault_lock(params = {}, options = {})
1522
+ req = build_request(:initiate_vault_lock, params)
1523
+ req.send_request(options)
1524
+ end
1525
+
1526
+ # This operation lists jobs for a vault, including jobs that are
1527
+ # in-progress and jobs that have recently finished.
1528
+ #
1529
+ # <note markdown="1"> Amazon Glacier retains recently completed jobs for a period before
1530
+ # deleting them; however, it eventually removes completed jobs. The
1531
+ # output of completed jobs can be retrieved. Retaining completed jobs
1532
+ # for a period of time after they have completed enables you to get a
1533
+ # job output in the event you miss the job completion notification or
1534
+ # your first attempt to download it fails. For example, suppose you
1535
+ # start an archive retrieval job to download an archive. After the job
1536
+ # completes, you start to download the archive but encounter a network
1537
+ # error. In this scenario, you can retry and download the archive while
1538
+ # the job exists.
1539
+ #
1540
+ # </note>
1541
+ #
1542
+ # To retrieve an archive or retrieve a vault inventory from Amazon
1543
+ # Glacier, you first initiate a job, and after the job completes, you
1544
+ # download the data. For an archive retrieval, the output is the archive
1545
+ # data. For an inventory retrieval, it is the inventory list. The List
1546
+ # Job operation returns a list of these jobs sorted by job initiation
1547
+ # time.
1548
+ #
1549
+ # The List Jobs operation supports pagination. You should always check
1550
+ # the response `Marker` field. If there are no more jobs to list, the
1551
+ # `Marker` field is set to `null`. If there are more jobs to list, the
1552
+ # `Marker` field is set to a non-null value, which you can use to
1553
+ # continue the pagination of the list. To return a list of jobs that
1554
+ # begins at a specific job, set the marker request parameter to the
1555
+ # `Marker` value for that job that you obtained from a previous List
1556
+ # Jobs request.
1557
+ #
1558
+ # You can set a maximum limit for the number of jobs returned in the
1559
+ # response by specifying the `limit` parameter in the request. The
1560
+ # default limit is 1000. The number of jobs returned might be fewer than
1561
+ # the limit, but the number of returned jobs never exceeds the limit.
1562
+ #
1563
+ # Additionally, you can filter the jobs list returned by specifying the
1564
+ # optional `statuscode` parameter or `completed` parameter, or both.
1565
+ # Using the `statuscode` parameter, you can specify to return only jobs
1566
+ # that match either the `InProgress`, `Succeeded`, or `Failed` status.
1567
+ # Using the `completed` parameter, you can specify to return only jobs
1568
+ # that were completed (`true`) or jobs that were not completed
1569
+ # (`false`).
1570
+ #
1571
+ # For the underlying REST API, see [List Jobs][1].
1572
+ #
1573
+ #
1574
+ #
1575
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-jobs-get.html
1576
+ # @option params [required, String] :account_id
1577
+ # The `AccountId` value is the AWS account ID of the account that owns
1578
+ # the vault. You can either specify an AWS account ID or optionally a
1579
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
1580
+ # account ID associated with the credentials used to sign the request.
1581
+ # If you use an account ID, do not include any hyphens ('-') in the
1582
+ # ID.
1583
+ # @option params [required, String] :vault_name
1584
+ # The name of the vault.
1585
+ # @option params [Integer] :limit
1586
+ # The maximum number of jobs to be returned. The default limit is 1000.
1587
+ # The number of jobs returned might be fewer than the specified limit,
1588
+ # but the number of returned jobs never exceeds the limit.
1589
+ # @option params [String] :marker
1590
+ # An opaque string used for pagination. This value specifies the job at
1591
+ # which the listing of jobs should begin. Get the marker value from a
1592
+ # previous List Jobs response. You only need to include the marker if
1593
+ # you are continuing the pagination of results started in a previous
1594
+ # List Jobs request.
1595
+ # @option params [String] :statuscode
1596
+ # The type of job status to return. You can specify the following
1597
+ # values: `InProgress`, `Succeeded`, or `Failed`.
1598
+ # @option params [String] :completed
1599
+ # The state of the jobs to return. You can specify `true` or `false`.
1600
+ # @return [Types::ListJobsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1601
+ #
1602
+ # * {Types::ListJobsOutput#job_list #JobList} => Array&lt;Types::GlacierJobDescription&gt;
1603
+ # * {Types::ListJobsOutput#marker #Marker} => String
1604
+ #
1605
+ # @example Request syntax with placeholder values
1606
+ # resp = client.list_jobs({
1607
+ # account_id: "string", # required
1608
+ # vault_name: "string", # required
1609
+ # limit: 1,
1610
+ # marker: "string",
1611
+ # statuscode: "string",
1612
+ # completed: "string",
1613
+ # })
1614
+ #
1615
+ # @example Response structure
1616
+ # resp.job_list #=> Array
1617
+ # resp.job_list[0].job_id #=> String
1618
+ # resp.job_list[0].job_description #=> String
1619
+ # resp.job_list[0].action #=> String, one of "ArchiveRetrieval", "InventoryRetrieval"
1620
+ # resp.job_list[0].archive_id #=> String
1621
+ # resp.job_list[0].vault_arn #=> String
1622
+ # resp.job_list[0].creation_date #=> Time
1623
+ # resp.job_list[0].completed #=> Boolean
1624
+ # resp.job_list[0].status_code #=> String, one of "InProgress", "Succeeded", "Failed"
1625
+ # resp.job_list[0].status_message #=> String
1626
+ # resp.job_list[0].archive_size_in_bytes #=> Integer
1627
+ # resp.job_list[0].inventory_size_in_bytes #=> Integer
1628
+ # resp.job_list[0].sns_topic #=> String
1629
+ # resp.job_list[0].completion_date #=> Time
1630
+ # resp.job_list[0].sha256_tree_hash #=> String
1631
+ # resp.job_list[0].archive_sha256_tree_hash #=> String
1632
+ # resp.job_list[0].retrieval_byte_range #=> String
1633
+ # resp.job_list[0].tier #=> String
1634
+ # resp.job_list[0].inventory_retrieval_parameters.format #=> String
1635
+ # resp.job_list[0].inventory_retrieval_parameters.start_date #=> Time
1636
+ # resp.job_list[0].inventory_retrieval_parameters.end_date #=> Time
1637
+ # resp.job_list[0].inventory_retrieval_parameters.limit #=> String
1638
+ # resp.job_list[0].inventory_retrieval_parameters.marker #=> String
1639
+ # resp.marker #=> String
1640
+ # @overload list_jobs(params = {})
1641
+ # @param [Hash] params ({})
1642
+ def list_jobs(params = {}, options = {})
1643
+ req = build_request(:list_jobs, params)
1644
+ req.send_request(options)
1645
+ end
1646
+
1647
+ # This operation lists in-progress multipart uploads for the specified
1648
+ # vault. An in-progress multipart upload is a multipart upload that has
1649
+ # been initiated by an InitiateMultipartUpload request, but has not yet
1650
+ # been completed or aborted. The list returned in the List Multipart
1651
+ # Upload response has no guaranteed order.
1652
+ #
1653
+ # The List Multipart Uploads operation supports pagination. By default,
1654
+ # this operation returns up to 1,000 multipart uploads in the response.
1655
+ # You should always check the response for a `marker` at which to
1656
+ # continue the list; if there are no more items the `marker` is `null`.
1657
+ # To return a list of multipart uploads that begins at a specific
1658
+ # upload, set the `marker` request parameter to the value you obtained
1659
+ # from a previous List Multipart Upload request. You can also limit the
1660
+ # number of uploads returned in the response by specifying the `limit`
1661
+ # parameter in the request.
1662
+ #
1663
+ # Note the difference between this operation and listing parts
1664
+ # (ListParts). The List Multipart Uploads operation lists all multipart
1665
+ # uploads for a vault and does not require a multipart upload ID. The
1666
+ # List Parts operation requires a multipart upload ID since parts are
1667
+ # associated with a single upload.
1668
+ #
1669
+ # An AWS account has full permission to perform all operations
1670
+ # (actions). However, AWS Identity and Access Management (IAM) users
1671
+ # don't have any permissions by default. You must grant them explicit
1672
+ # permission to perform specific actions. For more information, see
1673
+ # [Access Control Using AWS Identity and Access Management (IAM)][1].
1674
+ #
1675
+ # For conceptual information and the underlying REST API, see [Working
1676
+ # with Archives in Amazon Glacier][2] and [List Multipart Uploads ][3]
1677
+ # in the *Amazon Glacier Developer Guide*.
1678
+ #
1679
+ #
1680
+ #
1681
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
1682
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html
1683
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-list-uploads.html
1684
+ # @option params [required, String] :account_id
1685
+ # The `AccountId` value is the AWS account ID of the account that owns
1686
+ # the vault. You can either specify an AWS account ID or optionally a
1687
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
1688
+ # account ID associated with the credentials used to sign the request.
1689
+ # If you use an account ID, do not include any hyphens ('-') in the
1690
+ # ID.
1691
+ # @option params [required, String] :vault_name
1692
+ # The name of the vault.
1693
+ # @option params [String] :marker
1694
+ # An opaque string used for pagination. This value specifies the upload
1695
+ # at which the listing of uploads should begin. Get the marker value
1696
+ # from a previous List Uploads response. You need only include the
1697
+ # marker if you are continuing the pagination of results started in a
1698
+ # previous List Uploads request.
1699
+ # @option params [Integer] :limit
1700
+ # Specifies the maximum number of uploads returned in the response body.
1701
+ # If this value is not specified, the List Uploads operation returns up
1702
+ # to 1,000 uploads.
1703
+ # @return [Types::ListMultipartUploadsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1704
+ #
1705
+ # * {Types::ListMultipartUploadsOutput#uploads_list #UploadsList} => Array&lt;Types::UploadListElement&gt;
1706
+ # * {Types::ListMultipartUploadsOutput#marker #Marker} => String
1707
+ #
1708
+ # @example Request syntax with placeholder values
1709
+ # resp = client.list_multipart_uploads({
1710
+ # account_id: "string", # required
1711
+ # vault_name: "string", # required
1712
+ # marker: "string",
1713
+ # limit: 1,
1714
+ # })
1715
+ #
1716
+ # @example Response structure
1717
+ # resp.uploads_list #=> Array
1718
+ # resp.uploads_list[0].multipart_upload_id #=> String
1719
+ # resp.uploads_list[0].vault_arn #=> String
1720
+ # resp.uploads_list[0].archive_description #=> String
1721
+ # resp.uploads_list[0].part_size_in_bytes #=> Integer
1722
+ # resp.uploads_list[0].creation_date #=> Time
1723
+ # resp.marker #=> String
1724
+ # @overload list_multipart_uploads(params = {})
1725
+ # @param [Hash] params ({})
1726
+ def list_multipart_uploads(params = {}, options = {})
1727
+ req = build_request(:list_multipart_uploads, params)
1728
+ req.send_request(options)
1729
+ end
1730
+
1731
+ # This operation lists the parts of an archive that have been uploaded
1732
+ # in a specific multipart upload. You can make this request at any time
1733
+ # during an in-progress multipart upload before you complete the upload
1734
+ # (see CompleteMultipartUpload. List Parts returns an error for
1735
+ # completed uploads. The list returned in the List Parts response is
1736
+ # sorted by part range.
1737
+ #
1738
+ # The List Parts operation supports pagination. By default, this
1739
+ # operation returns up to 1,000 uploaded parts in the response. You
1740
+ # should always check the response for a `marker` at which to continue
1741
+ # the list; if there are no more items the `marker` is `null`. To return
1742
+ # a list of parts that begins at a specific part, set the `marker`
1743
+ # request parameter to the value you obtained from a previous List Parts
1744
+ # request. You can also limit the number of parts returned in the
1745
+ # response by specifying the `limit` parameter in the request.
1746
+ #
1747
+ # An AWS account has full permission to perform all operations
1748
+ # (actions). However, AWS Identity and Access Management (IAM) users
1749
+ # don't have any permissions by default. You must grant them explicit
1750
+ # permission to perform specific actions. For more information, see
1751
+ # [Access Control Using AWS Identity and Access Management (IAM)][1].
1752
+ #
1753
+ # For conceptual information and the underlying REST API, see [Working
1754
+ # with Archives in Amazon Glacier][2] and [List Parts][3] in the *Amazon
1755
+ # Glacier Developer Guide*.
1756
+ #
1757
+ #
1758
+ #
1759
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
1760
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html
1761
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-list-parts.html
1762
+ # @option params [required, String] :account_id
1763
+ # The `AccountId` value is the AWS account ID of the account that owns
1764
+ # the vault. You can either specify an AWS account ID or optionally a
1765
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
1766
+ # account ID associated with the credentials used to sign the request.
1767
+ # If you use an account ID, do not include any hyphens ('-') in the
1768
+ # ID.
1769
+ # @option params [required, String] :vault_name
1770
+ # The name of the vault.
1771
+ # @option params [required, String] :upload_id
1772
+ # The upload ID of the multipart upload.
1773
+ # @option params [String] :marker
1774
+ # An opaque string used for pagination. This value specifies the part at
1775
+ # which the listing of parts should begin. Get the marker value from the
1776
+ # response of a previous List Parts response. You need only include the
1777
+ # marker if you are continuing the pagination of results started in a
1778
+ # previous List Parts request.
1779
+ # @option params [Integer] :limit
1780
+ # The maximum number of parts to be returned. The default limit is 1000.
1781
+ # The number of parts returned might be fewer than the specified limit,
1782
+ # but the number of returned parts never exceeds the limit.
1783
+ # @return [Types::ListPartsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1784
+ #
1785
+ # * {Types::ListPartsOutput#multipart_upload_id #MultipartUploadId} => String
1786
+ # * {Types::ListPartsOutput#vault_arn #VaultARN} => String
1787
+ # * {Types::ListPartsOutput#archive_description #ArchiveDescription} => String
1788
+ # * {Types::ListPartsOutput#part_size_in_bytes #PartSizeInBytes} => Integer
1789
+ # * {Types::ListPartsOutput#creation_date #CreationDate} => Time
1790
+ # * {Types::ListPartsOutput#parts #Parts} => Array&lt;Types::PartListElement&gt;
1791
+ # * {Types::ListPartsOutput#marker #Marker} => String
1792
+ #
1793
+ # @example Request syntax with placeholder values
1794
+ # resp = client.list_parts({
1795
+ # account_id: "string", # required
1796
+ # vault_name: "string", # required
1797
+ # upload_id: "string", # required
1798
+ # marker: "string",
1799
+ # limit: 1,
1800
+ # })
1801
+ #
1802
+ # @example Response structure
1803
+ # resp.multipart_upload_id #=> String
1804
+ # resp.vault_arn #=> String
1805
+ # resp.archive_description #=> String
1806
+ # resp.part_size_in_bytes #=> Integer
1807
+ # resp.creation_date #=> Time
1808
+ # resp.parts #=> Array
1809
+ # resp.parts[0].range_in_bytes #=> String
1810
+ # resp.parts[0].sha256_tree_hash #=> String
1811
+ # resp.marker #=> String
1812
+ # @overload list_parts(params = {})
1813
+ # @param [Hash] params ({})
1814
+ def list_parts(params = {}, options = {})
1815
+ req = build_request(:list_parts, params)
1816
+ req.send_request(options)
1817
+ end
1818
+
1819
+ # This operation lists the provisioned capacity for the specified AWS
1820
+ # account.
1821
+ # @option params [required, String] :account_id
1822
+ # The `AccountId` value is the AWS account ID of the account that owns
1823
+ # the vault. You can either specify an AWS account ID or optionally a
1824
+ # single '-' (hyphen), in which case Amazon Glacier uses the AWS
1825
+ # account ID associated with the credentials used to sign the request.
1826
+ # If you use an account ID, don't include any hyphens ('-') in the
1827
+ # ID.
1828
+ # @return [Types::ListProvisionedCapacityOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1829
+ #
1830
+ # * {Types::ListProvisionedCapacityOutput#provisioned_capacity_list #ProvisionedCapacityList} => Array&lt;Types::ProvisionedCapacityDescription&gt;
1831
+ #
1832
+ # @example Request syntax with placeholder values
1833
+ # resp = client.list_provisioned_capacity({
1834
+ # account_id: "string", # required
1835
+ # })
1836
+ #
1837
+ # @example Response structure
1838
+ # resp.provisioned_capacity_list #=> Array
1839
+ # resp.provisioned_capacity_list[0].capacity_id #=> String
1840
+ # resp.provisioned_capacity_list[0].start_date #=> Time
1841
+ # resp.provisioned_capacity_list[0].expiration_date #=> Time
1842
+ # @overload list_provisioned_capacity(params = {})
1843
+ # @param [Hash] params ({})
1844
+ def list_provisioned_capacity(params = {}, options = {})
1845
+ req = build_request(:list_provisioned_capacity, params)
1846
+ req.send_request(options)
1847
+ end
1848
+
1849
+ # This operation lists all the tags attached to a vault. The operation
1850
+ # returns an empty map if there are no tags. For more information about
1851
+ # tags, see [Tagging Amazon Glacier Resources][1].
1852
+ #
1853
+ #
1854
+ #
1855
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html
1856
+ # @option params [required, String] :account_id
1857
+ # The `AccountId` value is the AWS account ID of the account that owns
1858
+ # the vault. You can either specify an AWS account ID or optionally a
1859
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
1860
+ # account ID associated with the credentials used to sign the request.
1861
+ # If you use an account ID, do not include any hyphens ('-') in the
1862
+ # ID.
1863
+ # @option params [required, String] :vault_name
1864
+ # The name of the vault.
1865
+ # @return [Types::ListTagsForVaultOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1866
+ #
1867
+ # * {Types::ListTagsForVaultOutput#tags #Tags} => Hash&lt;String,String&gt;
1868
+ #
1869
+ # @example Request syntax with placeholder values
1870
+ # resp = client.list_tags_for_vault({
1871
+ # account_id: "string", # required
1872
+ # vault_name: "string", # required
1873
+ # })
1874
+ #
1875
+ # @example Response structure
1876
+ # resp.tags #=> Hash
1877
+ # resp.tags["TagKey"] #=> String
1878
+ # @overload list_tags_for_vault(params = {})
1879
+ # @param [Hash] params ({})
1880
+ def list_tags_for_vault(params = {}, options = {})
1881
+ req = build_request(:list_tags_for_vault, params)
1882
+ req.send_request(options)
1883
+ end
1884
+
1885
+ # This operation lists all vaults owned by the calling user's account.
1886
+ # The list returned in the response is ASCII-sorted by vault name.
1887
+ #
1888
+ # By default, this operation returns up to 1,000 items. If there are
1889
+ # more vaults to list, the response `marker` field contains the vault
1890
+ # Amazon Resource Name (ARN) at which to continue the list with a new
1891
+ # List Vaults request; otherwise, the `marker` field is `null`. To
1892
+ # return a list of vaults that begins at a specific vault, set the
1893
+ # `marker` request parameter to the vault ARN you obtained from a
1894
+ # previous List Vaults request. You can also limit the number of vaults
1895
+ # returned in the response by specifying the `limit` parameter in the
1896
+ # request.
1897
+ #
1898
+ # An AWS account has full permission to perform all operations
1899
+ # (actions). However, AWS Identity and Access Management (IAM) users
1900
+ # don't have any permissions by default. You must grant them explicit
1901
+ # permission to perform specific actions. For more information, see
1902
+ # [Access Control Using AWS Identity and Access Management (IAM)][1].
1903
+ #
1904
+ # For conceptual information and underlying REST API, see [Retrieving
1905
+ # Vault Metadata in Amazon Glacier][2] and [List Vaults ][3] in the
1906
+ # *Amazon Glacier Developer Guide*.
1907
+ #
1908
+ #
1909
+ #
1910
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
1911
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/retrieving-vault-info.html
1912
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vaults-get.html
1913
+ # @option params [required, String] :account_id
1914
+ # The `AccountId` value is the AWS account ID. This value must match the
1915
+ # AWS account ID associated with the credentials used to sign the
1916
+ # request. You can either specify an AWS account ID or optionally a
1917
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
1918
+ # account ID associated with the credentials used to sign the request.
1919
+ # If you specify your account ID, do not include any hyphens ('-') in
1920
+ # the ID.
1921
+ # @option params [String] :marker
1922
+ # A string used for pagination. The marker specifies the vault ARN after
1923
+ # which the listing of vaults should begin.
1924
+ # @option params [Integer] :limit
1925
+ # The maximum number of vaults to be returned. The default limit is
1926
+ # 1000. The number of vaults returned might be fewer than the specified
1927
+ # limit, but the number of returned vaults never exceeds the limit.
1928
+ # @return [Types::ListVaultsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1929
+ #
1930
+ # * {Types::ListVaultsOutput#vault_list #VaultList} => Array&lt;Types::DescribeVaultOutput&gt;
1931
+ # * {Types::ListVaultsOutput#marker #Marker} => String
1932
+ #
1933
+ # @example Request syntax with placeholder values
1934
+ # resp = client.list_vaults({
1935
+ # account_id: "string", # required
1936
+ # marker: "string",
1937
+ # limit: 1,
1938
+ # })
1939
+ #
1940
+ # @example Response structure
1941
+ # resp.vault_list #=> Array
1942
+ # resp.vault_list[0].vault_arn #=> String
1943
+ # resp.vault_list[0].vault_name #=> String
1944
+ # resp.vault_list[0].creation_date #=> Time
1945
+ # resp.vault_list[0].last_inventory_date #=> Time
1946
+ # resp.vault_list[0].number_of_archives #=> Integer
1947
+ # resp.vault_list[0].size_in_bytes #=> Integer
1948
+ # resp.marker #=> String
1949
+ # @overload list_vaults(params = {})
1950
+ # @param [Hash] params ({})
1951
+ def list_vaults(params = {}, options = {})
1952
+ req = build_request(:list_vaults, params)
1953
+ req.send_request(options)
1954
+ end
1955
+
1956
+ # This operation purchases a provisioned capacity unit for an AWS
1957
+ # account.
1958
+ # @option params [required, String] :account_id
1959
+ # The AWS account ID of the account that owns the vault. You can either
1960
+ # specify an AWS account ID or optionally a single '-' (hyphen), in
1961
+ # which case Amazon Glacier uses the AWS account ID associated with the
1962
+ # credentials used to sign the request. If you use an account ID, don't
1963
+ # include any hyphens ('-') in the ID.
1964
+ # @return [Types::PurchaseProvisionedCapacityOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1965
+ #
1966
+ # * {Types::PurchaseProvisionedCapacityOutput#capacity_id #capacityId} => String
1967
+ #
1968
+ # @example Request syntax with placeholder values
1969
+ # resp = client.purchase_provisioned_capacity({
1970
+ # account_id: "string", # required
1971
+ # })
1972
+ #
1973
+ # @example Response structure
1974
+ # resp.capacity_id #=> String
1975
+ # @overload purchase_provisioned_capacity(params = {})
1976
+ # @param [Hash] params ({})
1977
+ def purchase_provisioned_capacity(params = {}, options = {})
1978
+ req = build_request(:purchase_provisioned_capacity, params)
1979
+ req.send_request(options)
1980
+ end
1981
+
1982
+ # This operation removes one or more tags from the set of tags attached
1983
+ # to a vault. For more information about tags, see [Tagging Amazon
1984
+ # Glacier Resources][1]. This operation is idempotent. The operation
1985
+ # will be successful, even if there are no tags attached to the vault.
1986
+ #
1987
+ #
1988
+ #
1989
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html
1990
+ # @option params [required, String] :account_id
1991
+ # The `AccountId` value is the AWS account ID of the account that owns
1992
+ # the vault. You can either specify an AWS account ID or optionally a
1993
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
1994
+ # account ID associated with the credentials used to sign the request.
1995
+ # If you use an account ID, do not include any hyphens ('-') in the
1996
+ # ID.
1997
+ # @option params [required, String] :vault_name
1998
+ # The name of the vault.
1999
+ # @option params [Array<String>] :tag_keys
2000
+ # A list of tag keys. Each corresponding tag is removed from the vault.
2001
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2002
+ #
2003
+ # @example Request syntax with placeholder values
2004
+ # resp = client.remove_tags_from_vault({
2005
+ # account_id: "string", # required
2006
+ # vault_name: "string", # required
2007
+ # tag_keys: ["string"],
2008
+ # })
2009
+ # @overload remove_tags_from_vault(params = {})
2010
+ # @param [Hash] params ({})
2011
+ def remove_tags_from_vault(params = {}, options = {})
2012
+ req = build_request(:remove_tags_from_vault, params)
2013
+ req.send_request(options)
2014
+ end
2015
+
2016
+ # This operation sets and then enacts a data retrieval policy in the
2017
+ # region specified in the PUT request. You can set one policy per region
2018
+ # for an AWS account. The policy is enacted within a few minutes of a
2019
+ # successful PUT operation.
2020
+ #
2021
+ # The set policy operation does not affect retrieval jobs that were in
2022
+ # progress before the policy was enacted. For more information about
2023
+ # data retrieval policies, see [Amazon Glacier Data Retrieval
2024
+ # Policies][1].
2025
+ #
2026
+ #
2027
+ #
2028
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html
2029
+ # @option params [required, String] :account_id
2030
+ # The `AccountId` value is the AWS account ID. This value must match the
2031
+ # AWS account ID associated with the credentials used to sign the
2032
+ # request. You can either specify an AWS account ID or optionally a
2033
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
2034
+ # account ID associated with the credentials used to sign the request.
2035
+ # If you specify your account ID, do not include any hyphens ('-') in
2036
+ # the ID.
2037
+ # @option params [Types::DataRetrievalPolicy] :policy
2038
+ # The data retrieval policy in JSON format.
2039
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2040
+ #
2041
+ # @example Request syntax with placeholder values
2042
+ # resp = client.set_data_retrieval_policy({
2043
+ # account_id: "string", # required
2044
+ # policy: {
2045
+ # rules: [
2046
+ # {
2047
+ # strategy: "string",
2048
+ # bytes_per_hour: 1,
2049
+ # },
2050
+ # ],
2051
+ # },
2052
+ # })
2053
+ # @overload set_data_retrieval_policy(params = {})
2054
+ # @param [Hash] params ({})
2055
+ def set_data_retrieval_policy(params = {}, options = {})
2056
+ req = build_request(:set_data_retrieval_policy, params)
2057
+ req.send_request(options)
2058
+ end
2059
+
2060
+ # This operation configures an access policy for a vault and will
2061
+ # overwrite an existing policy. To configure a vault access policy, send
2062
+ # a PUT request to the `access-policy` subresource of the vault. An
2063
+ # access policy is specific to a vault and is also called a vault
2064
+ # subresource. You can set one access policy per vault and the policy
2065
+ # can be up to 20 KB in size. For more information about vault access
2066
+ # policies, see [Amazon Glacier Access Control with Vault Access
2067
+ # Policies][1].
2068
+ #
2069
+ #
2070
+ #
2071
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html
2072
+ # @option params [required, String] :account_id
2073
+ # The `AccountId` value is the AWS account ID of the account that owns
2074
+ # the vault. You can either specify an AWS account ID or optionally a
2075
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
2076
+ # account ID associated with the credentials used to sign the request.
2077
+ # If you use an account ID, do not include any hyphens ('-') in the
2078
+ # ID.
2079
+ # @option params [required, String] :vault_name
2080
+ # The name of the vault.
2081
+ # @option params [Types::VaultAccessPolicy] :policy
2082
+ # The vault access policy as a JSON string.
2083
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2084
+ #
2085
+ # @example Request syntax with placeholder values
2086
+ # resp = client.set_vault_access_policy({
2087
+ # account_id: "string", # required
2088
+ # vault_name: "string", # required
2089
+ # policy: {
2090
+ # policy: "string",
2091
+ # },
2092
+ # })
2093
+ # @overload set_vault_access_policy(params = {})
2094
+ # @param [Hash] params ({})
2095
+ def set_vault_access_policy(params = {}, options = {})
2096
+ req = build_request(:set_vault_access_policy, params)
2097
+ req.send_request(options)
2098
+ end
2099
+
2100
+ # This operation configures notifications that will be sent when
2101
+ # specific events happen to a vault. By default, you don't get any
2102
+ # notifications.
2103
+ #
2104
+ # To configure vault notifications, send a PUT request to the
2105
+ # `notification-configuration` subresource of the vault. The request
2106
+ # should include a JSON document that provides an Amazon SNS topic and
2107
+ # specific events for which you want Amazon Glacier to send
2108
+ # notifications to the topic.
2109
+ #
2110
+ # Amazon SNS topics must grant permission to the vault to be allowed to
2111
+ # publish notifications to the topic. You can configure a vault to
2112
+ # publish a notification for the following vault events:
2113
+ #
2114
+ # * **ArchiveRetrievalCompleted** This event occurs when a job that was
2115
+ # initiated for an archive retrieval is completed (InitiateJob). The
2116
+ # status of the completed job can be "Succeeded" or "Failed". The
2117
+ # notification sent to the SNS topic is the same output as returned
2118
+ # from DescribeJob.
2119
+ #
2120
+ # * **InventoryRetrievalCompleted** This event occurs when a job that
2121
+ # was initiated for an inventory retrieval is completed (InitiateJob).
2122
+ # The status of the completed job can be "Succeeded" or "Failed".
2123
+ # The notification sent to the SNS topic is the same output as
2124
+ # returned from DescribeJob.
2125
+ #
2126
+ # An AWS account has full permission to perform all operations
2127
+ # (actions). However, AWS Identity and Access Management (IAM) users
2128
+ # don't have any permissions by default. You must grant them explicit
2129
+ # permission to perform specific actions. For more information, see
2130
+ # [Access Control Using AWS Identity and Access Management (IAM)][1].
2131
+ #
2132
+ # For conceptual information and underlying REST API, see [Configuring
2133
+ # Vault Notifications in Amazon Glacier][2] and [Set Vault Notification
2134
+ # Configuration ][3] in the *Amazon Glacier Developer Guide*.
2135
+ #
2136
+ #
2137
+ #
2138
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
2139
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html
2140
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-put.html
2141
+ # @option params [required, String] :account_id
2142
+ # The `AccountId` value is the AWS account ID of the account that owns
2143
+ # the vault. You can either specify an AWS account ID or optionally a
2144
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
2145
+ # account ID associated with the credentials used to sign the request.
2146
+ # If you use an account ID, do not include any hyphens ('-') in the
2147
+ # ID.
2148
+ # @option params [required, String] :vault_name
2149
+ # The name of the vault.
2150
+ # @option params [Types::VaultNotificationConfig] :vault_notification_config
2151
+ # Provides options for specifying notification configuration.
2152
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2153
+ #
2154
+ # @example Request syntax with placeholder values
2155
+ # resp = client.set_vault_notifications({
2156
+ # account_id: "string", # required
2157
+ # vault_name: "string", # required
2158
+ # vault_notification_config: {
2159
+ # sns_topic: "string",
2160
+ # events: ["string"],
2161
+ # },
2162
+ # })
2163
+ # @overload set_vault_notifications(params = {})
2164
+ # @param [Hash] params ({})
2165
+ def set_vault_notifications(params = {}, options = {})
2166
+ req = build_request(:set_vault_notifications, params)
2167
+ req.send_request(options)
2168
+ end
2169
+
2170
+ # This operation adds an archive to a vault. This is a synchronous
2171
+ # operation, and for a successful upload, your data is durably
2172
+ # persisted. Amazon Glacier returns the archive ID in the
2173
+ # `x-amz-archive-id` header of the response.
2174
+ #
2175
+ # You must use the archive ID to access your data in Amazon Glacier.
2176
+ # After you upload an archive, you should save the archive ID returned
2177
+ # so that you can retrieve or delete the archive later. Besides saving
2178
+ # the archive ID, you can also index it and give it a friendly name to
2179
+ # allow for better searching. You can also use the optional archive
2180
+ # description field to specify how the archive is referred to in an
2181
+ # external index of archives, such as you might create in Amazon
2182
+ # DynamoDB. You can also get the vault inventory to obtain a list of
2183
+ # archive IDs in a vault. For more information, see InitiateJob.
2184
+ #
2185
+ # You must provide a SHA256 tree hash of the data you are uploading. For
2186
+ # information about computing a SHA256 tree hash, see [Computing
2187
+ # Checksums][1].
2188
+ #
2189
+ # You can optionally specify an archive description of up to 1,024
2190
+ # printable ASCII characters. You can get the archive description when
2191
+ # you either retrieve the archive or get the vault inventory. For more
2192
+ # information, see InitiateJob. Amazon Glacier does not interpret the
2193
+ # description in any way. An archive description does not need to be
2194
+ # unique. You cannot use the description to retrieve or sort the archive
2195
+ # list.
2196
+ #
2197
+ # Archives are immutable. After you upload an archive, you cannot edit
2198
+ # the archive or its description.
2199
+ #
2200
+ # An AWS account has full permission to perform all operations
2201
+ # (actions). However, AWS Identity and Access Management (IAM) users
2202
+ # don't have any permissions by default. You must grant them explicit
2203
+ # permission to perform specific actions. For more information, see
2204
+ # [Access Control Using AWS Identity and Access Management (IAM)][2].
2205
+ #
2206
+ # For conceptual information and underlying REST API, see [Uploading an
2207
+ # Archive in Amazon Glacier][3] and [Upload Archive][4] in the *Amazon
2208
+ # Glacier Developer Guide*.
2209
+ #
2210
+ #
2211
+ #
2212
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html
2213
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
2214
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-an-archive.html
2215
+ # [4]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-post.html
2216
+ # @option params [required, String] :vault_name
2217
+ # The name of the vault.
2218
+ # @option params [required, String] :account_id
2219
+ # The `AccountId` value is the AWS account ID of the account that owns
2220
+ # the vault. You can either specify an AWS account ID or optionally a
2221
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
2222
+ # account ID associated with the credentials used to sign the request.
2223
+ # If you use an account ID, do not include any hyphens ('-') in the
2224
+ # ID.
2225
+ # @option params [String] :archive_description
2226
+ # The optional description of the archive you are uploading.
2227
+ # @option params [String] :checksum
2228
+ # The SHA256 tree hash of the data being uploaded.
2229
+ # @option params [String, IO] :body
2230
+ # The data to upload.
2231
+ # @return [Types::ArchiveCreationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2232
+ #
2233
+ # * {Types::ArchiveCreationOutput#location #location} => String
2234
+ # * {Types::ArchiveCreationOutput#checksum #checksum} => String
2235
+ # * {Types::ArchiveCreationOutput#archive_id #archiveId} => String
2236
+ #
2237
+ # @example Request syntax with placeholder values
2238
+ # resp = client.upload_archive({
2239
+ # vault_name: "string", # required
2240
+ # account_id: "string", # required
2241
+ # archive_description: "string",
2242
+ # checksum: "string",
2243
+ # body: "data",
2244
+ # })
2245
+ #
2246
+ # @example Response structure
2247
+ # resp.location #=> String
2248
+ # resp.checksum #=> String
2249
+ # resp.archive_id #=> String
2250
+ # @overload upload_archive(params = {})
2251
+ # @param [Hash] params ({})
2252
+ def upload_archive(params = {}, options = {})
2253
+ req = build_request(:upload_archive, params)
2254
+ req.send_request(options)
2255
+ end
2256
+
2257
+ # This operation uploads a part of an archive. You can upload archive
2258
+ # parts in any order. You can also upload them in parallel. You can
2259
+ # upload up to 10,000 parts for a multipart upload.
2260
+ #
2261
+ # Amazon Glacier rejects your upload part request if any of the
2262
+ # following conditions is true:
2263
+ #
2264
+ # * **SHA256 tree hash does not match**To ensure that part data is not
2265
+ # corrupted in transmission, you compute a SHA256 tree hash of the
2266
+ # part and include it in your request. Upon receiving the part data,
2267
+ # Amazon Glacier also computes a SHA256 tree hash. If these hash
2268
+ # values don't match, the operation fails. For information about
2269
+ # computing a SHA256 tree hash, see [Computing Checksums][1].
2270
+ #
2271
+ # * **Part size does not match**The size of each part except the last
2272
+ # must match the size specified in the corresponding
2273
+ # InitiateMultipartUpload request. The size of the last part must be
2274
+ # the same size as, or smaller than, the specified size.
2275
+ #
2276
+ # <note markdown="1"> If you upload a part whose size is smaller than the part size you
2277
+ # specified in your initiate multipart upload request and that part is
2278
+ # not the last part, then the upload part request will succeed.
2279
+ # However, the subsequent Complete Multipart Upload request will fail.
2280
+ #
2281
+ # </note>
2282
+ #
2283
+ # * **Range does not align**The byte range value in the request does not
2284
+ # align with the part size specified in the corresponding initiate
2285
+ # request. For example, if you specify a part size of 4194304 bytes (4
2286
+ # MB), then 0 to 4194303 bytes (4 MB - 1) and 4194304 (4 MB) to
2287
+ # 8388607 (8 MB - 1) are valid part ranges. However, if you set a
2288
+ # range value of 2 MB to 6 MB, the range does not align with the part
2289
+ # size and the upload will fail.
2290
+ #
2291
+ # This operation is idempotent. If you upload the same part multiple
2292
+ # times, the data included in the most recent request overwrites the
2293
+ # previously uploaded data.
2294
+ #
2295
+ # An AWS account has full permission to perform all operations
2296
+ # (actions). However, AWS Identity and Access Management (IAM) users
2297
+ # don't have any permissions by default. You must grant them explicit
2298
+ # permission to perform specific actions. For more information, see
2299
+ # [Access Control Using AWS Identity and Access Management (IAM)][2].
2300
+ #
2301
+ # For conceptual information and underlying REST API, see [Uploading
2302
+ # Large Archives in Parts (Multipart Upload)][3] and [Upload Part ][4]
2303
+ # in the *Amazon Glacier Developer Guide*.
2304
+ #
2305
+ #
2306
+ #
2307
+ # [1]: http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html
2308
+ # [2]: http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html
2309
+ # [3]: http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html
2310
+ # [4]: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-upload-part.html
2311
+ # @option params [required, String] :account_id
2312
+ # The `AccountId` value is the AWS account ID of the account that owns
2313
+ # the vault. You can either specify an AWS account ID or optionally a
2314
+ # single '`-`' (hyphen), in which case Amazon Glacier uses the AWS
2315
+ # account ID associated with the credentials used to sign the request.
2316
+ # If you use an account ID, do not include any hyphens ('-') in the
2317
+ # ID.
2318
+ # @option params [required, String] :vault_name
2319
+ # The name of the vault.
2320
+ # @option params [required, String] :upload_id
2321
+ # The upload ID of the multipart upload.
2322
+ # @option params [String] :checksum
2323
+ # The SHA256 tree hash of the data being uploaded.
2324
+ # @option params [String] :range
2325
+ # Identifies the range of bytes in the assembled archive that will be
2326
+ # uploaded in this part. Amazon Glacier uses this information to
2327
+ # assemble the archive in the proper sequence. The format of this header
2328
+ # follows RFC 2616. An example header is Content-Range:bytes
2329
+ # 0-4194303/*.
2330
+ # @option params [String, IO] :body
2331
+ # The data to upload.
2332
+ # @return [Types::UploadMultipartPartOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2333
+ #
2334
+ # * {Types::UploadMultipartPartOutput#checksum #checksum} => String
2335
+ #
2336
+ # @example Request syntax with placeholder values
2337
+ # resp = client.upload_multipart_part({
2338
+ # account_id: "string", # required
2339
+ # vault_name: "string", # required
2340
+ # upload_id: "string", # required
2341
+ # checksum: "string",
2342
+ # range: "string",
2343
+ # body: "data",
2344
+ # })
2345
+ #
2346
+ # @example Response structure
2347
+ # resp.checksum #=> String
2348
+ # @overload upload_multipart_part(params = {})
2349
+ # @param [Hash] params ({})
2350
+ def upload_multipart_part(params = {}, options = {})
2351
+ req = build_request(:upload_multipart_part, params)
2352
+ req.send_request(options)
2353
+ end
2354
+
2355
+ # @!endgroup
2356
+
2357
+ # @param params ({})
2358
+ # @api private
2359
+ def build_request(operation_name, params = {})
2360
+ handlers = @handlers.for(operation_name)
2361
+ context = Seahorse::Client::RequestContext.new(
2362
+ operation_name: operation_name,
2363
+ operation: config.api.operation(operation_name),
2364
+ client: self,
2365
+ params: params,
2366
+ config: config)
2367
+ context[:gem_name] = 'aws-sdk-glacier'
2368
+ context[:gem_version] = '1.0.0.rc1'
2369
+ Seahorse::Client::Request.new(handlers, context)
2370
+ end
2371
+
2372
+ # Polls an API operation until a resource enters a desired state.
2373
+ #
2374
+ # ## Basic Usage
2375
+ #
2376
+ # A waiter will call an API operation until:
2377
+ #
2378
+ # * It is successful
2379
+ # * It enters a terminal state
2380
+ # * It makes the maximum number of attempts
2381
+ #
2382
+ # In between attempts, the waiter will sleep.
2383
+ #
2384
+ # # polls in a loop, sleeping between attempts
2385
+ # client.waiter_until(waiter_name, params)
2386
+ #
2387
+ # ## Configuration
2388
+ #
2389
+ # You can configure the maximum number of polling attempts, and the
2390
+ # delay (in seconds) between each polling attempt. You can pass
2391
+ # configuration as the final arguments hash.
2392
+ #
2393
+ # # poll for ~25 seconds
2394
+ # client.wait_until(waiter_name, params, {
2395
+ # max_attempts: 5,
2396
+ # delay: 5,
2397
+ # })
2398
+ #
2399
+ # ## Callbacks
2400
+ #
2401
+ # You can be notified before each polling attempt and before each
2402
+ # delay. If you throw `:success` or `:failure` from these callbacks,
2403
+ # it will terminate the waiter.
2404
+ #
2405
+ # started_at = Time.now
2406
+ # client.wait_until(waiter_name, params, {
2407
+ #
2408
+ # # disable max attempts
2409
+ # max_attempts: nil,
2410
+ #
2411
+ # # poll for 1 hour, instead of a number of attempts
2412
+ # before_wait: -> (attempts, response) do
2413
+ # throw :failure if Time.now - started_at > 3600
2414
+ # end
2415
+ # })
2416
+ #
2417
+ # ## Handling Errors
2418
+ #
2419
+ # When a waiter is unsuccessful, it will raise an error.
2420
+ # All of the failure errors extend from
2421
+ # {Aws::Waiters::Errors::WaiterFailed}.
2422
+ #
2423
+ # begin
2424
+ # client.wait_until(...)
2425
+ # rescue Aws::Waiters::Errors::WaiterFailed
2426
+ # # resource did not enter the desired state in time
2427
+ # end
2428
+ #
2429
+ # ## Valid Waiters
2430
+ #
2431
+ # The following table lists the valid waiter names, the operations they call,
2432
+ # and the default `:delay` and `:max_attempts` values.
2433
+ #
2434
+ # | waiter_name | params | :delay | :max_attempts |
2435
+ # | ---------------- | ----------------- | -------- | ------------- |
2436
+ # | vault_exists | {#describe_vault} | 3 | 15 |
2437
+ # | vault_not_exists | {#describe_vault} | 3 | 15 |
2438
+ #
2439
+ # @raise [Errors::FailureStateError] Raised when the waiter terminates
2440
+ # because the waiter has entered a state that it will not transition
2441
+ # out of, preventing success.
2442
+ #
2443
+ # @raise [Errors::TooManyAttemptsError] Raised when the configured
2444
+ # maximum number of attempts have been made, and the waiter is not
2445
+ # yet successful.
2446
+ #
2447
+ # @raise [Errors::UnexpectedError] Raised when an error is encounted
2448
+ # while polling for a resource that is not expected.
2449
+ #
2450
+ # @raise [Errors::NoSuchWaiterError] Raised when you request to wait
2451
+ # for an unknown state.
2452
+ #
2453
+ # @return [Boolean] Returns `true` if the waiter was successful.
2454
+ # @param [Symbol] waiter_name
2455
+ # @param [Hash] params ({})
2456
+ # @param [Hash] options ({})
2457
+ # @option options [Integer] :max_attempts
2458
+ # @option options [Integer] :delay
2459
+ # @option options [Proc] :before_attempt
2460
+ # @option options [Proc] :before_wait
2461
+ def wait_until(waiter_name, params = {}, options = {})
2462
+ w = waiter(waiter_name, options)
2463
+ yield(w.waiter) if block_given? # deprecated
2464
+ w.wait(params)
2465
+ end
2466
+
2467
+ # @api private
2468
+ # @deprecated
2469
+ def waiter_names
2470
+ waiters.keys
2471
+ end
2472
+
2473
+ private
2474
+
2475
+ # @param [Symbol] waiter_name
2476
+ # @param [Hash] options ({})
2477
+ def waiter(waiter_name, options = {})
2478
+ waiter_class = waiters[waiter_name]
2479
+ if waiter_class
2480
+ waiter_class.new(options.merge(client: self))
2481
+ else
2482
+ raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
2483
+ end
2484
+ end
2485
+
2486
+ def waiters
2487
+ {
2488
+ vault_exists: Waiters::VaultExists,
2489
+ vault_not_exists: Waiters::VaultNotExists
2490
+ }
2491
+ end
2492
+
2493
+ class << self
2494
+
2495
+ # @api private
2496
+ attr_reader :identifier
2497
+
2498
+ # @api private
2499
+ def errors_module
2500
+ Errors
2501
+ end
2502
+
2503
+ end
2504
+ end
2505
+ end
2506
+ end