aws-sdk-s3 1.147.0 → 1.163.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +103 -2
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
  5. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
  6. data/lib/aws-sdk-s3/bucket.rb +209 -69
  7. data/lib/aws-sdk-s3/bucket_acl.rb +3 -3
  8. data/lib/aws-sdk-s3/bucket_cors.rb +4 -4
  9. data/lib/aws-sdk-s3/bucket_lifecycle.rb +4 -4
  10. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +4 -4
  11. data/lib/aws-sdk-s3/bucket_logging.rb +3 -3
  12. data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
  13. data/lib/aws-sdk-s3/bucket_policy.rb +4 -4
  14. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  15. data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
  16. data/lib/aws-sdk-s3/bucket_tagging.rb +4 -4
  17. data/lib/aws-sdk-s3/bucket_versioning.rb +5 -5
  18. data/lib/aws-sdk-s3/bucket_website.rb +4 -4
  19. data/lib/aws-sdk-s3/client.rb +1653 -637
  20. data/lib/aws-sdk-s3/client_api.rb +35 -3
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
  22. data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
  23. data/lib/aws-sdk-s3/customizations/object.rb +5 -5
  24. data/lib/aws-sdk-s3/customizations.rb +4 -1
  25. data/lib/aws-sdk-s3/encryption/client.rb +2 -2
  26. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +2 -2
  27. data/lib/aws-sdk-s3/encryptionV2/client.rb +2 -2
  28. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +2 -2
  29. data/lib/aws-sdk-s3/endpoint_parameters.rb +8 -0
  30. data/lib/aws-sdk-s3/endpoint_provider.rb +1 -0
  31. data/lib/aws-sdk-s3/endpoints.rb +199 -397
  32. data/lib/aws-sdk-s3/express_credentials_provider.rb +27 -4
  33. data/lib/aws-sdk-s3/file_downloader.rb +1 -1
  34. data/lib/aws-sdk-s3/file_uploader.rb +1 -1
  35. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +1 -1
  36. data/lib/aws-sdk-s3/multipart_upload.rb +24 -4
  37. data/lib/aws-sdk-s3/multipart_upload_part.rb +3 -3
  38. data/lib/aws-sdk-s3/object.rb +394 -137
  39. data/lib/aws-sdk-s3/object_acl.rb +3 -3
  40. data/lib/aws-sdk-s3/object_copier.rb +1 -1
  41. data/lib/aws-sdk-s3/object_multipart_copier.rb +10 -8
  42. data/lib/aws-sdk-s3/object_summary.rb +358 -115
  43. data/lib/aws-sdk-s3/object_version.rb +46 -9
  44. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  45. data/lib/aws-sdk-s3/plugins/endpoints.rb +10 -1
  46. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +8 -2
  47. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
  48. data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
  49. data/lib/aws-sdk-s3/presigner.rb +1 -0
  50. data/lib/aws-sdk-s3/resource.rb +12 -10
  51. data/lib/aws-sdk-s3/types.rb +966 -350
  52. data/lib/aws-sdk-s3.rb +1 -1
  53. data/sig/bucket.rbs +1 -0
  54. data/sig/client.rbs +38 -2
  55. data/sig/customizations/bucket.rbs +19 -0
  56. data/sig/customizations/object.rbs +38 -0
  57. data/sig/customizations/object_summary.rbs +35 -0
  58. data/sig/multipart_upload.rbs +1 -0
  59. data/sig/object.rbs +7 -0
  60. data/sig/object_summary.rbs +1 -0
  61. data/sig/object_version.rbs +6 -0
  62. data/sig/resource.rbs +6 -1
  63. data/sig/types.rbs +25 -2
  64. data/sig/waiters.rbs +12 -0
  65. metadata +12 -7
  66. data/lib/aws-sdk-s3/express_credentials_cache.rb +0 -30
@@ -334,6 +334,7 @@ module Aws::S3
334
334
  ListBucketMetricsConfigurationsOutput = Shapes::StructureShape.new(name: 'ListBucketMetricsConfigurationsOutput')
335
335
  ListBucketMetricsConfigurationsRequest = Shapes::StructureShape.new(name: 'ListBucketMetricsConfigurationsRequest')
336
336
  ListBucketsOutput = Shapes::StructureShape.new(name: 'ListBucketsOutput')
