aws-sdk-s3 1.0.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/lib/aws-sdk-s3.rb +66 -0
  3. data/lib/aws-sdk-s3/bucket.rb +595 -0
  4. data/lib/aws-sdk-s3/bucket_acl.rb +168 -0
  5. data/lib/aws-sdk-s3/bucket_cors.rb +146 -0
  6. data/lib/aws-sdk-s3/bucket_lifecycle.rb +164 -0
  7. data/lib/aws-sdk-s3/bucket_logging.rb +142 -0
  8. data/lib/aws-sdk-s3/bucket_notification.rb +187 -0
  9. data/lib/aws-sdk-s3/bucket_policy.rb +138 -0
  10. data/lib/aws-sdk-s3/bucket_region_cache.rb +79 -0
  11. data/lib/aws-sdk-s3/bucket_request_payment.rb +128 -0
  12. data/lib/aws-sdk-s3/bucket_tagging.rb +143 -0
  13. data/lib/aws-sdk-s3/bucket_versioning.rb +188 -0
  14. data/lib/aws-sdk-s3/bucket_website.rb +177 -0
  15. data/lib/aws-sdk-s3/client.rb +3171 -0
  16. data/lib/aws-sdk-s3/client_api.rb +1991 -0
  17. data/lib/aws-sdk-s3/customizations.rb +29 -0
  18. data/lib/aws-sdk-s3/customizations/bucket.rb +127 -0
  19. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +42 -0
  20. data/lib/aws-sdk-s3/customizations/object.rb +257 -0
  21. data/lib/aws-sdk-s3/customizations/object_summary.rb +65 -0
  22. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +11 -0
  23. data/lib/aws-sdk-s3/encryption.rb +19 -0
  24. data/lib/aws-sdk-s3/encryption/client.rb +369 -0
  25. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +178 -0
  26. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +63 -0
  27. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +38 -0
  28. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +50 -0
  29. data/lib/aws-sdk-s3/encryption/errors.rb +13 -0
  30. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +50 -0
  31. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +29 -0
  32. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +69 -0
  33. data/lib/aws-sdk-s3/encryption/key_provider.rb +29 -0
  34. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +71 -0
  35. data/lib/aws-sdk-s3/encryption/materials.rb +58 -0
  36. data/lib/aws-sdk-s3/encryption/utils.rb +79 -0
  37. data/lib/aws-sdk-s3/errors.rb +23 -0
  38. data/lib/aws-sdk-s3/file_part.rb +75 -0
  39. data/lib/aws-sdk-s3/file_uploader.rb +58 -0
  40. data/lib/aws-sdk-s3/legacy_signer.rb +186 -0
  41. data/lib/aws-sdk-s3/multipart_file_uploader.rb +187 -0
  42. data/lib/aws-sdk-s3/multipart_upload.rb +287 -0
  43. data/lib/aws-sdk-s3/multipart_upload_error.rb +16 -0
  44. data/lib/aws-sdk-s3/multipart_upload_part.rb +314 -0
  45. data/lib/aws-sdk-s3/object.rb +942 -0
  46. data/lib/aws-sdk-s3/object_acl.rb +214 -0
  47. data/lib/aws-sdk-s3/object_copier.rb +99 -0
  48. data/lib/aws-sdk-s3/object_multipart_copier.rb +179 -0
  49. data/lib/aws-sdk-s3/object_summary.rb +794 -0
  50. data/lib/aws-sdk-s3/object_version.rb +406 -0
  51. data/lib/aws-sdk-s3/plugins/accelerate.rb +92 -0
  52. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +89 -0
  53. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +23 -0
  54. data/lib/aws-sdk-s3/plugins/dualstack.rb +70 -0
  55. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +29 -0
  56. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +23 -0
  57. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +47 -0
  58. data/lib/aws-sdk-s3/plugins/location_constraint.rb +33 -0
  59. data/lib/aws-sdk-s3/plugins/md5s.rb +79 -0
  60. data/lib/aws-sdk-s3/plugins/redirects.rb +41 -0
  61. data/lib/aws-sdk-s3/plugins/s3_signer.rb +208 -0
  62. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +68 -0
  63. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +94 -0
  64. data/lib/aws-sdk-s3/presigned_post.rb +647 -0
  65. data/lib/aws-sdk-s3/presigner.rb +160 -0
  66. data/lib/aws-sdk-s3/resource.rb +96 -0
  67. data/lib/aws-sdk-s3/types.rb +5750 -0
  68. data/lib/aws-sdk-s3/waiters.rb +178 -0
  69. metadata +154 -0
