aws-sdk-s3 1.57.0 → 1.58.0

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.
@@ -3,6 +3,20 @@ require 'uri'
3
3
  module Aws
4
4
  module S3
5
5
  class Bucket
6
+ # Save the old initialize method so that we can call 'super'.
7
+ old_initialize = instance_method(:initialize)
8
+ # Define a new initialize method that extracts out a bucket ARN.
9
+ define_method(:initialize) do |*args|
10
+ old_initialize.bind(self).call(*args)
11
+ bucket_name, region, arn = Plugins::BucketARN.resolve_arn!(
12
+ name,
13
+ client.config.region,
14
+ client.config.s3_use_arn_region
15
+ )
16
+ @name = bucket_name
17
+ @client.config.region = region
18
+ @arn = arn
19
+ end
6
20
 
7
21
  # Deletes all objects and versioned objects from this bucket
8
22
  #
@@ -31,10 +45,10 @@ module Aws
31
45
  # each attempt.
32
46
  #
33
47
  # @return [void]
34
- def delete! options = { }
48
+ def delete!(options = {})
35
49
  options = {
36
50
  initial_wait: 1.3,
37
- max_attempts: 3,
51
+ max_attempts: 3
38
52
  }.merge(options)
39
53
 
40
54
  attempts = 0
@@ -43,20 +57,30 @@ module Aws
43
57
  delete
44
58
  rescue Errors::BucketNotEmpty
45
59
  attempts += 1
46
- if attempts >= options[:max_attempts]
47
- raise
48
- else
49
- Kernel.sleep(options[:initial_wait] ** attempts)
50
- retry
51
- end
60
+ raise if attempts >= options[:max_attempts]
61
+
62
+ Kernel.sleep(options[:initial_wait]**attempts)
63
+ retry
52
64
  end
53
65
  end
54
66
 
55
67
  # Returns a public URL for this bucket.
56
68
  #
57
- # bucket = s3.bucket('bucket-name')
58
- # bucket.url
59
- # #=> "https://bucket-name.s3.amazonaws.com"
69
+ # @example
70
+ #
71
+ # bucket = s3.bucket('bucket-name')
72
+ # bucket.url
73
+ # #=> "https://bucket-name.s3.amazonaws.com"
74
+ #
75
+ # It will also work when provided an Access Point ARN.
76
+ #
77
+ # @example
78
+ #
79
+ # bucket = s3.bucket(
80
+ # 'arn:aws:s3:us-east-1:123456789012:accesspoint:myendpoint'
81
+ # )
82
+ # bucket.url
83
+ # #=> "https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com"
60
84
  #
61
85
  # You can pass `virtual_host: true` to use the bucket name as the
62
86
  # host name.
@@ -73,6 +97,8 @@ module Aws
73
97
  def url(options = {})
74
98
  if options[:virtual_host]
75
99
  "http://#{name}"
100
+ elsif @arn
101
+ Plugins::BucketARN.resolve_url!(URI.parse(s3_bucket_url), @arn).to_s
76
102
  else
77
103
  s3_bucket_url
78
104
  end
@@ -93,7 +119,7 @@ module Aws
93
119
  client.config.credentials,
94
120
  client.config.region,
95
121
  name,
96
- {url: url}.merge(options)
122
+ { url: url }.merge(options)
97
123
  )
98
124
  end
99
125
 
@@ -101,6 +127,7 @@ module Aws
101
127
  def load
102
128
  @data = client.list_buckets.buckets.find { |b| b.name == name }
103
129
  raise "unable to load bucket #{name}" if @data.nil?
130
+
104
131
  self
105
132
  end
106
133
 
@@ -115,7 +142,7 @@ module Aws
115
142
  url.path += Seahorse::Util.uri_escape(name)
116
143
  end
117
144
  if (client.config.region == 'us-east-1') &&
118
- (client.config.s3_us_east_1_regional_endpoint == 'legacy')
145
+ (client.config.s3_us_east_1_regional_endpoint == 'legacy')
119
146
  url.host = Plugins::IADRegionalEndpoint.legacy_host(url.host)
120
147
  end
121
148
  url.to_s
@@ -123,7 +150,7 @@ module Aws
123
150
 
124
151
  def bucket_as_hostname?(https)
125
152
  Plugins::BucketDns.dns_compatible?(name, https) &&
126
- !client.config.force_path_style
153
+ !client.config.force_path_style
127
154
  end
128
155
 
129
156
  end
@@ -27,6 +27,7 @@ module Aws::S3
27
27
  @id = extract_id(args, options)
28
28
  @data = options.delete(:data)
29
29
  @client = options.delete(:client) || Client.new(options)
30
+ @waiter_block_warned = false
30
31
  end
31
32
 
32
33
  # @!group Read-Only Attributes