337
+ ListBucketsRequest = Shapes::StructureShape.new(name: 'ListBucketsRequest')
337
338
  ListDirectoryBucketsOutput = Shapes::StructureShape.new(name: 'ListDirectoryBucketsOutput')
338
339
  ListDirectoryBucketsRequest = Shapes::StructureShape.new(name: 'ListDirectoryBucketsRequest')
339
340
  ListMultipartUploadsOutput = Shapes::StructureShape.new(name: 'ListMultipartUploadsOutput')
@@ -357,6 +358,7 @@ module Aws::S3
357
358
  MFADeleteStatus = Shapes::StringShape.new(name: 'MFADeleteStatus')
358
359
  Marker = Shapes::StringShape.new(name: 'Marker')
359
360
  MaxAgeSeconds = Shapes::IntegerShape.new(name: 'MaxAgeSeconds')
361
+ MaxBuckets = Shapes::IntegerShape.new(name: 'MaxBuckets')
360
362
  MaxDirectoryBuckets = Shapes::IntegerShape.new(name: 'MaxDirectoryBuckets')
361
363
  MaxKeys = Shapes::IntegerShape.new(name: 'MaxKeys')
362
364
  MaxParts = Shapes::IntegerShape.new(name: 'MaxParts')
@@ -768,6 +770,7 @@ module Aws::S3
768
770
  CompleteMultipartUploadRequest.add_member(:checksum_sha256, Shapes::ShapeRef.new(shape: ChecksumSHA256, location: "header", location_name: "x-amz-checksum-sha256"))
769
771
  CompleteMultipartUploadRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
770
772
  CompleteMultipartUploadRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
773
+ CompleteMultipartUploadRequest.add_member(:if_none_match, Shapes::ShapeRef.new(shape: IfNoneMatch, location: "header", location_name: "If-None-Match"))
771
774
  CompleteMultipartUploadRequest.add_member(:sse_customer_algorithm, Shapes::ShapeRef.new(shape: SSECustomerAlgorithm, location: "header", location_name: "x-amz-server-side-encryption-customer-algorithm"))
772
775
  CompleteMultipartUploadRequest.add_member(:sse_customer_key, Shapes::ShapeRef.new(shape: SSECustomerKey, location: "header", location_name: "x-amz-server-side-encryption-customer-key"))
773
776
  CompleteMultipartUploadRequest.add_member(:sse_customer_key_md5, Shapes::ShapeRef.new(shape: SSECustomerKeyMD5, location: "header", location_name: "x-amz-server-side-encryption-customer-key-MD5"))
@@ -817,7 +820,7 @@ module Aws::S3
817
820
  CopyObjectRequest.add_member(:content_encoding, Shapes::ShapeRef.new(shape: ContentEncoding, location: "header", location_name: "Content-Encoding"))
818
821
  CopyObjectRequest.add_member(:content_language, Shapes::ShapeRef.new(shape: ContentLanguage, location: "header", location_name: "Content-Language"))
819
822
  CopyObjectRequest.add_member(:content_type, Shapes::ShapeRef.new(shape: ContentType, location: "header", location_name: "Content-Type"))
820
- CopyObjectRequest.add_member(:copy_source, Shapes::ShapeRef.new(shape: CopySource, required: true, location: "header", location_name: "x-amz-copy-source"))
823
+ CopyObjectRequest.add_member(:copy_source, Shapes::ShapeRef.new(shape: CopySource, required: true, location: "header", location_name: "x-amz-copy-source", metadata: {"contextParam"=>{"name"=>"CopySource"}}))
821
824
  CopyObjectRequest.add_member(:copy_source_if_match, Shapes::ShapeRef.new(shape: CopySourceIfMatch, location: "header", location_name: "x-amz-copy-source-if-match"))
822
825
  CopyObjectRequest.add_member(:copy_source_if_modified_since, Shapes::ShapeRef.new(shape: CopySourceIfModifiedSince, location: "header", location_name: "x-amz-copy-source-if-modified-since"))
823
826
  CopyObjectRequest.add_member(:copy_source_if_none_match, Shapes::ShapeRef.new(shape: CopySourceIfNoneMatch, location: "header", location_name: "x-amz-copy-source-if-none-match"))
@@ -827,7 +830,7 @@ module Aws::S3
827
830
  CopyObjectRequest.add_member(:grant_read, Shapes::ShapeRef.new(shape: GrantRead, location: "header", location_name: "x-amz-grant-read"))