@@ -0,0 +1,177 @@
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 S3
10
+ class BucketWebsite
11
+
12
+ extend Aws::Deprecations
13
+
14
+ # @overload def initialize(bucket_name, options = {})
15
+ # @param [String] bucket_name
16
+ # @option options [Client] :client
17
+ # @overload def initialize(options = {})
18
+ # @option options [required, String] :bucket_name
19
+ # @option options [Client] :client
20
+ def initialize(*args)
21
+ options = Hash === args.last ? args.pop.dup : {}
22
+ @bucket_name = extract_bucket_name(args, options)
23
+ @data = options.delete(:data)
24
+ @client = options.delete(:client) || Client.new(options)
25
+ end
26
+
27
+ # @!group Read-Only Attributes
28
+
29
+ # @return [String]
30
+ def bucket_name
31
+ @bucket_name
32
+ end
33
+
34
+ # @return [Types::RedirectAllRequestsTo]
35
+ def redirect_all_requests_to
36
+ data.redirect_all_requests_to
37
+ end
38
+
39
+ # @return [Types::IndexDocument]
40
+ def index_document
41
+ data.index_document
42
+ end
43
+
44
+ # @return [Types::ErrorDocument]
45
+ def error_document
46
+ data.error_document
47
+ end
48
+
49
+ # @return [Array<Types::RoutingRule>]
50
+ def routing_rules
51
+ data.routing_rules
52
+ end
53
+
54
+ # @!endgroup
55
+
56
+ # @return [Client]
57
+ def client
58
+ @client
59
+ end
60
+
61
+ # Loads, or reloads {#data} for the current {BucketWebsite}.
62
+ # Returns `self` making it possible to chain methods.
63
+ #
64
+ # bucket_website.reload.data
65
+ #
66
+ # @return [self]
67
+ def load
68
+ resp = @client.get_bucket_website(bucket: @bucket_name)
69
+ @data = resp.data
70
+ self
71
+ end
72
+ alias :reload :load
73
+
74
+ # @return [Types::GetBucketWebsiteOutput]
75
+ # Returns the data for this {BucketWebsite}. Calls
76
+ # {Client#get_bucket_website} if {#data_loaded?} is `false`.
77
+ def data
78
+ load unless @data
79
+ @data
80
+ end
81
+
82
+ # @return [Boolean]
83
+ # Returns `true` if this resource is loaded. Accessing attributes or
84
+ # {#data} on an unloaded resource will trigger a call to {#load}.
85
+ def data_loaded?
86
+ !!@data
87
+ end
88
+
89
+ # @!group Actions
90
+
91
+ # @example Request syntax with placeholder values
92
+ #
93
+ # bucket_website.delete()
94
+ # @param [Hash] options ({})
95
+ # @return [EmptyStructure]
96
+ def delete(options = {})
97
+ options = options.merge(bucket: @bucket_name)
98
+ resp = @client.delete_bucket_website(options)
99
+ resp.data
100
+ end
101
+
102
+ # @example Request syntax with placeholder values
103
+ #
104
+ # bucket_website.put({
105
+ # content_md5: "ContentMD5",
106
+ # website_configuration: { # required
107
+ # error_document: {
108
+ # key: "ObjectKey", # required
109
+ # },
110
+ # index_document: {
111
+ # suffix: "Suffix", # required
112
+ # },
113
+ # redirect_all_requests_to: {
114
+ # host_name: "HostName", # required
115
+ # protocol: "http", # accepts http, https
116
+ # },
117
+ # routing_rules: [
118
+ # {
119
+ # condition: {
120
+ # http_error_code_returned_equals: "HttpErrorCodeReturnedEquals",
121
+ # key_prefix_equals: "KeyPrefixEquals",
122
+ # },
123
+ # redirect: { # required
124
+ # host_name: "HostName",
125
+ # http_redirect_code: "HttpRedirectCode",
126
+ # protocol: "http", # accepts http, https
127
+ # replace_key_prefix_with: "ReplaceKeyPrefixWith",
128
+ # replace_key_with: "ReplaceKeyWith",
129
+ # },
130
+ # },
131
+ # ],
132
+ # },
133
+ # })
134
+ # @param [Hash] options ({})
135
+ # @option options [String] :content_md5
136
+ # @option options [required, Types::WebsiteConfiguration] :website_configuration
137
+ # @return [EmptyStructure]
138
+ def put(options = {})
139
+ options = options.merge(bucket: @bucket_name)
140
+ resp = @client.put_bucket_website(options)
141
+ resp.data
142
+ end
143
+
144
+ # @!group Associations
145
+
146
+ # @return [Bucket]
147
+ def bucket
148
+ Bucket.new(
149
+ name: @bucket_name,
150
+ client: @client
151
+ )
152
+ end
153
+
154
+ # @deprecated
155
+ # @api private
156
+ def identifiers
157
+ { bucket_name: @bucket_name }
158
+ end
159
+ deprecated(:identifiers)
160
+
161
+ private
162
+
163
+ def extract_bucket_name(args, options)
164
+ value = args[0] || options.delete(:bucket_name)
165
+ case value
166
+ when String then value
167
+ when nil then raise ArgumentError, "missing required option :bucket_name"
168
+ else
169
+ msg = "expected :bucket_name to be a String, got #{value.class}"
170
+ raise ArgumentError, msg
171
+ end
172
+ end
173
+
174
+ class Collection < Aws::Resources::Collection; end
175
+ end
176
+ end
177
+ end
@@ -0,0 +1,3171 @@
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/protocols/rest_xml.rb'
22
+ require 'aws-sdk-s3/plugins/accelerate.rb'
23
+ require 'aws-sdk-s3/plugins/dualstack.rb'
24
+ require 'aws-sdk-s3/plugins/bucket_dns.rb'
25
+ require 'aws-sdk-s3/plugins/expect_100_continue.rb'
26
+ require 'aws-sdk-s3/plugins/http_200_errors.rb'
27
+ require 'aws-sdk-s3/plugins/get_bucket_location_fix.rb'
28
+ require 'aws-sdk-s3/plugins/location_constraint.rb'
29
+ require 'aws-sdk-s3/plugins/md5s.rb'
30
+ require 'aws-sdk-s3/plugins/redirects.rb'
31
+ require 'aws-sdk-s3/plugins/sse_cpk.rb'
32
+ require 'aws-sdk-s3/plugins/url_encoded_keys.rb'
33
+ require 'aws-sdk-s3/plugins/s3_signer.rb'
34
+ require 'aws-sdk-s3/plugins/bucket_name_restrictions.rb'
35
+
36
+ Aws::Plugins::GlobalConfiguration.add_identifier(:s3)
37
+
38
+ module Aws
39
+ module S3
40
+ class Client < Seahorse::Client::Base
41
+
42
+ include Aws::ClientStubs
43
+
44
+ @identifier = :s3
45
+
46
+ set_api(ClientApi::API)
47
+
48
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
49
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
50
+ add_plugin(Aws::Plugins::Logging)
51
+ add_plugin(Aws::Plugins::ParamConverter)
52
+ add_plugin(Aws::Plugins::ParamValidator)
53
+ add_plugin(Aws::Plugins::UserAgent)
54
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
55
+ add_plugin(Aws::Plugins::RetryErrors)
56
+ add_plugin(Aws::Plugins::GlobalConfiguration)
57
+ add_plugin(Aws::Plugins::RegionalEndpoint)
58
+ add_plugin(Aws::Plugins::ResponsePaging)
59
+ add_plugin(Aws::Plugins::StubResponses)
60
+ add_plugin(Aws::Plugins::IdempotencyToken)
61
+ add_plugin(Aws::Plugins::Protocols::RestXml)
62
+ add_plugin(Aws::S3::Plugins::Accelerate)
63
+ add_plugin(Aws::S3::Plugins::Dualstack)
64
+ add_plugin(Aws::S3::Plugins::BucketDns)
65
+ add_plugin(Aws::S3::Plugins::Expect100Continue)
66
+ add_plugin(Aws::S3::Plugins::Http200Errors)
67
+ add_plugin(Aws::S3::Plugins::GetBucketLocationFix)
68
+ add_plugin(Aws::S3::Plugins::LocationConstraint)
69
+ add_plugin(Aws::S3::Plugins::Md5s)
70
+ add_plugin(Aws::S3::Plugins::Redirects)
71
+ add_plugin(Aws::S3::Plugins::SseCpk)
72
+ add_plugin(Aws::S3::Plugins::UrlEncodedKeys)
73
+ add_plugin(Aws::S3::Plugins::S3Signer)
74
+ add_plugin(Aws::S3::Plugins::BucketNameRestrictions)
75
+
76
+ # @option options [required, Aws::CredentialProvider] :credentials
77
+ # Your AWS credentials. This can be an instance of any one of the
78
+ # following classes:
79
+ #
80
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
81
+ # credentials.
82
+ #
83
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
84
+ # from an EC2 IMDS on an EC2 instance.
85
+ #
86
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
87
+ # shared file, such as `~/.aws/config`.
88
+ #
89
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
90
+ #
91
+ # When `:credentials` are not configured directly, the following
92
+ # locations will be searched for credentials:
93
+ #
94
+ # * `Aws.config[:credentials]`
95
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
96
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
97
+ # * `~/.aws/credentials`
98
+ # * `~/.aws/config`
99
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
100
+ # very aggressive. Construct and pass an instance of
101
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
102
+ # timeouts.
103
+ # @option options [required, String] :region
104
+ # The AWS region to connect to. The configured `:region` is
105
+ # used to determine the service `:endpoint`. When not passed,
106
+ # a default `:region` is search for in the following locations:
107
+ #
108
+ # * `Aws.config[:region]`
109
+ # * `ENV['AWS_REGION']`
110
+ # * `ENV['AMAZON_REGION']`
111
+ # * `ENV['AWS_DEFAULT_REGION']`
112
+ # * `~/.aws/credentials`
113
+ # * `~/.aws/config`
114
+ # @option options [String] :access_key_id
115
+ # @option options [Boolean] :compute_checksums (true)
116
+ # When `true` a MD5 checksum will be computed for every request that
117
+ # sends a body. When `false`, MD5 checksums will only be computed
118
+ # for operations that require them. Checksum errors returned by Amazon
119
+ # S3 are automatically retried up to `:retry_limit` times.
120
+ # @option options [Boolean] :convert_params (true)
121
+ # When `true`, an attempt is made to coerce request parameters into
122
+ # the required types.
123
+ # @option options [String] :endpoint
124
+ # The client endpoint is normally constructed from the `:region`
125
+ # option. You should only configure an `:endpoint` when connecting
126
+ # to test endpoints. This should be avalid HTTP(S) URI.
127
+ # @option options [Boolean] :follow_redirects (true)
128
+ # When `true`, this client will follow 307 redirects returned
129
+ # by Amazon S3.
130
+ # @option options [Boolean] :force_path_style (false)
131
+ # When set to `true`, the bucket name is always left in the
132
+ # request URI and never moved to the host as a sub-domain.
133
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
134
+ # The log formatter.
135
+ # @option options [Symbol] :log_level (:info)
136
+ # The log level to send messages to the `:logger` at.
137
+ # @option options [Logger] :logger
138
+ # The Logger instance to send log messages to. If this option
139
+ # is not set, logging will be disabled.
140
+ # @option options [String] :profile ("default")
141
+ # Used when loading credentials from the shared credentials file
142
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
143
+ # @option options [Boolean] :require_https_for_sse_cpk (true)
144
+ # When `true`, the endpoint **must** be HTTPS for all operations
145
+ # where server-side-encryption is used with customer-provided keys.
146
+ # This should only be disabled for local testing.
147
+ # @option options [Integer] :retry_limit (3)
148
+ # The maximum number of times to retry failed requests. Only
149
+ # ~ 500 level server errors and certain ~ 400 level client errors
150
+ # are retried. Generally, these are throttling errors, data
151
+ # checksum errors, networking errors, timeout errors and auth
152
+ # errors from expired credentials.
153
+ # @option options [String] :secret_access_key
154
+ # @option options [String] :session_token
155
+ # @option options [Boolean] :stub_responses (false)
156
+ # Causes the client to return stubbed responses. By default
157
+ # fake responses are generated and returned. You can specify
158
+ # the response data to return or errors to raise by calling
159
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
160
+ #
161
+ # ** Please note ** When response stubbing is enabled, no HTTP
162
+ # requests are made, and retries are disabled.
163
+ # @option options [Boolean] :use_accelerate_endpoint (false)
164
+ # When set to `true`, accelerated bucket endpoints will be used
165
+ # for all object operations. You must first enable accelerate for
166
+ # each bucket. [Go here for more information](http://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
167
+ # @option options [Boolean] :use_dualstack_endpoint (false)
168
+ # When set to `true`, IPv6-compatible bucket endpoints will be used
169
+ # for all operations.
170
+ # @option options [Boolean] :validate_params (true)
171
+ # When `true`, request parameters are validated before
172
+ # sending the request.
173
+ def initialize(*args)
174
+ super
175
+ end
176
+
177
+ # @!group API Operations
178
+
179
+ # Aborts a multipart upload.
180
+ #
181
+ # To verify that all parts have been removed, so you don't get charged
182
+ # for the part storage, you should call the List Parts operation and
183
+ # ensure the parts list is empty.
184
+ # @option params [required, String] :bucket
185
+ # @option params [required, String] :key
186
+ # @option params [required, String] :upload_id
187
+ # @option params [String] :request_payer
188
+ # Confirms that the requester knows that she or he will be charged for
189
+ # the request. Bucket owners need not specify this parameter in their
190
+ # requests. Documentation on downloading objects from requester pays
191
+ # buckets can be found at
192
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
193
+ # @return [Types::AbortMultipartUploadOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
194
+ #
195
+ # * {Types::AbortMultipartUploadOutput#request_charged #RequestCharged} => String
196
+ #
197
+ # @example Request syntax with placeholder values
198
+ # resp = client.abort_multipart_upload({
199
+ # bucket: "BucketName", # required
200
+ # key: "ObjectKey", # required
201
+ # upload_id: "MultipartUploadId", # required
202
+ # request_payer: "requester", # accepts requester
203
+ # })
204
+ #
205
+ # @example Response structure
206
+ # resp.request_charged #=> String, one of "requester"
207
+ # @overload abort_multipart_upload(params = {})
208
+ # @param [Hash] params ({})
209
+ def abort_multipart_upload(params = {}, options = {})
210
+ req = build_request(:abort_multipart_upload, params)
211
+ req.send_request(options)
212
+ end
213
+
214
+ # Completes a multipart upload by assembling previously uploaded parts.
215
+ # @option params [required, String] :bucket
216
+ # @option params [required, String] :key
217
+ # @option params [Types::CompletedMultipartUpload] :multipart_upload
218
+ # @option params [required, String] :upload_id
219
+ # @option params [String] :request_payer
220
+ # Confirms that the requester knows that she or he will be charged for
221
+ # the request. Bucket owners need not specify this parameter in their
222
+ # requests. Documentation on downloading objects from requester pays
223
+ # buckets can be found at
224
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
225
+ # @return [Types::CompleteMultipartUploadOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
226
+ #
227
+ # * {Types::CompleteMultipartUploadOutput#location #Location} => String
228
+ # * {Types::CompleteMultipartUploadOutput#bucket #Bucket} => String
229
+ # * {Types::CompleteMultipartUploadOutput#key #Key} => String
230
+ # * {Types::CompleteMultipartUploadOutput#expiration #Expiration} => String
231
+ # * {Types::CompleteMultipartUploadOutput#etag #ETag} => String
232
+ # * {Types::CompleteMultipartUploadOutput#server_side_encryption #ServerSideEncryption} => String
233
+ # * {Types::CompleteMultipartUploadOutput#version_id #VersionId} => String
234
+ # * {Types::CompleteMultipartUploadOutput#ssekms_key_id #SSEKMSKeyId} => String
235
+ # * {Types::CompleteMultipartUploadOutput#request_charged #RequestCharged} => String
236
+ #
237
+ # @example Request syntax with placeholder values
238
+ # resp = client.complete_multipart_upload({
239
+ # bucket: "BucketName", # required
240
+ # key: "ObjectKey", # required
241
+ # multipart_upload: {
242
+ # parts: [
243
+ # {
244
+ # etag: "ETag",
245
+ # part_number: 1,
246
+ # },
247
+ # ],
248
+ # },
249
+ # upload_id: "MultipartUploadId", # required
250
+ # request_payer: "requester", # accepts requester
251
+ # })
252
+ #
253
+ # @example Response structure
254
+ # resp.location #=> String
255
+ # resp.bucket #=> String
256
+ # resp.key #=> String
257
+ # resp.expiration #=> String
258
+ # resp.etag #=> String
259
+ # resp.server_side_encryption #=> String, one of "AES256", "aws:kms"
260
+ # resp.version_id #=> String
261
+ # resp.ssekms_key_id #=> String
262
+ # resp.request_charged #=> String, one of "requester"
263
+ # @overload complete_multipart_upload(params = {})
264
+ # @param [Hash] params ({})
265
+ def complete_multipart_upload(params = {}, options = {})
266
+ req = build_request(:complete_multipart_upload, params)
267
+ req.send_request(options)
268
+ end
269
+
270
+ # Creates a copy of an object that is already stored in Amazon S3.
271
+ # @option params [String] :acl
272
+ # The canned ACL to apply to the object.
273
+ # @option params [required, String] :bucket
274
+ # @option params [String] :cache_control
275
+ # Specifies caching behavior along the request/reply chain.
276
+ # @option params [String] :content_disposition
277
+ # Specifies presentational information for the object.
278
+ # @option params [String] :content_encoding
279
+ # Specifies what content encodings have been applied to the object and
280
+ # thus what decoding mechanisms must be applied to obtain the media-type
281
+ # referenced by the Content-Type header field.
282
+ # @option params [String] :content_language
283
+ # The language the content is in.
284
+ # @option params [String] :content_type
285
+ # A standard MIME type describing the format of the object data.
286
+ # @option params [required, String] :copy_source
287
+ # The name of the source bucket and key name of the source object,
288
+ # separated by a slash (/). Must be URL-encoded.
289
+ # @option params [String] :copy_source_if_match
290
+ # Copies the object if its entity tag (ETag) matches the specified tag.
291
+ # @option params [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
292
+ # Copies the object if it has been modified since the specified time.
293
+ # @option params [String] :copy_source_if_none_match
294
+ # Copies the object if its entity tag (ETag) is different than the
295
+ # specified ETag.
296
+ # @option params [Time,DateTime,Date,Integer,String] :copy_source_if_unmodified_since
297
+ # Copies the object if it hasn't been modified since the specified
298
+ # time.
299
+ # @option params [Time,DateTime,Date,Integer,String] :expires
300
+ # The date and time at which the object is no longer cacheable.
301
+ # @option params [String] :grant_full_control
302
+ # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
303
+ # object.
304
+ # @option params [String] :grant_read
305
+ # Allows grantee to read the object data and its metadata.
306
+ # @option params [String] :grant_read_acp
307
+ # Allows grantee to read the object ACL.
308
+ # @option params [String] :grant_write_acp
309
+ # Allows grantee to write the ACL for the applicable object.
310
+ # @option params [required, String] :key
311
+ # @option params [Hash<String,String>] :metadata
312
+ # A map of metadata to store with the object in S3.
313
+ # @option params [String] :metadata_directive
314
+ # Specifies whether the metadata is copied from the source object or
315
+ # replaced with metadata provided in the request.
316
+ # @option params [String] :server_side_encryption
317
+ # The Server-side encryption algorithm used when storing this object in
318
+ # S3 (e.g., AES256, aws:kms).
319
+ # @option params [String] :storage_class
320
+ # The type of storage to use for the object. Defaults to 'STANDARD'.
321
+ # @option params [String] :website_redirect_location
322
+ # If the bucket is configured as a website, redirects requests for this
323
+ # object to another object in the same bucket or to an external URL.
324
+ # Amazon S3 stores the value of this header in the object metadata.
325
+ # @option params [String] :sse_customer_algorithm
326
+ # Specifies the algorithm to use to when encrypting the object (e.g.,
327
+ # AES256).
328
+ # @option params [String] :sse_customer_key
329
+ # Specifies the customer-provided encryption key for Amazon S3 to use in
330
+ # encrypting data. This value is used to store the object and then it is
331
+ # discarded; Amazon does not store the encryption key. The key must be
332
+ # appropriate for use with the algorithm specified in the
333
+ # x-amz-server-side​-encryption​-customer-algorithm header.
334
+ # @option params [String] :sse_customer_key_md5
335
+ # Specifies the 128-bit MD5 digest of the encryption key according to
336
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
337
+ # ensure the encryption key was transmitted without error.
338
+ # @option params [String] :ssekms_key_id
339
+ # Specifies the AWS KMS key ID to use for object encryption. All GET and
340
+ # PUT requests for an object protected by AWS KMS will fail if not made
341
+ # via SSL or using SigV4. Documentation on configuring any of the
342
+ # officially supported AWS SDKs and CLI can be found at
343
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
344
+ # @option params [String] :copy_source_sse_customer_algorithm
345
+ # Specifies the algorithm to use when decrypting the source object
346
+ # (e.g., AES256).
347
+ # @option params [String] :copy_source_sse_customer_key
348
+ # Specifies the customer-provided encryption key for Amazon S3 to use to
349
+ # decrypt the source object. The encryption key provided in this header
350
+ # must be one that was used when the source object was created.
351
+ # @option params [String] :copy_source_sse_customer_key_md5
352
+ # Specifies the 128-bit MD5 digest of the encryption key according to
353
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
354
+ # ensure the encryption key was transmitted without error.
355
+ # @option params [String] :request_payer
356
+ # Confirms that the requester knows that she or he will be charged for
357
+ # the request. Bucket owners need not specify this parameter in their
358
+ # requests. Documentation on downloading objects from requester pays
359
+ # buckets can be found at
360
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
361
+ # @return [Types::CopyObjectOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
362
+ #
363
+ # * {Types::CopyObjectOutput#copy_object_result #CopyObjectResult} => Types::CopyObjectResult
364
+ # * {Types::CopyObjectOutput#expiration #Expiration} => String
365
+ # * {Types::CopyObjectOutput#copy_source_version_id #CopySourceVersionId} => String
366
+ # * {Types::CopyObjectOutput#version_id #VersionId} => String
367
+ # * {Types::CopyObjectOutput#server_side_encryption #ServerSideEncryption} => String
368
+ # * {Types::CopyObjectOutput#sse_customer_algorithm #SSECustomerAlgorithm} => String
369
+ # * {Types::CopyObjectOutput#sse_customer_key_md5 #SSECustomerKeyMD5} => String
370
+ # * {Types::CopyObjectOutput#ssekms_key_id #SSEKMSKeyId} => String
371
+ # * {Types::CopyObjectOutput#request_charged #RequestCharged} => String
372
+ #
373
+ # @example Request syntax with placeholder values
374
+ # resp = client.copy_object({
375
+ # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
376
+ # bucket: "BucketName", # required
377
+ # cache_control: "CacheControl",
378
+ # content_disposition: "ContentDisposition",
379
+ # content_encoding: "ContentEncoding",
380
+ # content_language: "ContentLanguage",
381
+ # content_type: "ContentType",
382
+ # copy_source: "CopySource", # required
383
+ # copy_source_if_match: "CopySourceIfMatch",
384
+ # copy_source_if_modified_since: Time.now,
385
+ # copy_source_if_none_match: "CopySourceIfNoneMatch",
386
+ # copy_source_if_unmodified_since: Time.now,
387
+ # expires: Time.now,
388
+ # grant_full_control: "GrantFullControl",
389
+ # grant_read: "GrantRead",
390
+ # grant_read_acp: "GrantReadACP",
391
+ # grant_write_acp: "GrantWriteACP",
392
+ # key: "ObjectKey", # required
393
+ # metadata: {
394
+ # "MetadataKey" => "MetadataValue",
395
+ # },
396
+ # metadata_directive: "COPY", # accepts COPY, REPLACE
397
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms
398
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA
399
+ # website_redirect_location: "WebsiteRedirectLocation",
400
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
401
+ # sse_customer_key: "SSECustomerKey",
402
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
403
+ # ssekms_key_id: "SSEKMSKeyId",
404
+ # copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
405
+ # copy_source_sse_customer_key: "CopySourceSSECustomerKey",
406
+ # copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
407
+ # request_payer: "requester", # accepts requester
408
+ # })
409
+ #
410
+ # @example Response structure
411
+ # resp.copy_object_result.etag #=> String
412
+ # resp.copy_object_result.last_modified #=> Time
413
+ # resp.expiration #=> String
414
+ # resp.copy_source_version_id #=> String
415
+ # resp.version_id #=> String
416
+ # resp.server_side_encryption #=> String, one of "AES256", "aws:kms"
417
+ # resp.sse_customer_algorithm #=> String
418
+ # resp.sse_customer_key_md5 #=> String
419
+ # resp.ssekms_key_id #=> String
420
+ # resp.request_charged #=> String, one of "requester"
421
+ # @overload copy_object(params = {})
422
+ # @param [Hash] params ({})
423
+ def copy_object(params = {}, options = {})
424
+ req = build_request(:copy_object, params)
425
+ req.send_request(options)
426
+ end
427
+
428
+ # Creates a new bucket.
429
+ # @option params [String] :acl
430
+ # The canned ACL to apply to the bucket.
431
+ # @option params [required, String] :bucket
432
+ # @option params [Types::CreateBucketConfiguration] :create_bucket_configuration
433
+ # @option params [String] :grant_full_control
434
+ # Allows grantee the read, write, read ACP, and write ACP permissions on
435
+ # the bucket.
436
+ # @option params [String] :grant_read
437
+ # Allows grantee to list the objects in the bucket.
438
+ # @option params [String] :grant_read_acp
439
+ # Allows grantee to read the bucket ACL.
440
+ # @option params [String] :grant_write
441
+ # Allows grantee to create, overwrite, and delete any object in the
442
+ # bucket.
443
+ # @option params [String] :grant_write_acp
444
+ # Allows grantee to write the ACL for the applicable bucket.
445
+ # @return [Types::CreateBucketOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
446
+ #
447
+ # * {Types::CreateBucketOutput#location #Location} => String
448
+ #
449
+ # @example Request syntax with placeholder values
450
+ # resp = client.create_bucket({
451
+ # acl: "private", # accepts private, public-read, public-read-write, authenticated-read
452
+ # bucket: "BucketName", # required
453
+ # create_bucket_configuration: {
454
+ # location_constraint: "EU", # accepts EU, eu-west-1, us-west-1, us-west-2, ap-south-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1, cn-north-1, eu-central-1
455
+ # },
456
+ # grant_full_control: "GrantFullControl",
457
+ # grant_read: "GrantRead",
458
+ # grant_read_acp: "GrantReadACP",
459
+ # grant_write: "GrantWrite",
460
+ # grant_write_acp: "GrantWriteACP",
461
+ # })
462
+ #
463
+ # @example Response structure
464
+ # resp.location #=> String
465
+ # @overload create_bucket(params = {})
466
+ # @param [Hash] params ({})
467
+ def create_bucket(params = {}, options = {})
468
+ req = build_request(:create_bucket, params)
469
+ req.send_request(options)
470
+ end
471
+
472
+ # Initiates a multipart upload and returns an upload ID.
473
+ #
474
+ # **Note:** After you initiate multipart upload and upload one or more
475
+ # parts, you must either complete or abort multipart upload in order to
476
+ # stop getting charged for storage of the uploaded parts. Only after you
477
+ # either complete or abort multipart upload, Amazon S3 frees up the
478
+ # parts storage and stops charging you for the parts storage.
479
+ # @option params [String] :acl
480
+ # The canned ACL to apply to the object.
481
+ # @option params [required, String] :bucket
482
+ # @option params [String] :cache_control
483
+ # Specifies caching behavior along the request/reply chain.
484
+ # @option params [String] :content_disposition
485
+ # Specifies presentational information for the object.
486
+ # @option params [String] :content_encoding
487
+ # Specifies what content encodings have been applied to the object and
488
+ # thus what decoding mechanisms must be applied to obtain the media-type
489
+ # referenced by the Content-Type header field.
490
+ # @option params [String] :content_language
491
+ # The language the content is in.
492
+ # @option params [String] :content_type
493
+ # A standard MIME type describing the format of the object data.
494
+ # @option params [Time,DateTime,Date,Integer,String] :expires
495
+ # The date and time at which the object is no longer cacheable.
496
+ # @option params [String] :grant_full_control
497
+ # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
498
+ # object.
499
+ # @option params [String] :grant_read
500
+ # Allows grantee to read the object data and its metadata.
501
+ # @option params [String] :grant_read_acp
502
+ # Allows grantee to read the object ACL.
503
+ # @option params [String] :grant_write_acp
504
+ # Allows grantee to write the ACL for the applicable object.
505
+ # @option params [required, String] :key
506
+ # @option params [Hash<String,String>] :metadata
507
+ # A map of metadata to store with the object in S3.
508
+ # @option params [String] :server_side_encryption
509
+ # The Server-side encryption algorithm used when storing this object in
510
+ # S3 (e.g., AES256, aws:kms).
511
+ # @option params [String] :storage_class
512
+ # The type of storage to use for the object. Defaults to 'STANDARD'.
513
+ # @option params [String] :website_redirect_location
514
+ # If the bucket is configured as a website, redirects requests for this
515
+ # object to another object in the same bucket or to an external URL.
516
+ # Amazon S3 stores the value of this header in the object metadata.
517
+ # @option params [String] :sse_customer_algorithm
518
+ # Specifies the algorithm to use to when encrypting the object (e.g.,
519
+ # AES256).
520
+ # @option params [String] :sse_customer_key
521
+ # Specifies the customer-provided encryption key for Amazon S3 to use in
522
+ # encrypting data. This value is used to store the object and then it is
523
+ # discarded; Amazon does not store the encryption key. The key must be
524
+ # appropriate for use with the algorithm specified in the
525
+ # x-amz-server-side​-encryption​-customer-algorithm header.
526
+ # @option params [String] :sse_customer_key_md5
527
+ # Specifies the 128-bit MD5 digest of the encryption key according to
528
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
529
+ # ensure the encryption key was transmitted without error.
530
+ # @option params [String] :ssekms_key_id
531
+ # Specifies the AWS KMS key ID to use for object encryption. All GET and
532
+ # PUT requests for an object protected by AWS KMS will fail if not made
533
+ # via SSL or using SigV4. Documentation on configuring any of the
534
+ # officially supported AWS SDKs and CLI can be found at
535
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
536
+ # @option params [String] :request_payer
537
+ # Confirms that the requester knows that she or he will be charged for
538
+ # the request. Bucket owners need not specify this parameter in their
539
+ # requests. Documentation on downloading objects from requester pays
540
+ # buckets can be found at
541
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
542
+ # @return [Types::CreateMultipartUploadOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
543
+ #
544
+ # * {Types::CreateMultipartUploadOutput#abort_date #AbortDate} => Time
545
+ # * {Types::CreateMultipartUploadOutput#abort_rule_id #AbortRuleId} => String
546
+ # * {Types::CreateMultipartUploadOutput#bucket #Bucket} => String
547
+ # * {Types::CreateMultipartUploadOutput#key #Key} => String
548
+ # * {Types::CreateMultipartUploadOutput#upload_id #UploadId} => String
549
+ # * {Types::CreateMultipartUploadOutput#server_side_encryption #ServerSideEncryption} => String
550
+ # * {Types::CreateMultipartUploadOutput#sse_customer_algorithm #SSECustomerAlgorithm} => String
551
+ # * {Types::CreateMultipartUploadOutput#sse_customer_key_md5 #SSECustomerKeyMD5} => String
552
+ # * {Types::CreateMultipartUploadOutput#ssekms_key_id #SSEKMSKeyId} => String
553
+ # * {Types::CreateMultipartUploadOutput#request_charged #RequestCharged} => String
554
+ #
555
+ # @example Request syntax with placeholder values
556
+ # resp = client.create_multipart_upload({
557
+ # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
558
+ # bucket: "BucketName", # required
559
+ # cache_control: "CacheControl",
560
+ # content_disposition: "ContentDisposition",
561
+ # content_encoding: "ContentEncoding",
562
+ # content_language: "ContentLanguage",
563
+ # content_type: "ContentType",
564
+ # expires: Time.now,
565
+ # grant_full_control: "GrantFullControl",
566
+ # grant_read: "GrantRead",
567
+ # grant_read_acp: "GrantReadACP",
568
+ # grant_write_acp: "GrantWriteACP",
569
+ # key: "ObjectKey", # required
570
+ # metadata: {
571
+ # "MetadataKey" => "MetadataValue",
572
+ # },
573
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms
574
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA
575
+ # website_redirect_location: "WebsiteRedirectLocation",
576
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
577
+ # sse_customer_key: "SSECustomerKey",
578
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
579
+ # ssekms_key_id: "SSEKMSKeyId",
580
+ # request_payer: "requester", # accepts requester
581
+ # })
582
+ #
583
+ # @example Response structure
584
+ # resp.abort_date #=> Time
585
+ # resp.abort_rule_id #=> String
586
+ # resp.bucket #=> String
587
+ # resp.key #=> String
588
+ # resp.upload_id #=> String
589
+ # resp.server_side_encryption #=> String, one of "AES256", "aws:kms"
590
+ # resp.sse_customer_algorithm #=> String
591
+ # resp.sse_customer_key_md5 #=> String
592
+ # resp.ssekms_key_id #=> String
593
+ # resp.request_charged #=> String, one of "requester"
594
+ # @overload create_multipart_upload(params = {})
595
+ # @param [Hash] params ({})
596
+ def create_multipart_upload(params = {}, options = {})
597
+ req = build_request(:create_multipart_upload, params)
598
+ req.send_request(options)
599
+ end
600
+
601
+ # Deletes the bucket. All objects (including all object versions and
602
+ # Delete Markers) in the bucket must be deleted before the bucket itself
603
+ # can be deleted.
604
+ # @option params [required, String] :bucket
605
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
606
+ #
607
+ # @example Request syntax with placeholder values
608
+ # resp = client.delete_bucket({
609
+ # bucket: "BucketName", # required
610
+ # })
611
+ # @overload delete_bucket(params = {})
612
+ # @param [Hash] params ({})
613
+ def delete_bucket(params = {}, options = {})
614
+ req = build_request(:delete_bucket, params)
615
+ req.send_request(options)
616
+ end
617
+
618
+ # Deletes the cors configuration information set for the bucket.
619
+ # @option params [required, String] :bucket
620
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
621
+ #
622
+ # @example Request syntax with placeholder values
623
+ # resp = client.delete_bucket_cors({
624
+ # bucket: "BucketName", # required
625
+ # })
626
+ # @overload delete_bucket_cors(params = {})
627
+ # @param [Hash] params ({})
628
+ def delete_bucket_cors(params = {}, options = {})
629
+ req = build_request(:delete_bucket_cors, params)
630
+ req.send_request(options)
631
+ end
632
+
633
+ # Deletes the lifecycle configuration from the bucket.
634
+ # @option params [required, String] :bucket
635
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
636
+ #
637
+ # @example Request syntax with placeholder values
638
+ # resp = client.delete_bucket_lifecycle({
639
+ # bucket: "BucketName", # required
640
+ # })
641
+ # @overload delete_bucket_lifecycle(params = {})
642
+ # @param [Hash] params ({})
643
+ def delete_bucket_lifecycle(params = {}, options = {})
644
+ req = build_request(:delete_bucket_lifecycle, params)
645
+ req.send_request(options)
646
+ end
647
+
648
+ # Deletes the policy from the bucket.
649
+ # @option params [required, String] :bucket
650
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
651
+ #
652
+ # @example Request syntax with placeholder values
653
+ # resp = client.delete_bucket_policy({
654
+ # bucket: "BucketName", # required
655
+ # })
656
+ # @overload delete_bucket_policy(params = {})
657
+ # @param [Hash] params ({})
658
+ def delete_bucket_policy(params = {}, options = {})
659
+ req = build_request(:delete_bucket_policy, params)
660
+ req.send_request(options)
661
+ end
662
+
663
+ # Deletes the replication configuration from the bucket.
664
+ # @option params [required, String] :bucket
665
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
666
+ #
667
+ # @example Request syntax with placeholder values
668
+ # resp = client.delete_bucket_replication({
669
+ # bucket: "BucketName", # required
670
+ # })
671
+ # @overload delete_bucket_replication(params = {})
672
+ # @param [Hash] params ({})
673
+ def delete_bucket_replication(params = {}, options = {})
674
+ req = build_request(:delete_bucket_replication, params)
675
+ req.send_request(options)
676
+ end
677
+
678
+ # Deletes the tags from the bucket.
679
+ # @option params [required, String] :bucket
680
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
681
+ #
682
+ # @example Request syntax with placeholder values
683
+ # resp = client.delete_bucket_tagging({
684
+ # bucket: "BucketName", # required
685
+ # })
686
+ # @overload delete_bucket_tagging(params = {})
687
+ # @param [Hash] params ({})
688
+ def delete_bucket_tagging(params = {}, options = {})
689
+ req = build_request(:delete_bucket_tagging, params)
690
+ req.send_request(options)
691
+ end
692
+
693
+ # This operation removes the website configuration from the bucket.
694
+ # @option params [required, String] :bucket
695
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
696
+ #
697
+ # @example Request syntax with placeholder values
698
+ # resp = client.delete_bucket_website({
699
+ # bucket: "BucketName", # required
700
+ # })
701
+ # @overload delete_bucket_website(params = {})
702
+ # @param [Hash] params ({})
703
+ def delete_bucket_website(params = {}, options = {})
704
+ req = build_request(:delete_bucket_website, params)
705
+ req.send_request(options)
706
+ end
707
+
708
+ # Removes the null version (if there is one) of an object and inserts a
709
+ # delete marker, which becomes the latest version of the object. If
710
+ # there isn't a null version, Amazon S3 does not remove any objects.
711
+ # @option params [required, String] :bucket
712
+ # @option params [required, String] :key
713
+ # @option params [String] :mfa
714
+ # The concatenation of the authentication device's serial number, a
715
+ # space, and the value that is displayed on your authentication device.
716
+ # @option params [String] :version_id
717
+ # VersionId used to reference a specific version of the object.
718
+ # @option params [String] :request_payer
719
+ # Confirms that the requester knows that she or he will be charged for
720
+ # the request. Bucket owners need not specify this parameter in their
721
+ # requests. Documentation on downloading objects from requester pays
722
+ # buckets can be found at
723
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
724
+ # @return [Types::DeleteObjectOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
725
+ #
726
+ # * {Types::DeleteObjectOutput#delete_marker #DeleteMarker} => Boolean
727
+ # * {Types::DeleteObjectOutput#version_id #VersionId} => String
728
+ # * {Types::DeleteObjectOutput#request_charged #RequestCharged} => String
729
+ #
730
+ # @example Request syntax with placeholder values
731
+ # resp = client.delete_object({
732
+ # bucket: "BucketName", # required
733
+ # key: "ObjectKey", # required
734
+ # mfa: "MFA",
735
+ # version_id: "ObjectVersionId",
736
+ # request_payer: "requester", # accepts requester
737
+ # })
738
+ #
739
+ # @example Response structure
740
+ # resp.delete_marker #=> Boolean
741
+ # resp.version_id #=> String
742
+ # resp.request_charged #=> String, one of "requester"
743
+ # @overload delete_object(params = {})
744
+ # @param [Hash] params ({})
745
+ def delete_object(params = {}, options = {})
746
+ req = build_request(:delete_object, params)
747
+ req.send_request(options)
748
+ end
749
+
750
+ # This operation enables you to delete multiple objects from a bucket
751
+ # using a single HTTP request. You may specify up to 1000 keys.
752
+ # @option params [required, String] :bucket
753
+ # @option params [required, Types::Delete] :delete
754
+ # @option params [String] :mfa
755
+ # The concatenation of the authentication device's serial number, a
756
+ # space, and the value that is displayed on your authentication device.
757
+ # @option params [String] :request_payer
758
+ # Confirms that the requester knows that she or he will be charged for
759
+ # the request. Bucket owners need not specify this parameter in their
760
+ # requests. Documentation on downloading objects from requester pays
761
+ # buckets can be found at
762
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
763
+ # @return [Types::DeleteObjectsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
764
+ #
765
+ # * {Types::DeleteObjectsOutput#deleted #Deleted} => Array&lt;Types::DeletedObject&gt;
766
+ # * {Types::DeleteObjectsOutput#request_charged #RequestCharged} => String
767
+ # * {Types::DeleteObjectsOutput#errors #Errors} => Array&lt;Types::Error&gt;
768
+ #
769
+ # @example Request syntax with placeholder values
770
+ # resp = client.delete_objects({
771
+ # bucket: "BucketName", # required
772
+ # delete: { # required
773
+ # objects: [ # required
774
+ # {
775
+ # key: "ObjectKey", # required
776
+ # version_id: "ObjectVersionId",
777
+ # },
778
+ # ],
779
+ # quiet: false,
780
+ # },
781
+ # mfa: "MFA",
782
+ # request_payer: "requester", # accepts requester
783
+ # })
784
+ #
785
+ # @example Response structure
786
+ # resp.deleted #=> Array
787
+ # resp.deleted[0].key #=> String
788
+ # resp.deleted[0].version_id #=> String
789
+ # resp.deleted[0].delete_marker #=> Boolean
790
+ # resp.deleted[0].delete_marker_version_id #=> String
791
+ # resp.request_charged #=> String, one of "requester"
792
+ # resp.errors #=> Array
793
+ # resp.errors[0].key #=> String
794
+ # resp.errors[0].version_id #=> String
795
+ # resp.errors[0].code #=> String
796
+ # resp.errors[0].message #=> String
797
+ # @overload delete_objects(params = {})
798
+ # @param [Hash] params ({})
799
+ def delete_objects(params = {}, options = {})
800
+ req = build_request(:delete_objects, params)
801
+ req.send_request(options)
802
+ end
803
+
804
+ # Returns the accelerate configuration of a bucket.
805
+ # @option params [required, String] :bucket
806
+ # Name of the bucket for which the accelerate configuration is
807
+ # retrieved.
808
+ # @return [Types::GetBucketAccelerateConfigurationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
809
+ #
810
+ # * {Types::GetBucketAccelerateConfigurationOutput#status #Status} => String
811
+ #
812
+ # @example Request syntax with placeholder values
813
+ # resp = client.get_bucket_accelerate_configuration({
814
+ # bucket: "BucketName", # required
815
+ # })
816
+ #
817
+ # @example Response structure
818
+ # resp.status #=> String, one of "Enabled", "Suspended"
819
+ # @overload get_bucket_accelerate_configuration(params = {})
820
+ # @param [Hash] params ({})
821
+ def get_bucket_accelerate_configuration(params = {}, options = {})
822
+ req = build_request(:get_bucket_accelerate_configuration, params)
823
+ req.send_request(options)
824
+ end
825
+
826
+ # Gets the access control policy for the bucket.
827
+ # @option params [required, String] :bucket
828
+ # @return [Types::GetBucketAclOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
829
+ #
830
+ # * {Types::GetBucketAclOutput#owner #Owner} => Types::Owner
831
+ # * {Types::GetBucketAclOutput#grants #Grants} => Array&lt;Types::Grant&gt;
832
+ #
833
+ # @example Request syntax with placeholder values
834
+ # resp = client.get_bucket_acl({
835
+ # bucket: "BucketName", # required
836
+ # })
837
+ #
838
+ # @example Response structure
839
+ # resp.owner.display_name #=> String
840
+ # resp.owner.id #=> String
841
+ # resp.grants #=> Array
842
+ # resp.grants[0].grantee.display_name #=> String
843
+ # resp.grants[0].grantee.email_address #=> String
844
+ # resp.grants[0].grantee.id #=> String
845
+ # resp.grants[0].grantee.type #=> String, one of "CanonicalUser", "AmazonCustomerByEmail", "Group"
846
+ # resp.grants[0].grantee.uri #=> String
847
+ # resp.grants[0].permission #=> String, one of "FULL_CONTROL", "WRITE", "WRITE_ACP", "READ", "READ_ACP"
848
+ # @overload get_bucket_acl(params = {})
849
+ # @param [Hash] params ({})
850
+ def get_bucket_acl(params = {}, options = {})
851
+ req = build_request(:get_bucket_acl, params)
852
+ req.send_request(options)
853
+ end
854
+
855
+ # Returns the cors configuration for the bucket.
856
+ # @option params [required, String] :bucket
857
+ # @return [Types::GetBucketCorsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
858
+ #
859
+ # * {Types::GetBucketCorsOutput#cors_rules #CORSRules} => Array&lt;Types::CORSRule&gt;
860
+ #
861
+ # @example Request syntax with placeholder values
862
+ # resp = client.get_bucket_cors({
863
+ # bucket: "BucketName", # required
864
+ # })
865
+ #
866
+ # @example Response structure
867
+ # resp.cors_rules #=> Array
868
+ # resp.cors_rules[0].allowed_headers #=> Array
869
+ # resp.cors_rules[0].allowed_headers[0] #=> String
870
+ # resp.cors_rules[0].allowed_methods #=> Array
871
+ # resp.cors_rules[0].allowed_methods[0] #=> String
872
+ # resp.cors_rules[0].allowed_origins #=> Array
873
+ # resp.cors_rules[0].allowed_origins[0] #=> String
874
+ # resp.cors_rules[0].expose_headers #=> Array
875
+ # resp.cors_rules[0].expose_headers[0] #=> String
876
+ # resp.cors_rules[0].max_age_seconds #=> Integer
877
+ # @overload get_bucket_cors(params = {})
878
+ # @param [Hash] params ({})
879
+ def get_bucket_cors(params = {}, options = {})
880
+ req = build_request(:get_bucket_cors, params)
881
+ req.send_request(options)
882
+ end
883
+
884
+ # Deprecated, see the GetBucketLifecycleConfiguration operation.
885
+ # @option params [required, String] :bucket
886
+ # @return [Types::GetBucketLifecycleOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
887
+ #
888
+ # * {Types::GetBucketLifecycleOutput#rules #Rules} => Array&lt;Types::Rule&gt;
889
+ #
890
+ # @example Request syntax with placeholder values
891
+ # resp = client.get_bucket_lifecycle({
892
+ # bucket: "BucketName", # required
893
+ # })
894
+ #
895
+ # @example Response structure
896
+ # resp.rules #=> Array
897
+ # resp.rules[0].expiration.date #=> Time
898
+ # resp.rules[0].expiration.days #=> Integer
899
+ # resp.rules[0].expiration.expired_object_delete_marker #=> Boolean
900
+ # resp.rules[0].id #=> String
901
+ # resp.rules[0].prefix #=> String
902
+ # resp.rules[0].status #=> String, one of "Enabled", "Disabled"
903
+ # resp.rules[0].transition.date #=> Time
904
+ # resp.rules[0].transition.days #=> Integer
905
+ # resp.rules[0].transition.storage_class #=> String, one of "GLACIER", "STANDARD_IA"
906
+ # resp.rules[0].noncurrent_version_transition.noncurrent_days #=> Integer
907
+ # resp.rules[0].noncurrent_version_transition.storage_class #=> String, one of "GLACIER", "STANDARD_IA"
908
+ # resp.rules[0].noncurrent_version_expiration.noncurrent_days #=> Integer
909
+ # resp.rules[0].abort_incomplete_multipart_upload.days_after_initiation #=> Integer
910
+ # @overload get_bucket_lifecycle(params = {})
911
+ # @param [Hash] params ({})
912
+ def get_bucket_lifecycle(params = {}, options = {})
913
+ req = build_request(:get_bucket_lifecycle, params)
914
+ req.send_request(options)
915
+ end
916
+
917
+ # Returns the lifecycle configuration information set on the bucket.
918
+ # @option params [required, String] :bucket
919
+ # @return [Types::GetBucketLifecycleConfigurationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
920
+ #
921
+ # * {Types::GetBucketLifecycleConfigurationOutput#rules #Rules} => Array&lt;Types::LifecycleRule&gt;
922
+ #
923
+ # @example Request syntax with placeholder values
924
+ # resp = client.get_bucket_lifecycle_configuration({
925
+ # bucket: "BucketName", # required
926
+ # })
927
+ #
928
+ # @example Response structure
929
+ # resp.rules #=> Array
930
+ # resp.rules[0].expiration.date #=> Time
931
+ # resp.rules[0].expiration.days #=> Integer
932
+ # resp.rules[0].expiration.expired_object_delete_marker #=> Boolean
933
+ # resp.rules[0].id #=> String
934
+ # resp.rules[0].prefix #=> String
935
+ # resp.rules[0].status #=> String, one of "Enabled", "Disabled"
936
+ # resp.rules[0].transitions #=> Array
937
+ # resp.rules[0].transitions[0].date #=> Time
938
+ # resp.rules[0].transitions[0].days #=> Integer
939
+ # resp.rules[0].transitions[0].storage_class #=> String, one of "GLACIER", "STANDARD_IA"
940
+ # resp.rules[0].noncurrent_version_transitions #=> Array
941
+ # resp.rules[0].noncurrent_version_transitions[0].noncurrent_days #=> Integer
942
+ # resp.rules[0].noncurrent_version_transitions[0].storage_class #=> String, one of "GLACIER", "STANDARD_IA"
943
+ # resp.rules[0].noncurrent_version_expiration.noncurrent_days #=> Integer
944
+ # resp.rules[0].abort_incomplete_multipart_upload.days_after_initiation #=> Integer
945
+ # @overload get_bucket_lifecycle_configuration(params = {})
946
+ # @param [Hash] params ({})
947
+ def get_bucket_lifecycle_configuration(params = {}, options = {})
948
+ req = build_request(:get_bucket_lifecycle_configuration, params)
949
+ req.send_request(options)
950
+ end
951
+
952
+ # Returns the region the bucket resides in.
953
+ # @option params [required, String] :bucket
954
+ # @return [Types::GetBucketLocationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
955
+ #
956
+ # * {Types::GetBucketLocationOutput#location_constraint #LocationConstraint} => String
957
+ #
958
+ # @example Request syntax with placeholder values
959
+ # resp = client.get_bucket_location({
960
+ # bucket: "BucketName", # required
961
+ # })
962
+ #
963
+ # @example Response structure
964
+ # resp.location_constraint #=> String, one of "EU", "eu-west-1", "us-west-1", "us-west-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "sa-east-1", "cn-north-1", "eu-central-1"
965
+ # @overload get_bucket_location(params = {})
966
+ # @param [Hash] params ({})
967
+ def get_bucket_location(params = {}, options = {})
968
+ req = build_request(:get_bucket_location, params)
969
+ req.send_request(options)
970
+ end
971
+
972
+ # Returns the logging status of a bucket and the permissions users have
973
+ # to view and modify that status. To use GET, you must be the bucket
974
+ # owner.
975
+ # @option params [required, String] :bucket
976
+ # @return [Types::GetBucketLoggingOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
977
+ #
978
+ # * {Types::GetBucketLoggingOutput#logging_enabled #LoggingEnabled} => Types::LoggingEnabled
979
+ #
980
+ # @example Request syntax with placeholder values
981
+ # resp = client.get_bucket_logging({
982
+ # bucket: "BucketName", # required
983
+ # })
984
+ #
985
+ # @example Response structure
986
+ # resp.logging_enabled.target_bucket #=> String
987
+ # resp.logging_enabled.target_grants #=> Array
988
+ # resp.logging_enabled.target_grants[0].grantee.display_name #=> String
989
+ # resp.logging_enabled.target_grants[0].grantee.email_address #=> String
990
+ # resp.logging_enabled.target_grants[0].grantee.id #=> String
991
+ # resp.logging_enabled.target_grants[0].grantee.type #=> String, one of "CanonicalUser", "AmazonCustomerByEmail", "Group"
992
+ # resp.logging_enabled.target_grants[0].grantee.uri #=> String
993
+ # resp.logging_enabled.target_grants[0].permission #=> String, one of "FULL_CONTROL", "READ", "WRITE"
994
+ # resp.logging_enabled.target_prefix #=> String
995
+ # @overload get_bucket_logging(params = {})
996
+ # @param [Hash] params ({})
997
+ def get_bucket_logging(params = {}, options = {})
998
+ req = build_request(:get_bucket_logging, params)
999
+ req.send_request(options)
1000
+ end
1001
+
1002
+ # Deprecated, see the GetBucketNotificationConfiguration operation.
1003
+ # @option params [required, String] :bucket
1004
+ # Name of the bucket to get the notification configuration for.
1005
+ # @return [Types::NotificationConfigurationDeprecated] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1006
+ #
1007
+ # * {Types::NotificationConfigurationDeprecated#topic_configuration #TopicConfiguration} => Types::TopicConfigurationDeprecated
1008
+ # * {Types::NotificationConfigurationDeprecated#queue_configuration #QueueConfiguration} => Types::QueueConfigurationDeprecated
1009
+ # * {Types::NotificationConfigurationDeprecated#cloud_function_configuration #CloudFunctionConfiguration} => Types::CloudFunctionConfiguration
1010
+ #
1011
+ # @example Request syntax with placeholder values
1012
+ # resp = client.get_bucket_notification({
1013
+ # bucket: "BucketName", # required
1014
+ # })
1015
+ #
1016
+ # @example Response structure
1017
+ # resp.topic_configuration.id #=> String
1018
+ # resp.topic_configuration.events #=> Array
1019
+ # resp.topic_configuration.events[0] #=> String, one of "s3:ReducedRedundancyLostObject", "s3:ObjectCreated:*", "s3:ObjectCreated:Put", "s3:ObjectCreated:Post", "s3:ObjectCreated:Copy", "s3:ObjectCreated:CompleteMultipartUpload", "s3:ObjectRemoved:*", "s3:ObjectRemoved:Delete", "s3:ObjectRemoved:DeleteMarkerCreated"
1020
+ # resp.topic_configuration.event #=> String, one of "s3:ReducedRedundancyLostObject", "s3:ObjectCreated:*", "s3:ObjectCreated:Put", "s3:ObjectCreated:Post", "s3:ObjectCreated:Copy", "s3:ObjectCreated:CompleteMultipartUpload", "s3:ObjectRemoved:*", "s3:ObjectRemoved:Delete", "s3:ObjectRemoved:DeleteMarkerCreated"
1021
+ # resp.topic_configuration.topic #=> String
1022
+ # resp.queue_configuration.id #=> String
1023
+ # resp.queue_configuration.event #=> String, one of "s3:ReducedRedundancyLostObject", "s3:ObjectCreated:*", "s3:ObjectCreated:Put", "s3:ObjectCreated:Post", "s3:ObjectCreated:Copy", "s3:ObjectCreated:CompleteMultipartUpload", "s3:ObjectRemoved:*", "s3:ObjectRemoved:Delete", "s3:ObjectRemoved:DeleteMarkerCreated"
1024
+ # resp.queue_configuration.events #=> Array
1025
+ # resp.queue_configuration.events[0] #=> String, one of "s3:ReducedRedundancyLostObject", "s3:ObjectCreated:*", "s3:ObjectCreated:Put", "s3:ObjectCreated:Post", "s3:ObjectCreated:Copy", "s3:ObjectCreated:CompleteMultipartUpload", "s3:ObjectRemoved:*", "s3:ObjectRemoved:Delete", "s3:ObjectRemoved:DeleteMarkerCreated"
1026
+ # resp.queue_configuration.queue #=> String
1027
+ # resp.cloud_function_configuration.id #=> String
1028
+ # resp.cloud_function_configuration.event #=> String, one of "s3:ReducedRedundancyLostObject", "s3:ObjectCreated:*", "s3:ObjectCreated:Put", "s3:ObjectCreated:Post", "s3:ObjectCreated:Copy", "s3:ObjectCreated:CompleteMultipartUpload", "s3:ObjectRemoved:*", "s3:ObjectRemoved:Delete", "s3:ObjectRemoved:DeleteMarkerCreated"
1029
+ # resp.cloud_function_configuration.events #=> Array
1030
+ # resp.cloud_function_configuration.events[0] #=> String, one of "s3:ReducedRedundancyLostObject", "s3:ObjectCreated:*", "s3:ObjectCreated:Put", "s3:ObjectCreated:Post", "s3:ObjectCreated:Copy", "s3:ObjectCreated:CompleteMultipartUpload", "s3:ObjectRemoved:*", "s3:ObjectRemoved:Delete", "s3:ObjectRemoved:DeleteMarkerCreated"
1031
+ # resp.cloud_function_configuration.cloud_function #=> String
1032
+ # resp.cloud_function_configuration.invocation_role #=> String
1033
+ # @overload get_bucket_notification(params = {})
1034
+ # @param [Hash] params ({})
1035
+ def get_bucket_notification(params = {}, options = {})
1036
+ req = build_request(:get_bucket_notification, params)
1037
+ req.send_request(options)
1038
+ end
1039
+
1040
+ # Returns the notification configuration of a bucket.
1041
+ # @option params [required, String] :bucket
1042
+ # Name of the bucket to get the notification configuration for.
1043
+ # @return [Types::NotificationConfiguration] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1044
+ #
1045
+ # * {Types::NotificationConfiguration#topic_configurations #TopicConfigurations} => Array&lt;Types::TopicConfiguration&gt;
1046
+ # * {Types::NotificationConfiguration#queue_configurations #QueueConfigurations} => Array&lt;Types::QueueConfiguration&gt;
1047
+ # * {Types::NotificationConfiguration#lambda_function_configurations #LambdaFunctionConfigurations} => Array&lt;Types::LambdaFunctionConfiguration&gt;
1048
+ #
1049
+ # @example Request syntax with placeholder values
1050
+ # resp = client.get_bucket_notification_configuration({
1051
+ # bucket: "BucketName", # required
1052
+ # })
1053
+ #
1054
+ # @example Response structure
1055
+ # resp.topic_configurations #=> Array
1056
+ # resp.topic_configurations[0].id #=> String
1057
+ # resp.topic_configurations[0].topic_arn #=> String
1058
+ # resp.topic_configurations[0].events #=> Array
1059
+ # resp.topic_configurations[0].events[0] #=> String, one of "s3:ReducedRedundancyLostObject", "s3:ObjectCreated:*", "s3:ObjectCreated:Put", "s3:ObjectCreated:Post", "s3:ObjectCreated:Copy", "s3:ObjectCreated:CompleteMultipartUpload", "s3:ObjectRemoved:*", "s3:ObjectRemoved:Delete", "s3:ObjectRemoved:DeleteMarkerCreated"
1060
+ # resp.topic_configurations[0].filter.key.filter_rules #=> Array
1061
+ # resp.topic_configurations[0].filter.key.filter_rules[0].name #=> String, one of "prefix", "suffix"
1062
+ # resp.topic_configurations[0].filter.key.filter_rules[0].value #=> String
1063
+ # resp.queue_configurations #=> Array
1064
+ # resp.queue_configurations[0].id #=> String
1065
+ # resp.queue_configurations[0].queue_arn #=> String
1066
+ # resp.queue_configurations[0].events #=> Array
1067
+ # resp.queue_configurations[0].events[0] #=> String, one of "s3:ReducedRedundancyLostObject", "s3:ObjectCreated:*", "s3:ObjectCreated:Put", "s3:ObjectCreated:Post", "s3:ObjectCreated:Copy", "s3:ObjectCreated:CompleteMultipartUpload", "s3:ObjectRemoved:*", "s3:ObjectRemoved:Delete", "s3:ObjectRemoved:DeleteMarkerCreated"
1068
+ # resp.queue_configurations[0].filter.key.filter_rules #=> Array
1069
+ # resp.queue_configurations[0].filter.key.filter_rules[0].name #=> String, one of "prefix", "suffix"
1070
+ # resp.queue_configurations[0].filter.key.filter_rules[0].value #=> String
1071
+ # resp.lambda_function_configurations #=> Array
1072
+ # resp.lambda_function_configurations[0].id #=> String
1073
+ # resp.lambda_function_configurations[0].lambda_function_arn #=> String
1074
+ # resp.lambda_function_configurations[0].events #=> Array
1075
+ # resp.lambda_function_configurations[0].events[0] #=> String, one of "s3:ReducedRedundancyLostObject", "s3:ObjectCreated:*", "s3:ObjectCreated:Put", "s3:ObjectCreated:Post", "s3:ObjectCreated:Copy", "s3:ObjectCreated:CompleteMultipartUpload", "s3:ObjectRemoved:*", "s3:ObjectRemoved:Delete", "s3:ObjectRemoved:DeleteMarkerCreated"
1076
+ # resp.lambda_function_configurations[0].filter.key.filter_rules #=> Array
1077
+ # resp.lambda_function_configurations[0].filter.key.filter_rules[0].name #=> String, one of "prefix", "suffix"
1078
+ # resp.lambda_function_configurations[0].filter.key.filter_rules[0].value #=> String
1079
+ # @overload get_bucket_notification_configuration(params = {})
1080
+ # @param [Hash] params ({})
1081
+ def get_bucket_notification_configuration(params = {}, options = {})
1082
+ req = build_request(:get_bucket_notification_configuration, params)
1083
+ req.send_request(options)
1084
+ end
1085
+
1086
+ # Returns the policy of a specified bucket.
1087
+ # @option params [required, String] :bucket
1088
+ # @return [Types::GetBucketPolicyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1089
+ #
1090
+ # * {Types::GetBucketPolicyOutput#policy #Policy} => String
1091
+ #
1092
+ # @example Request syntax with placeholder values
1093
+ # resp = client.get_bucket_policy({
1094
+ # bucket: "BucketName", # required
1095
+ # })
1096
+ #
1097
+ # @example Response structure
1098
+ # resp.policy #=> String
1099
+ # @overload get_bucket_policy(params = {})
1100
+ # @param [Hash] params ({})
1101
+ def get_bucket_policy(params = {}, options = {})
1102
+ req = build_request(:get_bucket_policy, params)
1103
+ req.send_request(options)
1104
+ end
1105
+
1106
+ # Returns the replication configuration of a bucket.
1107
+ # @option params [required, String] :bucket
1108
+ # @return [Types::GetBucketReplicationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1109
+ #
1110
+ # * {Types::GetBucketReplicationOutput#replication_configuration #ReplicationConfiguration} => Types::ReplicationConfiguration
1111
+ #
1112
+ # @example Request syntax with placeholder values
1113
+ # resp = client.get_bucket_replication({
1114
+ # bucket: "BucketName", # required
1115
+ # })
1116
+ #
1117
+ # @example Response structure
1118
+ # resp.replication_configuration.role #=> String
1119
+ # resp.replication_configuration.rules #=> Array
1120
+ # resp.replication_configuration.rules[0].id #=> String
1121
+ # resp.replication_configuration.rules[0].prefix #=> String
1122
+ # resp.replication_configuration.rules[0].status #=> String, one of "Enabled", "Disabled"
1123
+ # resp.replication_configuration.rules[0].destination.bucket #=> String
1124
+ # resp.replication_configuration.rules[0].destination.storage_class #=> String, one of "STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA"
1125
+ # @overload get_bucket_replication(params = {})
1126
+ # @param [Hash] params ({})
1127
+ def get_bucket_replication(params = {}, options = {})
1128
+ req = build_request(:get_bucket_replication, params)
1129
+ req.send_request(options)
1130
+ end
1131
+
1132
+ # Returns the request payment configuration of a bucket.
1133
+ # @option params [required, String] :bucket
1134
+ # @return [Types::GetBucketRequestPaymentOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1135
+ #
1136
+ # * {Types::GetBucketRequestPaymentOutput#payer #Payer} => String
1137
+ #
1138
+ # @example Request syntax with placeholder values
1139
+ # resp = client.get_bucket_request_payment({
1140
+ # bucket: "BucketName", # required
1141
+ # })
1142
+ #
1143
+ # @example Response structure
1144
+ # resp.payer #=> String, one of "Requester", "BucketOwner"
1145
+ # @overload get_bucket_request_payment(params = {})
1146
+ # @param [Hash] params ({})
1147
+ def get_bucket_request_payment(params = {}, options = {})
1148
+ req = build_request(:get_bucket_request_payment, params)
1149
+ req.send_request(options)
1150
+ end
1151
+
1152
+ # Returns the tag set associated with the bucket.
1153
+ # @option params [required, String] :bucket
1154
+ # @return [Types::GetBucketTaggingOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1155
+ #
1156
+ # * {Types::GetBucketTaggingOutput#tag_set #TagSet} => Array&lt;Types::Tag&gt;
1157
+ #
1158
+ # @example Request syntax with placeholder values
1159
+ # resp = client.get_bucket_tagging({
1160
+ # bucket: "BucketName", # required
1161
+ # })
1162
+ #
1163
+ # @example Response structure
1164
+ # resp.tag_set #=> Array
1165
+ # resp.tag_set[0].key #=> String
1166
+ # resp.tag_set[0].value #=> String
1167
+ # @overload get_bucket_tagging(params = {})
1168
+ # @param [Hash] params ({})
1169
+ def get_bucket_tagging(params = {}, options = {})
1170
+ req = build_request(:get_bucket_tagging, params)
1171
+ req.send_request(options)
1172
+ end
1173
+
1174
+ # Returns the versioning state of a bucket.
1175
+ # @option params [required, String] :bucket
1176
+ # @return [Types::GetBucketVersioningOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1177
+ #
1178
+ # * {Types::GetBucketVersioningOutput#status #Status} => String
1179
+ # * {Types::GetBucketVersioningOutput#mfa_delete #MFADelete} => String
1180
+ #
1181
+ # @example Request syntax with placeholder values
1182
+ # resp = client.get_bucket_versioning({
1183
+ # bucket: "BucketName", # required
1184
+ # })
1185
+ #
1186
+ # @example Response structure
1187
+ # resp.status #=> String, one of "Enabled", "Suspended"
1188
+ # resp.mfa_delete #=> String, one of "Enabled", "Disabled"
1189
+ # @overload get_bucket_versioning(params = {})
1190
+ # @param [Hash] params ({})
1191
+ def get_bucket_versioning(params = {}, options = {})
1192
+ req = build_request(:get_bucket_versioning, params)
1193
+ req.send_request(options)
1194
+ end
1195
+
1196
+ # Returns the website configuration for a bucket.
1197
+ # @option params [required, String] :bucket
1198
+ # @return [Types::GetBucketWebsiteOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1199
+ #
1200
+ # * {Types::GetBucketWebsiteOutput#redirect_all_requests_to #RedirectAllRequestsTo} => Types::RedirectAllRequestsTo
1201
+ # * {Types::GetBucketWebsiteOutput#index_document #IndexDocument} => Types::IndexDocument
1202
+ # * {Types::GetBucketWebsiteOutput#error_document #ErrorDocument} => Types::ErrorDocument
1203
+ # * {Types::GetBucketWebsiteOutput#routing_rules #RoutingRules} => Array&lt;Types::RoutingRule&gt;
1204
+ #
1205
+ # @example Request syntax with placeholder values
1206
+ # resp = client.get_bucket_website({
1207
+ # bucket: "BucketName", # required
1208
+ # })
1209
+ #
1210
+ # @example Response structure
1211
+ # resp.redirect_all_requests_to.host_name #=> String
1212
+ # resp.redirect_all_requests_to.protocol #=> String, one of "http", "https"
1213
+ # resp.index_document.suffix #=> String
1214
+ # resp.error_document.key #=> String
1215
+ # resp.routing_rules #=> Array
1216
+ # resp.routing_rules[0].condition.http_error_code_returned_equals #=> String
1217
+ # resp.routing_rules[0].condition.key_prefix_equals #=> String
1218
+ # resp.routing_rules[0].redirect.host_name #=> String
1219
+ # resp.routing_rules[0].redirect.http_redirect_code #=> String
1220
+ # resp.routing_rules[0].redirect.protocol #=> String, one of "http", "https"
1221
+ # resp.routing_rules[0].redirect.replace_key_prefix_with #=> String
1222
+ # resp.routing_rules[0].redirect.replace_key_with #=> String
1223
+ # @overload get_bucket_website(params = {})
1224
+ # @param [Hash] params ({})
1225
+ def get_bucket_website(params = {}, options = {})
1226
+ req = build_request(:get_bucket_website, params)
1227
+ req.send_request(options)
1228
+ end
1229
+
1230
+ # Retrieves objects from Amazon S3.
1231
+ # @option params [String, IO] :response_target
1232
+ # Where to write response data, file path, or IO object.
1233
+ # @option params [required, String] :bucket
1234
+ # @option params [String] :if_match
1235
+ # Return the object only if its entity tag (ETag) is the same as the one
1236
+ # specified, otherwise return a 412 (precondition failed).
1237
+ # @option params [Time,DateTime,Date,Integer,String] :if_modified_since
1238
+ # Return the object only if it has been modified since the specified
1239
+ # time, otherwise return a 304 (not modified).
1240
+ # @option params [String] :if_none_match
1241
+ # Return the object only if its entity tag (ETag) is different from the
1242
+ # one specified, otherwise return a 304 (not modified).
1243
+ # @option params [Time,DateTime,Date,Integer,String] :if_unmodified_since
1244
+ # Return the object only if it has not been modified since the specified
1245
+ # time, otherwise return a 412 (precondition failed).
1246
+ # @option params [required, String] :key
1247
+ # @option params [String] :range
1248
+ # Downloads the specified range bytes of an object. For more information
1249
+ # about the HTTP Range header, go to
1250
+ # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
1251
+ # @option params [String] :response_cache_control
1252
+ # Sets the Cache-Control header of the response.
1253
+ # @option params [String] :response_content_disposition
1254
+ # Sets the Content-Disposition header of the response
1255
+ # @option params [String] :response_content_encoding
1256
+ # Sets the Content-Encoding header of the response.
1257
+ # @option params [String] :response_content_language
1258
+ # Sets the Content-Language header of the response.
1259
+ # @option params [String] :response_content_type
1260
+ # Sets the Content-Type header of the response.
1261
+ # @option params [Time,DateTime,Date,Integer,String] :response_expires
1262
+ # Sets the Expires header of the response.
1263
+ # @option params [String] :version_id
1264
+ # VersionId used to reference a specific version of the object.
1265
+ # @option params [String] :sse_customer_algorithm
1266
+ # Specifies the algorithm to use to when encrypting the object (e.g.,
1267
+ # AES256).
1268
+ # @option params [String] :sse_customer_key
1269
+ # Specifies the customer-provided encryption key for Amazon S3 to use in
1270
+ # encrypting data. This value is used to store the object and then it is
1271
+ # discarded; Amazon does not store the encryption key. The key must be
1272
+ # appropriate for use with the algorithm specified in the
1273
+ # x-amz-server-side​-encryption​-customer-algorithm header.
1274
+ # @option params [String] :sse_customer_key_md5
1275
+ # Specifies the 128-bit MD5 digest of the encryption key according to
1276
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
1277
+ # ensure the encryption key was transmitted without error.
1278
+ # @option params [String] :request_payer
1279
+ # Confirms that the requester knows that she or he will be charged for
1280
+ # the request. Bucket owners need not specify this parameter in their
1281
+ # requests. Documentation on downloading objects from requester pays
1282
+ # buckets can be found at
1283
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1284
+ # @option params [Integer] :part_number
1285
+ # Part number of the object being read. This is a positive integer
1286
+ # between 1 and 10,000. Effectively performs a 'ranged' GET request
1287
+ # for the part specified. Useful for downloading just a part of an
1288
+ # object.
1289
+ # @return [Types::GetObjectOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1290
+ #
1291
+ # * {Types::GetObjectOutput#body #Body} => IO
1292
+ # * {Types::GetObjectOutput#delete_marker #DeleteMarker} => Boolean
1293
+ # * {Types::GetObjectOutput#accept_ranges #AcceptRanges} => String
1294
+ # * {Types::GetObjectOutput#expiration #Expiration} => String
1295
+ # * {Types::GetObjectOutput#restore #Restore} => String
1296
+ # * {Types::GetObjectOutput#last_modified #LastModified} => Time
1297
+ # * {Types::GetObjectOutput#content_length #ContentLength} => Integer
1298
+ # * {Types::GetObjectOutput#etag #ETag} => String
1299
+ # * {Types::GetObjectOutput#missing_meta #MissingMeta} => Integer
1300
+ # * {Types::GetObjectOutput#version_id #VersionId} => String
1301
+ # * {Types::GetObjectOutput#cache_control #CacheControl} => String
1302
+ # * {Types::GetObjectOutput#content_disposition #ContentDisposition} => String
1303
+ # * {Types::GetObjectOutput#content_encoding #ContentEncoding} => String
1304
+ # * {Types::GetObjectOutput#content_language #ContentLanguage} => String
1305
+ # * {Types::GetObjectOutput#content_range #ContentRange} => String
1306
+ # * {Types::GetObjectOutput#content_type #ContentType} => String
1307
+ # * {Types::GetObjectOutput#expires #Expires} => Time
1308
+ # * {Types::GetObjectOutput#expires_string #ExpiresString} => String
1309
+ # * {Types::GetObjectOutput#website_redirect_location #WebsiteRedirectLocation} => String
1310
+ # * {Types::GetObjectOutput#server_side_encryption #ServerSideEncryption} => String
1311
+ # * {Types::GetObjectOutput#metadata #Metadata} => Hash&lt;String,String&gt;
1312
+ # * {Types::GetObjectOutput#sse_customer_algorithm #SSECustomerAlgorithm} => String
1313
+ # * {Types::GetObjectOutput#sse_customer_key_md5 #SSECustomerKeyMD5} => String
1314
+ # * {Types::GetObjectOutput#ssekms_key_id #SSEKMSKeyId} => String
1315
+ # * {Types::GetObjectOutput#storage_class #StorageClass} => String
1316
+ # * {Types::GetObjectOutput#request_charged #RequestCharged} => String
1317
+ # * {Types::GetObjectOutput#replication_status #ReplicationStatus} => String
1318
+ # * {Types::GetObjectOutput#parts_count #PartsCount} => Integer
1319
+ #
1320
+ # @example Download an object to disk
1321
+ # # stream object directly to disk
1322
+ # resp = s3.get_object(
1323
+ # response_target: '/path/to/file',
1324
+ # bucket: 'bucket-name',
1325
+ # key: 'object-key')
1326
+ #
1327
+ # # you can still access other response data
1328
+ # resp.metadata #=> { ... }
1329
+ # resp.etag #=> "..."
1330
+ #
1331
+ # @example Download object into memory
1332
+ # # omit :response_target to download to a StringIO in memory
1333
+ # resp = s3.get_object(bucket: 'bucket-name', key: 'object-key')
1334
+ #
1335
+ # # call #read or #string on the response body
1336
+ # resp.body.read
1337
+ # #=> '...'
1338
+ #
1339
+ # @example Streaming data to a block
1340
+ # # WARNING: yielding data to a block disables retries of networking errors
1341
+ # File.open('/path/to/file', 'wb') do |file|
1342
+ # s3.get_object(bucket: 'bucket-name', key: 'object-key') do |chunk|
1343
+ # file.write(chunk)
1344
+ # end
1345
+ # end
1346
+ #
1347
+ # @example Request syntax with placeholder values
1348
+ # resp = client.get_object({
1349
+ # bucket: "BucketName", # required
1350
+ # if_match: "IfMatch",
1351
+ # if_modified_since: Time.now,
1352
+ # if_none_match: "IfNoneMatch",
1353
+ # if_unmodified_since: Time.now,
1354
+ # key: "ObjectKey", # required
1355
+ # range: "Range",
1356
+ # response_cache_control: "ResponseCacheControl",
1357
+ # response_content_disposition: "ResponseContentDisposition",
1358
+ # response_content_encoding: "ResponseContentEncoding",
1359
+ # response_content_language: "ResponseContentLanguage",
1360
+ # response_content_type: "ResponseContentType",
1361
+ # response_expires: Time.now,
1362
+ # version_id: "ObjectVersionId",
1363
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
1364
+ # sse_customer_key: "SSECustomerKey",
1365
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
1366
+ # request_payer: "requester", # accepts requester
1367
+ # part_number: 1,
1368
+ # })
1369
+ #
1370
+ # @example Response structure
1371
+ # resp.body #=> IO
1372
+ # resp.delete_marker #=> Boolean
1373
+ # resp.accept_ranges #=> String
1374
+ # resp.expiration #=> String
1375
+ # resp.restore #=> String
1376
+ # resp.last_modified #=> Time
1377
+ # resp.content_length #=> Integer
1378
+ # resp.etag #=> String
1379
+ # resp.missing_meta #=> Integer
1380
+ # resp.version_id #=> String
1381
+ # resp.cache_control #=> String
1382
+ # resp.content_disposition #=> String
1383
+ # resp.content_encoding #=> String
1384
+ # resp.content_language #=> String
1385
+ # resp.content_range #=> String
1386
+ # resp.content_type #=> String
1387
+ # resp.expires #=> Time
1388
+ # resp.expires_string #=> String
1389
+ # resp.website_redirect_location #=> String
1390
+ # resp.server_side_encryption #=> String, one of "AES256", "aws:kms"
1391
+ # resp.metadata #=> Hash
1392
+ # resp.metadata["MetadataKey"] #=> String
1393
+ # resp.sse_customer_algorithm #=> String
1394
+ # resp.sse_customer_key_md5 #=> String
1395
+ # resp.ssekms_key_id #=> String
1396
+ # resp.storage_class #=> String, one of "STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA"
1397
+ # resp.request_charged #=> String, one of "requester"
1398
+ # resp.replication_status #=> String, one of "COMPLETE", "PENDING", "FAILED", "REPLICA"
1399
+ # resp.parts_count #=> Integer
1400
+ # @overload get_object(params = {})
1401
+ # @param [Hash] params ({})
1402
+ def get_object(params = {}, options = {})
1403
+ req = build_request(:get_object, params)
1404
+ req.send_request(options)
1405
+ end
1406
+
1407
+ # Returns the access control list (ACL) of an object.
1408
+ # @option params [required, String] :bucket
1409
+ # @option params [required, String] :key
1410
+ # @option params [String] :version_id
1411
+ # VersionId used to reference a specific version of the object.
1412
+ # @option params [String] :request_payer
1413
+ # Confirms that the requester knows that she or he will be charged for
1414
+ # the request. Bucket owners need not specify this parameter in their
1415
+ # requests. Documentation on downloading objects from requester pays
1416
+ # buckets can be found at
1417
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1418
+ # @return [Types::GetObjectAclOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1419
+ #
1420
+ # * {Types::GetObjectAclOutput#owner #Owner} => Types::Owner
1421
+ # * {Types::GetObjectAclOutput#grants #Grants} => Array&lt;Types::Grant&gt;
1422
+ # * {Types::GetObjectAclOutput#request_charged #RequestCharged} => String
1423
+ #
1424
+ # @example Request syntax with placeholder values
1425
+ # resp = client.get_object_acl({
1426
+ # bucket: "BucketName", # required
1427
+ # key: "ObjectKey", # required
1428
+ # version_id: "ObjectVersionId",
1429
+ # request_payer: "requester", # accepts requester
1430
+ # })
1431
+ #
1432
+ # @example Response structure
1433
+ # resp.owner.display_name #=> String
1434
+ # resp.owner.id #=> String
1435
+ # resp.grants #=> Array
1436
+ # resp.grants[0].grantee.display_name #=> String
1437
+ # resp.grants[0].grantee.email_address #=> String
1438
+ # resp.grants[0].grantee.id #=> String
1439
+ # resp.grants[0].grantee.type #=> String, one of "CanonicalUser", "AmazonCustomerByEmail", "Group"
1440
+ # resp.grants[0].grantee.uri #=> String
1441
+ # resp.grants[0].permission #=> String, one of "FULL_CONTROL", "WRITE", "WRITE_ACP", "READ", "READ_ACP"
1442
+ # resp.request_charged #=> String, one of "requester"
1443
+ # @overload get_object_acl(params = {})
1444
+ # @param [Hash] params ({})
1445
+ def get_object_acl(params = {}, options = {})
1446
+ req = build_request(:get_object_acl, params)
1447
+ req.send_request(options)
1448
+ end
1449
+
1450
+ # Return torrent files from a bucket.
1451
+ # @option params [String, IO] :response_target
1452
+ # Where to write response data, file path, or IO object.
1453
+ # @option params [required, String] :bucket
1454
+ # @option params [required, String] :key
1455
+ # @option params [String] :request_payer
1456
+ # Confirms that the requester knows that she or he will be charged for
1457
+ # the request. Bucket owners need not specify this parameter in their
1458
+ # requests. Documentation on downloading objects from requester pays
1459
+ # buckets can be found at
1460
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1461
+ # @return [Types::GetObjectTorrentOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1462
+ #
1463
+ # * {Types::GetObjectTorrentOutput#body #Body} => IO
1464
+ # * {Types::GetObjectTorrentOutput#request_charged #RequestCharged} => String
1465
+ #
1466
+ # @example Request syntax with placeholder values
1467
+ # resp = client.get_object_torrent({
1468
+ # bucket: "BucketName", # required
1469
+ # key: "ObjectKey", # required
1470
+ # request_payer: "requester", # accepts requester
1471
+ # })
1472
+ #
1473
+ # @example Response structure
1474
+ # resp.body #=> IO
1475
+ # resp.request_charged #=> String, one of "requester"
1476
+ # @overload get_object_torrent(params = {})
1477
+ # @param [Hash] params ({})
1478
+ def get_object_torrent(params = {}, options = {})
1479
+ req = build_request(:get_object_torrent, params)
1480
+ req.send_request(options)
1481
+ end
1482
+
1483
+ # This operation is useful to determine if a bucket exists and you have
1484
+ # permission to access it.
1485
+ # @option params [required, String] :bucket
1486
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1487
+ #
1488
+ # @example Request syntax with placeholder values
1489
+ # resp = client.head_bucket({
1490
+ # bucket: "BucketName", # required
1491
+ # })
1492
+ # @overload head_bucket(params = {})
1493
+ # @param [Hash] params ({})
1494
+ def head_bucket(params = {}, options = {})
1495
+ req = build_request(:head_bucket, params)
1496
+ req.send_request(options)
1497
+ end
1498
+
1499
+ # The HEAD operation retrieves metadata from an object without returning
1500
+ # the object itself. This operation is useful if you're only interested
1501
+ # in an object's metadata. To use HEAD, you must have READ access to
1502
+ # the object.
1503
+ # @option params [required, String] :bucket
1504
+ # @option params [String] :if_match
1505
+ # Return the object only if its entity tag (ETag) is the same as the one
1506
+ # specified, otherwise return a 412 (precondition failed).
1507
+ # @option params [Time,DateTime,Date,Integer,String] :if_modified_since
1508
+ # Return the object only if it has been modified since the specified
1509
+ # time, otherwise return a 304 (not modified).
1510
+ # @option params [String] :if_none_match
1511
+ # Return the object only if its entity tag (ETag) is different from the
1512
+ # one specified, otherwise return a 304 (not modified).
1513
+ # @option params [Time,DateTime,Date,Integer,String] :if_unmodified_since
1514
+ # Return the object only if it has not been modified since the specified
1515
+ # time, otherwise return a 412 (precondition failed).
1516
+ # @option params [required, String] :key
1517
+ # @option params [String] :range
1518
+ # Downloads the specified range bytes of an object. For more information
1519
+ # about the HTTP Range header, go to
1520
+ # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
1521
+ # @option params [String] :version_id
1522
+ # VersionId used to reference a specific version of the object.
1523
+ # @option params [String] :sse_customer_algorithm
1524
+ # Specifies the algorithm to use to when encrypting the object (e.g.,
1525
+ # AES256).
1526
+ # @option params [String] :sse_customer_key
1527
+ # Specifies the customer-provided encryption key for Amazon S3 to use in
1528
+ # encrypting data. This value is used to store the object and then it is
1529
+ # discarded; Amazon does not store the encryption key. The key must be
1530
+ # appropriate for use with the algorithm specified in the
1531
+ # x-amz-server-side​-encryption​-customer-algorithm header.
1532
+ # @option params [String] :sse_customer_key_md5
1533
+ # Specifies the 128-bit MD5 digest of the encryption key according to
1534
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
1535
+ # ensure the encryption key was transmitted without error.
1536
+ # @option params [String] :request_payer
1537
+ # Confirms that the requester knows that she or he will be charged for
1538
+ # the request. Bucket owners need not specify this parameter in their
1539
+ # requests. Documentation on downloading objects from requester pays
1540
+ # buckets can be found at
1541
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1542
+ # @option params [Integer] :part_number
1543
+ # Part number of the object being read. This is a positive integer
1544
+ # between 1 and 10,000. Effectively performs a 'ranged' HEAD request
1545
+ # for the part specified. Useful querying about the size of the part and
1546
+ # the number of parts in this object.
1547
+ # @return [Types::HeadObjectOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1548
+ #
1549
+ # * {Types::HeadObjectOutput#delete_marker #DeleteMarker} => Boolean
1550
+ # * {Types::HeadObjectOutput#accept_ranges #AcceptRanges} => String
1551
+ # * {Types::HeadObjectOutput#expiration #Expiration} => String
1552
+ # * {Types::HeadObjectOutput#restore #Restore} => String
1553
+ # * {Types::HeadObjectOutput#last_modified #LastModified} => Time
1554
+ # * {Types::HeadObjectOutput#content_length #ContentLength} => Integer
1555
+ # * {Types::HeadObjectOutput#etag #ETag} => String
1556
+ # * {Types::HeadObjectOutput#missing_meta #MissingMeta} => Integer
1557
+ # * {Types::HeadObjectOutput#version_id #VersionId} => String
1558
+ # * {Types::HeadObjectOutput#cache_control #CacheControl} => String
1559
+ # * {Types::HeadObjectOutput#content_disposition #ContentDisposition} => String
1560
+ # * {Types::HeadObjectOutput#content_encoding #ContentEncoding} => String
1561
+ # * {Types::HeadObjectOutput#content_language #ContentLanguage} => String
1562
+ # * {Types::HeadObjectOutput#content_type #ContentType} => String
1563
+ # * {Types::HeadObjectOutput#expires #Expires} => Time
1564
+ # * {Types::HeadObjectOutput#expires_string #ExpiresString} => String
1565
+ # * {Types::HeadObjectOutput#website_redirect_location #WebsiteRedirectLocation} => String
1566
+ # * {Types::HeadObjectOutput#server_side_encryption #ServerSideEncryption} => String
1567
+ # * {Types::HeadObjectOutput#metadata #Metadata} => Hash&lt;String,String&gt;
1568
+ # * {Types::HeadObjectOutput#sse_customer_algorithm #SSECustomerAlgorithm} => String
1569
+ # * {Types::HeadObjectOutput#sse_customer_key_md5 #SSECustomerKeyMD5} => String
1570
+ # * {Types::HeadObjectOutput#ssekms_key_id #SSEKMSKeyId} => String
1571
+ # * {Types::HeadObjectOutput#storage_class #StorageClass} => String
1572
+ # * {Types::HeadObjectOutput#request_charged #RequestCharged} => String
1573
+ # * {Types::HeadObjectOutput#replication_status #ReplicationStatus} => String
1574
+ # * {Types::HeadObjectOutput#parts_count #PartsCount} => Integer
1575
+ #
1576
+ # @example Request syntax with placeholder values
1577
+ # resp = client.head_object({
1578
+ # bucket: "BucketName", # required
1579
+ # if_match: "IfMatch",
1580
+ # if_modified_since: Time.now,
1581
+ # if_none_match: "IfNoneMatch",
1582
+ # if_unmodified_since: Time.now,
1583
+ # key: "ObjectKey", # required
1584
+ # range: "Range",
1585
+ # version_id: "ObjectVersionId",
1586
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
1587
+ # sse_customer_key: "SSECustomerKey",
1588
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
1589
+ # request_payer: "requester", # accepts requester
1590
+ # part_number: 1,
1591
+ # })
1592
+ #
1593
+ # @example Response structure
1594
+ # resp.delete_marker #=> Boolean
1595
+ # resp.accept_ranges #=> String
1596
+ # resp.expiration #=> String
1597
+ # resp.restore #=> String
1598
+ # resp.last_modified #=> Time
1599
+ # resp.content_length #=> Integer
1600
+ # resp.etag #=> String
1601
+ # resp.missing_meta #=> Integer
1602
+ # resp.version_id #=> String
1603
+ # resp.cache_control #=> String
1604
+ # resp.content_disposition #=> String
1605
+ # resp.content_encoding #=> String
1606
+ # resp.content_language #=> String
1607
+ # resp.content_type #=> String
1608
+ # resp.expires #=> Time
1609
+ # resp.expires_string #=> String
1610
+ # resp.website_redirect_location #=> String
1611
+ # resp.server_side_encryption #=> String, one of "AES256", "aws:kms"
1612
+ # resp.metadata #=> Hash
1613
+ # resp.metadata["MetadataKey"] #=> String
1614
+ # resp.sse_customer_algorithm #=> String
1615
+ # resp.sse_customer_key_md5 #=> String
1616
+ # resp.ssekms_key_id #=> String
1617
+ # resp.storage_class #=> String, one of "STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA"
1618
+ # resp.request_charged #=> String, one of "requester"
1619
+ # resp.replication_status #=> String, one of "COMPLETE", "PENDING", "FAILED", "REPLICA"
1620
+ # resp.parts_count #=> Integer
1621
+ # @overload head_object(params = {})
1622
+ # @param [Hash] params ({})
1623
+ def head_object(params = {}, options = {})
1624
+ req = build_request(:head_object, params)
1625
+ req.send_request(options)
1626
+ end
1627
+
1628
+ # Returns a list of all buckets owned by the authenticated sender of the
1629
+ # request.
1630
+ # @return [Types::ListBucketsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1631
+ #
1632
+ # * {Types::ListBucketsOutput#buckets #Buckets} => Array&lt;Types::Bucket&gt;
1633
+ # * {Types::ListBucketsOutput#owner #Owner} => Types::Owner
1634
+ #
1635
+ # @example Response structure
1636
+ # resp.buckets #=> Array
1637
+ # resp.buckets[0].name #=> String
1638
+ # resp.buckets[0].creation_date #=> Time
1639
+ # resp.owner.display_name #=> String
1640
+ # resp.owner.id #=> String
1641
+ # @overload list_buckets(params = {})
1642
+ # @param [Hash] params ({})
1643
+ def list_buckets(params = {}, options = {})
1644
+ req = build_request(:list_buckets, params)
1645
+ req.send_request(options)
1646
+ end
1647
+
1648
+ # This operation lists in-progress multipart uploads.
1649
+ # @option params [required, String] :bucket
1650
+ # @option params [String] :delimiter
1651
+ # Character you use to group keys.
1652
+ # @option params [String] :encoding_type
1653
+ # Requests Amazon S3 to encode the object keys in the response and
1654
+ # specifies the encoding method to use. An object key may contain any
1655
+ # Unicode character; however, XML 1.0 parser cannot parse some
1656
+ # characters, such as characters with an ASCII value from 0 to 10. For
1657
+ # characters that are not supported in XML 1.0, you can add this
1658
+ # parameter to request that Amazon S3 encode the keys in the response.
1659
+ # @option params [String] :key_marker
1660
+ # Together with upload-id-marker, this parameter specifies the multipart
1661
+ # upload after which listing should begin.
1662
+ # @option params [Integer] :max_uploads
1663
+ # Sets the maximum number of multipart uploads, from 1 to 1,000, to
1664
+ # return in the response body. 1,000 is the maximum number of uploads
1665
+ # that can be returned in a response.
1666
+ # @option params [String] :prefix
1667
+ # Lists in-progress uploads only for those keys that begin with the
1668
+ # specified prefix.
1669
+ # @option params [String] :upload_id_marker
1670
+ # Together with key-marker, specifies the multipart upload after which
1671
+ # listing should begin. If key-marker is not specified, the
1672
+ # upload-id-marker parameter is ignored.
1673
+ # @return [Types::ListMultipartUploadsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1674
+ #
1675
+ # * {Types::ListMultipartUploadsOutput#bucket #Bucket} => String
1676
+ # * {Types::ListMultipartUploadsOutput#key_marker #KeyMarker} => String
1677
+ # * {Types::ListMultipartUploadsOutput#upload_id_marker #UploadIdMarker} => String
1678
+ # * {Types::ListMultipartUploadsOutput#next_key_marker #NextKeyMarker} => String
1679
+ # * {Types::ListMultipartUploadsOutput#prefix #Prefix} => String
1680
+ # * {Types::ListMultipartUploadsOutput#delimiter #Delimiter} => String
1681
+ # * {Types::ListMultipartUploadsOutput#next_upload_id_marker #NextUploadIdMarker} => String
1682
+ # * {Types::ListMultipartUploadsOutput#max_uploads #MaxUploads} => Integer
1683
+ # * {Types::ListMultipartUploadsOutput#is_truncated #IsTruncated} => Boolean
1684
+ # * {Types::ListMultipartUploadsOutput#uploads #Uploads} => Array&lt;Types::MultipartUpload&gt;
1685
+ # * {Types::ListMultipartUploadsOutput#common_prefixes #CommonPrefixes} => Array&lt;Types::CommonPrefix&gt;
1686
+ # * {Types::ListMultipartUploadsOutput#encoding_type #EncodingType} => String
1687
+ #
1688
+ # @example Request syntax with placeholder values
1689
+ # resp = client.list_multipart_uploads({
1690
+ # bucket: "BucketName", # required
1691
+ # delimiter: "Delimiter",
1692
+ # encoding_type: "url", # accepts url
1693
+ # key_marker: "KeyMarker",
1694
+ # max_uploads: 1,
1695
+ # prefix: "Prefix",
1696
+ # upload_id_marker: "UploadIdMarker",
1697
+ # })
1698
+ #
1699
+ # @example Response structure
1700
+ # resp.bucket #=> String
1701
+ # resp.key_marker #=> String
1702
+ # resp.upload_id_marker #=> String
1703
+ # resp.next_key_marker #=> String
1704
+ # resp.prefix #=> String
1705
+ # resp.delimiter #=> String
1706
+ # resp.next_upload_id_marker #=> String
1707
+ # resp.max_uploads #=> Integer
1708
+ # resp.is_truncated #=> Boolean
1709
+ # resp.uploads #=> Array
1710
+ # resp.uploads[0].upload_id #=> String
1711
+ # resp.uploads[0].key #=> String
1712
+ # resp.uploads[0].initiated #=> Time
1713
+ # resp.uploads[0].storage_class #=> String, one of "STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA"
1714
+ # resp.uploads[0].owner.display_name #=> String
1715
+ # resp.uploads[0].owner.id #=> String
1716
+ # resp.uploads[0].initiator.id #=> String
1717
+ # resp.uploads[0].initiator.display_name #=> String
1718
+ # resp.common_prefixes #=> Array
1719
+ # resp.common_prefixes[0].prefix #=> String
1720
+ # resp.encoding_type #=> String, one of "url"
1721
+ # @overload list_multipart_uploads(params = {})
1722
+ # @param [Hash] params ({})
1723
+ def list_multipart_uploads(params = {}, options = {})
1724
+ req = build_request(:list_multipart_uploads, params)
1725
+ req.send_request(options)
1726
+ end
1727
+
1728
+ # Returns metadata about all of the versions of objects in a bucket.
1729
+ # @option params [required, String] :bucket
1730
+ # @option params [String] :delimiter
1731
+ # A delimiter is a character you use to group keys.
1732
+ # @option params [String] :encoding_type
1733
+ # Requests Amazon S3 to encode the object keys in the response and
1734
+ # specifies the encoding method to use. An object key may contain any
1735
+ # Unicode character; however, XML 1.0 parser cannot parse some
1736
+ # characters, such as characters with an ASCII value from 0 to 10. For
1737
+ # characters that are not supported in XML 1.0, you can add this
1738
+ # parameter to request that Amazon S3 encode the keys in the response.
1739
+ # @option params [String] :key_marker
1740
+ # Specifies the key to start with when listing objects in a bucket.
1741
+ # @option params [Integer] :max_keys
1742
+ # Sets the maximum number of keys returned in the response. The response
1743
+ # might contain fewer keys but will never contain more.
1744
+ # @option params [String] :prefix
1745
+ # Limits the response to keys that begin with the specified prefix.
1746
+ # @option params [String] :version_id_marker
1747
+ # Specifies the object version you want to start listing from.
1748
+ # @return [Types::ListObjectVersionsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1749
+ #
1750
+ # * {Types::ListObjectVersionsOutput#is_truncated #IsTruncated} => Boolean
1751
+ # * {Types::ListObjectVersionsOutput#key_marker #KeyMarker} => String
1752
+ # * {Types::ListObjectVersionsOutput#version_id_marker #VersionIdMarker} => String
1753
+ # * {Types::ListObjectVersionsOutput#next_key_marker #NextKeyMarker} => String
1754
+ # * {Types::ListObjectVersionsOutput#next_version_id_marker #NextVersionIdMarker} => String
1755
+ # * {Types::ListObjectVersionsOutput#versions #Versions} => Array&lt;Types::ObjectVersion&gt;
1756
+ # * {Types::ListObjectVersionsOutput#delete_markers #DeleteMarkers} => Array&lt;Types::DeleteMarkerEntry&gt;
1757
+ # * {Types::ListObjectVersionsOutput#name #Name} => String
1758
+ # * {Types::ListObjectVersionsOutput#prefix #Prefix} => String
1759
+ # * {Types::ListObjectVersionsOutput#delimiter #Delimiter} => String
1760
+ # * {Types::ListObjectVersionsOutput#max_keys #MaxKeys} => Integer
1761
+ # * {Types::ListObjectVersionsOutput#common_prefixes #CommonPrefixes} => Array&lt;Types::CommonPrefix&gt;
1762
+ # * {Types::ListObjectVersionsOutput#encoding_type #EncodingType} => String
1763
+ #
1764
+ # @example Request syntax with placeholder values
1765
+ # resp = client.list_object_versions({
1766
+ # bucket: "BucketName", # required
1767
+ # delimiter: "Delimiter",
1768
+ # encoding_type: "url", # accepts url
1769
+ # key_marker: "KeyMarker",
1770
+ # max_keys: 1,
1771
+ # prefix: "Prefix",
1772
+ # version_id_marker: "VersionIdMarker",
1773
+ # })
1774
+ #
1775
+ # @example Response structure
1776
+ # resp.is_truncated #=> Boolean
1777
+ # resp.key_marker #=> String
1778
+ # resp.version_id_marker #=> String
1779
+ # resp.next_key_marker #=> String
1780
+ # resp.next_version_id_marker #=> String
1781
+ # resp.versions #=> Array
1782
+ # resp.versions[0].etag #=> String
1783
+ # resp.versions[0].size #=> Integer
1784
+ # resp.versions[0].storage_class #=> String, one of "STANDARD"
1785
+ # resp.versions[0].key #=> String
1786
+ # resp.versions[0].version_id #=> String
1787
+ # resp.versions[0].is_latest #=> Boolean
1788
+ # resp.versions[0].last_modified #=> Time
1789
+ # resp.versions[0].owner.display_name #=> String
1790
+ # resp.versions[0].owner.id #=> String
1791
+ # resp.delete_markers #=> Array
1792
+ # resp.delete_markers[0].owner.display_name #=> String
1793
+ # resp.delete_markers[0].owner.id #=> String
1794
+ # resp.delete_markers[0].key #=> String
1795
+ # resp.delete_markers[0].version_id #=> String
1796
+ # resp.delete_markers[0].is_latest #=> Boolean
1797
+ # resp.delete_markers[0].last_modified #=> Time
1798
+ # resp.name #=> String
1799
+ # resp.prefix #=> String
1800
+ # resp.delimiter #=> String
1801
+ # resp.max_keys #=> Integer
1802
+ # resp.common_prefixes #=> Array
1803
+ # resp.common_prefixes[0].prefix #=> String
1804
+ # resp.encoding_type #=> String, one of "url"
1805
+ # @overload list_object_versions(params = {})
1806
+ # @param [Hash] params ({})
1807
+ def list_object_versions(params = {}, options = {})
1808
+ req = build_request(:list_object_versions, params)
1809
+ req.send_request(options)
1810
+ end
1811
+
1812
+ # Returns some or all (up to 1000) of the objects in a bucket. You can
1813
+ # use the request parameters as selection criteria to return a subset of
1814
+ # the objects in a bucket.
1815
+ # @option params [required, String] :bucket
1816
+ # @option params [String] :delimiter
1817
+ # A delimiter is a character you use to group keys.
1818
+ # @option params [String] :encoding_type
1819
+ # Requests Amazon S3 to encode the object keys in the response and
1820
+ # specifies the encoding method to use. An object key may contain any
1821
+ # Unicode character; however, XML 1.0 parser cannot parse some
1822
+ # characters, such as characters with an ASCII value from 0 to 10. For
1823
+ # characters that are not supported in XML 1.0, you can add this
1824
+ # parameter to request that Amazon S3 encode the keys in the response.
1825
+ # @option params [String] :marker
1826
+ # Specifies the key to start with when listing objects in a bucket.
1827
+ # @option params [Integer] :max_keys
1828
+ # Sets the maximum number of keys returned in the response. The response
1829
+ # might contain fewer keys but will never contain more.
1830
+ # @option params [String] :prefix
1831
+ # Limits the response to keys that begin with the specified prefix.
1832
+ # @option params [String] :request_payer
1833
+ # Confirms that the requester knows that she or he will be charged for
1834
+ # the list objects request. Bucket owners need not specify this
1835
+ # parameter in their requests.
1836
+ # @return [Types::ListObjectsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1837
+ #
1838
+ # * {Types::ListObjectsOutput#is_truncated #IsTruncated} => Boolean
1839
+ # * {Types::ListObjectsOutput#marker #Marker} => String
1840
+ # * {Types::ListObjectsOutput#next_marker #NextMarker} => String
1841
+ # * {Types::ListObjectsOutput#contents #Contents} => Array&lt;Types::Object&gt;
1842
+ # * {Types::ListObjectsOutput#name #Name} => String
1843
+ # * {Types::ListObjectsOutput#prefix #Prefix} => String
1844
+ # * {Types::ListObjectsOutput#delimiter #Delimiter} => String
1845
+ # * {Types::ListObjectsOutput#max_keys #MaxKeys} => Integer
1846
+ # * {Types::ListObjectsOutput#common_prefixes #CommonPrefixes} => Array&lt;Types::CommonPrefix&gt;
1847
+ # * {Types::ListObjectsOutput#encoding_type #EncodingType} => String
1848
+ #
1849
+ # @example Request syntax with placeholder values
1850
+ # resp = client.list_objects({
1851
+ # bucket: "BucketName", # required
1852
+ # delimiter: "Delimiter",
1853
+ # encoding_type: "url", # accepts url
1854
+ # marker: "Marker",
1855
+ # max_keys: 1,
1856
+ # prefix: "Prefix",
1857
+ # request_payer: "requester", # accepts requester
1858
+ # })
1859
+ #
1860
+ # @example Response structure
1861
+ # resp.is_truncated #=> Boolean
1862
+ # resp.marker #=> String
1863
+ # resp.next_marker #=> String
1864
+ # resp.contents #=> Array
1865
+ # resp.contents[0].key #=> String
1866
+ # resp.contents[0].last_modified #=> Time
1867
+ # resp.contents[0].etag #=> String
1868
+ # resp.contents[0].size #=> Integer
1869
+ # resp.contents[0].storage_class #=> String, one of "STANDARD", "REDUCED_REDUNDANCY", "GLACIER"
1870
+ # resp.contents[0].owner.display_name #=> String
1871
+ # resp.contents[0].owner.id #=> String
1872
+ # resp.name #=> String
1873
+ # resp.prefix #=> String
1874
+ # resp.delimiter #=> String
1875
+ # resp.max_keys #=> Integer
1876
+ # resp.common_prefixes #=> Array
1877
+ # resp.common_prefixes[0].prefix #=> String
1878
+ # resp.encoding_type #=> String, one of "url"
1879
+ # @overload list_objects(params = {})
1880
+ # @param [Hash] params ({})
1881
+ def list_objects(params = {}, options = {})
1882
+ req = build_request(:list_objects, params)
1883
+ req.send_request(options)
1884
+ end
1885
+
1886
+ # Returns some or all (up to 1000) of the objects in a bucket. You can
1887
+ # use the request parameters as selection criteria to return a subset of
1888
+ # the objects in a bucket. Note: ListObjectsV2 is the revised List
1889
+ # Objects API and we recommend you use this revised API for new
1890
+ # application development.
1891
+ # @option params [required, String] :bucket
1892
+ # Name of the bucket to list.
1893
+ # @option params [String] :delimiter
1894
+ # A delimiter is a character you use to group keys.
1895
+ # @option params [String] :encoding_type
1896
+ # Encoding type used by Amazon S3 to encode object keys in the response.
1897
+ # @option params [Integer] :max_keys
1898
+ # Sets the maximum number of keys returned in the response. The response
1899
+ # might contain fewer keys but will never contain more.
1900
+ # @option params [String] :prefix
1901
+ # Limits the response to keys that begin with the specified prefix.
1902
+ # @option params [String] :continuation_token
1903
+ # ContinuationToken indicates Amazon S3 that the list is being continued
1904
+ # on this bucket with a token. ContinuationToken is obfuscated and is
1905
+ # not a real key
1906
+ # @option params [Boolean] :fetch_owner
1907
+ # The owner field is not present in listV2 by default, if you want to
1908
+ # return owner field with each key in the result then set the fetch
1909
+ # owner field to true
1910
+ # @option params [String] :start_after
1911
+ # StartAfter is where you want Amazon S3 to start listing from. Amazon
1912
+ # S3 starts listing after this specified key. StartAfter can be any key
1913
+ # in the bucket
1914
+ # @option params [String] :request_payer
1915
+ # Confirms that the requester knows that she or he will be charged for
1916
+ # the list objects request in V2 style. Bucket owners need not specify
1917
+ # this parameter in their requests.
1918
+ # @return [Types::ListObjectsV2Output] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1919
+ #
1920
+ # * {Types::ListObjectsV2Output#is_truncated #IsTruncated} => Boolean
1921
+ # * {Types::ListObjectsV2Output#contents #Contents} => Array&lt;Types::Object&gt;
1922
+ # * {Types::ListObjectsV2Output#name #Name} => String
1923
+ # * {Types::ListObjectsV2Output#prefix #Prefix} => String
1924
+ # * {Types::ListObjectsV2Output#delimiter #Delimiter} => String
1925
+ # * {Types::ListObjectsV2Output#max_keys #MaxKeys} => Integer
1926
+ # * {Types::ListObjectsV2Output#common_prefixes #CommonPrefixes} => Array&lt;Types::CommonPrefix&gt;
1927
+ # * {Types::ListObjectsV2Output#encoding_type #EncodingType} => String
1928
+ # * {Types::ListObjectsV2Output#key_count #KeyCount} => Integer
1929
+ # * {Types::ListObjectsV2Output#continuation_token #ContinuationToken} => String
1930
+ # * {Types::ListObjectsV2Output#next_continuation_token #NextContinuationToken} => String
1931
+ # * {Types::ListObjectsV2Output#start_after #StartAfter} => String
1932
+ #
1933
+ # @example Request syntax with placeholder values
1934
+ # resp = client.list_objects_v2({
1935
+ # bucket: "BucketName", # required
1936
+ # delimiter: "Delimiter",
1937
+ # encoding_type: "url", # accepts url
1938
+ # max_keys: 1,
1939
+ # prefix: "Prefix",
1940
+ # continuation_token: "Token",
1941
+ # fetch_owner: false,
1942
+ # start_after: "StartAfter",
1943
+ # request_payer: "requester", # accepts requester
1944
+ # })
1945
+ #
1946
+ # @example Response structure
1947
+ # resp.is_truncated #=> Boolean
1948
+ # resp.contents #=> Array
1949
+ # resp.contents[0].key #=> String
1950
+ # resp.contents[0].last_modified #=> Time
1951
+ # resp.contents[0].etag #=> String
1952
+ # resp.contents[0].size #=> Integer
1953
+ # resp.contents[0].storage_class #=> String, one of "STANDARD", "REDUCED_REDUNDANCY", "GLACIER"
1954
+ # resp.contents[0].owner.display_name #=> String
1955
+ # resp.contents[0].owner.id #=> String
1956
+ # resp.name #=> String
1957
+ # resp.prefix #=> String
1958
+ # resp.delimiter #=> String
1959
+ # resp.max_keys #=> Integer
1960
+ # resp.common_prefixes #=> Array
1961
+ # resp.common_prefixes[0].prefix #=> String
1962
+ # resp.encoding_type #=> String, one of "url"
1963
+ # resp.key_count #=> Integer
1964
+ # resp.continuation_token #=> String
1965
+ # resp.next_continuation_token #=> String
1966
+ # resp.start_after #=> String
1967
+ # @overload list_objects_v2(params = {})
1968
+ # @param [Hash] params ({})
1969
+ def list_objects_v2(params = {}, options = {})
1970
+ req = build_request(:list_objects_v2, params)
1971
+ req.send_request(options)
1972
+ end
1973
+
1974
+ # Lists the parts that have been uploaded for a specific multipart
1975
+ # upload.
1976
+ # @option params [required, String] :bucket
1977
+ # @option params [required, String] :key
1978
+ # @option params [Integer] :max_parts
1979
+ # Sets the maximum number of parts to return.
1980
+ # @option params [Integer] :part_number_marker
1981
+ # Specifies the part after which listing should begin. Only parts with
1982
+ # higher part numbers will be listed.
1983
+ # @option params [required, String] :upload_id
1984
+ # Upload ID identifying the multipart upload whose parts are being
1985
+ # listed.
1986
+ # @option params [String] :request_payer
1987
+ # Confirms that the requester knows that she or he will be charged for
1988
+ # the request. Bucket owners need not specify this parameter in their
1989
+ # requests. Documentation on downloading objects from requester pays
1990
+ # buckets can be found at
1991
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1992
+ # @return [Types::ListPartsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1993
+ #
1994
+ # * {Types::ListPartsOutput#abort_date #AbortDate} => Time
1995
+ # * {Types::ListPartsOutput#abort_rule_id #AbortRuleId} => String
1996
+ # * {Types::ListPartsOutput#bucket #Bucket} => String
1997
+ # * {Types::ListPartsOutput#key #Key} => String
1998
+ # * {Types::ListPartsOutput#upload_id #UploadId} => String
1999
+ # * {Types::ListPartsOutput#part_number_marker #PartNumberMarker} => Integer
2000
+ # * {Types::ListPartsOutput#next_part_number_marker #NextPartNumberMarker} => Integer
2001
+ # * {Types::ListPartsOutput#max_parts #MaxParts} => Integer
2002
+ # * {Types::ListPartsOutput#is_truncated #IsTruncated} => Boolean
2003
+ # * {Types::ListPartsOutput#parts #Parts} => Array&lt;Types::Part&gt;
2004
+ # * {Types::ListPartsOutput#initiator #Initiator} => Types::Initiator
2005
+ # * {Types::ListPartsOutput#owner #Owner} => Types::Owner
2006
+ # * {Types::ListPartsOutput#storage_class #StorageClass} => String
2007
+ # * {Types::ListPartsOutput#request_charged #RequestCharged} => String
2008
+ #
2009
+ # @example Request syntax with placeholder values
2010
+ # resp = client.list_parts({
2011
+ # bucket: "BucketName", # required
2012
+ # key: "ObjectKey", # required
2013
+ # max_parts: 1,
2014
+ # part_number_marker: 1,
2015
+ # upload_id: "MultipartUploadId", # required
2016
+ # request_payer: "requester", # accepts requester
2017
+ # })
2018
+ #
2019
+ # @example Response structure
2020
+ # resp.abort_date #=> Time
2021
+ # resp.abort_rule_id #=> String
2022
+ # resp.bucket #=> String
2023
+ # resp.key #=> String
2024
+ # resp.upload_id #=> String
2025
+ # resp.part_number_marker #=> Integer
2026
+ # resp.next_part_number_marker #=> Integer
2027
+ # resp.max_parts #=> Integer
2028
+ # resp.is_truncated #=> Boolean
2029
+ # resp.parts #=> Array
2030
+ # resp.parts[0].part_number #=> Integer
2031
+ # resp.parts[0].last_modified #=> Time
2032
+ # resp.parts[0].etag #=> String
2033
+ # resp.parts[0].size #=> Integer
2034
+ # resp.initiator.id #=> String
2035
+ # resp.initiator.display_name #=> String
2036
+ # resp.owner.display_name #=> String
2037
+ # resp.owner.id #=> String
2038
+ # resp.storage_class #=> String, one of "STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA"
2039
+ # resp.request_charged #=> String, one of "requester"
2040
+ # @overload list_parts(params = {})
2041
+ # @param [Hash] params ({})
2042
+ def list_parts(params = {}, options = {})
2043
+ req = build_request(:list_parts, params)
2044
+ req.send_request(options)
2045
+ end
2046
+
2047
+ # Sets the accelerate configuration of an existing bucket.
2048
+ # @option params [required, String] :bucket
2049
+ # Name of the bucket for which the accelerate configuration is set.
2050
+ # @option params [required, Types::AccelerateConfiguration] :accelerate_configuration
2051
+ # Specifies the Accelerate Configuration you want to set for the bucket.
2052
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2053
+ #
2054
+ # @example Request syntax with placeholder values
2055
+ # resp = client.put_bucket_accelerate_configuration({
2056
+ # bucket: "BucketName", # required
2057
+ # accelerate_configuration: { # required
2058
+ # status: "Enabled", # accepts Enabled, Suspended
2059
+ # },
2060
+ # })
2061
+ # @overload put_bucket_accelerate_configuration(params = {})
2062
+ # @param [Hash] params ({})
2063
+ def put_bucket_accelerate_configuration(params = {}, options = {})
2064
+ req = build_request(:put_bucket_accelerate_configuration, params)
2065
+ req.send_request(options)
2066
+ end
2067
+
2068
+ # Sets the permissions on a bucket using access control lists (ACL).
2069
+ # @option params [String] :acl
2070
+ # The canned ACL to apply to the bucket.
2071
+ # @option params [Types::AccessControlPolicy] :access_control_policy
2072
+ # @option params [required, String] :bucket
2073
+ # @option params [String] :content_md5
2074
+ # @option params [String] :grant_full_control
2075
+ # Allows grantee the read, write, read ACP, and write ACP permissions on
2076
+ # the bucket.
2077
+ # @option params [String] :grant_read
2078
+ # Allows grantee to list the objects in the bucket.
2079
+ # @option params [String] :grant_read_acp
2080
+ # Allows grantee to read the bucket ACL.
2081
+ # @option params [String] :grant_write
2082
+ # Allows grantee to create, overwrite, and delete any object in the
2083
+ # bucket.
2084
+ # @option params [String] :grant_write_acp
2085
+ # Allows grantee to write the ACL for the applicable bucket.
2086
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2087
+ #
2088
+ # @example Request syntax with placeholder values
2089
+ # resp = client.put_bucket_acl({
2090
+ # acl: "private", # accepts private, public-read, public-read-write, authenticated-read
2091
+ # access_control_policy: {
2092
+ # grants: [
2093
+ # {
2094
+ # grantee: {
2095
+ # display_name: "DisplayName",
2096
+ # email_address: "EmailAddress",
2097
+ # id: "ID",
2098
+ # type: "CanonicalUser", # required, accepts CanonicalUser, AmazonCustomerByEmail, Group
2099
+ # uri: "URI",
2100
+ # },
2101
+ # permission: "FULL_CONTROL", # accepts FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP
2102
+ # },
2103
+ # ],
2104
+ # owner: {
2105
+ # display_name: "DisplayName",
2106
+ # id: "ID",
2107
+ # },
2108
+ # },
2109
+ # bucket: "BucketName", # required
2110
+ # content_md5: "ContentMD5",
2111
+ # grant_full_control: "GrantFullControl",
2112
+ # grant_read: "GrantRead",
2113
+ # grant_read_acp: "GrantReadACP",
2114
+ # grant_write: "GrantWrite",
2115
+ # grant_write_acp: "GrantWriteACP",
2116
+ # })
2117
+ # @overload put_bucket_acl(params = {})
2118
+ # @param [Hash] params ({})
2119
+ def put_bucket_acl(params = {}, options = {})
2120
+ req = build_request(:put_bucket_acl, params)
2121
+ req.send_request(options)
2122
+ end
2123
+
2124
+ # Sets the cors configuration for a bucket.
2125
+ # @option params [required, String] :bucket
2126
+ # @option params [required, Types::CORSConfiguration] :cors_configuration
2127
+ # @option params [String] :content_md5
2128
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2129
+ #
2130
+ # @example Request syntax with placeholder values
2131
+ # resp = client.put_bucket_cors({
2132
+ # bucket: "BucketName", # required
2133
+ # cors_configuration: { # required
2134
+ # cors_rules: [ # required
2135
+ # {
2136
+ # allowed_headers: ["AllowedHeader"],
2137
+ # allowed_methods: ["AllowedMethod"], # required
2138
+ # allowed_origins: ["AllowedOrigin"], # required
2139
+ # expose_headers: ["ExposeHeader"],
2140
+ # max_age_seconds: 1,
2141
+ # },
2142
+ # ],
2143
+ # },
2144
+ # content_md5: "ContentMD5",
2145
+ # })
2146
+ # @overload put_bucket_cors(params = {})
2147
+ # @param [Hash] params ({})
2148
+ def put_bucket_cors(params = {}, options = {})
2149
+ req = build_request(:put_bucket_cors, params)
2150
+ req.send_request(options)
2151
+ end
2152
+
2153
+ # Deprecated, see the PutBucketLifecycleConfiguration operation.
2154
+ # @option params [required, String] :bucket
2155
+ # @option params [String] :content_md5
2156
+ # @option params [Types::LifecycleConfiguration] :lifecycle_configuration
2157
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2158
+ #
2159
+ # @example Request syntax with placeholder values
2160
+ # resp = client.put_bucket_lifecycle({
2161
+ # bucket: "BucketName", # required
2162
+ # content_md5: "ContentMD5",
2163
+ # lifecycle_configuration: {
2164
+ # rules: [ # required
2165
+ # {
2166
+ # expiration: {
2167
+ # date: Time.now,
2168
+ # days: 1,
2169
+ # expired_object_delete_marker: false,
2170
+ # },
2171
+ # id: "ID",
2172
+ # prefix: "Prefix", # required
2173
+ # status: "Enabled", # required, accepts Enabled, Disabled
2174
+ # transition: {
2175
+ # date: Time.now,
2176
+ # days: 1,
2177
+ # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA
2178
+ # },
2179
+ # noncurrent_version_transition: {
2180
+ # noncurrent_days: 1,
2181
+ # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA
2182
+ # },
2183
+ # noncurrent_version_expiration: {
2184
+ # noncurrent_days: 1,
2185
+ # },
2186
+ # abort_incomplete_multipart_upload: {
2187
+ # days_after_initiation: 1,
2188
+ # },
2189
+ # },
2190
+ # ],
2191
+ # },
2192
+ # })
2193
+ # @overload put_bucket_lifecycle(params = {})
2194
+ # @param [Hash] params ({})
2195
+ def put_bucket_lifecycle(params = {}, options = {})
2196
+ req = build_request(:put_bucket_lifecycle, params)
2197
+ req.send_request(options)
2198
+ end
2199
+
2200
+ # Sets lifecycle configuration for your bucket. If a lifecycle
2201
+ # configuration exists, it replaces it.
2202
+ # @option params [required, String] :bucket
2203
+ # @option params [Types::BucketLifecycleConfiguration] :lifecycle_configuration
2204
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2205
+ #
2206
+ # @example Request syntax with placeholder values
2207
+ # resp = client.put_bucket_lifecycle_configuration({
2208
+ # bucket: "BucketName", # required
2209
+ # lifecycle_configuration: {
2210
+ # rules: [ # required
2211
+ # {
2212
+ # expiration: {
2213
+ # date: Time.now,
2214
+ # days: 1,
2215
+ # expired_object_delete_marker: false,
2216
+ # },
2217
+ # id: "ID",
2218
+ # prefix: "Prefix", # required
2219
+ # status: "Enabled", # required, accepts Enabled, Disabled
2220
+ # transitions: [
2221
+ # {
2222
+ # date: Time.now,
2223
+ # days: 1,
2224
+ # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA
2225
+ # },
2226
+ # ],
2227
+ # noncurrent_version_transitions: [
2228
+ # {
2229
+ # noncurrent_days: 1,
2230
+ # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA
2231
+ # },
2232
+ # ],
2233
+ # noncurrent_version_expiration: {
2234
+ # noncurrent_days: 1,
2235
+ # },
2236
+ # abort_incomplete_multipart_upload: {
2237
+ # days_after_initiation: 1,
2238
+ # },
2239
+ # },
2240
+ # ],
2241
+ # },
2242
+ # })
2243
+ # @overload put_bucket_lifecycle_configuration(params = {})
2244
+ # @param [Hash] params ({})
2245
+ def put_bucket_lifecycle_configuration(params = {}, options = {})
2246
+ req = build_request(:put_bucket_lifecycle_configuration, params)
2247
+ req.send_request(options)
2248
+ end
2249
+
2250
+ # Set the logging parameters for a bucket and to specify permissions for
2251
+ # who can view and modify the logging parameters. To set the logging
2252
+ # status of a bucket, you must be the bucket owner.
2253
+ # @option params [required, String] :bucket
2254
+ # @option params [required, Types::BucketLoggingStatus] :bucket_logging_status
2255
+ # @option params [String] :content_md5
2256
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2257
+ #
2258
+ # @example Request syntax with placeholder values
2259
+ # resp = client.put_bucket_logging({
2260
+ # bucket: "BucketName", # required
2261
+ # bucket_logging_status: { # required
2262
+ # logging_enabled: {
2263
+ # target_bucket: "TargetBucket",
2264
+ # target_grants: [
2265
+ # {
2266
+ # grantee: {
2267
+ # display_name: "DisplayName",
2268
+ # email_address: "EmailAddress",
2269
+ # id: "ID",
2270
+ # type: "CanonicalUser", # required, accepts CanonicalUser, AmazonCustomerByEmail, Group
2271
+ # uri: "URI",
2272
+ # },
2273
+ # permission: "FULL_CONTROL", # accepts FULL_CONTROL, READ, WRITE
2274
+ # },
2275
+ # ],
2276
+ # target_prefix: "TargetPrefix",
2277
+ # },
2278
+ # },
2279
+ # content_md5: "ContentMD5",
2280
+ # })
2281
+ # @overload put_bucket_logging(params = {})
2282
+ # @param [Hash] params ({})
2283
+ def put_bucket_logging(params = {}, options = {})
2284
+ req = build_request(:put_bucket_logging, params)
2285
+ req.send_request(options)
2286
+ end
2287
+
2288
+ # Deprecated, see the PutBucketNotificationConfiguraiton operation.
2289
+ # @option params [required, String] :bucket
2290
+ # @option params [String] :content_md5
2291
+ # @option params [required, Types::NotificationConfigurationDeprecated] :notification_configuration
2292
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2293
+ #
2294
+ # @example Request syntax with placeholder values
2295
+ # resp = client.put_bucket_notification({
2296
+ # bucket: "BucketName", # required
2297
+ # content_md5: "ContentMD5",
2298
+ # notification_configuration: { # required
2299
+ # topic_configuration: {
2300
+ # id: "NotificationId",
2301
+ # events: ["s3:ReducedRedundancyLostObject"], # accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
2302
+ # event: "s3:ReducedRedundancyLostObject", # accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
2303
+ # topic: "TopicArn",
2304
+ # },
2305
+ # queue_configuration: {
2306
+ # id: "NotificationId",
2307
+ # event: "s3:ReducedRedundancyLostObject", # accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
2308
+ # events: ["s3:ReducedRedundancyLostObject"], # accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
2309
+ # queue: "QueueArn",
2310
+ # },
2311
+ # cloud_function_configuration: {
2312
+ # id: "NotificationId",
2313
+ # event: "s3:ReducedRedundancyLostObject", # accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
2314
+ # events: ["s3:ReducedRedundancyLostObject"], # accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
2315
+ # cloud_function: "CloudFunction",
2316
+ # invocation_role: "CloudFunctionInvocationRole",
2317
+ # },
2318
+ # },
2319
+ # })
2320
+ # @overload put_bucket_notification(params = {})
2321
+ # @param [Hash] params ({})
2322
+ def put_bucket_notification(params = {}, options = {})
2323
+ req = build_request(:put_bucket_notification, params)
2324
+ req.send_request(options)
2325
+ end
2326
+
2327
+ # Enables notifications of specified events for a bucket.
2328
+ # @option params [required, String] :bucket
2329
+ # @option params [required, Types::NotificationConfiguration] :notification_configuration
2330
+ # Container for specifying the notification configuration of the bucket.
2331
+ # If this element is empty, notifications are turned off on the bucket.
2332
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2333
+ #
2334
+ # @example Request syntax with placeholder values
2335
+ # resp = client.put_bucket_notification_configuration({
2336
+ # bucket: "BucketName", # required
2337
+ # notification_configuration: { # required
2338
+ # topic_configurations: [
2339
+ # {
2340
+ # id: "NotificationId",
2341
+ # topic_arn: "TopicArn", # required
2342
+ # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
2343
+ # filter: {
2344
+ # key: {
2345
+ # filter_rules: [
2346
+ # {
2347
+ # name: "prefix", # accepts prefix, suffix
2348
+ # value: "FilterRuleValue",
2349
+ # },
2350
+ # ],
2351
+ # },
2352
+ # },
2353
+ # },
2354
+ # ],
2355
+ # queue_configurations: [
2356
+ # {
2357
+ # id: "NotificationId",
2358
+ # queue_arn: "QueueArn", # required
2359
+ # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
2360
+ # filter: {
2361
+ # key: {
2362
+ # filter_rules: [
2363
+ # {
2364
+ # name: "prefix", # accepts prefix, suffix
2365
+ # value: "FilterRuleValue",
2366
+ # },
2367
+ # ],
2368
+ # },
2369
+ # },
2370
+ # },
2371
+ # ],
2372
+ # lambda_function_configurations: [
2373
+ # {
2374
+ # id: "NotificationId",
2375
+ # lambda_function_arn: "LambdaFunctionArn", # required
2376
+ # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
2377
+ # filter: {
2378
+ # key: {
2379
+ # filter_rules: [
2380
+ # {
2381
+ # name: "prefix", # accepts prefix, suffix
2382
+ # value: "FilterRuleValue",
2383
+ # },
2384
+ # ],
2385
+ # },
2386
+ # },
2387
+ # },
2388
+ # ],
2389
+ # },
2390
+ # })
2391
+ # @overload put_bucket_notification_configuration(params = {})
2392
+ # @param [Hash] params ({})
2393
+ def put_bucket_notification_configuration(params = {}, options = {})
2394
+ req = build_request(:put_bucket_notification_configuration, params)
2395
+ req.send_request(options)
2396
+ end
2397
+
2398
+ # Replaces a policy on a bucket. If the bucket already has a policy, the
2399
+ # one in this request completely replaces it.
2400
+ # @option params [required, String] :bucket
2401
+ # @option params [String] :content_md5
2402
+ # @option params [required, String] :policy
2403
+ # The bucket policy as a JSON document.
2404
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2405
+ #
2406
+ # @example Request syntax with placeholder values
2407
+ # resp = client.put_bucket_policy({
2408
+ # bucket: "BucketName", # required
2409
+ # content_md5: "ContentMD5",
2410
+ # policy: "Policy", # required
2411
+ # })
2412
+ # @overload put_bucket_policy(params = {})
2413
+ # @param [Hash] params ({})
2414
+ def put_bucket_policy(params = {}, options = {})
2415
+ req = build_request(:put_bucket_policy, params)
2416
+ req.send_request(options)
2417
+ end
2418
+
2419
+ # Creates a new replication configuration (or replaces an existing one,
2420
+ # if present).
2421
+ # @option params [required, String] :bucket
2422
+ # @option params [String] :content_md5
2423
+ # @option params [required, Types::ReplicationConfiguration] :replication_configuration
2424
+ # Container for replication rules. You can add as many as 1,000 rules.
2425
+ # Total replication configuration size can be up to 2 MB.
2426
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2427
+ #
2428
+ # @example Request syntax with placeholder values
2429
+ # resp = client.put_bucket_replication({
2430
+ # bucket: "BucketName", # required
2431
+ # content_md5: "ContentMD5",
2432
+ # replication_configuration: { # required
2433
+ # role: "Role", # required
2434
+ # rules: [ # required
2435
+ # {
2436
+ # id: "ID",
2437
+ # prefix: "Prefix", # required
2438
+ # status: "Enabled", # required, accepts Enabled, Disabled
2439
+ # destination: { # required
2440
+ # bucket: "BucketName", # required
2441
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA
2442
+ # },
2443
+ # },
2444
+ # ],
2445
+ # },
2446
+ # })
2447
+ # @overload put_bucket_replication(params = {})
2448
+ # @param [Hash] params ({})
2449
+ def put_bucket_replication(params = {}, options = {})
2450
+ req = build_request(:put_bucket_replication, params)
2451
+ req.send_request(options)
2452
+ end
2453
+
2454
+ # Sets the request payment configuration for a bucket. By default, the
2455
+ # bucket owner pays for downloads from the bucket. This configuration
2456
+ # parameter enables the bucket owner (only) to specify that the person
2457
+ # requesting the download will be charged for the download.
2458
+ # Documentation on requester pays buckets can be found at
2459
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
2460
+ # @option params [required, String] :bucket
2461
+ # @option params [String] :content_md5
2462
+ # @option params [required, Types::RequestPaymentConfiguration] :request_payment_configuration
2463
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2464
+ #
2465
+ # @example Request syntax with placeholder values
2466
+ # resp = client.put_bucket_request_payment({
2467
+ # bucket: "BucketName", # required
2468
+ # content_md5: "ContentMD5",
2469
+ # request_payment_configuration: { # required
2470
+ # payer: "Requester", # required, accepts Requester, BucketOwner
2471
+ # },
2472
+ # })
2473
+ # @overload put_bucket_request_payment(params = {})
2474
+ # @param [Hash] params ({})
2475
+ def put_bucket_request_payment(params = {}, options = {})
2476
+ req = build_request(:put_bucket_request_payment, params)
2477
+ req.send_request(options)
2478
+ end
2479
+
2480
+ # Sets the tags for a bucket.
2481
+ # @option params [required, String] :bucket
2482
+ # @option params [String] :content_md5
2483
+ # @option params [required, Types::Tagging] :tagging
2484
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2485
+ #
2486
+ # @example Request syntax with placeholder values
2487
+ # resp = client.put_bucket_tagging({
2488
+ # bucket: "BucketName", # required
2489
+ # content_md5: "ContentMD5",
2490
+ # tagging: { # required
2491
+ # tag_set: [ # required
2492
+ # {
2493
+ # key: "ObjectKey", # required
2494
+ # value: "Value", # required
2495
+ # },
2496
+ # ],
2497
+ # },
2498
+ # })
2499
+ # @overload put_bucket_tagging(params = {})
2500
+ # @param [Hash] params ({})
2501
+ def put_bucket_tagging(params = {}, options = {})
2502
+ req = build_request(:put_bucket_tagging, params)
2503
+ req.send_request(options)
2504
+ end
2505
+
2506
+ # Sets the versioning state of an existing bucket. To set the versioning
2507
+ # state, you must be the bucket owner.
2508
+ # @option params [required, String] :bucket
2509
+ # @option params [String] :content_md5
2510
+ # @option params [String] :mfa
2511
+ # The concatenation of the authentication device's serial number, a
2512
+ # space, and the value that is displayed on your authentication device.
2513
+ # @option params [required, Types::VersioningConfiguration] :versioning_configuration
2514
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2515
+ #
2516
+ # @example Request syntax with placeholder values
2517
+ # resp = client.put_bucket_versioning({
2518
+ # bucket: "BucketName", # required
2519
+ # content_md5: "ContentMD5",
2520
+ # mfa: "MFA",
2521
+ # versioning_configuration: { # required
2522
+ # mfa_delete: "Enabled", # accepts Enabled, Disabled
2523
+ # status: "Enabled", # accepts Enabled, Suspended
2524
+ # },
2525
+ # })
2526
+ # @overload put_bucket_versioning(params = {})
2527
+ # @param [Hash] params ({})
2528
+ def put_bucket_versioning(params = {}, options = {})
2529
+ req = build_request(:put_bucket_versioning, params)
2530
+ req.send_request(options)
2531
+ end
2532
+
2533
+ # Set the website configuration for a bucket.
2534
+ # @option params [required, String] :bucket
2535
+ # @option params [String] :content_md5
2536
+ # @option params [required, Types::WebsiteConfiguration] :website_configuration
2537
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2538
+ #
2539
+ # @example Request syntax with placeholder values
2540
+ # resp = client.put_bucket_website({
2541
+ # bucket: "BucketName", # required
2542
+ # content_md5: "ContentMD5",
2543
+ # website_configuration: { # required
2544
+ # error_document: {
2545
+ # key: "ObjectKey", # required
2546
+ # },
2547
+ # index_document: {
2548
+ # suffix: "Suffix", # required
2549
+ # },
2550
+ # redirect_all_requests_to: {
2551
+ # host_name: "HostName", # required
2552
+ # protocol: "http", # accepts http, https
2553
+ # },
2554
+ # routing_rules: [
2555
+ # {
2556
+ # condition: {
2557
+ # http_error_code_returned_equals: "HttpErrorCodeReturnedEquals",
2558
+ # key_prefix_equals: "KeyPrefixEquals",
2559
+ # },
2560
+ # redirect: { # required
2561
+ # host_name: "HostName",
2562
+ # http_redirect_code: "HttpRedirectCode",
2563
+ # protocol: "http", # accepts http, https
2564
+ # replace_key_prefix_with: "ReplaceKeyPrefixWith",
2565
+ # replace_key_with: "ReplaceKeyWith",
2566
+ # },
2567
+ # },
2568
+ # ],
2569
+ # },
2570
+ # })
2571
+ # @overload put_bucket_website(params = {})
2572
+ # @param [Hash] params ({})
2573
+ def put_bucket_website(params = {}, options = {})
2574
+ req = build_request(:put_bucket_website, params)
2575
+ req.send_request(options)
2576
+ end
2577
+
2578
+ # Adds an object to a bucket.
2579
+ # @option params [String] :acl
2580
+ # The canned ACL to apply to the object.
2581
+ # @option params [String, IO] :body
2582
+ # Object data.
2583
+ # @option params [required, String] :bucket
2584
+ # Name of the bucket to which the PUT operation was initiated.
2585
+ # @option params [String] :cache_control
2586
+ # Specifies caching behavior along the request/reply chain.
2587
+ # @option params [String] :content_disposition
2588
+ # Specifies presentational information for the object.
2589
+ # @option params [String] :content_encoding
2590
+ # Specifies what content encodings have been applied to the object and
2591
+ # thus what decoding mechanisms must be applied to obtain the media-type
2592
+ # referenced by the Content-Type header field.
2593
+ # @option params [String] :content_language
2594
+ # The language the content is in.
2595
+ # @option params [Integer] :content_length
2596
+ # Size of the body in bytes. This parameter is useful when the size of
2597
+ # the body cannot be determined automatically.
2598
+ # @option params [String] :content_md5
2599
+ # The base64-encoded 128-bit MD5 digest of the part data.
2600
+ # @option params [String] :content_type
2601
+ # A standard MIME type describing the format of the object data.
2602
+ # @option params [Time,DateTime,Date,Integer,String] :expires
2603
+ # The date and time at which the object is no longer cacheable.
2604
+ # @option params [String] :grant_full_control
2605
+ # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
2606
+ # object.
2607
+ # @option params [String] :grant_read
2608
+ # Allows grantee to read the object data and its metadata.
2609
+ # @option params [String] :grant_read_acp
2610
+ # Allows grantee to read the object ACL.
2611
+ # @option params [String] :grant_write_acp
2612
+ # Allows grantee to write the ACL for the applicable object.
2613
+ # @option params [required, String] :key
2614
+ # Object key for which the PUT operation was initiated.
2615
+ # @option params [Hash<String,String>] :metadata
2616
+ # A map of metadata to store with the object in S3.
2617
+ # @option params [String] :server_side_encryption
2618
+ # The Server-side encryption algorithm used when storing this object in
2619
+ # S3 (e.g., AES256, aws:kms).
2620
+ # @option params [String] :storage_class
2621
+ # The type of storage to use for the object. Defaults to 'STANDARD'.
2622
+ # @option params [String] :website_redirect_location
2623
+ # If the bucket is configured as a website, redirects requests for this
2624
+ # object to another object in the same bucket or to an external URL.
2625
+ # Amazon S3 stores the value of this header in the object metadata.
2626
+ # @option params [String] :sse_customer_algorithm
2627
+ # Specifies the algorithm to use to when encrypting the object (e.g.,
2628
+ # AES256).
2629
+ # @option params [String] :sse_customer_key
2630
+ # Specifies the customer-provided encryption key for Amazon S3 to use in
2631
+ # encrypting data. This value is used to store the object and then it is
2632
+ # discarded; Amazon does not store the encryption key. The key must be
2633
+ # appropriate for use with the algorithm specified in the
2634
+ # x-amz-server-side​-encryption​-customer-algorithm header.
2635
+ # @option params [String] :sse_customer_key_md5
2636
+ # Specifies the 128-bit MD5 digest of the encryption key according to
2637
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
2638
+ # ensure the encryption key was transmitted without error.
2639
+ # @option params [String] :ssekms_key_id
2640
+ # Specifies the AWS KMS key ID to use for object encryption. All GET and
2641
+ # PUT requests for an object protected by AWS KMS will fail if not made
2642
+ # via SSL or using SigV4. Documentation on configuring any of the
2643
+ # officially supported AWS SDKs and CLI can be found at
2644
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
2645
+ # @option params [String] :request_payer
2646
+ # Confirms that the requester knows that she or he will be charged for
2647
+ # the request. Bucket owners need not specify this parameter in their
2648
+ # requests. Documentation on downloading objects from requester pays
2649
+ # buckets can be found at
2650
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
2651
+ # @return [Types::PutObjectOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2652
+ #
2653
+ # * {Types::PutObjectOutput#expiration #Expiration} => String
2654
+ # * {Types::PutObjectOutput#etag #ETag} => String
2655
+ # * {Types::PutObjectOutput#server_side_encryption #ServerSideEncryption} => String
2656
+ # * {Types::PutObjectOutput#version_id #VersionId} => String
2657
+ # * {Types::PutObjectOutput#sse_customer_algorithm #SSECustomerAlgorithm} => String
2658
+ # * {Types::PutObjectOutput#sse_customer_key_md5 #SSECustomerKeyMD5} => String
2659
+ # * {Types::PutObjectOutput#ssekms_key_id #SSEKMSKeyId} => String
2660
+ # * {Types::PutObjectOutput#request_charged #RequestCharged} => String
2661
+ #
2662
+ # @example Streaming a file from disk
2663
+ # # upload file from disk in a single request, may not exceed 5GB
2664
+ # File.open('/source/file/path', 'rb') do |file|
2665
+ # s3.put_object(bucket: 'bucket-name', key: 'object-key', body: file)
2666
+ # end
2667
+ #
2668
+ # @example Request syntax with placeholder values
2669
+ # resp = client.put_object({
2670
+ # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
2671
+ # body: source_file,
2672
+ # bucket: "BucketName", # required
2673
+ # cache_control: "CacheControl",
2674
+ # content_disposition: "ContentDisposition",
2675
+ # content_encoding: "ContentEncoding",
2676
+ # content_language: "ContentLanguage",
2677
+ # content_length: 1,
2678
+ # content_md5: "ContentMD5",
2679
+ # content_type: "ContentType",
2680
+ # expires: Time.now,
2681
+ # grant_full_control: "GrantFullControl",
2682
+ # grant_read: "GrantRead",
2683
+ # grant_read_acp: "GrantReadACP",
2684
+ # grant_write_acp: "GrantWriteACP",
2685
+ # key: "ObjectKey", # required
2686
+ # metadata: {
2687
+ # "MetadataKey" => "MetadataValue",
2688
+ # },
2689
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms
2690
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA
2691
+ # website_redirect_location: "WebsiteRedirectLocation",
2692
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
2693
+ # sse_customer_key: "SSECustomerKey",
2694
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
2695
+ # ssekms_key_id: "SSEKMSKeyId",
2696
+ # request_payer: "requester", # accepts requester
2697
+ # })
2698
+ #
2699
+ # @example Response structure
2700
+ # resp.expiration #=> String
2701
+ # resp.etag #=> String
2702
+ # resp.server_side_encryption #=> String, one of "AES256", "aws:kms"
2703
+ # resp.version_id #=> String
2704
+ # resp.sse_customer_algorithm #=> String
2705
+ # resp.sse_customer_key_md5 #=> String
2706
+ # resp.ssekms_key_id #=> String
2707
+ # resp.request_charged #=> String, one of "requester"
2708
+ # @overload put_object(params = {})
2709
+ # @param [Hash] params ({})
2710
+ def put_object(params = {}, options = {})
2711
+ req = build_request(:put_object, params)
2712
+ req.send_request(options)
2713
+ end
2714
+
2715
+ # uses the acl subresource to set the access control list (ACL)
2716
+ # permissions for an object that already exists in a bucket
2717
+ # @option params [String] :acl
2718
+ # The canned ACL to apply to the object.
2719
+ # @option params [Types::AccessControlPolicy] :access_control_policy
2720
+ # @option params [required, String] :bucket
2721
+ # @option params [String] :content_md5
2722
+ # @option params [String] :grant_full_control
2723
+ # Allows grantee the read, write, read ACP, and write ACP permissions on
2724
+ # the bucket.
2725
+ # @option params [String] :grant_read
2726
+ # Allows grantee to list the objects in the bucket.
2727
+ # @option params [String] :grant_read_acp
2728
+ # Allows grantee to read the bucket ACL.
2729
+ # @option params [String] :grant_write
2730
+ # Allows grantee to create, overwrite, and delete any object in the
2731
+ # bucket.
2732
+ # @option params [String] :grant_write_acp
2733
+ # Allows grantee to write the ACL for the applicable bucket.
2734
+ # @option params [required, String] :key
2735
+ # @option params [String] :request_payer
2736
+ # Confirms that the requester knows that she or he will be charged for
2737
+ # the request. Bucket owners need not specify this parameter in their
2738
+ # requests. Documentation on downloading objects from requester pays
2739
+ # buckets can be found at
2740
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
2741
+ # @option params [String] :version_id
2742
+ # VersionId used to reference a specific version of the object.
2743
+ # @return [Types::PutObjectAclOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2744
+ #
2745
+ # * {Types::PutObjectAclOutput#request_charged #RequestCharged} => String
2746
+ #
2747
+ # @example Request syntax with placeholder values
2748
+ # resp = client.put_object_acl({
2749
+ # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
2750
+ # access_control_policy: {
2751
+ # grants: [
2752
+ # {
2753
+ # grantee: {
2754
+ # display_name: "DisplayName",
2755
+ # email_address: "EmailAddress",
2756
+ # id: "ID",
2757
+ # type: "CanonicalUser", # required, accepts CanonicalUser, AmazonCustomerByEmail, Group
2758
+ # uri: "URI",
2759
+ # },
2760
+ # permission: "FULL_CONTROL", # accepts FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP
2761
+ # },
2762
+ # ],
2763
+ # owner: {
2764
+ # display_name: "DisplayName",
2765
+ # id: "ID",
2766
+ # },
2767
+ # },
2768
+ # bucket: "BucketName", # required
2769
+ # content_md5: "ContentMD5",
2770
+ # grant_full_control: "GrantFullControl",
2771
+ # grant_read: "GrantRead",
2772
+ # grant_read_acp: "GrantReadACP",
2773
+ # grant_write: "GrantWrite",
2774
+ # grant_write_acp: "GrantWriteACP",
2775
+ # key: "ObjectKey", # required
2776
+ # request_payer: "requester", # accepts requester
2777
+ # version_id: "ObjectVersionId",
2778
+ # })
2779
+ #
2780
+ # @example Response structure
2781
+ # resp.request_charged #=> String, one of "requester"
2782
+ # @overload put_object_acl(params = {})
2783
+ # @param [Hash] params ({})
2784
+ def put_object_acl(params = {}, options = {})
2785
+ req = build_request(:put_object_acl, params)
2786
+ req.send_request(options)
2787
+ end
2788
+
2789
+ # Restores an archived copy of an object back into Amazon S3
2790
+ # @option params [required, String] :bucket
2791
+ # @option params [required, String] :key
2792
+ # @option params [String] :version_id
2793
+ # @option params [Types::RestoreRequest] :restore_request
2794
+ # @option params [String] :request_payer
2795
+ # Confirms that the requester knows that she or he will be charged for
2796
+ # the request. Bucket owners need not specify this parameter in their
2797
+ # requests. Documentation on downloading objects from requester pays
2798
+ # buckets can be found at
2799
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
2800
+ # @return [Types::RestoreObjectOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2801
+ #
2802
+ # * {Types::RestoreObjectOutput#request_charged #RequestCharged} => String
2803
+ #
2804
+ # @example Request syntax with placeholder values
2805
+ # resp = client.restore_object({
2806
+ # bucket: "BucketName", # required
2807
+ # key: "ObjectKey", # required
2808
+ # version_id: "ObjectVersionId",
2809
+ # restore_request: {
2810
+ # days: 1, # required
2811
+ # glacier_job_parameters: {
2812
+ # tier: "Standard", # required, accepts Standard, Bulk, Expedited
2813
+ # },
2814
+ # },
2815
+ # request_payer: "requester", # accepts requester
2816
+ # })
2817
+ #
2818
+ # @example Response structure
2819
+ # resp.request_charged #=> String, one of "requester"
2820
+ # @overload restore_object(params = {})
2821
+ # @param [Hash] params ({})
2822
+ def restore_object(params = {}, options = {})
2823
+ req = build_request(:restore_object, params)
2824
+ req.send_request(options)
2825
+ end
2826
+
2827
+ # Uploads a part in a multipart upload.
2828
+ #
2829
+ # **Note:** After you initiate multipart upload and upload one or more
2830
+ # parts, you must either complete or abort multipart upload in order to
2831
+ # stop getting charged for storage of the uploaded parts. Only after you
2832
+ # either complete or abort multipart upload, Amazon S3 frees up the
2833
+ # parts storage and stops charging you for the parts storage.
2834
+ # @option params [String, IO] :body
2835
+ # Object data.
2836
+ # @option params [required, String] :bucket
2837
+ # Name of the bucket to which the multipart upload was initiated.
2838
+ # @option params [Integer] :content_length
2839
+ # Size of the body in bytes. This parameter is useful when the size of
2840
+ # the body cannot be determined automatically.
2841
+ # @option params [String] :content_md5
2842
+ # The base64-encoded 128-bit MD5 digest of the part data.
2843
+ # @option params [required, String] :key
2844
+ # Object key for which the multipart upload was initiated.
2845
+ # @option params [required, Integer] :part_number
2846
+ # Part number of part being uploaded. This is a positive integer between
2847
+ # 1 and 10,000.
2848
+ # @option params [required, String] :upload_id
2849
+ # Upload ID identifying the multipart upload whose part is being
2850
+ # uploaded.
2851
+ # @option params [String] :sse_customer_algorithm
2852
+ # Specifies the algorithm to use to when encrypting the object (e.g.,
2853
+ # AES256).
2854
+ # @option params [String] :sse_customer_key
2855
+ # Specifies the customer-provided encryption key for Amazon S3 to use in
2856
+ # encrypting data. This value is used to store the object and then it is
2857
+ # discarded; Amazon does not store the encryption key. The key must be
2858
+ # appropriate for use with the algorithm specified in the
2859
+ # x-amz-server-side​-encryption​-customer-algorithm header. This must be
2860
+ # the same encryption key specified in the initiate multipart upload
2861
+ # request.
2862
+ # @option params [String] :sse_customer_key_md5
2863
+ # Specifies the 128-bit MD5 digest of the encryption key according to
2864
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
2865
+ # ensure the encryption key was transmitted without error.
2866
+ # @option params [String] :request_payer
2867
+ # Confirms that the requester knows that she or he will be charged for
2868
+ # the request. Bucket owners need not specify this parameter in their
2869
+ # requests. Documentation on downloading objects from requester pays
2870
+ # buckets can be found at
2871
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
2872
+ # @return [Types::UploadPartOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2873
+ #
2874
+ # * {Types::UploadPartOutput#server_side_encryption #ServerSideEncryption} => String
2875
+ # * {Types::UploadPartOutput#etag #ETag} => String
2876
+ # * {Types::UploadPartOutput#sse_customer_algorithm #SSECustomerAlgorithm} => String
2877
+ # * {Types::UploadPartOutput#sse_customer_key_md5 #SSECustomerKeyMD5} => String
2878
+ # * {Types::UploadPartOutput#ssekms_key_id #SSEKMSKeyId} => String
2879
+ # * {Types::UploadPartOutput#request_charged #RequestCharged} => String
2880
+ #
2881
+ # @example Request syntax with placeholder values
2882
+ # resp = client.upload_part({
2883
+ # body: source_file,
2884
+ # bucket: "BucketName", # required
2885
+ # content_length: 1,
2886
+ # content_md5: "ContentMD5",
2887
+ # key: "ObjectKey", # required
2888
+ # part_number: 1, # required
2889
+ # upload_id: "MultipartUploadId", # required
2890
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
2891
+ # sse_customer_key: "SSECustomerKey",
2892
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
2893
+ # request_payer: "requester", # accepts requester
2894
+ # })
2895
+ #
2896
+ # @example Response structure
2897
+ # resp.server_side_encryption #=> String, one of "AES256", "aws:kms"
2898
+ # resp.etag #=> String
2899
+ # resp.sse_customer_algorithm #=> String
2900
+ # resp.sse_customer_key_md5 #=> String
2901
+ # resp.ssekms_key_id #=> String
2902
+ # resp.request_charged #=> String, one of "requester"
2903
+ # @overload upload_part(params = {})
2904
+ # @param [Hash] params ({})
2905
+ def upload_part(params = {}, options = {})
2906
+ req = build_request(:upload_part, params)
2907
+ req.send_request(options)
2908
+ end
2909
+
2910
+ # Uploads a part by copying data from an existing object as data source.
2911
+ # @option params [required, String] :bucket
2912
+ # @option params [required, String] :copy_source
2913
+ # The name of the source bucket and key name of the source object,
2914
+ # separated by a slash (/). Must be URL-encoded.
2915
+ # @option params [String] :copy_source_if_match
2916
+ # Copies the object if its entity tag (ETag) matches the specified tag.
2917
+ # @option params [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
2918
+ # Copies the object if it has been modified since the specified time.
2919
+ # @option params [String] :copy_source_if_none_match
2920
+ # Copies the object if its entity tag (ETag) is different than the
2921
+ # specified ETag.
2922
+ # @option params [Time,DateTime,Date,Integer,String] :copy_source_if_unmodified_since
2923
+ # Copies the object if it hasn't been modified since the specified
2924
+ # time.
2925
+ # @option params [String] :copy_source_range
2926
+ # The range of bytes to copy from the source object. The range value
2927
+ # must use the form bytes=first-last, where the first and last are the
2928
+ # zero-based byte offsets to copy. For example, bytes=0-9 indicates that
2929
+ # you want to copy the first ten bytes of the source. You can copy a
2930
+ # range only if the source object is greater than 5 GB.
2931
+ # @option params [required, String] :key
2932
+ # @option params [required, Integer] :part_number
2933
+ # Part number of part being copied. This is a positive integer between 1
2934
+ # and 10,000.
2935
+ # @option params [required, String] :upload_id
2936
+ # Upload ID identifying the multipart upload whose part is being copied.
2937
+ # @option params [String] :sse_customer_algorithm
2938
+ # Specifies the algorithm to use to when encrypting the object (e.g.,
2939
+ # AES256).
2940
+ # @option params [String] :sse_customer_key
2941
+ # Specifies the customer-provided encryption key for Amazon S3 to use in
2942
+ # encrypting data. This value is used to store the object and then it is
2943
+ # discarded; Amazon does not store the encryption key. The key must be
2944
+ # appropriate for use with the algorithm specified in the
2945
+ # x-amz-server-side​-encryption​-customer-algorithm header. This must be
2946
+ # the same encryption key specified in the initiate multipart upload
2947
+ # request.
2948
+ # @option params [String] :sse_customer_key_md5
2949
+ # Specifies the 128-bit MD5 digest of the encryption key according to
2950
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
2951
+ # ensure the encryption key was transmitted without error.
2952
+ # @option params [String] :copy_source_sse_customer_algorithm
2953
+ # Specifies the algorithm to use when decrypting the source object
2954
+ # (e.g., AES256).
2955
+ # @option params [String] :copy_source_sse_customer_key
2956
+ # Specifies the customer-provided encryption key for Amazon S3 to use to
2957
+ # decrypt the source object. The encryption key provided in this header
2958
+ # must be one that was used when the source object was created.
2959
+ # @option params [String] :copy_source_sse_customer_key_md5
2960
+ # Specifies the 128-bit MD5 digest of the encryption key according to
2961
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
2962
+ # ensure the encryption key was transmitted without error.
2963
+ # @option params [String] :request_payer
2964
+ # Confirms that the requester knows that she or he will be charged for
2965
+ # the request. Bucket owners need not specify this parameter in their
2966
+ # requests. Documentation on downloading objects from requester pays
2967
+ # buckets can be found at
2968
+ # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
2969
+ # @return [Types::UploadPartCopyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2970
+ #
2971
+ # * {Types::UploadPartCopyOutput#copy_source_version_id #CopySourceVersionId} => String
2972
+ # * {Types::UploadPartCopyOutput#copy_part_result #CopyPartResult} => Types::CopyPartResult
2973
+ # * {Types::UploadPartCopyOutput#server_side_encryption #ServerSideEncryption} => String
2974
+ # * {Types::UploadPartCopyOutput#sse_customer_algorithm #SSECustomerAlgorithm} => String
2975
+ # * {Types::UploadPartCopyOutput#sse_customer_key_md5 #SSECustomerKeyMD5} => String
2976
+ # * {Types::UploadPartCopyOutput#ssekms_key_id #SSEKMSKeyId} => String
2977
+ # * {Types::UploadPartCopyOutput#request_charged #RequestCharged} => String
2978
+ #
2979
+ # @example Request syntax with placeholder values
2980
+ # resp = client.upload_part_copy({
2981
+ # bucket: "BucketName", # required
2982
+ # copy_source: "CopySource", # required
2983
+ # copy_source_if_match: "CopySourceIfMatch",
2984
+ # copy_source_if_modified_since: Time.now,
2985
+ # copy_source_if_none_match: "CopySourceIfNoneMatch",
2986
+ # copy_source_if_unmodified_since: Time.now,
2987
+ # copy_source_range: "CopySourceRange",
2988
+ # key: "ObjectKey", # required
2989
+ # part_number: 1, # required
2990
+ # upload_id: "MultipartUploadId", # required
2991
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
2992
+ # sse_customer_key: "SSECustomerKey",
2993
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
2994
+ # copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
2995
+ # copy_source_sse_customer_key: "CopySourceSSECustomerKey",
2996
+ # copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
2997
+ # request_payer: "requester", # accepts requester
2998
+ # })
2999
+ #
3000
+ # @example Response structure
3001
+ # resp.copy_source_version_id #=> String
3002
+ # resp.copy_part_result.etag #=> String
3003
+ # resp.copy_part_result.last_modified #=> Time
3004
+ # resp.server_side_encryption #=> String, one of "AES256", "aws:kms"
3005
+ # resp.sse_customer_algorithm #=> String
3006
+ # resp.sse_customer_key_md5 #=> String
3007
+ # resp.ssekms_key_id #=> String
3008
+ # resp.request_charged #=> String, one of "requester"
3009
+ # @overload upload_part_copy(params = {})
3010
+ # @param [Hash] params ({})
3011
+ def upload_part_copy(params = {}, options = {})
3012
+ req = build_request(:upload_part_copy, params)
3013
+ req.send_request(options)
3014
+ end
3015
+
3016
+ # @!endgroup
3017
+
3018
+ # @param params ({})
3019
+ # @api private
3020
+ def build_request(operation_name, params = {})
3021
+ handlers = @handlers.for(operation_name)
3022
+ context = Seahorse::Client::RequestContext.new(
3023
+ operation_name: operation_name,
3024
+ operation: config.api.operation(operation_name),
3025
+ client: self,
3026
+ params: params,
3027
+ config: config)
3028
+ context[:gem_name] = 'aws-sdk-s3'
3029
+ context[:gem_version] = '1.0.0.rc1'
3030
+ Seahorse::Client::Request.new(handlers, context)
3031
+ end
3032
+
3033
+ # Polls an API operation until a resource enters a desired state.
3034
+ #
3035
+ # ## Basic Usage
3036
+ #
3037
+ # A waiter will call an API operation until:
3038
+ #
3039
+ # * It is successful
3040
+ # * It enters a terminal state
3041
+ # * It makes the maximum number of attempts
3042
+ #
3043
+ # In between attempts, the waiter will sleep.
3044
+ #
3045
+ # # polls in a loop, sleeping between attempts
3046
+ # client.waiter_until(waiter_name, params)
3047
+ #
3048
+ # ## Configuration
3049
+ #
3050
+ # You can configure the maximum number of polling attempts, and the
3051
+ # delay (in seconds) between each polling attempt. You can pass
3052
+ # configuration as the final arguments hash.
3053
+ #
3054
+ # # poll for ~25 seconds
3055
+ # client.wait_until(waiter_name, params, {
3056
+ # max_attempts: 5,
3057
+ # delay: 5,
3058
+ # })
3059
+ #
3060
+ # ## Callbacks
3061
+ #
3062
+ # You can be notified before each polling attempt and before each
3063
+ # delay. If you throw `:success` or `:failure` from these callbacks,
3064
+ # it will terminate the waiter.
3065
+ #
3066
+ # started_at = Time.now
3067
+ # client.wait_until(waiter_name, params, {
3068
+ #
3069
+ # # disable max attempts
3070
+ # max_attempts: nil,
3071
+ #
3072
+ # # poll for 1 hour, instead of a number of attempts
3073
+ # before_wait: -> (attempts, response) do
3074
+ # throw :failure if Time.now - started_at > 3600
3075
+ # end
3076
+ # })
3077
+ #
3078
+ # ## Handling Errors
3079
+ #
3080
+ # When a waiter is unsuccessful, it will raise an error.
3081
+ # All of the failure errors extend from
3082
+ # {Aws::Waiters::Errors::WaiterFailed}.
3083
+ #
3084
+ # begin
3085
+ # client.wait_until(...)
3086
+ # rescue Aws::Waiters::Errors::WaiterFailed
3087
+ # # resource did not enter the desired state in time
3088
+ # end
3089
+ #
3090
+ # ## Valid Waiters
3091
+ #
3092
+ # The following table lists the valid waiter names, the operations they call,
3093
+ # and the default `:delay` and `:max_attempts` values.
3094
+ #
3095
+ # | waiter_name | params | :delay | :max_attempts |
3096
+ # | ----------------- | -------------- | -------- | ------------- |
3097
+ # | bucket_exists | {#head_bucket} | 5 | 20 |
3098
+ # | bucket_not_exists | {#head_bucket} | 5 | 20 |
3099
+ # | object_exists | {#head_object} | 5 | 20 |
3100
+ # | object_not_exists | {#head_object} | 5 | 20 |
3101
+ #
3102
+ # @raise [Errors::FailureStateError] Raised when the waiter terminates
3103
+ # because the waiter has entered a state that it will not transition
3104
+ # out of, preventing success.
3105
+ #
3106
+ # @raise [Errors::TooManyAttemptsError] Raised when the configured
3107
+ # maximum number of attempts have been made, and the waiter is not
3108
+ # yet successful.
3109
+ #
3110
+ # @raise [Errors::UnexpectedError] Raised when an error is encounted
3111
+ # while polling for a resource that is not expected.
3112
+ #
3113
+ # @raise [Errors::NoSuchWaiterError] Raised when you request to wait
3114
+ # for an unknown state.
3115
+ #
3116
+ # @return [Boolean] Returns `true` if the waiter was successful.
3117
+ # @param [Symbol] waiter_name
3118
+ # @param [Hash] params ({})
3119
+ # @param [Hash] options ({})
3120
+ # @option options [Integer] :max_attempts
3121
+ # @option options [Integer] :delay
3122
+ # @option options [Proc] :before_attempt
3123
+ # @option options [Proc] :before_wait
3124
+ def wait_until(waiter_name, params = {}, options = {})
3125
+ w = waiter(waiter_name, options)
3126
+ yield(w.waiter) if block_given? # deprecated
3127
+ w.wait(params)
3128
+ end
3129
+
3130
+ # @api private
3131
+ # @deprecated
3132
+ def waiter_names
3133
+ waiters.keys
3134
+ end
3135
+
3136
+ private
3137
+
3138
+ # @param [Symbol] waiter_name
3139
+ # @param [Hash] options ({})
3140
+ def waiter(waiter_name, options = {})
3141
+ waiter_class = waiters[waiter_name]
3142
+ if waiter_class
3143
+ waiter_class.new(options.merge(client: self))
3144
+ else
3145
+ raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
3146
+ end
3147
+ end
3148
+
3149
+ def waiters
3150
+ {
3151
+ bucket_exists: Waiters::BucketExists,
3152
+ bucket_not_exists: Waiters::BucketNotExists,
3153
+ object_exists: Waiters::ObjectExists,
3154
+ object_not_exists: Waiters::ObjectNotExists
3155
+ }
3156
+ end
3157
+
3158
+ class << self
3159
+
3160
+ # @api private
3161
+ attr_reader :identifier
3162
+
3163
+ # @api private
3164
+ def errors_module
3165
+ Errors
3166
+ end
3167
+
3168
+ end
3169
+ end
3170
+ end
3171
+ end