@@ -219,9 +220,13 @@ module Aws::S3
219
220
  # @option options [String] :request_payer
220
221
  # Confirms that the requester knows that she or he will be charged for
221
222
  # 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
223
+ # requests. For information about downloading objects from Requester
224
+ # Pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
225
+ # in the *Amazon S3 Developer Guide*.
226
+ #
227
+ #
228
+ #
229
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
225
230
  # @return [Types::AbortMultipartUploadOutput]
226
231
  def abort(options = {})
227
232
  options = options.merge(
@@ -252,9 +257,13 @@ module Aws::S3
252
257
  # @option options [String] :request_payer
253
258
  # Confirms that the requester knows that she or he will be charged for
254
259
  # the request. Bucket owners need not specify this parameter in their
255
- # requests. Documentation on downloading objects from requester pays
256
- # buckets can be found at
257
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
260
+ # requests. For information about downloading objects from Requester
261
+ # Pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
262
+ # in the *Amazon S3 Developer Guide*.
263
+ #
264
+ #
265
+ #
266
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
258
267
  # @return [Object]
259
268
  def complete(options = {})
260
269
  options = options.merge(
@@ -302,9 +311,13 @@ module Aws::S3
302
311
  # @option options [String] :request_payer
303
312
  # Confirms that the requester knows that she or he will be charged for
304
313
  # the request. Bucket owners need not specify this parameter in their
305
- # requests. Documentation on downloading objects from requester pays
306
- # buckets can be found at
307
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
314
+ # requests. For information about downloading objects from Requester
315
+ # Pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
316
+ # in the *Amazon S3 Developer Guide*.
317
+ #
318
+ #
319
+ #
320
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
308
321
  # @return [MultipartUploadPart::Collection]
309
322
  def parts(options = {})
310
323
  batches = Enumerator.new do |y|
@@ -30,6 +30,7 @@ module Aws::S3
30
30
  @part_number = extract_part_number(args, options)
31
31
  @data = options.delete(:data)
32
32
  @client = options.delete(:client) || Client.new(options)
33
+ @waiter_block_warned = false
33
34
  end
34
35
 
35
36
  # @!group Read-Only Attributes
@@ -234,26 +235,26 @@ module Aws::S3
234
235
  # The range of bytes to copy from the source object. The range value
235
236
  # must use the form bytes=first-last, where the first and last are the
236
237
  # zero-based byte offsets to copy. For example, bytes=0-9 indicates that
237
- # you want to copy the first ten bytes of the source. You can copy a
238
+ # you want to copy the first 10 bytes of the source. You can copy a
238
239
  # range only if the source object is greater than 5 MB.
239
240
  # @option options [String] :sse_customer_algorithm
240
- # Specifies the algorithm to use to when encrypting the object (e.g.,
241
- # AES256).
241
+ # Specifies the algorithm to use to when encrypting the object (for
242
+ # example, AES256).
242
243
  # @option options [String] :sse_customer_key
243
244
  # Specifies the customer-provided encryption key for Amazon S3 to use in
244
245
  # encrypting data. This value is used to store the object and then it is
245
- # discarded; Amazon does not store the encryption key. The key must be
246
- # appropriate for use with the algorithm specified in the
247
- # x-amz-server-side​-encryption​-customer-algorithm header. This must be
248
- # the same encryption key specified in the initiate multipart upload
246
+ # discarded; Amazon S3 does not store the encryption key. The key must
247
+ # be appropriate for use with the algorithm specified in the
248
+ # `x-amz-server-side​-encryption​-customer-algorithm` header. This must
249
+ # be the same encryption key specified in the initiate multipart upload
249
250
  # request.
250
251
  # @option options [String] :sse_customer_key_md5
251
252
  # Specifies the 128-bit MD5 digest of the encryption key according to
252
253
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
253
- # ensure the encryption key was transmitted without error.
254
+ # ensure that the encryption key was transmitted without error.
254
255
  # @option options [String] :copy_source_sse_customer_algorithm
255
- # Specifies the algorithm to use when decrypting the source object
256
- # (e.g., AES256).
256
+ # Specifies the algorithm to use when decrypting the source object (for
257
+ # example, AES256).
257
258
  # @option options [String] :copy_source_sse_customer_key
258
259
  # Specifies the customer-provided encryption key for Amazon S3 to use to
259
260
  # decrypt the source object. The encryption key provided in this header
@@ -261,13 +262,17 @@ module Aws::S3
261
262
  # @option options [String] :copy_source_sse_customer_key_md5
262
263
  # Specifies the 128-bit MD5 digest of the encryption key according to
263
264
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
264
- # ensure the encryption key was transmitted without error.
265
+ # ensure that the encryption key was transmitted without error.
265
266
  # @option options [String] :request_payer
266
267
  # Confirms that the requester knows that she or he will be charged for
267
268
  # the request. Bucket owners need not specify this parameter in their
268
- # requests. Documentation on downloading objects from requester pays
269
- # buckets can be found at
270
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
269
+ # requests. For information about downloading objects from Requester
270
+ # Pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
271
+ # in the *Amazon S3 Developer Guide*.
272
+ #
273
+ #
274
+ #
275
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
271
276
  # @return [Types::UploadPartCopyOutput]
272
277
  def copy_from(options = {})
273
278
  options = options.merge(
@@ -299,29 +304,33 @@ module Aws::S3
299
304
  # the body cannot be determined automatically.
300
305
  # @option options [String] :content_md5
301
306
  # The base64-encoded 128-bit MD5 digest of the part data. This parameter
302
- # is auto-populated when using the command from the CLI. This parameted
307
+ # is auto-populated when using the command from the CLI. This parameter
303
308
  # is required if object lock parameters are specified.
304
309
  # @option options [String] :sse_customer_algorithm
305
- # Specifies the algorithm to use to when encrypting the object (e.g.,
306
- # AES256).
310
+ # Specifies the algorithm to use to when encrypting the object (for
311
+ # example, AES256).
307
312
  # @option options [String] :sse_customer_key
308
313
  # Specifies the customer-provided encryption key for Amazon S3 to use in
309
314
  # encrypting data. This value is used to store the object and then it is
310
- # discarded; Amazon does not store the encryption key. The key must be
311
- # appropriate for use with the algorithm specified in the
312
- # x-amz-server-side​-encryption​-customer-algorithm header. This must be
313
- # the same encryption key specified in the initiate multipart upload
315
+ # discarded; Amazon S3 does not store the encryption key. The key must
316
+ # be appropriate for use with the algorithm specified in the
317
+ # `x-amz-server-side​-encryption​-customer-algorithm header`. This must
318
+ # be the same encryption key specified in the initiate multipart upload
314
319
  # request.
315
320
  # @option options [String] :sse_customer_key_md5
316
321
  # Specifies the 128-bit MD5 digest of the encryption key according to
317
322
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
318
- # ensure the encryption key was transmitted without error.
323
+ # ensure that the encryption key was transmitted without error.
319
324
  # @option options [String] :request_payer
320
325
  # Confirms that the requester knows that she or he will be charged for
321
326
  # the request. Bucket owners need not specify this parameter in their
322
- # requests. Documentation on downloading objects from requester pays
323
- # buckets can be found at
324
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
327
+ # requests. For information about downloading objects from Requester
328
+ # Pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
329
+ # in the *Amazon S3 Developer Guide*.
330
+ #
331
+ #
332
+ #
333
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
325
334
  # @return [Types::UploadPartOutput]
326
335
  def upload(options = {})
327
336
  options = options.merge(
@@ -24,6 +24,7 @@ module Aws::S3
24
24
  @key = extract_key(args, options)
25
25
  @data = options.delete(:data)
26
26
  @client = options.delete(:client) || Client.new(options)
27
+ @waiter_block_warned = false
27
28
  end
28
29
 
29
30
  # @!group Read-Only Attributes
@@ -46,7 +47,7 @@ module Aws::S3
46
47
  data[:delete_marker]
47
48
  end
48
49
 
49
- # Indicates that a range of bytes was specifed.
50
+ # Indicates that a range of bytes was specified.
50
51
  # @return [String]
51
52
  def accept_ranges
52
53
  data[:accept_ranges]
@@ -54,7 +55,7 @@ module Aws::S3
54
55
 
55
56
  # If the object expiration is configured (see PUT Bucket lifecycle), the
56
57
  # response includes this header. It includes the expiry-date and rule-id
57
- # key value pairs providing object expiration information. The value of
58
+ # key-value pairs providing object expiration information. The value of
58
59
  # the rule-id is URL encoded.
59
60
  # @return [String]
60
61
  def expiration
@@ -99,14 +100,14 @@ module Aws::S3
99
100
  end
100
101
 
101
102
  # An ETag is an opaque identifier assigned by a web server to a specific
102
- # version of a resource found at a URL
103
+ # version of a resource found at a URL.
103
104
  # @return [String]
104
105
  def etag
105
106
  data[:etag]
106
107
  end
107
108
 
108
109
  # This is set to the number of metadata entries not returned in
109
- # x-amz-meta headers. This can happen if you create metadata using an
110
+ # `x-amz-meta` headers. This can happen if you create metadata using an
110
111
  # API like SOAP that supports more flexible metadata than the REST API.
111
112
  # For example, using SOAP, you can create metadata whose values are not
112
113
  # legal HTTP headers.
@@ -175,8 +176,8 @@ module Aws::S3
175
176
  # If the object is stored using server-side encryption either with an
176
177
  # AWS KMS customer master key (CMK) or an Amazon S3-managed encryption
177
178
  # key, the response includes this header with the value of the
178
- # Server-side encryption algorithm used when storing this object in S3
179
- # (e.g., AES256, aws:kms).
179
+ # server-side encryption algorithm used when storing this object in
180
+ # Amazon S3 (for example, AES256, aws:kms).
180
181
  # @return [String]
181
182
  def server_side_encryption
182
183
  data[:server_side_encryption]
@@ -197,7 +198,7 @@ module Aws::S3
197
198
  end
198
199
 
199
200
  # If server-side encryption with a customer-provided encryption key was
200
- # requested, the response will include this header to provide round trip
201
+ # requested, the response will include this header to provide round-trip
201
202
  # message integrity verification of the customer-provided encryption
202
203
  # key.
203
204
  # @return [String]
@@ -205,8 +206,8 @@ module Aws::S3
205
206
  data[:sse_customer_key_md5]
206
207
  end
207
208
 
208
- # If present, specifies the ID of the AWS Key Management Service (KMS)
209
- # customer master key (CMK) that was used for the object.
209
+ # If present, specifies the ID of the AWS Key Management Service (AWS
210
+ # KMS) customer master key (CMK) that was used for the object.
210
211
  # @return [String]
211
212
  def ssekms_key_id
212
213
  data[:ssekms_key_id]
@@ -235,27 +236,28 @@ module Aws::S3
235
236
  # Amazon S3 can return this header if your request involves a bucket
236
237
  # that is either a source or destination in a replication rule.
237
238
  #
238
- # In replication you have a source bucket on which you configure
239
+ # In replication, you have a source bucket on which you configure
239
240
  # replication and destination bucket where Amazon S3 stores object
240
- # replicas. When you request an object (GetObject) or object metadata
241
- # (HeadObject) from these buckets, Amazon S3 will return the
242
- # x-amz-replication-status header in the response as follows:
243
- #
244
- # * If requesting object from the source bucket — Amazon S3 will return
245
- # the x-amz-replication-status header if object in your request is
246
- # eligible for replication.
247
- #
248
- # For example, suppose in your replication configuration you specify
249
- # object prefix "TaxDocs" requesting Amazon S3 to replicate objects
250
- # with key prefix "TaxDocs". Then any objects you upload with this
251
- # key name prefix, for example "TaxDocs/document1.pdf", is eligible
252
- # for replication. For any object request with this key name prefix
253
- # Amazon S3 will return the x-amz-replication-status header with value
254
- # PENDING, COMPLETED or FAILED indicating object replication status.
255
- #
256
- # * If requesting object from the destination bucket — Amazon S3 will
257
- # return the x-amz-replication-status header with value REPLICA if
258
- # object in your request is a replica that Amazon S3 created.
241
+ # replicas. When you request an object (`GetObject`) or object metadata
242
+ # (`HeadObject`) from these buckets, Amazon S3 will return the
243
+ # `x-amz-replication-status` header in the response as follows:
244
+ #
245
+ # * If requesting an object from the source bucket — Amazon S3 will
246
+ # return the `x-amz-replication-status` header if the object in your
247
+ # request is eligible for replication.
248
+ #
249
+ # For example, suppose that in your replication configuration, you
250
+ # specify object prefix `TaxDocs` requesting Amazon S3 to replicate
251
+ # objects with key prefix `TaxDocs`. Any objects you upload with this
252
+ # key name prefix, for example `TaxDocs/document1.pdf`, are eligible
253
+ # for replication. For any object request with this key name prefix,
254
+ # Amazon S3 will return the `x-amz-replication-status` header with
255
+ # value PENDING, COMPLETED or FAILED indicating object replication
256
+ # status.
257
+ #
258
+ # * If requesting an object from the destination bucket Amazon S3 will
259
+ # return the `x-amz-replication-status` header with value REPLICA if
260
+ # the object in your request is a replica that Amazon S3 created.
259
261
  #
260
262
  # For more information, see [Replication][1].
261
263
  #
@@ -584,8 +586,8 @@ module Aws::S3
584
586
  # Specifies whether the object tag-set are copied from the source object
585
587
  # or replaced with tag-set provided in the request.
586
588
  # @option options [String] :server_side_encryption
587
- # The Server-side encryption algorithm used when storing this object in
588
- # S3 (e.g., AES256, aws:kms).
589
+ # The server-side encryption algorithm used when storing this object in
590
+ # Amazon S3 (for example, AES256, aws:kms).
589
591
  # @option options [String] :storage_class
590
592
  # The type of storage to use for the object. Defaults to 'STANDARD'.
591
593
  # @option options [String] :website_redirect_location
@@ -593,31 +595,36 @@ module Aws::S3
593
595
  # object to another object in the same bucket or to an external URL.
594
596
  # Amazon S3 stores the value of this header in the object metadata.
595
597
  # @option options [String] :sse_customer_algorithm
596
- # Specifies the algorithm to use to when encrypting the object (e.g.,
597
- # AES256).
598
+ # Specifies the algorithm to use to when encrypting the object (for
599
+ # example, AES256).
598
600
  # @option options [String] :sse_customer_key
599
601
  # Specifies the customer-provided encryption key for Amazon S3 to use in
600
602
  # encrypting data. This value is used to store the object and then it is
601
- # discarded; Amazon does not store the encryption key. The key must be
602
- # appropriate for use with the algorithm specified in the
603
- # x-amz-server-side​-encryption​-customer-algorithm header.
603
+ # discarded; Amazon S3 does not store the encryption key. The key must
604
+ # be appropriate for use with the algorithm specified in the
605
+ # `x-amz-server-side​-encryption​-customer-algorithm` header.
604
606
  # @option options [String] :sse_customer_key_md5
605
607
  # Specifies the 128-bit MD5 digest of the encryption key according to
606
608
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
607
- # ensure the encryption key was transmitted without error.
609
+ # ensure that the encryption key was transmitted without error.
608
610
  # @option options [String] :ssekms_key_id
609
611
  # Specifies the AWS KMS key ID to use for object encryption. All GET and
610
612
  # PUT requests for an object protected by AWS KMS will fail if not made
611
- # via SSL or using SigV4. Documentation on configuring any of the
612
- # officially supported AWS SDKs and CLI can be found at
613
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
613
+ # via SSL or using SigV4. For information about configuring using any of
614
+ # the officially supported AWS SDKs and AWS CLI, see [Specifying the
615
+ # Signature Version in Request Authentication][1] in the *Amazon S3
616
+ # Developer Guide*.
617
+ #
618
+ #
619
+ #
620
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
614
621
  # @option options [String] :ssekms_encryption_context
615
622
  # Specifies the AWS KMS Encryption Context to use for object encryption.
616
623
  # The value of this header is a base64-encoded UTF-8 string holding JSON
617
624
  # with the encryption context key-value pairs.
618
625
  # @option options [String] :copy_source_sse_customer_algorithm
619
- # Specifies the algorithm to use when decrypting the source object
620
- # (e.g., AES256).
626
+ # Specifies the algorithm to use when decrypting the source object (for
627
+ # example, AES256).
621
628
  # @option options [String] :copy_source_sse_customer_key
622
629
  # Specifies the customer-provided encryption key for Amazon S3 to use to
623
630
  # decrypt the source object. The encryption key provided in this header
@@ -625,17 +632,21 @@ module Aws::S3
625
632
  # @option options [String] :copy_source_sse_customer_key_md5
626
633
  # Specifies the 128-bit MD5 digest of the encryption key according to
627
634
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
628
- # ensure the encryption key was transmitted without error.
635
+ # ensure that the encryption key was transmitted without error.
629
636
  # @option options [String] :request_payer
630
637
  # Confirms that the requester knows that she or he will be charged for
631
638
  # the request. Bucket owners need not specify this parameter in their
632
- # requests. Documentation on downloading objects from requester pays
633
- # buckets can be found at
634
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
639
+ # requests. For information about downloading objects from Requester
640
+ # Pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
641
+ # in the *Amazon S3 Developer Guide*.
642
+ #
643
+ #
644
+ #
645
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
635
646
  # @option options [String] :tagging
636
647
  # The tag-set for the object destination object this value must be used
637
- # in conjunction with the TaggingDirective. The tag-set must be encoded
638
- # as URL Query parameters
648
+ # in conjunction with the `TaggingDirective`. The tag-set must be
649
+ # encoded as URL Query parameters.
639
650
  # @option options [String] :object_lock_mode
640
651
  # The Object Lock mode that you want to apply to the copied object.
641
652
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
@@ -665,16 +676,20 @@ module Aws::S3
665
676
  # @option options [String] :mfa
666
677
  # The concatenation of the authentication device's serial number, a
667
678
  # space, and the value that is displayed on your authentication device.
668
- # Required to permanently delete a versionedobject if versioning is
669
- # configured with MFA Deleteenabled.
679
+ # Required to permanently delete a versioned object if versioning is
680
+ # configured with MFA delete enabled.
670
681
  # @option options [String] :version_id
671
682
  # VersionId used to reference a specific version of the object.
672
683
  # @option options [String] :request_payer
673
684
  # Confirms that the requester knows that she or he will be charged for
674
685
  # the request. Bucket owners need not specify this parameter in their
675
- # requests. Documentation on downloading objects from requester pays
676
- # buckets can be found at
677
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
686
+ # requests. For information about downloading objects from Requester
687
+ # Pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
688
+ # in the *Amazon S3 Developer Guide*.
689
+ #
690
+ #
691
+ #
692
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
678
693
  # @option options [Boolean] :bypass_governance_retention
679
694
  # Indicates whether S3 Object Lock should bypass Governance-mode
680
695
  # restrictions to process this operation.
@@ -724,41 +739,45 @@ module Aws::S3
724
739
  # time, otherwise return a 412 (precondition failed).
725
740
  # @option options [String] :range
726
741
  # Downloads the specified range bytes of an object. For more information
727
- # about the HTTP Range header, go to
728
- # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
742
+ # about the HTTP Range header, see
743
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35]().
729
744
  # @option options [String] :response_cache_control
730
- # Sets the Cache-Control header of the response.
745
+ # Sets the `Cache-Control` header of the response.
731
746
  # @option options [String] :response_content_disposition
732
- # Sets the Content-Disposition header of the response
747
+ # Sets the `Content-Disposition` header of the response
733
748
  # @option options [String] :response_content_encoding
734
- # Sets the Content-Encoding header of the response.
749
+ # Sets the `Content-Encoding` header of the response.
735
750
  # @option options [String] :response_content_language
736
- # Sets the Content-Language header of the response.
751
+ # Sets the `Content-Language` header of the response.
737
752
  # @option options [String] :response_content_type
738
- # Sets the Content-Type header of the response.
753
+ # Sets the `Content-Type` header of the response.
739
754
  # @option options [Time,DateTime,Date,Integer,String] :response_expires
740
- # Sets the Expires header of the response.
755
+ # Sets the `Expires` header of the response.
741
756
  # @option options [String] :version_id
742
757
  # VersionId used to reference a specific version of the object.
743
758
  # @option options [String] :sse_customer_algorithm
744
- # Specifies the algorithm to use to when encrypting the object (e.g.,
745
- # AES256).
759
+ # Specifies the algorithm to use to when encrypting the object (for
760
+ # example, AES256).
746
761
  # @option options [String] :sse_customer_key
747
762
  # Specifies the customer-provided encryption key for Amazon S3 to use in
748
763
  # encrypting data. This value is used to store the object and then it is
749
- # discarded; Amazon does not store the encryption key. The key must be
750
- # appropriate for use with the algorithm specified in the
751
- # x-amz-server-side​-encryption​-customer-algorithm header.
764
+ # discarded; Amazon S3 does not store the encryption key. The key must
765
+ # be appropriate for use with the algorithm specified in the
766
+ # `x-amz-server-side​-encryption​-customer-algorithm` header.
752
767
  # @option options [String] :sse_customer_key_md5
753
768
  # Specifies the 128-bit MD5 digest of the encryption key according to
754
769
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
755
- # ensure the encryption key was transmitted without error.
770
+ # ensure that the encryption key was transmitted without error.
756
771
  # @option options [String] :request_payer
757
772
  # Confirms that the requester knows that she or he will be charged for
758
773
  # the request. Bucket owners need not specify this parameter in their
759
- # requests. Documentation on downloading objects from requester pays
760
- # buckets can be found at
761
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
774
+ # requests. For information about downloading objects from Requester
775
+ # Pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
776
+ # in the *Amazon S3 Developer Guide*.
777
+ #
778
+ #
779
+ #
780
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
762
781
  # @option options [Integer] :part_number
763
782
  # Part number of the object being read. This is a positive integer
764
783
  # between 1 and 10,000. Effectively performs a 'ranged' GET request
@@ -834,8 +853,8 @@ module Aws::S3
834
853
  # @option options [Hash<String,String>] :metadata
835
854
  # A map of metadata to store with the object in S3.
836
855
  # @option options [String] :server_side_encryption
837
- # The Server-side encryption algorithm used when storing this object in
838
- # S3 (e.g., AES256, aws:kms).
856
+ # The server-side encryption algorithm used when storing this object in
857
+ # Amazon S3 (for example, AES256, aws:kms).
839
858
  # @option options [String] :storage_class
840
859
  # The type of storage to use for the object. Defaults to 'STANDARD'.
841
860
  # @option options [String] :website_redirect_location
@@ -843,24 +862,29 @@ module Aws::S3
843
862
  # object to another object in the same bucket or to an external URL.
844
863
  # Amazon S3 stores the value of this header in the object metadata.
845
864
  # @option options [String] :sse_customer_algorithm
846
- # Specifies the algorithm to use to when encrypting the object (e.g.,
847
- # AES256).
865
+ # Specifies the algorithm to use to when encrypting the object (for
866
+ # example, AES256).
848
867
  # @option options [String] :sse_customer_key
849
868
  # Specifies the customer-provided encryption key for Amazon S3 to use in
850
869
  # encrypting data. This value is used to store the object and then it is
851
- # discarded; Amazon does not store the encryption key. The key must be
852
- # appropriate for use with the algorithm specified in the
853
- # x-amz-server-side​-encryption​-customer-algorithm header.
870
+ # discarded; Amazon S3 does not store the encryption key. The key must
871
+ # be appropriate for use with the algorithm specified in the
872
+ # `x-amz-server-side​-encryption​-customer-algorithm` header.
854
873
  # @option options [String] :sse_customer_key_md5
855
874
  # Specifies the 128-bit MD5 digest of the encryption key according to
856
875
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
857
- # ensure the encryption key was transmitted without error.
876
+ # ensure that the encryption key was transmitted without error.
858
877
  # @option options [String] :ssekms_key_id
859
878
  # Specifies the AWS KMS key ID to use for object encryption. All GET and
860
879
  # PUT requests for an object protected by AWS KMS will fail if not made
861
- # via SSL or using SigV4. Documentation on configuring any of the
862
- # officially supported AWS SDKs and CLI can be found at
863
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
880
+ # via SSL or using SigV4. For information about configuring using any of
881
+ # the officially supported AWS SDKs and AWS CLI, see [Specifying the
882
+ # Signature Version in Request Authentication][1] in the *Amazon S3
883
+ # Developer Guide*.
884
+ #
885
+ #
886
+ #
887
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
864
888
  # @option options [String] :ssekms_encryption_context
865
889
  # Specifies the AWS KMS Encryption Context to use for object encryption.
866
890
  # The value of this header is a base64-encoded UTF-8 string holding JSON
@@ -868,12 +892,16 @@ module Aws::S3
868
892
  # @option options [String] :request_payer
869
893
  # Confirms that the requester knows that she or he will be charged for
870
894
  # the request. Bucket owners need not specify this parameter in their
871
- # requests. Documentation on downloading objects from requester pays
872
- # buckets can be found at
873
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
895
+ # requests. For information about downloading objects from Requester
896
+ # Pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
897
+ # in the *Amazon S3 Developer Guide*.
898
+ #
899
+ #
900
+ #
901
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
874
902
  # @option options [String] :tagging
875
903
  # The tag-set for the object. The tag-set must be encoded as URL Query
876
- # parameters
904
+ # parameters.
877
905
  # @option options [String] :object_lock_mode
878
906
  # Specifies the Object Lock mode that you want to apply to the uploaded
879
907
  # object.
@@ -1016,8 +1044,8 @@ module Aws::S3
1016
1044
  # @option options [Hash<String,String>] :metadata
1017
1045
  # A map of metadata to store with the object in S3.
1018
1046
  # @option options [String] :server_side_encryption
1019
- # The Server-side encryption algorithm used when storing this object in
1020
- # S3 (e.g., AES256, aws:kms).
1047
+ # The server-side encryption algorithm used when storing this object in
1048
+ # Amazon S3 (for example, AES256, aws:kms).
1021
1049
  # @option options [String] :storage_class
1022
1050
  # If you don't specify, Standard is the default storage class. Amazon
1023
1051
  # S3 supports other storage classes.
@@ -1025,7 +1053,7 @@ module Aws::S3
1025
1053
  # If the bucket is configured as a website, redirects requests for this
1026
1054
  # object to another object in the same bucket or to an external URL.
1027
1055
  # Amazon S3 stores the value of this header in the object metadata. For
1028
- # information about object metadata, see .
1056
+ # information about object metadata, see [Object Key and Metadata][1].
1029
1057
  #
1030
1058
  # In the following example, the request header sets the redirect to an
1031
1059
  # object (anotherPage.html) in the same bucket:
@@ -1038,37 +1066,38 @@ module Aws::S3
1038
1066
  # `x-amz-website-redirect-location: http://www.example.com/`
1039
1067
  #
1040
1068
  # For more information about website hosting in Amazon S3, see [Hosting
1041
- # Websites on Amazon S3][1] and [How to Configure Website Page
1042
- # Redirects][2].
1069
+ # Websites on Amazon S3][2] and [How to Configure Website Page
1070
+ # Redirects][3].
1043
1071
  #
1044
1072
  #
1045
1073
  #
1046
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
1047
- # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
1074
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
1075
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
1076
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
1048
1077
  # @option options [String] :sse_customer_algorithm
1049
- # Specifies the algorithm to use to when encrypting the object (e.g.,
1050
- # AES256).
1078
+ # Specifies the algorithm to use to when encrypting the object (for
1079
+ # example, AES256).
1051
1080
  # @option options [String] :sse_customer_key
1052
1081
  # Specifies the customer-provided encryption key for Amazon S3 to use in
1053
1082
  # encrypting data. This value is used to store the object and then it is
1054
- # discarded; Amazon does not store the encryption key. The key must be
1055
- # appropriate for use with the algorithm specified in the
1056
- # x-amz-server-side​-encryption​-customer-algorithm header.
1083
+ # discarded; Amazon S3 does not store the encryption key. The key must
1084
+ # be appropriate for use with the algorithm specified in the
1085
+ # `x-amz-server-side​-encryption​-customer-algorithm` header.
1057
1086
  # @option options [String] :sse_customer_key_md5
1058
1087
  # Specifies the 128-bit MD5 digest of the encryption key according to
1059
1088
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
1060
- # ensure the encryption key was transmitted without error.
1089
+ # ensure that the encryption key was transmitted without error.
1061
1090
  # @option options [String] :ssekms_key_id
1062
- # If the x-amz-server-side-encryption is present and has the value of
1063
- # aws:kms, this header specifies the ID of the AWS Key Management
1091
+ # If `x-amz-server-side-encryption` is present and has the value of
1092
+ # `aws:kms`, this header specifies the ID of the AWS Key Management
1064
1093
  # Service (AWS KMS) customer master key (CMK) that was used for the
1065
1094
  # object.
1066
1095
  #
1067
- # If the value of x-amz-server-side-encryption is aws:kms, this header
1068
- # specifies the ID of the AWS KMS CMK that will be used for the object.
1069
- # If you specify x-amz-server-side-encryption:aws:kms, but do not
1070
- # provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses
1071
- # the AWS managed CMK in AWS to protect the data.
1096
+ # If the value of `x-amz-server-side-encryption` is `aws:kms`, this
1097
+ # header specifies the ID of the AWS KMS CMK that will be used for the
1098
+ # object. If you specify `x-amz-server-side-encryption:aws:kms`, but do
1099
+ # not provide` x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3
1100
+ # uses the AWS managed CMK in AWS to protect the data.
1072
1101
  # @option options [String] :ssekms_encryption_context
1073
1102
  # Specifies the AWS KMS Encryption Context to use for object encryption.
1074
1103
  # The value of this header is a base64-encoded UTF-8 string holding JSON
@@ -1076,9 +1105,13 @@ module Aws::S3
1076
1105
  # @option options [String] :request_payer
1077
1106
  # Confirms that the requester knows that she or he will be charged for
1078
1107
  # the request. Bucket owners need not specify this parameter in their
1079
- # requests. Documentation on downloading objects from requester pays
1080
- # buckets can be found at
1081
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1108
+ # requests. For information about downloading objects from Requester
1109
+ # Pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1110
+ # in the *Amazon S3 Developer Guide*.
1111
+ #
1112
+ #
1113
+ #
1114
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1082
1115
  # @option options [String] :tagging
1083
1116
  # The tag-set for the object. The tag-set must be encoded as URL Query
1084
1117
  # parameters. (For example, "Key1=Value1")
@@ -1198,9 +1231,13 @@ module Aws::S3
1198
1231
  # @option options [String] :request_payer
1199
1232
  # Confirms that the requester knows that she or he will be charged for
1200
1233
  # the request. Bucket owners need not specify this parameter in their
1201
- # requests. Documentation on downloading objects from requester pays
1202
- # buckets can be found at
1203
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1234
+ # requests. For information about downloading objects from Requester
1235
+ # Pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1236
+ # in the *Amazon S3 Developer Guide*.
1237
+ #
1238
+ #
1239
+ #
1240
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1204
1241
  # @return [Types::RestoreObjectOutput]
1205
1242
  def restore_object(options = {})
1206
1243
  options = options.merge(
@@ -1327,13 +1364,17 @@ module Aws::S3
1327
1364
  # The concatenation of the authentication device's serial number, a
1328
1365
  # space, and the value that is displayed on your authentication device.
1329
1366
  # Required to permanently delete a versioned object if versioning is
1330
- # configured with MFA Delete enabled.
1367
+ # configured with MFA delete enabled.
1331
1368
  # @option options [String] :request_payer
1332
1369
  # Confirms that the requester knows that she or he will be charged for
1333
1370
  # the request. Bucket owners need not specify this parameter in their
1334
- # requests. Documentation on downloading objects from requester pays
1335
- # buckets can be found at
1336
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1371
+ # requests. For information about downloading objects from Requester
1372
+ # Pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1373
+ # in the *Amazon S3 Developer Guide*.
1374
+ #
1375
+ #
1376
+ #
1377
+ # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1337
1378
  # @option options [Boolean] :bypass_governance_retention
1338
1379
  # Specifies whether you want to delete this object even if it has a
1339
1380
  # Governance-type Object Lock in place. You must have sufficient