828
831
  CopyObjectRequest.add_member(:grant_read_acp, Shapes::ShapeRef.new(shape: GrantReadACP, location: "header", location_name: "x-amz-grant-read-acp"))
829
832
  CopyObjectRequest.add_member(:grant_write_acp, Shapes::ShapeRef.new(shape: GrantWriteACP, location: "header", location_name: "x-amz-grant-write-acp"))
830
- CopyObjectRequest.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, required: true, location: "uri", location_name: "Key"))
833
+ CopyObjectRequest.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, required: true, location: "uri", location_name: "Key", metadata: {"contextParam"=>{"name"=>"Key"}}))
831
834
  CopyObjectRequest.add_member(:metadata, Shapes::ShapeRef.new(shape: Metadata, location: "headers", location_name: "x-amz-meta-"))
832
835
  CopyObjectRequest.add_member(:metadata_directive, Shapes::ShapeRef.new(shape: MetadataDirective, location: "header", location_name: "x-amz-metadata-directive"))
833
836
  CopyObjectRequest.add_member(:tagging_directive, Shapes::ShapeRef.new(shape: TaggingDirective, location: "header", location_name: "x-amz-tagging-directive"))
@@ -937,11 +940,19 @@ module Aws::S3
937
940
  CreateMultipartUploadRequest.add_member(:checksum_algorithm, Shapes::ShapeRef.new(shape: ChecksumAlgorithm, location: "header", location_name: "x-amz-checksum-algorithm"))
938
941
  CreateMultipartUploadRequest.struct_class = Types::CreateMultipartUploadRequest
939
942
 
943
+ CreateSessionOutput.add_member(:server_side_encryption, Shapes::ShapeRef.new(shape: ServerSideEncryption, location: "header", location_name: "x-amz-server-side-encryption"))
944
+ CreateSessionOutput.add_member(:ssekms_key_id, Shapes::ShapeRef.new(shape: SSEKMSKeyId, location: "header", location_name: "x-amz-server-side-encryption-aws-kms-key-id"))
945
+ CreateSessionOutput.add_member(:ssekms_encryption_context, Shapes::ShapeRef.new(shape: SSEKMSEncryptionContext, location: "header", location_name: "x-amz-server-side-encryption-context"))
946
+ CreateSessionOutput.add_member(:bucket_key_enabled, Shapes::ShapeRef.new(shape: BucketKeyEnabled, location: "header", location_name: "x-amz-server-side-encryption-bucket-key-enabled"))
940
947
  CreateSessionOutput.add_member(:credentials, Shapes::ShapeRef.new(shape: SessionCredentials, required: true, location_name: "Credentials"))
941
948
  CreateSessionOutput.struct_class = Types::CreateSessionOutput
942
949
 
943
950
  CreateSessionRequest.add_member(:session_mode, Shapes::ShapeRef.new(shape: SessionMode, location: "header", location_name: "x-amz-create-session-mode"))
944
951
  CreateSessionRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket", metadata: {"contextParam"=>{"name"=>"Bucket"}}))
952
+ CreateSessionRequest.add_member(:server_side_encryption, Shapes::ShapeRef.new(shape: ServerSideEncryption, location: "header", location_name: "x-amz-server-side-encryption"))
953
+ CreateSessionRequest.add_member(:ssekms_key_id, Shapes::ShapeRef.new(shape: SSEKMSKeyId, location: "header", location_name: "x-amz-server-side-encryption-aws-kms-key-id"))
954
+ CreateSessionRequest.add_member(:ssekms_encryption_context, Shapes::ShapeRef.new(shape: SSEKMSEncryptionContext, location: "header", location_name: "x-amz-server-side-encryption-context"))
955
+ CreateSessionRequest.add_member(:bucket_key_enabled, Shapes::ShapeRef.new(shape: BucketKeyEnabled, location: "header", location_name: "x-amz-server-side-encryption-bucket-key-enabled"))
945
956
  CreateSessionRequest.struct_class = Types::CreateSessionRequest
946
957
 
947
958
  DefaultRetention.add_member(:mode, Shapes::ShapeRef.new(shape: ObjectLockRetentionMode, location_name: "Mode"))
@@ -1531,6 +1542,12 @@ module Aws::S3
1531
1542
  HeadObjectRequest.add_member(:if_unmodified_since, Shapes::ShapeRef.new(shape: IfUnmodifiedSince, location: "header", location_name: "If-Unmodified-Since"))
1532
1543
  HeadObjectRequest.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, required: true, location: "uri", location_name: "Key", metadata: {"contextParam"=>{"name"=>"Key"}}))
1533
1544
  HeadObjectRequest.add_member(:range, Shapes::ShapeRef.new(shape: Range, location: "header", location_name: "Range"))
1545
+ HeadObjectRequest.add_member(:response_cache_control, Shapes::ShapeRef.new(shape: ResponseCacheControl, location: "querystring", location_name: "response-cache-control"))
1546
+ HeadObjectRequest.add_member(:response_content_disposition, Shapes::ShapeRef.new(shape: ResponseContentDisposition, location: "querystring", location_name: "response-content-disposition"))
1547
+ HeadObjectRequest.add_member(:response_content_encoding, Shapes::ShapeRef.new(shape: ResponseContentEncoding, location: "querystring", location_name: "response-content-encoding"))
1548
+ HeadObjectRequest.add_member(:response_content_language, Shapes::ShapeRef.new(shape: ResponseContentLanguage, location: "querystring", location_name: "response-content-language"))
1549
+ HeadObjectRequest.add_member(:response_content_type, Shapes::ShapeRef.new(shape: ResponseContentType, location: "querystring", location_name: "response-content-type"))
1550
+ HeadObjectRequest.add_member(:response_expires, Shapes::ShapeRef.new(shape: ResponseExpires, location: "querystring", location_name: "response-expires"))
1534
1551
  HeadObjectRequest.add_member(:version_id, Shapes::ShapeRef.new(shape: ObjectVersionId, location: "querystring", location_name: "versionId"))
1535
1552
  HeadObjectRequest.add_member(:sse_customer_algorithm, Shapes::ShapeRef.new(shape: SSECustomerAlgorithm, location: "header", location_name: "x-amz-server-side-encryption-customer-algorithm"))
1536
1553
  HeadObjectRequest.add_member(:sse_customer_key, Shapes::ShapeRef.new(shape: SSECustomerKey, location: "header", location_name: "x-amz-server-side-encryption-customer-key"))
@@ -1701,8 +1718,13 @@ module Aws::S3
1701
1718
 
1702
1719
  ListBucketsOutput.add_member(:buckets, Shapes::ShapeRef.new(shape: Buckets, location_name: "Buckets"))
1703
1720
  ListBucketsOutput.add_member(:owner, Shapes::ShapeRef.new(shape: Owner, location_name: "Owner"))
1721
+ ListBucketsOutput.add_member(:continuation_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "ContinuationToken"))
1704
1722
  ListBucketsOutput.struct_class = Types::ListBucketsOutput
1705
1723
 
1724
+ ListBucketsRequest.add_member(:max_buckets, Shapes::ShapeRef.new(shape: MaxBuckets, location: "querystring", location_name: "max-buckets"))
1725
+ ListBucketsRequest.add_member(:continuation_token, Shapes::ShapeRef.new(shape: Token, location: "querystring", location_name: "continuation-token"))
1726
+ ListBucketsRequest.struct_class = Types::ListBucketsRequest
1727
+
1706
1728
  ListDirectoryBucketsOutput.add_member(:buckets, Shapes::ShapeRef.new(shape: Buckets, location_name: "Buckets"))
1707
1729
  ListDirectoryBucketsOutput.add_member(:continuation_token, Shapes::ShapeRef.new(shape: DirectoryBucketToken, location_name: "ContinuationToken"))
1708
1730
  ListDirectoryBucketsOutput.struct_class = Types::ListDirectoryBucketsOutput
@@ -2305,6 +2327,7 @@ module Aws::S3
2305
2327
  PutObjectRequest.add_member(:checksum_sha1, Shapes::ShapeRef.new(shape: ChecksumSHA1, location: "header", location_name: "x-amz-checksum-sha1"))
2306
2328
  PutObjectRequest.add_member(:checksum_sha256, Shapes::ShapeRef.new(shape: ChecksumSHA256, location: "header", location_name: "x-amz-checksum-sha256"))
2307
2329
  PutObjectRequest.add_member(:expires, Shapes::ShapeRef.new(shape: Expires, location: "header", location_name: "Expires"))
2330
+ PutObjectRequest.add_member(:if_none_match, Shapes::ShapeRef.new(shape: IfNoneMatch, location: "header", location_name: "If-None-Match"))
2308
2331
  PutObjectRequest.add_member(:grant_full_control, Shapes::ShapeRef.new(shape: GrantFullControl, location: "header", location_name: "x-amz-grant-full-control"))
2309
2332
  PutObjectRequest.add_member(:grant_read, Shapes::ShapeRef.new(shape: GrantRead, location: "header", location_name: "x-amz-grant-read"))
2310
2333
  PutObjectRequest.add_member(:grant_read_acp, Shapes::ShapeRef.new(shape: GrantReadACP, location: "header", location_name: "x-amz-grant-read-acp"))
@@ -2760,10 +2783,12 @@ module Aws::S3
2760
2783
 
2761
2784
  api.metadata = {
2762
2785
  "apiVersion" => "2006-03-01",
2786
+ "auth" => ["aws.auth#sigv4"],
2763
2787
  "checksumFormat" => "md5",
2764
2788
  "endpointPrefix" => "s3",
2765
2789
  "globalEndpoint" => "s3.amazonaws.com",
2766
2790
  "protocol" => "rest-xml",
2791
+ "protocols" => ["rest-xml"],
2767
2792
  "serviceAbbreviation" => "Amazon S3",
2768
2793
  "serviceFullName" => "Amazon Simple Storage Service",
2769
2794
  "serviceId" => "S3",
@@ -3283,8 +3308,14 @@ module Aws::S3
3283
3308
  o.name = "ListBuckets"
3284
3309
  o.http_method = "GET"
3285
3310
  o.http_request_uri = "/"
3286
- o.input = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
3311
+ o.input = Shapes::ShapeRef.new(shape: ListBucketsRequest)
3287
3312
  o.output = Shapes::ShapeRef.new(shape: ListBucketsOutput)
3313
+ o[:pager] = Aws::Pager.new(
3314
+ limit_key: "max_buckets",
3315
+ tokens: {
3316
+ "continuation_token" => "continuation_token"
3317
+ }
3318
+ )
3288
3319
  end)
3289
3320
 
3290
3321
  api.add_operation(:list_directory_buckets, Seahorse::Model::Operation.new.tap do |o|
@@ -3828,6 +3859,7 @@ module Aws::S3
3828
3859
  o.http_method = "POST"
3829
3860
  o.http_request_uri = "/WriteGetObjectResponse"
3830
3861
  o['authtype'] = "v4-unsigned-body"
3862
+ o['unsignedPayload'] = true
3831
3863
  o.endpoint_pattern = {
3832
3864
  "hostPrefix" => "{RequestRoute}.",
3833
3865
  }
@@ -134,7 +134,7 @@ module Aws
134
134
 
135
135
  # @api private
136
136
  def load
137
- @data = Aws::Plugins::UserAgent.feature('resource') do
137
+ @data = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
138
138
  client.list_buckets.buckets.find { |b| b.name == name }
139
139
  end
140
140
  raise "unable to load bucket #{name}" if @data.nil?
@@ -3,8 +3,8 @@
3
3
  module Aws
4
4
  module S3
5
5
  module Errors
6
- # Hijack PermanentRedirect dynamic error to also include endpoint
7
- # and bucket.
6
+ # Hijack PermanentRedirect dynamic error to include the bucket, region,
7
+ # and endpoint.
8
8
  class PermanentRedirect < ServiceError
9
9
  # @param [Seahorse::Client::RequestContext] context
10
10
  # @param [String] message
@@ -22,6 +22,19 @@ module Aws
22
22
  super(context, message, data)
23
23
  end
24
24
  end
25
+
26
+ # Hijack PermanentRedirect (HeadBucket case - no body) dynamic error to
27
+ # include the region.
28
+ class Http301Error < ServiceError
29
+ # @param [Seahorse::Client::RequestContext] context
30
+ # @param [String] message
31
+ # @param [Aws::S3::Types::PermanentRedirect] _data
32
+ def initialize(context, message, _data = Aws::EmptyStructure.new)
33
+ data = Aws::S3::Types::PermanentRedirect.new(message: message)
34
+ data.region = context.http_response.headers['x-amz-bucket-region']
35
+ super(context, message, data)
36
+ end
37
+ end
25
38
  end
26
39
  end
27
40
  end
@@ -76,7 +76,7 @@ module Aws
76
76
  # @see #copy_to
77
77
  #
78
78
  def copy_from(source, options = {})
79
- Aws::Plugins::UserAgent.feature('resource') do
79
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
80
80
  if Hash === source && source[:copy_source]
81
81
  # for backwards compatibility
82
82
  @client.copy_object(source.merge(bucket: bucket_name, key: key))
@@ -119,7 +119,7 @@ module Aws
119
119
  # object.copy_to('src-bucket/src-key', multipart_copy: true)
120
120
  #
121
121
  def copy_to(target, options = {})
122
- Aws::Plugins::UserAgent.feature('resource') do
122
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
123
123
  ObjectCopier.new(self, options).copy_to(target, options)
124
124
  end
125
125
  end
@@ -390,7 +390,7 @@ module Aws
390
390
  tempfile: uploading_options.delete(:tempfile),
391
391
  part_size: uploading_options.delete(:part_size)
392
392
  )
393
- Aws::Plugins::UserAgent.feature('resource') do
393
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
394
394
  uploader.upload(
395
395
  uploading_options.merge(bucket: bucket_name, key: key),
396
396
  &block
@@ -473,7 +473,7 @@ module Aws
473
473
  multipart_threshold: uploading_options.delete(:multipart_threshold),
474
474
  client: client
475
475
  )
476
- response = Aws::Plugins::UserAgent.feature('resource') do
476
+ response = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
477
477
  uploader.upload(
478
478
  source,
479
479
  uploading_options.merge(bucket: bucket_name, key: key)
@@ -551,7 +551,7 @@ module Aws
551
551
  # @see Client#head_object
552
552
  def download_file(destination, options = {})
553
553
  downloader = FileDownloader.new(client: client)
554
- Aws::Plugins::UserAgent.feature('resource') do
554
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
555
555
  downloader.download(
556
556
  destination,
557
557
  options.merge(bucket: bucket_name, key: key)
@@ -18,9 +18,12 @@ require 'aws-sdk-s3/presigner'
18
18
 
19
19
  # s3 express session auth
20
20
  require 'aws-sdk-s3/express_credentials'
21
- require 'aws-sdk-s3/express_credentials_cache'
22
21
  require 'aws-sdk-s3/express_credentials_provider'
23
22
 
23
+ # s3 access grants auth
24
+ require 'aws-sdk-s3/access_grants_credentials'
25
+ require 'aws-sdk-s3/access_grants_credentials_provider'
26
+
24
27
  # customizations to generated classes
25
28
  require 'aws-sdk-s3/customizations/bucket'
26
29
  require 'aws-sdk-s3/customizations/errors'
@@ -270,7 +270,7 @@ module Aws
270
270
  envelope_location: @envelope_location,
271
271
  instruction_file_suffix: @instruction_file_suffix,
272
272
  }
273
- Aws::Plugins::UserAgent.feature('S3CryptoV1n') do
273
+ Aws::Plugins::UserAgent.metric('S3_CRYPTO_V1N') do
274
274
  req.send_request
275
275
  end
276
276
  end
@@ -300,7 +300,7 @@ module Aws
300
300
  envelope_location: envelope_location,
301
301
  instruction_file_suffix: instruction_file_suffix,
302
302
  }
303
- Aws::Plugins::UserAgent.feature('S3CryptoV1n') do
303
+ Aws::Plugins::UserAgent.metric('S3_CRYPTO_V1N') do
304
304
  req.send_request(target: block)
305
305
  end
306
306
  end
@@ -17,7 +17,7 @@ module Aws
17
17
  # envelope and encryption cipher.
18
18
  def encryption_cipher
19
19
  encryption_context = { "kms_cmk_id" => @kms_key_id }
20
- key_data = Aws::Plugins::UserAgent.feature('S3CryptoV1n') do
20
+ key_data = Aws::Plugins::UserAgent.metric('S3_CRYPTO_V1N') do
21
21
  @kms_client.generate_data_key(
22
22
  key_id: @kms_key_id,
23
23
  encryption_context: encryption_context,
@@ -60,7 +60,7 @@ module Aws
60
60
  "#{envelope['x-amz-wrap-alg']}"
61
61
  end
62
62
 
63
- key = Aws::Plugins::UserAgent.feature('S3CryptoV1n') do
63
+ key = Aws::Plugins::UserAgent.metric('S3_CRYPTO_V1N') do
64
64
  @kms_client.decrypt(
65
65
  ciphertext_blob: decode64(envelope['x-amz-key-v2']),
66
66
  encryption_context: encryption_context
@@ -361,7 +361,7 @@ module Aws
361
361
  instruction_file_suffix: @instruction_file_suffix,
362
362
  kms_encryption_context: kms_encryption_context
363
363
  }
364
- Aws::Plugins::UserAgent.feature('S3CryptoV2') do
364
+ Aws::Plugins::UserAgent.metric('S3_CRYPTO_V2') do
365
365
  req.send_request
366
366
  end
367
367
  end
@@ -416,7 +416,7 @@ module Aws
416
416
  kms_allow_decrypt_with_any_cmk: kms_any_cmk_mode,
417
417
  security_profile: security_profile
418
418
  }
419
- Aws::Plugins::UserAgent.feature('S3CryptoV2') do
419
+ Aws::Plugins::UserAgent.metric('S3_CRYPTO_V2') do
420
420
  req.send_request(target: block)
421
421
  end
422
422
  end
@@ -24,7 +24,7 @@ module Aws
24
24
  def encryption_cipher(options = {})
25
25
  validate_key_for_encryption
26
26
  encryption_context = build_encryption_context(@content_encryption_schema, options)
27
- key_data = Aws::Plugins::UserAgent.feature('S3CryptoV2') do
27
+ key_data = Aws::Plugins::UserAgent.metric('S3_CRYPTO_V2') do
28
28
  @kms_client.generate_data_key(
29
29
  key_id: @kms_key_id,
30
30
  encryption_context: encryption_context,
@@ -85,7 +85,7 @@ module Aws
85
85
  decrypt_options[:key_id] = @kms_key_id
86
86
  end
87
87
 
88
- key = Aws::Plugins::UserAgent.feature('S3CryptoV2') do
88
+ key = Aws::Plugins::UserAgent.metric('S3_CRYPTO_V2') do
89
89
  @kms_client.decrypt(decrypt_options).plaintext
90
90
  end
91
91
  iv = decode64(envelope['x-amz-iv'])
@@ -65,6 +65,11 @@ module Aws::S3
65
65
  #
66
66
  # @return [String]
67
67
  #
68
+ # @!attribute copy_source
69
+ # The Copy Source used for Copy Object request. This is an optional parameter that will be set automatically for operations that are scoped to Copy Source.
70
+ #
71
+ # @return [String]
72
+ #
68
73
  # @!attribute disable_access_points
69
74
  # Internal parameter to disable Access Point Buckets
70
75
  #
@@ -102,6 +107,7 @@ module Aws::S3
102
107
  :use_object_lambda_endpoint,
103
108
  :key,
104
109
  :prefix,
110
+ :copy_source,
105
111
  :disable_access_points,
106
112
  :disable_multi_region_access_points,
107
113
  :use_arn_region,
@@ -124,6 +130,7 @@ module Aws::S3
124
130
  'UseObjectLambdaEndpoint' => :use_object_lambda_endpoint,
125
131
  'Key' => :key,
126
132
  'Prefix' => :prefix,
133
+ 'CopySource' => :copy_source,
127
134
  'DisableAccessPoints' => :disable_access_points,
128
135
  'DisableMultiRegionAccessPoints' => :disable_multi_region_access_points,
129
136
  'UseArnRegion' => :use_arn_region,
@@ -164,6 +171,7 @@ module Aws::S3
164
171
  self[:use_object_lambda_endpoint] = options[:use_object_lambda_endpoint]
165
172
  self[:key] = options[:key]
166
173
  self[:prefix] = options[:prefix]
174
+ self[:copy_source] = options[:copy_source]
167
175
  self[:disable_access_points] = options[:disable_access_points]
168
176
  self[:disable_multi_region_access_points] = options[:disable_multi_region_access_points]
169
177
  self[:disable_multi_region_access_points] = false if self[:disable_multi_region_access_points].nil?
@@ -21,6 +21,7 @@ module Aws::S3
21
21
  use_object_lambda_endpoint = parameters.use_object_lambda_endpoint
22
22
  key = parameters.key
23
23
  prefix = parameters.prefix
24
+ copy_source = parameters.copy_source
24
25
  disable_access_points = parameters.disable_access_points
25
26
  disable_multi_region_access_points = parameters.disable_multi_region_access_points
26
27
  use_arn_region = parameters.use_arn_region