New Upstream Release - ruby-aws-sdk-s3
Ready changes
Summary
Merged new upstream version: 1.132.0 (was: 1.126.0).
Diff
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 37b0e9f..7076d82 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,43 @@
Unreleased Changes
------------------
+1.132.0 (2023-07-24)
+------------------
+
+* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
+
+* Feature - Add support for verifying checksums in FileDownloader.
+
+1.131.0 (2023-07-20)
+------------------
+
+* Feature - Improve performance of S3 clients by simplifying and optimizing endpoint resolution.
+
+1.130.0 (2023-07-13)
+------------------
+
+* Feature - S3 Inventory now supports Object Access Control List and Object Owner as available object metadata fields in inventory reports.
+
+* Feature - Allow Object multipart copy API to work when requiring a checksum algorithm.
+* Feature - Allow Object multipart copy API to optionally copy parts as they exist on the source object if it has parts, instead of generating new part ranges, when specifying `use_source_parts: true`.
+
+1.129.0 (2023-07-11)
+------------------
+
+* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
+
+1.128.0 (2023-07-06)
+------------------
+
+* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
+
+1.127.0 (2023-06-28)
+------------------
+
+* Feature - The S3 LISTObjects, ListObjectsV2 and ListObjectVersions API now supports a new optional header x-amz-optional-object-attributes. If header contains RestoreStatus as the value, then S3 will include Glacier restore status i.e. isRestoreInProgress and RestoreExpiryDate in List response.
+
+* Feature - Select minimum expiration time for presigned urls between the expiration time option and the credential expiration time.
+
1.126.0 (2023-06-16)
------------------
diff --git a/VERSION b/VERSION
index c96f047..82c65d8 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.126.0
+1.132.0
diff --git a/aws-sdk-s3.gemspec b/aws-sdk-s3.gemspec
index 1c6c87b..dfde650 100644
--- a/aws-sdk-s3.gemspec
+++ b/aws-sdk-s3.gemspec
@@ -2,24 +2,24 @@
# This file has been automatically generated by gem2tgz #
#########################################################
# -*- encoding: utf-8 -*-
-# stub: aws-sdk-s3 1.126.0 ruby lib
+# stub: aws-sdk-s3 1.132.0 ruby lib
Gem::Specification.new do |s|
s.name = "aws-sdk-s3".freeze
- s.version = "1.126.0"
+ s.version = "1.132.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.metadata = { "changelog_uri" => "https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-s3/CHANGELOG.md", "source_code_uri" => "https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-s3" } if s.respond_to? :metadata=
s.require_paths = ["lib".freeze]
s.authors = ["Amazon Web Services".freeze]
- s.date = "2023-06-16"
+ s.date = "2023-07-24"
s.description = "Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3). This gem is part of the AWS SDK for Ruby.".freeze
s.email = ["aws-dr-rubygems@amazon.com".freeze]
s.files = ["CHANGELOG.md".freeze, "LICENSE.txt".freeze, "VERSION".freeze, "lib/aws-sdk-s3.rb".freeze, "lib/aws-sdk-s3/bucket.rb".freeze, "lib/aws-sdk-s3/bucket_acl.rb".freeze, "lib/aws-sdk-s3/bucket_cors.rb".freeze, "lib/aws-sdk-s3/bucket_lifecycle.rb".freeze, "lib/aws-sdk-s3/bucket_lifecycle_configuration.rb".freeze, "lib/aws-sdk-s3/bucket_logging.rb".freeze, "lib/aws-sdk-s3/bucket_notification.rb".freeze, "lib/aws-sdk-s3/bucket_policy.rb".freeze, "lib/aws-sdk-s3/bucket_region_cache.rb".freeze, "lib/aws-sdk-s3/bucket_request_payment.rb".freeze, "lib/aws-sdk-s3/bucket_tagging.rb".freeze, "lib/aws-sdk-s3/bucket_versioning.rb".freeze, "lib/aws-sdk-s3/bucket_website.rb".freeze, "lib/aws-sdk-s3/client.rb".freeze, "lib/aws-sdk-s3/client_api.rb".freeze, "lib/aws-sdk-s3/customizations.rb".freeze, "lib/aws-sdk-s3/customizations/bucket.rb".freeze, "lib/aws-sdk-s3/customizations/errors.rb".freeze, "lib/aws-sdk-s3/customizations/multipart_upload.rb".freeze, "lib/aws-sdk-s3/customizations/object.rb".freeze, "lib/aws-sdk-s3/customizations/object_summary.rb".freeze, "lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb".freeze, "lib/aws-sdk-s3/customizations/types/permanent_redirect.rb".freeze, "lib/aws-sdk-s3/encryption.rb".freeze, "lib/aws-sdk-s3/encryption/client.rb".freeze, "lib/aws-sdk-s3/encryption/decrypt_handler.rb".freeze, "lib/aws-sdk-s3/encryption/default_cipher_provider.rb".freeze, "lib/aws-sdk-s3/encryption/default_key_provider.rb".freeze, "lib/aws-sdk-s3/encryption/encrypt_handler.rb".freeze, "lib/aws-sdk-s3/encryption/errors.rb".freeze, "lib/aws-sdk-s3/encryption/io_auth_decrypter.rb".freeze, "lib/aws-sdk-s3/encryption/io_decrypter.rb".freeze, "lib/aws-sdk-s3/encryption/io_encrypter.rb".freeze, "lib/aws-sdk-s3/encryption/key_provider.rb".freeze, "lib/aws-sdk-s3/encryption/kms_cipher_provider.rb".freeze, "lib/aws-sdk-s3/encryption/materials.rb".freeze, "lib/aws-sdk-s3/encryption/utils.rb".freeze, "lib/aws-sdk-s3/encryptionV2/client.rb".freeze, "lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb".freeze, "lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb".freeze, "lib/aws-sdk-s3/encryptionV2/default_key_provider.rb".freeze, "lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb".freeze, "lib/aws-sdk-s3/encryptionV2/errors.rb".freeze, "lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb".freeze, "lib/aws-sdk-s3/encryptionV2/io_decrypter.rb".freeze, "lib/aws-sdk-s3/encryptionV2/io_encrypter.rb".freeze, "lib/aws-sdk-s3/encryptionV2/key_provider.rb".freeze, "lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb".freeze, "lib/aws-sdk-s3/encryptionV2/materials.rb".freeze, "lib/aws-sdk-s3/encryptionV2/utils.rb".freeze, "lib/aws-sdk-s3/encryption_v2.rb".freeze, "lib/aws-sdk-s3/endpoint_parameters.rb".freeze, "lib/aws-sdk-s3/endpoint_provider.rb".freeze, "lib/aws-sdk-s3/endpoints.rb".freeze, "lib/aws-sdk-s3/errors.rb".freeze, "lib/aws-sdk-s3/event_streams.rb".freeze, "lib/aws-sdk-s3/file_downloader.rb".freeze, "lib/aws-sdk-s3/file_part.rb".freeze, "lib/aws-sdk-s3/file_uploader.rb".freeze, "lib/aws-sdk-s3/legacy_signer.rb".freeze, "lib/aws-sdk-s3/multipart_file_uploader.rb".freeze, "lib/aws-sdk-s3/multipart_stream_uploader.rb".freeze, "lib/aws-sdk-s3/multipart_upload.rb".freeze, "lib/aws-sdk-s3/multipart_upload_error.rb".freeze, "lib/aws-sdk-s3/multipart_upload_part.rb".freeze, "lib/aws-sdk-s3/object.rb".freeze, "lib/aws-sdk-s3/object_acl.rb".freeze, "lib/aws-sdk-s3/object_copier.rb".freeze, "lib/aws-sdk-s3/object_multipart_copier.rb".freeze, "lib/aws-sdk-s3/object_summary.rb".freeze, "lib/aws-sdk-s3/object_version.rb".freeze, "lib/aws-sdk-s3/plugins/accelerate.rb".freeze, "lib/aws-sdk-s3/plugins/arn.rb".freeze, "lib/aws-sdk-s3/plugins/bucket_dns.rb".freeze, "lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb".freeze, "lib/aws-sdk-s3/plugins/dualstack.rb".freeze, "lib/aws-sdk-s3/plugins/endpoints.rb".freeze, "lib/aws-sdk-s3/plugins/expect_100_continue.rb".freeze, "lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb".freeze, "lib/aws-sdk-s3/plugins/http_200_errors.rb".freeze, "lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb".freeze, "lib/aws-sdk-s3/plugins/location_constraint.rb".freeze, "lib/aws-sdk-s3/plugins/md5s.rb".freeze, "lib/aws-sdk-s3/plugins/redirects.rb".freeze, "lib/aws-sdk-s3/plugins/s3_host_id.rb".freeze, "lib/aws-sdk-s3/plugins/s3_signer.rb".freeze, "lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb".freeze, "lib/aws-sdk-s3/plugins/sse_cpk.rb".freeze, "lib/aws-sdk-s3/plugins/streaming_retry.rb".freeze, "lib/aws-sdk-s3/plugins/url_encoded_keys.rb".freeze, "lib/aws-sdk-s3/presigned_post.rb".freeze, "lib/aws-sdk-s3/presigner.rb".freeze, "lib/aws-sdk-s3/resource.rb".freeze, "lib/aws-sdk-s3/types.rb".freeze, "lib/aws-sdk-s3/waiters.rb".freeze]
s.homepage = "https://github.com/aws/aws-sdk-ruby".freeze
s.licenses = ["Apache-2.0".freeze]
s.required_ruby_version = Gem::Requirement.new(">= 2.3".freeze)
- s.rubygems_version = "3.3.15".freeze
+ s.rubygems_version = "3.2.5".freeze
s.summary = "AWS SDK for Ruby - Amazon S3".freeze
if s.respond_to? :specification_version then
@@ -27,12 +27,12 @@ Gem::Specification.new do |s|
end
if s.respond_to? :add_runtime_dependency then
- s.add_runtime_dependency(%q<aws-sdk-core>.freeze, ["~> 3", ">= 3.174.0"])
+ s.add_runtime_dependency(%q<aws-sdk-core>.freeze, ["~> 3", ">= 3.179.0"])
s.add_runtime_dependency(%q<aws-sdk-kms>.freeze, ["~> 1"])
- s.add_runtime_dependency(%q<aws-sigv4>.freeze, ["~> 1.4"])
+ s.add_runtime_dependency(%q<aws-sigv4>.freeze, ["~> 1.6"])
else
- s.add_dependency(%q<aws-sdk-core>.freeze, ["~> 3", ">= 3.174.0"])
+ s.add_dependency(%q<aws-sdk-core>.freeze, ["~> 3", ">= 3.179.0"])
s.add_dependency(%q<aws-sdk-kms>.freeze, ["~> 1"])
- s.add_dependency(%q<aws-sigv4>.freeze, ["~> 1.4"])
+ s.add_dependency(%q<aws-sigv4>.freeze, ["~> 1.6"])
end
end
diff --git a/debian/changelog b/debian/changelog
index 816b4a0..92f0e95 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ruby-aws-sdk-s3 (1.132.0-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk> Thu, 03 Aug 2023 07:57:20 -0000
+
ruby-aws-sdk-s3 (1.126.0-1) experimental; urgency=medium
* Team upload.
diff --git a/lib/aws-sdk-s3.rb b/lib/aws-sdk-s3.rb
index 85520cf..94c4c3c 100644
--- a/lib/aws-sdk-s3.rb
+++ b/lib/aws-sdk-s3.rb
@@ -73,6 +73,6 @@ require_relative 'aws-sdk-s3/event_streams'
# @!group service
module Aws::S3
- GEM_VERSION = '1.126.0'
+ GEM_VERSION = '1.132.0'
end
diff --git a/lib/aws-sdk-s3/bucket.rb b/lib/aws-sdk-s3/bucket.rb
index 274ca41..a872d37 100644
--- a/lib/aws-sdk-s3/bucket.rb
+++ b/lib/aws-sdk-s3/bucket.rb
@@ -229,7 +229,7 @@ module Aws::S3
# bucket.create({
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read
# create_bucket_configuration: {
- # location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
+ # location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2, ap-south-2, eu-south-2
# },
# grant_full_control: "GrantFullControl",
# grant_read: "GrantRead",
@@ -754,14 +754,14 @@ module Aws::S3
# result element are not returned elsewhere in the response.
# @option options [String] :encoding_type
# Requests Amazon S3 to encode the object keys in the response and
- # specifies the encoding method to use. An object key may contain any
- # Unicode character; however, XML 1.0 parser cannot parse some
+ # specifies the encoding method to use. An object key can contain any
+ # Unicode character; however, the XML 1.0 parser cannot parse some
# characters, such as characters with an ASCII value from 0 to 10. For
# characters that are not supported in XML 1.0, you can add this
# parameter to request that Amazon S3 encode the keys in the response.
# @option options [String] :key_marker
- # Together with upload-id-marker, this parameter specifies the multipart
- # upload after which listing should begin.
+ # Together with `upload-id-marker`, this parameter specifies the
+ # multipart upload after which listing should begin.
#
# If `upload-id-marker` is not specified, only the keys
# lexicographically greater than the specified `key-marker` will be
@@ -774,8 +774,8 @@ module Aws::S3
# @option options [String] :prefix
# Lists in-progress uploads only for those keys that begin with the
# specified prefix. You can use prefixes to separate a bucket into
- # different grouping of keys. (You can think of using prefix to make
- # groups in the same way you'd use a folder in a file system.)
+ # different grouping of keys. (You can think of using `prefix` to make
+ # groups in the same way that you'd use a folder in a file system.)
# @option options [String] :upload_id_marker
# Together with key-marker, specifies the multipart upload after which
# listing should begin. If key-marker is not specified, the
@@ -849,19 +849,20 @@ module Aws::S3
# version_id_marker: "VersionIdMarker",
# expected_bucket_owner: "AccountId",
# request_payer: "requester", # accepts requester
+ # optional_object_attributes: ["RestoreStatus"], # accepts RestoreStatus
# })
# @param [Hash] options ({})
# @option options [String] :delimiter
# A delimiter is a character that you specify to group keys. All keys
# that contain the same string between the `prefix` and the first
# occurrence of the delimiter are grouped under a single result element
- # in CommonPrefixes. These groups are counted as one result against the
- # max-keys limitation. These keys are not returned elsewhere in the
- # response.
+ # in `CommonPrefixes`. These groups are counted as one result against
+ # the `max-keys` limitation. These keys are not returned elsewhere in
+ # the response.
# @option options [String] :encoding_type
# Requests Amazon S3 to encode the object keys in the response and
- # specifies the encoding method to use. An object key may contain any
- # Unicode character; however, XML 1.0 parser cannot parse some
+ # specifies the encoding method to use. An object key can contain any
+ # Unicode character; however, the XML 1.0 parser cannot parse some
# characters, such as characters with an ASCII value from 0 to 10. For
# characters that are not supported in XML 1.0, you can add this
# parameter to request that Amazon S3 encode the keys in the response.
@@ -870,10 +871,10 @@ module Aws::S3
# @option options [String] :prefix
# Use this parameter to select only those keys that begin with the
# specified prefix. You can use prefixes to separate a bucket into
- # different groupings of keys. (You can think of using prefix to make
- # groups in the same way you'd use a folder in a file system.) You can
- # use prefix with delimiter to roll up numerous objects into a single
- # result under CommonPrefixes.
+ # different groupings of keys. (You can think of using `prefix` to make
+ # groups in the same way that you'd use a folder in a file system.) You
+ # can use `prefix` with `delimiter` to roll up numerous objects into a
+ # single result under `CommonPrefixes`.
# @option options [String] :version_id_marker
# Specifies the object version you want to start listing from.
# @option options [String] :expected_bucket_owner
@@ -890,6 +891,9 @@ module Aws::S3
#
#
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+ # @option options [Array<String>] :optional_object_attributes
+ # Specifies the optional fields that you want returned in the response.
+ # Fields that you do not specify are not returned.
# @return [ObjectVersion::Collection]
def object_versions(options = {})
batches = Enumerator.new do |y|
@@ -924,18 +928,19 @@ module Aws::S3
# start_after: "StartAfter",
# request_payer: "requester", # accepts requester
# expected_bucket_owner: "AccountId",
+ # optional_object_attributes: ["RestoreStatus"], # accepts RestoreStatus
# })
# @param [Hash] options ({})
# @option options [String] :delimiter
- # A delimiter is a character you use to group keys.
+ # A delimiter is a character that you use to group keys.
# @option options [String] :encoding_type
# Encoding type used by Amazon S3 to encode object keys in the response.
# @option options [String] :prefix
# Limits the response to keys that begin with the specified prefix.
# @option options [Boolean] :fetch_owner
- # The owner field is not present in listV2 by default, if you want to
- # return owner field with each key in the result then set the fetch
- # owner field to true.
+ # The owner field is not present in `ListObjectsV2` by default. If you
+ # want to return the owner field with each key in the result, then set
+ # the `FetchOwner` field to `true`.
# @option options [String] :start_after
# StartAfter is where you want Amazon S3 to start listing from. Amazon
# S3 starts listing after this specified key. StartAfter can be any key
@@ -948,6 +953,9 @@ module Aws::S3
# The account ID of the expected bucket owner. If the bucket is owned by
# a different account, the request fails with the HTTP status code `403
# Forbidden` (access denied).
+ # @option options [Array<String>] :optional_object_attributes
+ # Specifies the optional fields that you want returned in the response.
+ # Fields that you do not specify are not returned.
# @return [ObjectSummary::Collection]
def objects(options = {})
batches = Enumerator.new do |y|
diff --git a/lib/aws-sdk-s3/client.rb b/lib/aws-sdk-s3/client.rb
index af84c3f..70aa7c9 100644
--- a/lib/aws-sdk-s3/client.rb
+++ b/lib/aws-sdk-s3/client.rb
@@ -28,6 +28,7 @@ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
require 'aws-sdk-core/plugins/transfer_encoding.rb'
require 'aws-sdk-core/plugins/http_checksum.rb'
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
+require 'aws-sdk-core/plugins/request_compression.rb'
require 'aws-sdk-core/plugins/defaults_mode.rb'
require 'aws-sdk-core/plugins/recursion_detection.rb'
require 'aws-sdk-core/plugins/sign.rb'
@@ -96,6 +97,7 @@ module Aws::S3
add_plugin(Aws::Plugins::TransferEncoding)
add_plugin(Aws::Plugins::HttpChecksum)
add_plugin(Aws::Plugins::ChecksumAlgorithm)
+ add_plugin(Aws::Plugins::RequestCompression)
add_plugin(Aws::Plugins::DefaultsMode)
add_plugin(Aws::Plugins::RecursionDetection)
add_plugin(Aws::Plugins::Sign)
@@ -235,6 +237,10 @@ module Aws::S3
# Set to true to disable SDK automatically adding host prefix
# to default service endpoint when available.
#
+ # @option options [Boolean] :disable_request_compression (false)
+ # When set to 'true' the request body will not be compressed
+ # for supported operations.
+ #
# @option options [String] :endpoint
# The client endpoint is normally constructed from the `:region`
# option. You should only configure an `:endpoint` when connecting
@@ -266,6 +272,10 @@ module Aws::S3
# When set to `true`, the bucket name is always left in the
# request URI and never moved to the host as a sub-domain.
#
+ # @option options [Boolean] :ignore_configured_endpoint_urls
+ # Setting to true disables use of endpoint URLs provided via environment
+ # variables and the shared configuration file.
+ #
# @option options [Proc] :input_event_stream_handler
# When an EventStream or Proc object is provided, it can be used for sending events for the event stream.
#
@@ -292,6 +302,11 @@ module Aws::S3
# Used when loading credentials from the shared credentials file
# at HOME/.aws/credentials. When not specified, 'default' is used.
#
+ # @option options [Integer] :request_min_compression_size_bytes (10240)
+ # The minimum size in bytes that triggers compression for request
+ # bodies. The value must be non-negative integer value between 0
+ # and 10485780 bytes inclusive.
+ #
# @option options [Boolean] :require_https_for_sse_cpk (true)
# When `true`, the endpoint **must** be HTTPS for all operations
# where server-side-encryption is used with customer-provided keys.
@@ -513,7 +528,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -702,7 +717,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -953,8 +968,10 @@ module Aws::S3
# </note>
#
# The copy request charge is based on the storage class and Region that
- # you specify for the destination object. For pricing information, see
- # [Amazon S3 pricing][3].
+ # you specify for the destination object. The request can also result in
+ # a data retrieval charge for the source if the source storage class
+ # bills for data retrieval. For pricing information, see [Amazon S3
+ # pricing][3].
#
# Amazon S3 transfer acceleration does not support cross-Region copies.
# If you request a cross-Region copy using a transfer acceleration
@@ -1170,7 +1187,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -1680,33 +1697,33 @@ module Aws::S3
# * {Types::CreateBucketOutput#location #location} => String
#
#
- # @example Example: To create a bucket
+ # @example Example: To create a bucket in a specific region
#
- # # The following example creates a bucket.
+ # # The following example creates a bucket. The request specifies an AWS region where to create the bucket.
#
# resp = client.create_bucket({
# bucket: "examplebucket",
+ # create_bucket_configuration: {
+ # location_constraint: "eu-west-1",
+ # },
# })
#
# resp.to_h outputs the following:
# {
- # location: "/examplebucket",
+ # location: "http://examplebucket.<Region>.s3.amazonaws.com/",
# }
#
- # @example Example: To create a bucket in a specific region
+ # @example Example: To create a bucket
#
- # # The following example creates a bucket. The request specifies an AWS region where to create the bucket.
+ # # The following example creates a bucket.
#
# resp = client.create_bucket({
# bucket: "examplebucket",
- # create_bucket_configuration: {
- # location_constraint: "eu-west-1",
- # },
# })
#
# resp.to_h outputs the following:
# {
- # location: "http://examplebucket.<Region>.s3.amazonaws.com/",
+ # location: "/examplebucket",
# }
#
# @example Request syntax with placeholder values
@@ -1715,7 +1732,7 @@ module Aws::S3
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read
# bucket: "BucketName", # required
# create_bucket_configuration: {
- # location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
+ # location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2, ap-south-2, eu-south-2
# },
# grant_full_control: "GrantFullControl",
# grant_read: "GrantRead",
@@ -2026,7 +2043,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -3111,7 +3128,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -3158,6 +3175,15 @@ module Aws::S3
# * {Types::DeleteObjectOutput#request_charged #request_charged} => String
#
#
+ # @example Example: To delete an object (from a non-versioned bucket)
+ #
+ # # The following example deletes an object from a non-versioned bucket.
+ #
+ # resp = client.delete_object({
+ # bucket: "ExampleBucket",
+ # key: "HappyFace.jpg",
+ # })
+ #
# @example Example: To delete an object
#
# # The following example deletes an object from an S3 bucket.
@@ -3171,15 +3197,6 @@ module Aws::S3
# {
# }
#
- # @example Example: To delete an object (from a non-versioned bucket)
- #
- # # The following example deletes an object from a non-versioned bucket.
- #
- # resp = client.delete_object({
- # bucket: "ExampleBucket",
- # key: "HappyFace.jpg",
- # })
- #
# @example Request syntax with placeholder values
#
# resp = client.delete_object({
@@ -3247,7 +3264,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -3271,35 +3288,35 @@ module Aws::S3
# * {Types::DeleteObjectTaggingOutput#version_id #version_id} => String
#
#
- # @example Example: To remove tag set from an object version
+ # @example Example: To remove tag set from an object
#
- # # The following example removes tag set associated with the specified object version. The request specifies both the
- # # object key and object version.
+ # # The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the
+ # # operation removes tag set from the latest object version.
#
# resp = client.delete_object_tagging({
# bucket: "examplebucket",
# key: "HappyFace.jpg",
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
# })
#
# resp.to_h outputs the following:
# {
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
+ # version_id: "null",
# }
#
- # @example Example: To remove tag set from an object
+ # @example Example: To remove tag set from an object version
#
- # # The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the
- # # operation removes tag set from the latest object version.
+ # # The following example removes tag set associated with the specified object version. The request specifies both the
+ # # object key and object version.
#
# resp = client.delete_object_tagging({
# bucket: "examplebucket",
# key: "HappyFace.jpg",
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
# })
#
# resp.to_h outputs the following:
# {
- # version_id: "null",
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
# }
#
# @example Request syntax with placeholder values
@@ -3395,7 +3412,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -4212,7 +4229,7 @@ module Aws::S3
# resp.inventory_configuration.id #=> String
# resp.inventory_configuration.included_object_versions #=> String, one of "All", "Current"
# resp.inventory_configuration.optional_fields #=> Array
- # resp.inventory_configuration.optional_fields[0] #=> String, one of "Size", "LastModifiedDate", "StorageClass", "ETag", "IsMultipartUploaded", "ReplicationStatus", "EncryptionStatus", "ObjectLockRetainUntilDate", "ObjectLockMode", "ObjectLockLegalHoldStatus", "IntelligentTieringAccessTier", "BucketKeyStatus", "ChecksumAlgorithm"
+ # resp.inventory_configuration.optional_fields[0] #=> String, one of "Size", "LastModifiedDate", "StorageClass", "ETag", "IsMultipartUploaded", "ReplicationStatus", "EncryptionStatus", "ObjectLockRetainUntilDate", "ObjectLockMode", "ObjectLockLegalHoldStatus", "IntelligentTieringAccessTier", "BucketKeyStatus", "ChecksumAlgorithm", "ObjectAccessControlList", "ObjectOwner"
# resp.inventory_configuration.schedule.frequency #=> String, one of "Daily", "Weekly"
#
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration AWS API Documentation
@@ -4556,7 +4573,7 @@ module Aws::S3
#
# @example Response structure
#
- # resp.location_constraint #=> String, one of "af-south-1", "ap-east-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ca-central-1", "cn-north-1", "cn-northwest-1", "EU", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "me-south-1", "sa-east-1", "us-east-2", "us-gov-east-1", "us-gov-west-1", "us-west-1", "us-west-2"
+ # resp.location_constraint #=> String, one of "af-south-1", "ap-east-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ca-central-1", "cn-north-1", "cn-northwest-1", "EU", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "me-south-1", "sa-east-1", "us-east-2", "us-gov-east-1", "us-gov-west-1", "us-west-1", "us-west-2", "ap-south-2", "eu-south-2"
#
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation AWS API Documentation
#
@@ -5770,7 +5787,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -6357,7 +6374,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -6410,9 +6427,8 @@ module Aws::S3
# Forbidden` (access denied).
#
# @option params [required, Array<String>] :object_attributes
- # An XML header that specifies the fields at the root level that you
- # want returned in the response. Fields that you do not specify are not
- # returned.
+ # Specifies the fields at the root level that you want returned in the
+ # response. Fields that you do not specify are not returned.
#
# @return [Types::GetObjectAttributesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
#
@@ -6757,7 +6773,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -6792,49 +6808,49 @@ module Aws::S3
# * {Types::GetObjectTaggingOutput#tag_set #tag_set} => Array<Types::Tag>
#
#
- # @example Example: To retrieve tag set of an object
+ # @example Example: To retrieve tag set of a specific object version
#
- # # The following example retrieves tag set of an object.
+ # # The following example retrieves tag set of an object. The request specifies object version.
#
# resp = client.get_object_tagging({
# bucket: "examplebucket",
- # key: "HappyFace.jpg",
+ # key: "exampleobject",
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
# })
#
# resp.to_h outputs the following:
# {
# tag_set: [
# {
- # key: "Key4",
- # value: "Value4",
- # },
- # {
- # key: "Key3",
- # value: "Value3",
+ # key: "Key1",
+ # value: "Value1",
# },
# ],
- # version_id: "null",
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
# }
#
- # @example Example: To retrieve tag set of a specific object version
+ # @example Example: To retrieve tag set of an object
#
- # # The following example retrieves tag set of an object. The request specifies object version.
+ # # The following example retrieves tag set of an object.
#
# resp = client.get_object_tagging({
# bucket: "examplebucket",
- # key: "exampleobject",
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
+ # key: "HappyFace.jpg",
# })
#
# resp.to_h outputs the following:
# {
# tag_set: [
# {
- # key: "Key1",
- # value: "Value1",
+ # key: "Key4",
+ # value: "Value4",
+ # },
+ # {
+ # key: "Key3",
+ # value: "Value3",
# },
# ],
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
+ # version_id: "null",
# }
#
# @example Request syntax with placeholder values
@@ -7090,7 +7106,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][3] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][3] in the *Amazon S3 User Guide*.
#
#
#
@@ -7247,7 +7263,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -7507,7 +7523,7 @@ module Aws::S3
# retrieved.
#
# @option params [String] :continuation_token
- # The ContinuationToken that represents a placeholder from where this
+ # The `ContinuationToken` that represents a placeholder from where this
# request should begin.
#
# @option params [String] :expected_bucket_owner
@@ -7693,7 +7709,7 @@ module Aws::S3
#
# @option params [String] :continuation_token
# The marker used to continue an inventory configuration listing that
- # has been truncated. Use the NextContinuationToken from a previously
+ # has been truncated. Use the `NextContinuationToken` from a previously
# truncated list response to continue the listing. The continuation
# token is an opaque value that Amazon S3 understands.
#
@@ -7731,7 +7747,7 @@ module Aws::S3
# resp.inventory_configuration_list[0].id #=> String
# resp.inventory_configuration_list[0].included_object_versions #=> String, one of "All", "Current"
# resp.inventory_configuration_list[0].optional_fields #=> Array
- # resp.inventory_configuration_list[0].optional_fields[0] #=> String, one of "Size", "LastModifiedDate", "StorageClass", "ETag", "IsMultipartUploaded", "ReplicationStatus", "EncryptionStatus", "ObjectLockRetainUntilDate", "ObjectLockMode", "ObjectLockLegalHoldStatus", "IntelligentTieringAccessTier", "BucketKeyStatus", "ChecksumAlgorithm"
+ # resp.inventory_configuration_list[0].optional_fields[0] #=> String, one of "Size", "LastModifiedDate", "StorageClass", "ETag", "IsMultipartUploaded", "ReplicationStatus", "EncryptionStatus", "ObjectLockRetainUntilDate", "ObjectLockMode", "ObjectLockLegalHoldStatus", "IntelligentTieringAccessTier", "BucketKeyStatus", "ChecksumAlgorithm", "ObjectAccessControlList", "ObjectOwner"
# resp.inventory_configuration_list[0].schedule.frequency #=> String, one of "Daily", "Weekly"
# resp.is_truncated #=> Boolean
# resp.next_continuation_token #=> String
@@ -7793,7 +7809,7 @@ module Aws::S3
#
# @option params [String] :continuation_token
# The marker that is used to continue a metrics configuration listing
- # that has been truncated. Use the NextContinuationToken from a
+ # that has been truncated. Use the `NextContinuationToken` from a
# previously truncated list response to continue the listing. The
# continuation token is an opaque value that Amazon S3 understands.
#
@@ -7972,7 +7988,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -7991,15 +8007,15 @@ module Aws::S3
#
# @option params [String] :encoding_type
# Requests Amazon S3 to encode the object keys in the response and
- # specifies the encoding method to use. An object key may contain any
- # Unicode character; however, XML 1.0 parser cannot parse some
+ # specifies the encoding method to use. An object key can contain any
+ # Unicode character; however, the XML 1.0 parser cannot parse some
# characters, such as characters with an ASCII value from 0 to 10. For
# characters that are not supported in XML 1.0, you can add this
# parameter to request that Amazon S3 encode the keys in the response.
#
# @option params [String] :key_marker
- # Together with upload-id-marker, this parameter specifies the multipart
- # upload after which listing should begin.
+ # Together with `upload-id-marker`, this parameter specifies the
+ # multipart upload after which listing should begin.
#
# If `upload-id-marker` is not specified, only the keys
# lexicographically greater than the specified `key-marker` will be
@@ -8018,8 +8034,8 @@ module Aws::S3
# @option params [String] :prefix
# Lists in-progress uploads only for those keys that begin with the
# specified prefix. You can use prefixes to separate a bucket into
- # different grouping of keys. (You can think of using prefix to make
- # groups in the same way you'd use a folder in a file system.)
+ # different grouping of keys. (You can think of using `prefix` to make
+ # groups in the same way that you'd use a folder in a file system.)
#
# @option params [String] :upload_id_marker
# Together with key-marker, specifies the multipart upload after which
@@ -8064,97 +8080,97 @@ module Aws::S3
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
#
- # @example Example: List next set of multipart uploads when previous result is truncated
+ # @example Example: To list in-progress multipart uploads on a bucket
#
- # # The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next
- # # setup of multipart uploads.
+ # # The following example lists in-progress multipart uploads on a specific bucket.
#
# resp = client.list_multipart_uploads({
# bucket: "examplebucket",
- # key_marker: "nextkeyfrompreviousresponse",
- # max_uploads: 2,
- # upload_id_marker: "valuefrompreviousresponse",
# })
#
# resp.to_h outputs the following:
# {
- # bucket: "acl1",
- # is_truncated: true,
- # key_marker: "",
- # max_uploads: 2,
- # next_key_marker: "someobjectkey",
- # next_upload_id_marker: "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
- # upload_id_marker: "",
# uploads: [
# {
# initiated: Time.parse("2014-05-01T05:40:58.000Z"),
# initiator: {
- # display_name: "ownder-display-name",
+ # display_name: "display-name",
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
# },
# key: "JavaFile",
# owner: {
- # display_name: "mohanataws",
- # id: "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
+ # display_name: "display-name",
+ # id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
# },
# storage_class: "STANDARD",
- # upload_id: "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--",
+ # upload_id: "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--",
# },
# {
# initiated: Time.parse("2014-05-01T05:41:27.000Z"),
# initiator: {
- # display_name: "ownder-display-name",
+ # display_name: "display-name",
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
# },
# key: "JavaFile",
# owner: {
- # display_name: "ownder-display-name",
+ # display_name: "display-name",
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
# },
# storage_class: "STANDARD",
- # upload_id: "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
+ # upload_id: "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
# },
# ],
# }
#
- # @example Example: To list in-progress multipart uploads on a bucket
+ # @example Example: List next set of multipart uploads when previous result is truncated
#
- # # The following example lists in-progress multipart uploads on a specific bucket.
+ # # The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next
+ # # setup of multipart uploads.
#
# resp = client.list_multipart_uploads({
# bucket: "examplebucket",
+ # key_marker: "nextkeyfrompreviousresponse",
+ # max_uploads: 2,
+ # upload_id_marker: "valuefrompreviousresponse",
# })
#
# resp.to_h outputs the following:
# {
+ # bucket: "acl1",
+ # is_truncated: true,
+ # key_marker: "",
+ # max_uploads: 2,
+ # next_key_marker: "someobjectkey",
+ # next_upload_id_marker: "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
+ # upload_id_marker: "",
# uploads: [
# {
# initiated: Time.parse("2014-05-01T05:40:58.000Z"),
# initiator: {
- # display_name: "display-name",
+ # display_name: "ownder-display-name",
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
# },
# key: "JavaFile",
# owner: {
- # display_name: "display-name",
- # id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
+ # display_name: "mohanataws",
+ # id: "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
# },
# storage_class: "STANDARD",
- # upload_id: "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--",
+ # upload_id: "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--",
# },
# {
# initiated: Time.parse("2014-05-01T05:41:27.000Z"),
# initiator: {
- # display_name: "display-name",
+ # display_name: "ownder-display-name",
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
# },
# key: "JavaFile",
# owner: {
- # display_name: "display-name",
+ # display_name: "ownder-display-name",
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
# },
# storage_class: "STANDARD",
- # upload_id: "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
+ # upload_id: "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
# },
# ],
# }
@@ -8212,10 +8228,10 @@ module Aws::S3
# can also use request parameters as selection criteria to return
# metadata about a subset of all the object versions.
#
- # To use this operation, you must have permissions to perform the
+ # To use this operation, you must have permission to perform the
# `s3:ListBucketVersions` action. Be aware of the name difference.
#
- # <note markdown="1"> A 200 OK response can contain valid or invalid XML. Make sure to
+ # <note markdown="1"> A `200 OK` response can contain valid or invalid XML. Make sure to
# design your application to parse the contents of the response and
# handle it appropriately.
#
@@ -8249,14 +8265,14 @@ module Aws::S3
# A delimiter is a character that you specify to group keys. All keys
# that contain the same string between the `prefix` and the first
# occurrence of the delimiter are grouped under a single result element
- # in CommonPrefixes. These groups are counted as one result against the
- # max-keys limitation. These keys are not returned elsewhere in the
- # response.
+ # in `CommonPrefixes`. These groups are counted as one result against
+ # the `max-keys` limitation. These keys are not returned elsewhere in
+ # the response.
#
# @option params [String] :encoding_type
# Requests Amazon S3 to encode the object keys in the response and
- # specifies the encoding method to use. An object key may contain any
- # Unicode character; however, XML 1.0 parser cannot parse some
+ # specifies the encoding method to use. An object key can contain any
+ # Unicode character; however, the XML 1.0 parser cannot parse some
# characters, such as characters with an ASCII value from 0 to 10. For
# characters that are not supported in XML 1.0, you can add this
# parameter to request that Amazon S3 encode the keys in the response.
@@ -8265,20 +8281,20 @@ module Aws::S3
# Specifies the key to start with when listing objects in a bucket.
#
# @option params [Integer] :max_keys
- # Sets the maximum number of keys returned in the response. By default
+ # Sets the maximum number of keys returned in the response. By default,
# the action returns up to 1,000 key names. The response might contain
# fewer keys but will never contain more. If additional keys satisfy the
- # search criteria, but were not returned because max-keys was exceeded,
- # the response contains <isTruncated>true</isTruncated>. To
- # return the additional keys, see key-marker and version-id-marker.
+ # search criteria, but were not returned because `max-keys` was
+ # exceeded, the response contains `<isTruncated>true</isTruncated>`. To
+ # return the additional keys, see `key-marker` and `version-id-marker`.
#
# @option params [String] :prefix
# Use this parameter to select only those keys that begin with the
# specified prefix. You can use prefixes to separate a bucket into
- # different groupings of keys. (You can think of using prefix to make
- # groups in the same way you'd use a folder in a file system.) You can
- # use prefix with delimiter to roll up numerous objects into a single
- # result under CommonPrefixes.
+ # different groupings of keys. (You can think of using `prefix` to make
+ # groups in the same way that you'd use a folder in a file system.) You
+ # can use `prefix` with `delimiter` to roll up numerous objects into a
+ # single result under `CommonPrefixes`.
#
# @option params [String] :version_id_marker
# Specifies the object version you want to start listing from.
@@ -8299,6 +8315,10 @@ module Aws::S3
#
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
#
+ # @option params [Array<String>] :optional_object_attributes
+ # Specifies the optional fields that you want returned in the response.
+ # Fields that you do not specify are not returned.
+ #
# @return [Types::ListObjectVersionsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
#
# * {Types::ListObjectVersionsOutput#is_truncated #is_truncated} => Boolean
@@ -8374,6 +8394,7 @@ module Aws::S3
# version_id_marker: "VersionIdMarker",
# expected_bucket_owner: "AccountId",
# request_payer: "requester", # accepts requester
+ # optional_object_attributes: ["RestoreStatus"], # accepts RestoreStatus
# })
#
# @example Response structure
@@ -8395,6 +8416,8 @@ module Aws::S3
# resp.versions[0].last_modified #=> Time
# resp.versions[0].owner.display_name #=> String
# resp.versions[0].owner.id #=> String
+ # resp.versions[0].restore_status.is_restore_in_progress #=> Boolean
+ # resp.versions[0].restore_status.restore_expiry_date #=> Time
# resp.delete_markers #=> Array
# resp.delete_markers[0].owner.display_name #=> String
# resp.delete_markers[0].owner.id #=> String
@@ -8468,7 +8491,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -8476,12 +8499,12 @@ module Aws::S3
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html
#
# @option params [String] :delimiter
- # A delimiter is a character you use to group keys.
+ # A delimiter is a character that you use to group keys.
#
# @option params [String] :encoding_type
# Requests Amazon S3 to encode the object keys in the response and
- # specifies the encoding method to use. An object key may contain any
- # Unicode character; however, XML 1.0 parser cannot parse some
+ # specifies the encoding method to use. An object key can contain any
+ # Unicode character; however, the XML 1.0 parser cannot parse some
# characters, such as characters with an ASCII value from 0 to 10. For
# characters that are not supported in XML 1.0, you can add this
# parameter to request that Amazon S3 encode the keys in the response.
@@ -8492,7 +8515,7 @@ module Aws::S3
# bucket.
#
# @option params [Integer] :max_keys
- # Sets the maximum number of keys returned in the response. By default
+ # Sets the maximum number of keys returned in the response. By default,
# the action returns up to 1,000 key names. The response might contain
# fewer keys but will never contain more.
#
@@ -8509,6 +8532,10 @@ module Aws::S3
# a different account, the request fails with the HTTP status code `403
# Forbidden` (access denied).
#
+ # @option params [Array<String>] :optional_object_attributes
+ # Specifies the optional fields that you want returned in the response.
+ # Fields that you do not specify are not returned.
+ #
# @return [Types::ListObjectsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
#
# * {Types::ListObjectsOutput#is_truncated #is_truncated} => Boolean
@@ -8575,6 +8602,7 @@ module Aws::S3
# prefix: "Prefix",
# request_payer: "requester", # accepts requester
# expected_bucket_owner: "AccountId",
+ # optional_object_attributes: ["RestoreStatus"], # accepts RestoreStatus
# })
#
# @example Response structure
@@ -8592,6 +8620,8 @@ module Aws::S3
# resp.contents[0].storage_class #=> String, one of "STANDARD", "REDUCED_REDUNDANCY", "GLACIER", "STANDARD_IA", "ONEZONE_IA", "INTELLIGENT_TIERING", "DEEP_ARCHIVE", "OUTPOSTS", "GLACIER_IR", "SNOW"
# resp.contents[0].owner.display_name #=> String
# resp.contents[0].owner.id #=> String
+ # resp.contents[0].restore_status.is_restore_in_progress #=> Boolean
+ # resp.contents[0].restore_status.restore_expiry_date #=> Time
# resp.name #=> String
# resp.prefix #=> String
# resp.delimiter #=> String
@@ -8617,21 +8647,23 @@ module Aws::S3
# parse the contents of the response and handle it appropriately.
# Objects are returned sorted in an ascending order of the respective
# key names in the list. For more information about listing objects, see
- # [Listing object keys programmatically][1]
+ # [Listing object keys programmatically][1] in the *Amazon S3 User
+ # Guide*.
#
# To use this operation, you must have READ access to the bucket.
#
# To use this action in an Identity and Access Management (IAM) policy,
- # you must have permissions to perform the `s3:ListBucket` action. The
+ # you must have permission to perform the `s3:ListBucket` action. The
# bucket owner has this permission by default and can grant this
# permission to others. For more information about permissions, see
# [Permissions Related to Bucket Subresource Operations][2] and
- # [Managing Access Permissions to Your Amazon S3 Resources][3].
+ # [Managing Access Permissions to Your Amazon S3 Resources][3] in the
+ # *Amazon S3 User Guide*.
#
# This section describes the latest revision of this action. We
- # recommend that you use this revised API for application development.
- # For backward compatibility, Amazon S3 continues to support the prior
- # version of this API, [ListObjects][4].
+ # recommend that you use this revised API operation for application
+ # development. For backward compatibility, Amazon S3 continues to
+ # support the prior version of this API operation, [ListObjects][4].
#
# To get a list of your buckets, see [ListBuckets][5].
#
@@ -8672,7 +8704,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -8680,13 +8712,13 @@ module Aws::S3
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html
#
# @option params [String] :delimiter
- # A delimiter is a character you use to group keys.
+ # A delimiter is a character that you use to group keys.
#
# @option params [String] :encoding_type
# Encoding type used by Amazon S3 to encode object keys in the response.
#
# @option params [Integer] :max_keys
- # Sets the maximum number of keys returned in the response. By default
+ # Sets the maximum number of keys returned in the response. By default,
# the action returns up to 1,000 key names. The response might contain
# fewer keys but will never contain more.
#
@@ -8694,14 +8726,14 @@ module Aws::S3
# Limits the response to keys that begin with the specified prefix.
#
# @option params [String] :continuation_token
- # ContinuationToken indicates Amazon S3 that the list is being continued
- # on this bucket with a token. ContinuationToken is obfuscated and is
- # not a real key.
+ # `ContinuationToken` indicates to Amazon S3 that the list is being
+ # continued on this bucket with a token. `ContinuationToken` is
+ # obfuscated and is not a real key.
#
# @option params [Boolean] :fetch_owner
- # The owner field is not present in listV2 by default, if you want to
- # return owner field with each key in the result then set the fetch
- # owner field to true.
+ # The owner field is not present in `ListObjectsV2` by default. If you
+ # want to return the owner field with each key in the result, then set
+ # the `FetchOwner` field to `true`.
#
# @option params [String] :start_after
# StartAfter is where you want Amazon S3 to start listing from. Amazon
@@ -8718,6 +8750,10 @@ module Aws::S3
# a different account, the request fails with the HTTP status code `403
# Forbidden` (access denied).
#
+ # @option params [Array<String>] :optional_object_attributes
+ # Specifies the optional fields that you want returned in the response.
+ # Fields that you do not specify are not returned.
+ #
# @return [Types::ListObjectsV2Output] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
#
# * {Types::ListObjectsV2Output#is_truncated #is_truncated} => Boolean
@@ -8786,6 +8822,7 @@ module Aws::S3
# start_after: "StartAfter",
# request_payer: "requester", # accepts requester
# expected_bucket_owner: "AccountId",
+ # optional_object_attributes: ["RestoreStatus"], # accepts RestoreStatus
# })
#
# @example Response structure
@@ -8801,6 +8838,8 @@ module Aws::S3
# resp.contents[0].storage_class #=> String, one of "STANDARD", "REDUCED_REDUNDANCY", "GLACIER", "STANDARD_IA", "ONEZONE_IA", "INTELLIGENT_TIERING", "DEEP_ARCHIVE", "OUTPOSTS", "GLACIER_IR", "SNOW"
# resp.contents[0].owner.display_name #=> String
# resp.contents[0].owner.id #=> String
+ # resp.contents[0].restore_status.is_restore_in_progress #=> Boolean
+ # resp.contents[0].restore_status.restore_expiry_date #=> Time
# resp.name #=> String
# resp.prefix #=> String
# resp.delimiter #=> String
@@ -8889,7 +8928,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -10132,7 +10171,7 @@ module Aws::S3
# },
# id: "InventoryId", # required
# included_object_versions: "All", # required, accepts All, Current
- # optional_fields: ["Size"], # accepts Size, LastModifiedDate, StorageClass, ETag, IsMultipartUploaded, ReplicationStatus, EncryptionStatus, ObjectLockRetainUntilDate, ObjectLockMode, ObjectLockLegalHoldStatus, IntelligentTieringAccessTier, BucketKeyStatus, ChecksumAlgorithm
+ # optional_fields: ["Size"], # accepts Size, LastModifiedDate, StorageClass, ETag, IsMultipartUploaded, ReplicationStatus, EncryptionStatus, ObjectLockRetainUntilDate, ObjectLockMode, ObjectLockLegalHoldStatus, IntelligentTieringAccessTier, BucketKeyStatus, ChecksumAlgorithm, ObjectAccessControlList, ObjectOwner
# schedule: { # required
# frequency: "Daily", # required, accepts Daily, Weekly
# },
@@ -12152,7 +12191,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -12456,134 +12495,134 @@ module Aws::S3
# * {Types::PutObjectOutput#request_charged #request_charged} => String
#
#
- # @example Example: To upload an object and specify optional tags
+ # @example Example: To upload an object
#
- # # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
- # # S3 returns version ID of the newly created object.
+ # # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
+ # # syntax. S3 returns VersionId of the newly created object.
#
# resp = client.put_object({
- # body: "c:\\HappyFace.jpg",
+ # body: "HappyFace.jpg",
# bucket: "examplebucket",
# key: "HappyFace.jpg",
- # tagging: "key1=value1&key2=value2",
# })
#
# resp.to_h outputs the following:
# {
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
- # version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
+ # version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
# }
#
- # @example Example: To upload an object and specify canned ACL.
+ # @example Example: To upload object and specify user-defined metadata
#
- # # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
- # # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
+ # # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
+ # # enabled, S3 returns version ID in response.
#
# resp = client.put_object({
- # acl: "authenticated-read",
# body: "filetoupload",
# bucket: "examplebucket",
# key: "exampleobject",
+ # metadata: {
+ # "metadata1" => "value1",
+ # "metadata2" => "value2",
+ # },
# })
#
# resp.to_h outputs the following:
# {
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
- # version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
+ # version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
# }
#
- # @example Example: To create an object.
+ # @example Example: To upload an object (specify optional headers)
#
- # # The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
+ # # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
+ # # storage class and use server-side encryption.
#
# resp = client.put_object({
- # body: "filetoupload",
+ # body: "HappyFace.jpg",
# bucket: "examplebucket",
- # key: "objectkey",
+ # key: "HappyFace.jpg",
+ # server_side_encryption: "AES256",
+ # storage_class: "STANDARD_IA",
# })
#
# resp.to_h outputs the following:
# {
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
- # version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
+ # server_side_encryption: "AES256",
+ # version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
# }
#
- # @example Example: To upload an object and specify server-side encryption and object tags
+ # @example Example: To create an object.
#
- # # The following example uploads an object. The request specifies the optional server-side encryption option. The request
- # # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
+ # # The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
#
# resp = client.put_object({
# body: "filetoupload",
# bucket: "examplebucket",
- # key: "exampleobject",
- # server_side_encryption: "AES256",
- # tagging: "key1=value1&key2=value2",
+ # key: "objectkey",
# })
#
# resp.to_h outputs the following:
# {
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
- # server_side_encryption: "AES256",
- # version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
+ # version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
# }
#
- # @example Example: To upload object and specify user-defined metadata
+ # @example Example: To upload an object and specify server-side encryption and object tags
#
- # # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
- # # enabled, S3 returns version ID in response.
+ # # The following example uploads an object. The request specifies the optional server-side encryption option. The request
+ # # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
#
# resp = client.put_object({
# body: "filetoupload",
# bucket: "examplebucket",
# key: "exampleobject",
- # metadata: {
- # "metadata1" => "value1",
- # "metadata2" => "value2",
- # },
+ # server_side_encryption: "AES256",
+ # tagging: "key1=value1&key2=value2",
# })
#
# resp.to_h outputs the following:
# {
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
- # version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
+ # server_side_encryption: "AES256",
+ # version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
# }
#
- # @example Example: To upload an object
+ # @example Example: To upload an object and specify optional tags
#
- # # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
- # # syntax. S3 returns VersionId of the newly created object.
+ # # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
+ # # S3 returns version ID of the newly created object.
#
# resp = client.put_object({
- # body: "HappyFace.jpg",
+ # body: "c:\\HappyFace.jpg",
# bucket: "examplebucket",
# key: "HappyFace.jpg",
+ # tagging: "key1=value1&key2=value2",
# })
#
# resp.to_h outputs the following:
# {
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
- # version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
+ # version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
# }
#
- # @example Example: To upload an object (specify optional headers)
+ # @example Example: To upload an object and specify canned ACL.
#
- # # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
- # # storage class and use server-side encryption.
+ # # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
+ # # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
#
# resp = client.put_object({
- # body: "HappyFace.jpg",
+ # acl: "authenticated-read",
+ # body: "filetoupload",
# bucket: "examplebucket",
- # key: "HappyFace.jpg",
- # server_side_encryption: "AES256",
- # storage_class: "STANDARD_IA",
+ # key: "exampleobject",
# })
#
# resp.to_h outputs the following:
# {
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
- # server_side_encryption: "AES256",
- # version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
+ # version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
# }
#
# @example Streaming a file from disk
@@ -12929,7 +12968,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -13433,7 +13472,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -13895,7 +13934,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -14629,7 +14668,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -14978,7 +15017,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -15614,7 +15653,7 @@ module Aws::S3
params: params,
config: config)
context[:gem_name] = 'aws-sdk-s3'
- context[:gem_version] = '1.126.0'
+ context[:gem_version] = '1.132.0'
Seahorse::Client::Request.new(handlers, context)
end
diff --git a/lib/aws-sdk-s3/client_api.rb b/lib/aws-sdk-s3/client_api.rb
index e668758..cdd11ae 100644
--- a/lib/aws-sdk-s3/client_api.rb
+++ b/lib/aws-sdk-s3/client_api.rb
@@ -296,6 +296,7 @@ module Aws::S3
IsEnabled = Shapes::BooleanShape.new(name: 'IsEnabled')
IsLatest = Shapes::BooleanShape.new(name: 'IsLatest')
IsPublic = Shapes::BooleanShape.new(name: 'IsPublic')
+ IsRestoreInProgress = Shapes::BooleanShape.new(name: 'IsRestoreInProgress')
IsTruncated = Shapes::BooleanShape.new(name: 'IsTruncated')
JSONInput = Shapes::StructureShape.new(name: 'JSONInput')
JSONOutput = Shapes::StructureShape.new(name: 'JSONOutput')
@@ -409,6 +410,8 @@ module Aws::S3
ObjectVersionId = Shapes::StringShape.new(name: 'ObjectVersionId')
ObjectVersionList = Shapes::ListShape.new(name: 'ObjectVersionList', flattened: true)
ObjectVersionStorageClass = Shapes::StringShape.new(name: 'ObjectVersionStorageClass')
+ OptionalObjectAttributes = Shapes::StringShape.new(name: 'OptionalObjectAttributes')
+ OptionalObjectAttributesList = Shapes::ListShape.new(name: 'OptionalObjectAttributesList')
OutputLocation = Shapes::StructureShape.new(name: 'OutputLocation')
OutputSerialization = Shapes::StructureShape.new(name: 'OutputSerialization')
Owner = Shapes::StructureShape.new(name: 'Owner')
@@ -507,11 +510,13 @@ module Aws::S3
ResponseContentType = Shapes::StringShape.new(name: 'ResponseContentType')
ResponseExpires = Shapes::TimestampShape.new(name: 'ResponseExpires', timestampFormat: "rfc822")
Restore = Shapes::StringShape.new(name: 'Restore')
+ RestoreExpiryDate = Shapes::TimestampShape.new(name: 'RestoreExpiryDate')
RestoreObjectOutput = Shapes::StructureShape.new(name: 'RestoreObjectOutput')
RestoreObjectRequest = Shapes::StructureShape.new(name: 'RestoreObjectRequest')
RestoreOutputPath = Shapes::StringShape.new(name: 'RestoreOutputPath')
RestoreRequest = Shapes::StructureShape.new(name: 'RestoreRequest')
RestoreRequestType = Shapes::StringShape.new(name: 'RestoreRequestType')
+ RestoreStatus = Shapes::StructureShape.new(name: 'RestoreStatus')
Role = Shapes::StringShape.new(name: 'Role')
RoutingRule = Shapes::StructureShape.new(name: 'RoutingRule')
RoutingRules = Shapes::ListShape.new(name: 'RoutingRules')
@@ -1705,6 +1710,7 @@ module Aws::S3
ListObjectVersionsRequest.add_member(:version_id_marker, Shapes::ShapeRef.new(shape: VersionIdMarker, location: "querystring", location_name: "version-id-marker"))
ListObjectVersionsRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
ListObjectVersionsRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
+ ListObjectVersionsRequest.add_member(:optional_object_attributes, Shapes::ShapeRef.new(shape: OptionalObjectAttributesList, location: "header", location_name: "x-amz-optional-object-attributes"))
ListObjectVersionsRequest.struct_class = Types::ListObjectVersionsRequest
ListObjectsOutput.add_member(:is_truncated, Shapes::ShapeRef.new(shape: IsTruncated, location_name: "IsTruncated"))
@@ -1728,6 +1734,7 @@ module Aws::S3
ListObjectsRequest.add_member(:prefix, Shapes::ShapeRef.new(shape: Prefix, location: "querystring", location_name: "prefix"))
ListObjectsRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
ListObjectsRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
+ ListObjectsRequest.add_member(:optional_object_attributes, Shapes::ShapeRef.new(shape: OptionalObjectAttributesList, location: "header", location_name: "x-amz-optional-object-attributes"))
ListObjectsRequest.struct_class = Types::ListObjectsRequest
ListObjectsV2Output.add_member(:is_truncated, Shapes::ShapeRef.new(shape: IsTruncated, location_name: "IsTruncated"))
@@ -1755,6 +1762,7 @@ module Aws::S3
ListObjectsV2Request.add_member(:start_after, Shapes::ShapeRef.new(shape: StartAfter, location: "querystring", location_name: "start-after"))
ListObjectsV2Request.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
ListObjectsV2Request.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
+ ListObjectsV2Request.add_member(:optional_object_attributes, Shapes::ShapeRef.new(shape: OptionalObjectAttributesList, location: "header", location_name: "x-amz-optional-object-attributes"))
ListObjectsV2Request.struct_class = Types::ListObjectsV2Request
ListPartsOutput.add_member(:abort_date, Shapes::ShapeRef.new(shape: AbortDate, location: "header", location_name: "x-amz-abort-date"))
@@ -1868,6 +1876,7 @@ module Aws::S3
Object.add_member(:size, Shapes::ShapeRef.new(shape: Size, location_name: "Size"))
Object.add_member(:storage_class, Shapes::ShapeRef.new(shape: ObjectStorageClass, location_name: "StorageClass"))
Object.add_member(:owner, Shapes::ShapeRef.new(shape: Owner, location_name: "Owner"))
+ Object.add_member(:restore_status, Shapes::ShapeRef.new(shape: RestoreStatus, location_name: "RestoreStatus"))
Object.struct_class = Types::Object
ObjectAlreadyInActiveTierError.struct_class = Types::ObjectAlreadyInActiveTierError
@@ -1915,10 +1924,13 @@ module Aws::S3
ObjectVersion.add_member(:is_latest, Shapes::ShapeRef.new(shape: IsLatest, location_name: "IsLatest"))
ObjectVersion.add_member(:last_modified, Shapes::ShapeRef.new(shape: LastModified, location_name: "LastModified"))
ObjectVersion.add_member(:owner, Shapes::ShapeRef.new(shape: Owner, location_name: "Owner"))
+ ObjectVersion.add_member(:restore_status, Shapes::ShapeRef.new(shape: RestoreStatus, location_name: "RestoreStatus"))
ObjectVersion.struct_class = Types::ObjectVersion
ObjectVersionList.member = Shapes::ShapeRef.new(shape: ObjectVersion)
+ OptionalObjectAttributesList.member = Shapes::ShapeRef.new(shape: OptionalObjectAttributes)
+
OutputLocation.add_member(:s3, Shapes::ShapeRef.new(shape: S3Location, location_name: "S3"))
OutputLocation.struct_class = Types::OutputLocation
@@ -2392,6 +2404,10 @@ module Aws::S3
RestoreRequest.add_member(:output_location, Shapes::ShapeRef.new(shape: OutputLocation, location_name: "OutputLocation"))
RestoreRequest.struct_class = Types::RestoreRequest
+ RestoreStatus.add_member(:is_restore_in_progress, Shapes::ShapeRef.new(shape: IsRestoreInProgress, location_name: "IsRestoreInProgress"))
+ RestoreStatus.add_member(:restore_expiry_date, Shapes::ShapeRef.new(shape: RestoreExpiryDate, location_name: "RestoreExpiryDate"))
+ RestoreStatus.struct_class = Types::RestoreStatus
+
RoutingRule.add_member(:condition, Shapes::ShapeRef.new(shape: Condition, location_name: "Condition"))
RoutingRule.add_member(:redirect, Shapes::ShapeRef.new(shape: Redirect, required: true, location_name: "Redirect"))
RoutingRule.struct_class = Types::RoutingRule
diff --git a/lib/aws-sdk-s3/customizations/errors.rb b/lib/aws-sdk-s3/customizations/errors.rb
index 173cc57..0b0b4aa 100644
--- a/lib/aws-sdk-s3/customizations/errors.rb
+++ b/lib/aws-sdk-s3/customizations/errors.rb
@@ -8,7 +8,7 @@ module Aws
class PermanentRedirect < ServiceError
# @param [Seahorse::Client::RequestContext] context
# @param [String] message
- # @param [Aws::S3::Types::PermanentRedirect] data
+ # @param [Aws::S3::Types::PermanentRedirect] _data
def initialize(context, message, _data = Aws::EmptyStructure.new)
data = Aws::S3::Types::PermanentRedirect.new(message: message)
body = context.http_response.body_contents
diff --git a/lib/aws-sdk-s3/customizations/object.rb b/lib/aws-sdk-s3/customizations/object.rb
index 07956f4..bc3b814 100644
--- a/lib/aws-sdk-s3/customizations/object.rb
+++ b/lib/aws-sdk-s3/customizations/object.rb
@@ -46,6 +46,14 @@ module Aws
# different region. You do not need to specify this option
# if you have provided a `:source_client` or a `:content_length`.
#
+ # @option options [Boolean] :use_source_parts (false) Only used when
+ # `:multipart_copy` is `true`. Use part sizes defined on the source
+ # object if any exist. If copying or moving an object that
+ # is already multipart, this does not re-part the object, instead
+ # re-using the part definitions on the original. That means the etag
+ # and any checksums will not change. This is especially useful if the
+ # source object has parts with varied sizes.
+ #
# @example Basic object copy
#
# bucket = Aws::S3::Bucket.new('target-bucket')
@@ -484,6 +492,18 @@ module Aws
# retrieve the object. For more about object versioning, see:
# https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectVersioning.html
#
+ # @option options [String] checksum_mode (ENABLED) When `ENABLED` and
+ # the object has a stored checksum, it will be used to validate the
+ # download and will raise an `Aws::Errors::ChecksumError` if
+ # checksum validation fails. You may provide a `on_checksum_validated`
+ # callback if you need to verify that validation occured and which
+ # algorithm was used.
+ #
+ # @option options [Callable] on_checksum_validated Called each time a
+ # request's checksum is validated with the checksum algorithm and the
+ # response. For multipart downloads, this will be called for each
+ # part that is downloaded and validated.
+ #
# @return [Boolean] Returns `true` when the file is downloaded without
# any errors.
def download_file(destination, options = {})
diff --git a/lib/aws-sdk-s3/endpoint_parameters.rb b/lib/aws-sdk-s3/endpoint_parameters.rb
index eeec041..46dfee8 100644
--- a/lib/aws-sdk-s3/endpoint_parameters.rb
+++ b/lib/aws-sdk-s3/endpoint_parameters.rb
@@ -119,6 +119,10 @@ module Aws::S3
end
self[:endpoint] = options[:endpoint]
self[:force_path_style] = options[:force_path_style]
+ self[:force_path_style] = false if self[:force_path_style].nil?
+ if self[:force_path_style].nil?
+ raise ArgumentError, "Missing required EndpointParameter: :force_path_style"
+ end
self[:accelerate] = options[:accelerate]
self[:accelerate] = false if self[:accelerate].nil?
if self[:accelerate].nil?
diff --git a/lib/aws-sdk-s3/endpoint_provider.rb b/lib/aws-sdk-s3/endpoint_provider.rb
index 7db3d20..dfc7b87 100644
--- a/lib/aws-sdk-s3/endpoint_provider.rb
+++ b/lib/aws-sdk-s3/endpoint_provider.rb
@@ -23,7 +23,22 @@ module Aws::S3
disable_multi_region_access_points = parameters.disable_multi_region_access_points
use_arn_region = parameters.use_arn_region
if Aws::Endpoints::Matchers.set?(region)
- if Aws::Endpoints::Matchers.set?(bucket) && (hardware_type = Aws::Endpoints::Matchers.substring(bucket, 49, 50, true)) && (region_prefix = Aws::Endpoints::Matchers.substring(bucket, 8, 12, true)) && (abba_suffix = Aws::Endpoints::Matchers.substring(bucket, 0, 7, true)) && (outpost_id = Aws::Endpoints::Matchers.substring(bucket, 32, 49, true)) && (region_partition = Aws::Endpoints::Matchers.aws_partition(region)) && Aws::Endpoints::Matchers.string_equals?(abba_suffix, "--op-s3")
+ if Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
+ raise ArgumentError, "Accelerate cannot be used with FIPS"
+ end
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint)
+ raise ArgumentError, "Cannot set dual-stack in combination with a custom endpoint."
+ end
+ if Aws::Endpoints::Matchers.set?(endpoint) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
+ raise ArgumentError, "A custom endpoint cannot be combined with FIPS"
+ end
+ if Aws::Endpoints::Matchers.set?(endpoint) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true)
+ raise ArgumentError, "A custom endpoint cannot be combined with S3 Accelerate"
+ end
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && (partition_result = Aws::Endpoints::Matchers.aws_partition(region)) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn")
+ raise ArgumentError, "Partition does not support FIPS"
+ end
+ if Aws::Endpoints::Matchers.set?(bucket) && (hardware_type = Aws::Endpoints::Matchers.substring(bucket, 49, 50, true)) && (region_prefix = Aws::Endpoints::Matchers.substring(bucket, 8, 12, true)) && (bucket_alias_suffix = Aws::Endpoints::Matchers.substring(bucket, 0, 7, true)) && (outpost_id = Aws::Endpoints::Matchers.substring(bucket, 32, 49, true)) && (region_partition = Aws::Endpoints::Matchers.aws_partition(region)) && Aws::Endpoints::Matchers.string_equals?(bucket_alias_suffix, "--op-s3")
if Aws::Endpoints::Matchers.valid_host_label?(outpost_id, false)
if Aws::Endpoints::Matchers.string_equals?(hardware_type, "e")
if Aws::Endpoints::Matchers.string_equals?(region_prefix, "beta")
@@ -55,124 +70,12 @@ module Aws::S3
if Aws::Endpoints::Matchers.set?(endpoint) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(Aws::Endpoints::Matchers.parse_url(endpoint)))
raise ArgumentError, "Custom endpoint `#{endpoint}` was not a valid URI"
end
- if Aws::Endpoints::Matchers.set?(force_path_style) && Aws::Endpoints::Matchers.boolean_equals?(force_path_style, true)
- if Aws::Endpoints::Matchers.aws_parse_arn(bucket)
- raise ArgumentError, "Path-style addressing cannot be used with ARN buckets"
- end
- if (uri_encoded_bucket = Aws::Endpoints::Matchers.uri_encode(bucket))
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint)
- raise ArgumentError, "Cannot set dual-stack in combination with a custom endpoint."
- end
- if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
- if Aws::Endpoints::Matchers.boolean_equals?(accelerate, false)
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
- return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
- return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
- if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
- if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- end
- raise ArgumentError, "Path-style addressing cannot be used with S3 Accelerate"
- end
- raise ArgumentError, "A valid partition could not be determined"
- end
- end
- if Aws::Endpoints::Matchers.aws_virtual_hostable_s3_bucket?(bucket, false)
+ if Aws::Endpoints::Matchers.boolean_equals?(force_path_style, false) && Aws::Endpoints::Matchers.aws_virtual_hostable_s3_bucket?(bucket, false)
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
if Aws::Endpoints::Matchers.valid_host_label?(region, false)
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn")
- raise ArgumentError, "Partition does not support FIPS"
- end
- if Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
- raise ArgumentError, "Accelerate cannot be used with FIPS"
- end
if Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn")
raise ArgumentError, "S3 Accelerate cannot be used in this region"
end
- if Aws::Endpoints::Matchers.set?(endpoint) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
- raise ArgumentError, "Host override cannot be combined with Dualstack, FIPS, or S3 Accelerate"
- end
- if Aws::Endpoints::Matchers.set?(endpoint) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
- raise ArgumentError, "Host override cannot be combined with Dualstack, FIPS, or S3 Accelerate"
- end
- if Aws::Endpoints::Matchers.set?(endpoint) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true)
- raise ArgumentError, "Host override cannot be combined with Dualstack, FIPS, or S3 Accelerate"
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
@@ -185,9 +88,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-fips.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-fips.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
end
@@ -197,9 +97,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-accelerate.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-accelerate.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-accelerate.dualstack.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
end
@@ -209,9 +106,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3.dualstack.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
end
@@ -224,12 +118,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(url, "isIp"), false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{bucket}.#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(url, "isIp"), true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(url, "isIp"), false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{bucket}.#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(url, "isIp"), true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -251,9 +139,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-accelerate.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-accelerate.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3-accelerate.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -266,9 +151,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -281,18 +163,16 @@ module Aws::S3
end
raise ArgumentError, "Invalid region: region was not a valid DNS name."
end
- raise ArgumentError, "A valid partition could not be determined"
end
- if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(url, "scheme"), "http") && Aws::Endpoints::Matchers.aws_virtual_hostable_s3_bucket?(bucket, true) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false)
+ if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(url, "scheme"), "http") && Aws::Endpoints::Matchers.aws_virtual_hostable_s3_bucket?(bucket, true) && Aws::Endpoints::Matchers.boolean_equals?(force_path_style, false) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.boolean_equals?(accelerate, false)
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
if Aws::Endpoints::Matchers.valid_host_label?(region, false)
return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{bucket}.#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
end
raise ArgumentError, "Invalid region: region was not a valid DNS name."
end
- raise ArgumentError, "A valid partition could not be determined"
end
- if (bucket_arn = Aws::Endpoints::Matchers.aws_parse_arn(bucket))
+ if Aws::Endpoints::Matchers.boolean_equals?(force_path_style, false) && (bucket_arn = Aws::Endpoints::Matchers.aws_parse_arn(bucket))
if (arn_type = Aws::Endpoints::Matchers.attr(bucket_arn, "resourceId[0]")) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(arn_type, ""))
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(bucket_arn, "service"), "s3-object-lambda")
if Aws::Endpoints::Matchers.string_equals?(arn_type, "accesspoint")
@@ -320,9 +200,6 @@ module Aws::S3
end
if Aws::Endpoints::Matchers.valid_host_label?(Aws::Endpoints::Matchers.attr(bucket_arn, "accountId"), false)
if Aws::Endpoints::Matchers.valid_host_label?(access_point_name, false)
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(bucket_partition, "name"), "aws-cn")
- raise ArgumentError, "Partition does not support FIPS"
- end
if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{access_point_name}-#{bucket_arn['accountId']}.#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3-object-lambda", "signingRegion"=>"#{bucket_arn['region']}"}]})
end
@@ -339,9 +216,7 @@ module Aws::S3
end
raise ArgumentError, "Client was configured for partition `#{partition_result['name']}` but ARN (`#{bucket}`) has `#{bucket_partition['name']}`"
end
- raise ArgumentError, "A valid partition could not be determined"
end
- raise ArgumentError, "Could not load partition for ARN region `#{bucket_arn['region']}`"
end
raise ArgumentError, "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."
end
@@ -373,12 +248,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(accelerate, true)
raise ArgumentError, "Access Points do not support S3 Accelerate"
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(bucket_partition, "name"), "aws-cn")
- raise ArgumentError, "Partition does not support FIPS"
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint)
- raise ArgumentError, "DualStack cannot be combined with a Host override (PrivateLink)"
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
return Aws::Endpoints::Endpoint.new(url: "https://#{access_point_name}-#{bucket_arn['accountId']}.s3-accesspoint-fips.dualstack.#{bucket_arn['region']}.#{bucket_partition['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{bucket_arn['region']}"}]})
end
@@ -405,13 +274,10 @@ module Aws::S3
end
raise ArgumentError, "Client was configured for partition `#{partition_result['name']}` but ARN (`#{bucket}`) has `#{bucket_partition['name']}`"
end
- raise ArgumentError, "A valid partition could not be determined"
end
- raise ArgumentError, "Could not load partition for ARN region `#{bucket_arn['region']}`"
end
raise ArgumentError, "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."
end
- raise ArgumentError, "Invalid ARN: bucket ARN is missing a region"
end
end
if Aws::Endpoints::Matchers.valid_host_label?(access_point_name, true)
@@ -433,7 +299,6 @@ module Aws::S3
end
raise ArgumentError, "Client was configured for partition `#{mrap_partition['name']}` but bucket referred to partition `#{bucket_arn['partition']}`"
end
- raise ArgumentError, "#{region} was not a valid region"
end
raise ArgumentError, "Invalid Access Point Name"
end
@@ -482,9 +347,7 @@ module Aws::S3
end
raise ArgumentError, "Client was configured for partition `#{partition_result['name']}` but ARN (`#{bucket}`) has `#{bucket_partition['name']}`"
end
- raise ArgumentError, "A valid partition could not be determined"
end
- raise ArgumentError, "Could not load partition for ARN region #{bucket_arn['region']}"
end
raise ArgumentError, "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `#{outpost_id}`"
end
@@ -497,15 +360,12 @@ module Aws::S3
if (arn_prefix = Aws::Endpoints::Matchers.substring(bucket, 0, 4, false)) && Aws::Endpoints::Matchers.string_equals?(arn_prefix, "arn:") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(Aws::Endpoints::Matchers.aws_parse_arn(bucket)))
raise ArgumentError, "Invalid ARN: `#{bucket}` was not a valid ARN"
end
+ if Aws::Endpoints::Matchers.boolean_equals?(force_path_style, true) && Aws::Endpoints::Matchers.aws_parse_arn(bucket)
+ raise ArgumentError, "Path-style addressing cannot be used with ARN buckets"
+ end
if (uri_encoded_bucket = Aws::Endpoints::Matchers.uri_encode(bucket))
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint)
- raise ArgumentError, "Cannot set dual-stack in combination with a custom endpoint."
- end
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
if Aws::Endpoints::Matchers.boolean_equals?(accelerate, false)
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
@@ -515,21 +375,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
@@ -542,9 +387,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.#{region}.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
end
@@ -554,9 +396,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['normalizedPath']}#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -569,9 +408,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}/#{uri_encoded_bucket}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -584,7 +420,6 @@ module Aws::S3
end
raise ArgumentError, "Path-style addressing cannot be used with S3 Accelerate"
end
- raise ArgumentError, "A valid partition could not be determined"
end
end
if Aws::Endpoints::Matchers.set?(use_object_lambda_endpoint) && Aws::Endpoints::Matchers.boolean_equals?(use_object_lambda_endpoint, true)
@@ -596,9 +431,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(accelerate, true)
raise ArgumentError, "S3 Object Lambda does not support S3 Accelerate"
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn")
- raise ArgumentError, "Partition does not support FIPS"
- end
if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3-object-lambda", "signingRegion"=>"#{region}"}]})
end
@@ -609,29 +441,10 @@ module Aws::S3
end
raise ArgumentError, "Invalid region: region was not a valid DNS name."
end
- raise ArgumentError, "A valid partition could not be determined"
end
if Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(bucket))
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
if Aws::Endpoints::Matchers.valid_host_label?(region, true)
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn")
- raise ArgumentError, "Partition does not support FIPS"
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
@@ -641,21 +454,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.dualstack.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
@@ -665,21 +463,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
return Aws::Endpoints::Endpoint.new(url: "https://s3-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, false)
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
- end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://s3.dualstack.us-east-1.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
@@ -692,9 +475,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -707,9 +487,6 @@ module Aws::S3
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
end
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
- return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"us-east-1"}]})
- end
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(region, "aws-global")) && Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true)
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
return Aws::Endpoints::Endpoint.new(url: "https://s3.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3", "signingRegion"=>"#{region}"}]})
@@ -722,7 +499,6 @@ module Aws::S3
end
raise ArgumentError, "Invalid region: region was not a valid DNS name."
end
- raise ArgumentError, "A valid partition could not be determined"
end
end
raise ArgumentError, "A region must be set when sending requests to S3."
diff --git a/lib/aws-sdk-s3/file_downloader.rb b/lib/aws-sdk-s3/file_downloader.rb
index 48f335a..49d1a7e 100644
--- a/lib/aws-sdk-s3/file_downloader.rb
+++ b/lib/aws-sdk-s3/file_downloader.rb
@@ -31,6 +31,10 @@ module Aws
key: options[:key],
}
@params[:version_id] = options[:version_id] if options[:version_id]
+ @params[:checksum_mode] = options[:checksum_mode] || 'ENABLED'
+ @on_checksum_validated = options[:on_checksum_validated]
+
+ validate!
Aws::Plugins::UserAgent.feature('s3-transfer') do
case @mode
@@ -54,6 +58,17 @@ module Aws
private
+ def validate!
+ if @on_checksum_validated && @params[:checksum_mode] != 'ENABLED'
+ raise ArgumentError, "You must set checksum_mode: 'ENABLED' " +
+ "when providing a on_checksum_validated callback"
+ end
+
+ if @on_checksum_validated && !@on_checksum_validated.respond_to?(:call)
+ raise ArgumentError, 'on_checksum_validated must be callable'
+ end
+ end
+
def multipart_download
resp = @client.head_object(@params.merge(part_number: 1))
count = resp.parts_count
@@ -129,6 +144,9 @@ module Aws
@params.merge(param.to_sym => chunk)
)
write(resp)
+ if @on_checksum_validated && resp.checksum_validated
+ @on_checksum_validated.call(resp.checksum_validated, resp)
+ end
end
end
threads.each(&:join)
@@ -142,9 +160,17 @@ module Aws
end
def single_request
- @client.get_object(
+ resp = @client.get_object(
@params.merge(response_target: @path)
)
+
+ return resp unless @on_checksum_validated
+
+ if resp.checksum_validated
+ @on_checksum_validated.call(resp.checksum_validated, resp)
+ end
+
+ resp
end
end
end
diff --git a/lib/aws-sdk-s3/object_multipart_copier.rb b/lib/aws-sdk-s3/object_multipart_copier.rb
index 864748d..54adbcd 100644
--- a/lib/aws-sdk-s3/object_multipart_copier.rb
+++ b/lib/aws-sdk-s3/object_multipart_copier.rb
@@ -15,18 +15,21 @@ module Aws
MAX_PARTS = 10_000
# @option options [Client] :client
- # @option [Integer] :min_part_size (52428800) Size of copied parts.
- # Defaults to 50MB.
- # will be constructed from the given `options' hash.
- # @option [Integer] :thread_count (10) Number of concurrent threads to
- # use for copying parts.
+ # @option options [Integer] :min_part_size (52428800)
+ # Size of copied parts. Defaults to 50MB.
+ # @option options [Integer] :thread_count (10) Number of concurrent
+ # threads to use for copying parts.
+ # @option options [Boolean] :use_source_parts (false) Use part sizes
+ # defined on the source object if any exist. If copying or moving an
+ # object that is already multipart, this does not re-part the object,
+ # instead re-using the part definitions on the original. That means
+ # the etag and any checksums will not change. This is especially
+ # useful if the source object has parts with varied sizes.
def initialize(options = {})
+ @use_source_parts = options.delete(:use_source_parts) || false
@thread_count = options.delete(:thread_count) || 10
@min_part_size = options.delete(:min_part_size) || (FIVE_MB * 10)
@client = options[:client] || Client.new
- if options[:checksum_algorithm]
- raise ArgumentError, 'Multipart Copy does not support setting :checksum_algorithm'
- end
end
# @return [Client]
@@ -78,10 +81,9 @@ module Aws
end
def copy_part(part)
- {
- etag: @client.upload_part_copy(part).copy_part_result.etag,
- part_number: part[:part_number],
- }
+ @client.upload_part_copy(part).copy_part_result.to_h.merge({
+ part_number: part[:part_number]
+ }).tap { |result| result.delete(:last_modified) }
end
def complete_upload(parts, options)
@@ -104,24 +106,37 @@ module Aws
parts = []
options = options_for(:upload_part_copy, options)
while offset < size
+ part_size = calculate_part_size(part_number, default_part_size, options)
parts << options.merge({
part_number: part_number,
- copy_source_range: byte_range(offset, default_part_size, size),
+ copy_source_range: byte_range(offset, part_size, size),
})
part_number += 1
- offset += default_part_size
+ offset += part_size
end
parts
end
- def byte_range(offset, default_part_size, size)
- if offset + default_part_size < size
- "bytes=#{offset}-#{offset + default_part_size - 1}"
+ def byte_range(offset, part_size, size)
+ if offset + part_size < size
+ "bytes=#{offset}-#{offset + part_size - 1}"
else
"bytes=#{offset}-#{size - 1}"
end
end
+ def calculate_part_size(part_number, default_part_size, options)
+ if @use_source_parts && source_has_parts(options)
+ source_metadata(options.merge({ part_number: part_number }))[:content_length]
+ else
+ default_part_size
+ end
+ end
+
+ def source_has_parts(options)
+ @source_has_parts ||= source_metadata(options.merge({ part_number: 1 }))[:parts_count]
+ end
+
def source_metadata(options)
if options[:content_length]
return { content_length: options.delete(:content_length) }
@@ -138,6 +153,7 @@ module Aws
key = CGI.unescape(key)
opts = { bucket: bucket, key: key }
opts[:version_id] = version_id if version_id
+ opts[:part_number] = options[:part_number] if options[:part_number]
client.head_object(opts).to_h
end
diff --git a/lib/aws-sdk-s3/object_summary.rb b/lib/aws-sdk-s3/object_summary.rb
index 0375a73..c37eb4d 100644
--- a/lib/aws-sdk-s3/object_summary.rb
+++ b/lib/aws-sdk-s3/object_summary.rb
@@ -98,6 +98,20 @@ module Aws::S3
data[:owner]
end
+ # Specifies the restoration status of an object. Objects in certain
+ # storage classes must be restored before they can be retrieved. For
+ # more information about these storage classes and how to work with
+ # archived objects, see [ Working with archived objects][1] in the
+ # *Amazon S3 User Guide*.
+ #
+ #
+ #
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
+ # @return [Types::RestoreStatus]
+ def restore_status
+ data[:restore_status]
+ end
+
# @!endgroup
# @return [Client]
diff --git a/lib/aws-sdk-s3/object_version.rb b/lib/aws-sdk-s3/object_version.rb
index b379706..41ad3c8 100644
--- a/lib/aws-sdk-s3/object_version.rb
+++ b/lib/aws-sdk-s3/object_version.rb
@@ -105,6 +105,20 @@ module Aws::S3
data[:owner]
end
+ # Specifies the restoration status of an object. Objects in certain
+ # storage classes must be restored before they can be retrieved. For
+ # more information about these storage classes and how to work with
+ # archived objects, see [ Working with archived objects][1] in the
+ # *Amazon S3 User Guide*.
+ #
+ #
+ #
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
+ # @return [Types::RestoreStatus]
+ def restore_status
+ data[:restore_status]
+ end
+
# @!endgroup
# @return [Client]
diff --git a/lib/aws-sdk-s3/presigned_post.rb b/lib/aws-sdk-s3/presigned_post.rb
index 94b6c4a..b36a202 100644
--- a/lib/aws-sdk-s3/presigned_post.rb
+++ b/lib/aws-sdk-s3/presigned_post.rb
@@ -315,26 +315,28 @@ module Aws
# @!group Fields
- # The key to use for the uploaded object. You can use `${filename}`
- # as a variable in the key. This will be replaced with the name
- # of the file as provided by the user.
+ # @!method key(key)
+ # The key to use for the uploaded object. You can use `${filename}`
+ # as a variable in the key. This will be replaced with the name
+ # of the file as provided by the user.
#
- # For example, if the key is given as `/user/betty/${filename}` and
- # the file uploaded is named `lolcatz.jpg`, the resultant key will
- # be `/user/betty/lolcatz.jpg`.
+ # For example, if the key is given as `/user/betty/${filename}` and
+ # the file uploaded is named `lolcatz.jpg`, the resultant key will
+ # be `/user/betty/lolcatz.jpg`.
#
- # @param [String] key
- # @see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html)
- # @return [self]
+ # @param [String] key
+ # @see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html)
+ # @return [self]
define_field(:key) do |key|
@key_set = true
with('key', key)
end
- # Specify a prefix the uploaded
- # @param [String] prefix
- # @see #key
- # @return [self]
+ # @!method key_starts_with(prefix)
+ # Specify a prefix the uploaded
+ # @param [String] prefix
+ # @see #key
+ # @return [self]
define_field(:key_starts_with) do |prefix|
@key_set = true
starts_with('key', prefix)
@@ -412,26 +414,29 @@ module Aws
# @return [self]
define_field(:content_encoding, 'Content-Encoding', starts_with: true)
- # The date and time at which the object is no longer cacheable.
- # @note This does not affect the expiration of the presigned post
- # signature.
- # @param [Time] time
- # @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
- # @return [self]
+ # @!method expires(time)
+ # The date and time at which the object is no longer cacheable.
+ # @note This does not affect the expiration of the presigned post
+ # signature.
+ # @param [Time] time
+ # @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
+ # @return [self]
define_field(:expires) do |time|
with('Expires', time.httpdate)
end
- # @param [String] prefix
- # @see #expires
- # @return [self]
+ # @!method expires_starts_with(prefix)
+ # @param [String] prefix
+ # @see #expires
+ # @return [self]
define_field(:expires_starts_with) do |prefix|
starts_with('Expires', prefix)
end
- # The minimum and maximum allowable size for the uploaded content.
- # @param [Range<Integer>] byte_range
- # @return [self]
+ # @!method content_length_range(byte_range)
+ # The minimum and maximum allowable size for the uploaded content.
+ # @param [Range<Integer>] byte_range
+ # @return [self]
define_field(:content_length_range) do |byte_range|
min = byte_range.begin
max = byte_range.end
@@ -507,10 +512,11 @@ module Aws
# @return [self]
define_field(:website_redirect_location, 'x-amz-website-redirect-location')
- # Metadata hash to store with the uploaded object. Hash keys will be
- # prefixed with "x-amz-meta-".
- # @param [Hash<String,String>] hash
- # @return [self]
+ # @!method metadata(hash)
+ # Metadata hash to store with the uploaded object. Hash keys will be
+ # prefixed with "x-amz-meta-".
+ # @param [Hash<String,String>] hash
+ # @return [self]
define_field(:metadata) do |hash|
hash.each do |key, value|
with("x-amz-meta-#{key}", value)
@@ -518,10 +524,11 @@ module Aws
self
end
- # Specify allowable prefix for each key in the metadata hash.
- # @param [Hash<String,String>] hash
- # @see #metadata
- # @return [self]
+ # @!method metadata_starts_with(hash)
+ # Specify allowable prefix for each key in the metadata hash.
+ # @param [Hash<String,String>] hash
+ # @see #metadata
+ # @return [self]
define_field(:metadata_starts_with) do |hash|
hash.each do |key, value|
starts_with("x-amz-meta-#{key}", value)
@@ -571,24 +578,26 @@ module Aws
'x-amz-server-side-encryption-customer-algorithm'
)
- # Specifies the customer-provided encryption key for Amazon S3 to use
- # in encrypting data. This value is used to store the object and then
- # it is discarded; Amazon does not store the encryption key.
+ # @!method server_side_encryption_customer_key(value)
+ # Specifies the customer-provided encryption key for Amazon S3 to use
+ # in encrypting data. This value is used to store the object and then
+ # it is discarded; Amazon does not store the encryption key.
#
- # You must also call {#server_side_encryption_customer_algorithm}.
+ # You must also call {#server_side_encryption_customer_algorithm}.
#
- # @param [String] value
- # @see #server_side_encryption_customer_algorithm
- # @return [self]
+ # @param [String] value
+ # @see #server_side_encryption_customer_algorithm
+ # @return [self]
define_field(:server_side_encryption_customer_key) do |value|
field_name = 'x-amz-server-side-encryption-customer-key'
with(field_name, base64(value))
with(field_name + '-MD5', base64(OpenSSL::Digest::MD5.digest(value)))
end
- # @param [String] prefix
- # @see #server_side_encryption_customer_key
- # @return [self]
+ # @!method server_side_encryption_customer_key_starts_with(prefix)
+ # @param [String] prefix
+ # @see #server_side_encryption_customer_key
+ # @return [self]
define_field(:server_side_encryption_customer_key_starts_with) do |prefix|
field_name = 'x-amz-server-side-encryption-customer-key'
starts_with(field_name, prefix)
diff --git a/lib/aws-sdk-s3/presigner.rb b/lib/aws-sdk-s3/presigner.rb
index d970c1e..5705aec 100644
--- a/lib/aws-sdk-s3/presigner.rb
+++ b/lib/aws-sdk-s3/presigner.rb
@@ -49,7 +49,8 @@ module Aws
# before the presigned URL expires. Defaults to 15 minutes. As signature
# version 4 has a maximum expiry time of one week for presigned URLs,
# attempts to set this value to greater than one week (604800) will
- # raise an exception.
+ # raise an exception. The min value of this option and the credentials
+ # expiration time is used in the presigned URL.
#
# @option params [Time] :time (Time.now) The starting time for when the
# presigned url becomes active.
@@ -96,7 +97,8 @@ module Aws
# before the presigned URL expires. Defaults to 15 minutes. As signature
# version 4 has a maximum expiry time of one week for presigned URLs,
# attempts to set this value to greater than one week (604800) will
- # raise an exception.
+ # raise an exception. The min value of this option and the credentials
+ # expiration time is used in the presigned URL.
#
# @option params [Time] :time (Time.now) The starting time for when the
# presigned url becomes active.
diff --git a/lib/aws-sdk-s3/resource.rb b/lib/aws-sdk-s3/resource.rb
index dc5d3fd..a2c6fc7 100644
--- a/lib/aws-sdk-s3/resource.rb
+++ b/lib/aws-sdk-s3/resource.rb
@@ -41,7 +41,7 @@ module Aws::S3
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read
# bucket: "BucketName", # required
# create_bucket_configuration: {
- # location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
+ # location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2, ap-south-2, eu-south-2
# },
# grant_full_control: "GrantFullControl",
# grant_read: "GrantRead",
diff --git a/lib/aws-sdk-s3/types.rb b/lib/aws-sdk-s3/types.rb
index 5053548..c6b8167 100644
--- a/lib/aws-sdk-s3/types.rb
+++ b/lib/aws-sdk-s3/types.rb
@@ -65,7 +65,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -718,7 +718,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -871,7 +871,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -1256,7 +1256,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -1895,7 +1895,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -2002,7 +2002,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -2671,7 +2671,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -2764,7 +2764,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -2842,7 +2842,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -5046,7 +5046,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -5109,9 +5109,8 @@ module Aws::S3
# @return [String]
#
# @!attribute [rw] object_attributes
- # An XML header that specifies the fields at the root level that you
- # want returned in the response. Fields that you do not specify are
- # not returned.
+ # Specifies the fields at the root level that you want returned in the
+ # response. Fields that you do not specify are not returned.
# @return [Array<String>]
#
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAttributesRequest AWS API Documentation
@@ -5528,7 +5527,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -5787,7 +5786,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -6045,7 +6044,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][3] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][3] in the *Amazon S3 User Guide*.
#
#
#
@@ -6418,7 +6417,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -7242,8 +7241,8 @@ module Aws::S3
# @return [String]
#
# @!attribute [rw] continuation_token
- # The ContinuationToken that represents a placeholder from where this
- # request should begin.
+ # The `ContinuationToken` that represents a placeholder from where
+ # this request should begin.
# @return [String]
#
# @!attribute [rw] expected_bucket_owner
@@ -7355,9 +7354,9 @@ module Aws::S3
#
# @!attribute [rw] continuation_token
# The marker used to continue an inventory configuration listing that
- # has been truncated. Use the NextContinuationToken from a previously
- # truncated list response to continue the listing. The continuation
- # token is an opaque value that Amazon S3 understands.
+ # has been truncated. Use the `NextContinuationToken` from a
+ # previously truncated list response to continue the listing. The
+ # continuation token is an opaque value that Amazon S3 understands.
# @return [String]
#
# @!attribute [rw] expected_bucket_owner
@@ -7418,7 +7417,7 @@ module Aws::S3
#
# @!attribute [rw] continuation_token
# The marker that is used to continue a metrics configuration listing
- # that has been truncated. Use the NextContinuationToken from a
+ # that has been truncated. Use the `NextContinuationToken` from a
# previously truncated list response to continue the listing. The
# continuation token is an opaque value that Amazon S3 understands.
# @return [String]
@@ -7521,9 +7520,9 @@ module Aws::S3
# Encoding type used by Amazon S3 to encode object keys in the
# response.
#
- # If you specify `encoding-type` request parameter, Amazon S3 includes
- # this element in the response, and returns encoded key name values in
- # the following response elements:
+ # If you specify the `encoding-type` request parameter, Amazon S3
+ # includes this element in the response, and returns encoded key name
+ # values in the following response elements:
#
# `Delimiter`, `KeyMarker`, `Prefix`, `NextKeyMarker`, `Key`.
# @return [String]
@@ -7572,7 +7571,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -7594,15 +7593,15 @@ module Aws::S3
#
# @!attribute [rw] encoding_type
# Requests Amazon S3 to encode the object keys in the response and
- # specifies the encoding method to use. An object key may contain any
- # Unicode character; however, XML 1.0 parser cannot parse some
+ # specifies the encoding method to use. An object key can contain any
+ # Unicode character; however, the XML 1.0 parser cannot parse some
# characters, such as characters with an ASCII value from 0 to 10. For
# characters that are not supported in XML 1.0, you can add this
# parameter to request that Amazon S3 encode the keys in the response.
# @return [String]
#
# @!attribute [rw] key_marker
- # Together with upload-id-marker, this parameter specifies the
+ # Together with `upload-id-marker`, this parameter specifies the
# multipart upload after which listing should begin.
#
# If `upload-id-marker` is not specified, only the keys
@@ -7624,8 +7623,8 @@ module Aws::S3
# @!attribute [rw] prefix
# Lists in-progress uploads only for those keys that begin with the
# specified prefix. You can use prefixes to separate a bucket into
- # different grouping of keys. (You can think of using prefix to make
- # groups in the same way you'd use a folder in a file system.)
+ # different grouping of keys. (You can think of using `prefix` to make
+ # groups in the same way that you'd use a folder in a file system.)
# @return [String]
#
# @!attribute [rw] upload_id_marker
@@ -7674,9 +7673,9 @@ module Aws::S3
# @!attribute [rw] is_truncated
# A flag that indicates whether Amazon S3 returned all of the results
# that satisfied the search criteria. If your results were truncated,
- # you can make a follow-up paginated request using the NextKeyMarker
- # and NextVersionIdMarker response parameters as a starting place in
- # another request to return the rest of the results.
+ # you can make a follow-up paginated request by using the
+ # `NextKeyMarker` and `NextVersionIdMarker` response parameters as a
+ # starting place in another request to return the rest of the results.
# @return [Boolean]
#
# @!attribute [rw] key_marker
@@ -7698,7 +7697,7 @@ module Aws::S3
# When the number of responses exceeds the value of `MaxKeys`,
# `NextVersionIdMarker` specifies the first object version not
# returned that satisfies the search criteria. Use this value for the
- # version-id-marker request parameter in a subsequent request.
+ # `version-id-marker` request parameter in a subsequent request.
# @return [String]
#
# @!attribute [rw] versions
@@ -7723,7 +7722,7 @@ module Aws::S3
# that you specify to group keys. All keys that contain the same
# string between the prefix and the first occurrence of the delimiter
# are grouped under a single result element in `CommonPrefixes`. These
- # groups are counted as one result against the max-keys limitation.
+ # groups are counted as one result against the `max-keys` limitation.
# These keys are not returned elsewhere in the response.
# @return [String]
#
@@ -7740,9 +7739,9 @@ module Aws::S3
# Encoding type used by Amazon S3 to encode object key names in the
# XML response.
#
- # If you specify encoding-type request parameter, Amazon S3 includes
- # this element in the response, and returns encoded key name values in
- # the following response elements:
+ # If you specify the `encoding-type` request parameter, Amazon S3
+ # includes this element in the response, and returns encoded key name
+ # values in the following response elements:
#
# `KeyMarker, NextKeyMarker, Prefix, Key`, and `Delimiter`.
# @return [String]
@@ -7781,15 +7780,15 @@ module Aws::S3
# A delimiter is a character that you specify to group keys. All keys
# that contain the same string between the `prefix` and the first
# occurrence of the delimiter are grouped under a single result
- # element in CommonPrefixes. These groups are counted as one result
- # against the max-keys limitation. These keys are not returned
+ # element in `CommonPrefixes`. These groups are counted as one result
+ # against the `max-keys` limitation. These keys are not returned
# elsewhere in the response.
# @return [String]
#
# @!attribute [rw] encoding_type
# Requests Amazon S3 to encode the object keys in the response and
- # specifies the encoding method to use. An object key may contain any
- # Unicode character; however, XML 1.0 parser cannot parse some
+ # specifies the encoding method to use. An object key can contain any
+ # Unicode character; however, the XML 1.0 parser cannot parse some
# characters, such as characters with an ASCII value from 0 to 10. For
# characters that are not supported in XML 1.0, you can add this
# parameter to request that Amazon S3 encode the keys in the response.
@@ -7800,22 +7799,22 @@ module Aws::S3
# @return [String]
#
# @!attribute [rw] max_keys
- # Sets the maximum number of keys returned in the response. By default
- # the action returns up to 1,000 key names. The response might contain
- # fewer keys but will never contain more. If additional keys satisfy
- # the search criteria, but were not returned because max-keys was
- # exceeded, the response contains
- # <isTruncated>true</isTruncated>. To return the
- # additional keys, see key-marker and version-id-marker.
+ # Sets the maximum number of keys returned in the response. By
+ # default, the action returns up to 1,000 key names. The response
+ # might contain fewer keys but will never contain more. If additional
+ # keys satisfy the search criteria, but were not returned because
+ # `max-keys` was exceeded, the response contains
+ # `<isTruncated>true</isTruncated>`. To return the additional keys,
+ # see `key-marker` and `version-id-marker`.
# @return [Integer]
#
# @!attribute [rw] prefix
# Use this parameter to select only those keys that begin with the
# specified prefix. You can use prefixes to separate a bucket into
- # different groupings of keys. (You can think of using prefix to make
- # groups in the same way you'd use a folder in a file system.) You
- # can use prefix with delimiter to roll up numerous objects into a
- # single result under CommonPrefixes.
+ # different groupings of keys. (You can think of using `prefix` to
+ # make groups in the same way that you'd use a folder in a file
+ # system.) You can use `prefix` with `delimiter` to roll up numerous
+ # objects into a single result under `CommonPrefixes`.
# @return [String]
#
# @!attribute [rw] version_id_marker
@@ -7840,6 +7839,11 @@ module Aws::S3
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
# @return [String]
#
+ # @!attribute [rw] optional_object_attributes
+ # Specifies the optional fields that you want returned in the
+ # response. Fields that you do not specify are not returned.
+ # @return [Array<String>]
+ #
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsRequest AWS API Documentation
#
class ListObjectVersionsRequest < Struct.new(
@@ -7851,7 +7855,8 @@ module Aws::S3
:prefix,
:version_id_marker,
:expected_bucket_owner,
- :request_payer)
+ :request_payer,
+ :optional_object_attributes)
SENSITIVE = []
include Aws::Structure
end
@@ -7867,14 +7872,18 @@ module Aws::S3
# @return [String]
#
# @!attribute [rw] next_marker
- # When response is truncated (the IsTruncated element value in the
- # response is true), you can use the key name in this field as marker
- # in the subsequent request to get next set of objects. Amazon S3
- # lists objects in alphabetical order Note: This element is returned
- # only if you have delimiter request parameter specified. If response
- # does not include the NextMarker and it is truncated, you can use the
- # value of the last Key in the response as the marker in the
- # subsequent request to get the next set of object keys.
+ # When the response is truncated (the `IsTruncated` element value in
+ # the response is `true`), you can use the key name in this field as
+ # the `marker` parameter in the subsequent request to get the next set
+ # of objects. Amazon S3 lists objects in alphabetical order.
+ #
+ # <note markdown="1"> This element is returned only if you have the `delimiter` request
+ # parameter specified. If the response does not include the
+ # `NextMarker` element and it is truncated, you can use the value of
+ # the last `Key` element in the response as the `marker` parameter in
+ # the subsequent request to get the next set of object keys.
+ #
+ # </note>
# @return [String]
#
# @!attribute [rw] contents
@@ -7905,19 +7914,20 @@ module Aws::S3
# All of the keys (up to 1,000) rolled up in a common prefix count as
# a single return when calculating the number of returns.
#
- # A response can contain CommonPrefixes only if you specify a
+ # A response can contain `CommonPrefixes` only if you specify a
# delimiter.
#
- # CommonPrefixes contains all (if there are any) keys between Prefix
- # and the next occurrence of the string specified by the delimiter.
+ # `CommonPrefixes` contains all (if there are any) keys between
+ # `Prefix` and the next occurrence of the string specified by the
+ # delimiter.
#
- # CommonPrefixes lists keys that act like subdirectories in the
- # directory specified by Prefix.
+ # `CommonPrefixes` lists keys that act like subdirectories in the
+ # directory specified by `Prefix`.
#
- # For example, if the prefix is notes/ and the delimiter is a slash
- # (/) as in notes/summer/july, the common prefix is notes/summer/. All
- # of the keys that roll up into a common prefix count as a single
- # return when calculating the number of returns.
+ # For example, if the prefix is `notes/` and the delimiter is a slash
+ # (`/`), as in `notes/summer/july`, the common prefix is
+ # `notes/summer/`. All of the keys that roll up into a common prefix
+ # count as a single return when calculating the number of returns.
# @return [Array<Types::CommonPrefix>]
#
# @!attribute [rw] encoding_type
@@ -7967,7 +7977,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -7976,13 +7986,13 @@ module Aws::S3
# @return [String]
#
# @!attribute [rw] delimiter
- # A delimiter is a character you use to group keys.
+ # A delimiter is a character that you use to group keys.
# @return [String]
#
# @!attribute [rw] encoding_type
# Requests Amazon S3 to encode the object keys in the response and
- # specifies the encoding method to use. An object key may contain any
- # Unicode character; however, XML 1.0 parser cannot parse some
+ # specifies the encoding method to use. An object key can contain any
+ # Unicode character; however, the XML 1.0 parser cannot parse some
# characters, such as characters with an ASCII value from 0 to 10. For
# characters that are not supported in XML 1.0, you can add this
# parameter to request that Amazon S3 encode the keys in the response.
@@ -7995,9 +8005,9 @@ module Aws::S3
# @return [String]
#
# @!attribute [rw] max_keys
- # Sets the maximum number of keys returned in the response. By default
- # the action returns up to 1,000 key names. The response might contain
- # fewer keys but will never contain more.
+ # Sets the maximum number of keys returned in the response. By
+ # default, the action returns up to 1,000 key names. The response
+ # might contain fewer keys but will never contain more.
# @return [Integer]
#
# @!attribute [rw] prefix
@@ -8016,6 +8026,11 @@ module Aws::S3
# `403 Forbidden` (access denied).
# @return [String]
#
+ # @!attribute [rw] optional_object_attributes
+ # Specifies the optional fields that you want returned in the
+ # response. Fields that you do not specify are not returned.
+ # @return [Array<String>]
+ #
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsRequest AWS API Documentation
#
class ListObjectsRequest < Struct.new(
@@ -8026,15 +8041,17 @@ module Aws::S3
:max_keys,
:prefix,
:request_payer,
- :expected_bucket_owner)
+ :expected_bucket_owner,
+ :optional_object_attributes)
SENSITIVE = []
include Aws::Structure
end
# @!attribute [rw] is_truncated
- # Set to false if all of the results were returned. Set to true if
+ # Set to `false` if all of the results were returned. Set to `true` if
# more keys are available to return. If the number of results exceeds
- # that specified by MaxKeys, all of the results might not be returned.
+ # that specified by `MaxKeys`, all of the results might not be
+ # returned.
# @return [Boolean]
#
# @!attribute [rw] contents
@@ -8060,7 +8077,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -8073,17 +8090,17 @@ module Aws::S3
# @return [String]
#
# @!attribute [rw] delimiter
- # Causes keys that contain the same string between the prefix and the
- # first occurrence of the delimiter to be rolled up into a single
- # result element in the CommonPrefixes collection. These rolled-up
+ # Causes keys that contain the same string between the `prefix` and
+ # the first occurrence of the delimiter to be rolled up into a single
+ # result element in the `CommonPrefixes` collection. These rolled-up
# keys are not returned elsewhere in the response. Each rolled-up
# result counts as only one return against the `MaxKeys` value.
# @return [String]
#
# @!attribute [rw] max_keys
- # Sets the maximum number of keys returned in the response. By default
- # the action returns up to 1,000 key names. The response might contain
- # fewer keys but will never contain more.
+ # Sets the maximum number of keys returned in the response. By
+ # default, the action returns up to 1,000 key names. The response
+ # might contain fewer keys but will never contain more.
# @return [Integer]
#
# @!attribute [rw] common_prefixes
@@ -8110,7 +8127,7 @@ module Aws::S3
# Encoding type used by Amazon S3 to encode object key names in the
# XML response.
#
- # If you specify the encoding-type request parameter, Amazon S3
+ # If you specify the `encoding-type` request parameter, Amazon S3
# includes this element in the response, and returns encoded key name
# values in the following response elements:
#
@@ -8118,13 +8135,14 @@ module Aws::S3
# @return [String]
#
# @!attribute [rw] key_count
- # KeyCount is the number of keys returned with this request. KeyCount
- # will always be less than or equal to the `MaxKeys` field. Say you
- # ask for 50 keys, your result will include 50 keys or fewer.
+ # `KeyCount` is the number of keys returned with this request.
+ # `KeyCount` will always be less than or equal to the `MaxKeys` field.
+ # For example, if you ask for 50 keys, your result will include 50
+ # keys or fewer.
# @return [Integer]
#
# @!attribute [rw] continuation_token
- # If ContinuationToken was sent with the request, it is included in
+ # If `ContinuationToken` was sent with the request, it is included in
# the response.
# @return [String]
#
@@ -8185,7 +8203,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -8194,7 +8212,7 @@ module Aws::S3
# @return [String]
#
# @!attribute [rw] delimiter
- # A delimiter is a character you use to group keys.
+ # A delimiter is a character that you use to group keys.
# @return [String]
#
# @!attribute [rw] encoding_type
@@ -8203,9 +8221,9 @@ module Aws::S3
# @return [String]
#
# @!attribute [rw] max_keys
- # Sets the maximum number of keys returned in the response. By default
- # the action returns up to 1,000 key names. The response might contain
- # fewer keys but will never contain more.
+ # Sets the maximum number of keys returned in the response. By
+ # default, the action returns up to 1,000 key names. The response
+ # might contain fewer keys but will never contain more.
# @return [Integer]
#
# @!attribute [rw] prefix
@@ -8213,15 +8231,15 @@ module Aws::S3
# @return [String]
#
# @!attribute [rw] continuation_token
- # ContinuationToken indicates Amazon S3 that the list is being
- # continued on this bucket with a token. ContinuationToken is
+ # `ContinuationToken` indicates to Amazon S3 that the list is being
+ # continued on this bucket with a token. `ContinuationToken` is
# obfuscated and is not a real key.
# @return [String]
#
# @!attribute [rw] fetch_owner
- # The owner field is not present in listV2 by default, if you want to
- # return owner field with each key in the result then set the fetch
- # owner field to true.
+ # The owner field is not present in `ListObjectsV2` by default. If you
+ # want to return the owner field with each key in the result, then set
+ # the `FetchOwner` field to `true`.
# @return [Boolean]
#
# @!attribute [rw] start_after
@@ -8242,6 +8260,11 @@ module Aws::S3
# `403 Forbidden` (access denied).
# @return [String]
#
+ # @!attribute [rw] optional_object_attributes
+ # Specifies the optional fields that you want returned in the
+ # response. Fields that you do not specify are not returned.
+ # @return [Array<String>]
+ #
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Request AWS API Documentation
#
class ListObjectsV2Request < Struct.new(
@@ -8254,7 +8277,8 @@ module Aws::S3
:fetch_owner,
:start_after,
:request_payer,
- :expected_bucket_owner)
+ :expected_bucket_owner,
+ :optional_object_attributes)
SENSITIVE = []
include Aws::Structure
end
@@ -8305,7 +8329,7 @@ module Aws::S3
#
# @!attribute [rw] next_part_number_marker
# When a list is truncated, this element specifies the last part in
- # the list, as well as the value to use for the part-number-marker
+ # the list, as well as the value to use for the `part-number-marker`
# request parameter in a subsequent request.
# @return [Integer]
#
@@ -8394,7 +8418,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -8538,11 +8562,11 @@ module Aws::S3
# A metadata key-value pair to store with an object.
#
# @!attribute [rw] name
- # Name of the Object.
+ # Name of the object.
# @return [String]
#
# @!attribute [rw] value
- # Value of the Object.
+ # Value of the object.
# @return [String]
#
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetadataEntry AWS API Documentation
@@ -8957,6 +8981,18 @@ module Aws::S3
# The owner of the object
# @return [Types::Owner]
#
+ # @!attribute [rw] restore_status
+ # Specifies the restoration status of an object. Objects in certain
+ # storage classes must be restored before they can be retrieved. For
+ # more information about these storage classes and how to work with
+ # archived objects, see [ Working with archived objects][1] in the
+ # *Amazon S3 User Guide*.
+ #
+ #
+ #
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
+ # @return [Types::RestoreStatus]
+ #
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Object AWS API Documentation
#
class Object < Struct.new(
@@ -8966,7 +9002,8 @@ module Aws::S3
:checksum_algorithm,
:size,
:storage_class,
- :owner)
+ :owner,
+ :restore_status)
SENSITIVE = []
include Aws::Structure
end
@@ -9201,6 +9238,18 @@ module Aws::S3
# Specifies the owner of the object.
# @return [Types::Owner]
#
+ # @!attribute [rw] restore_status
+ # Specifies the restoration status of an object. Objects in certain
+ # storage classes must be restored before they can be retrieved. For
+ # more information about these storage classes and how to work with
+ # archived objects, see [ Working with archived objects][1] in the
+ # *Amazon S3 User Guide*.
+ #
+ #
+ #
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
+ # @return [Types::RestoreStatus]
+ #
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectVersion AWS API Documentation
#
class ObjectVersion < Struct.new(
@@ -9212,7 +9261,8 @@ module Aws::S3
:version_id,
:is_latest,
:last_modified,
- :owner)
+ :owner,
+ :restore_status)
SENSITIVE = []
include Aws::Structure
end
@@ -10668,7 +10718,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -11077,7 +11127,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -11586,7 +11636,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -12254,7 +12304,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -12372,6 +12422,49 @@ module Aws::S3
include Aws::Structure
end
+ # Specifies the restoration status of an object. Objects in certain
+ # storage classes must be restored before they can be retrieved. For
+ # more information about these storage classes and how to work with
+ # archived objects, see [ Working with archived objects][1] in the
+ # *Amazon S3 User Guide*.
+ #
+ #
+ #
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
+ #
+ # @!attribute [rw] is_restore_in_progress
+ # Specifies whether the object is currently being restored. If the
+ # object restoration is in progress, the header returns the value
+ # `TRUE`. For example:
+ #
+ # `x-amz-optional-object-attributes: IsRestoreInProgress="true"`
+ #
+ # If the object restoration has completed, the header returns the
+ # value `FALSE`. For example:
+ #
+ # `x-amz-optional-object-attributes: IsRestoreInProgress="false",
+ # RestoreExpiryDate="2012-12-21T00:00:00.000Z"`
+ #
+ # If the object hasn't been restored, there is no header response.
+ # @return [Boolean]
+ #
+ # @!attribute [rw] restore_expiry_date
+ # Indicates when the restored copy will expire. This value is
+ # populated only if the object has already been restored. For example:
+ #
+ # `x-amz-optional-object-attributes: IsRestoreInProgress="false",
+ # RestoreExpiryDate="2012-12-21T00:00:00.000Z"`
+ # @return [Time]
+ #
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreStatus AWS API Documentation
+ #
+ class RestoreStatus < Struct.new(
+ :is_restore_in_progress,
+ :restore_expiry_date)
+ SENSITIVE = []
+ include Aws::Structure
+ end
+
# Specifies the redirect behavior and when a redirect is applied. For
# more information about routing rules, see [Configuring advanced
# conditional redirects][1] in the *Amazon S3 User Guide*.
@@ -13311,7 +13404,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
@@ -13627,7 +13720,7 @@ module Aws::S3
# When you use this action with S3 on Outposts through the Amazon Web
# Services SDKs, you provide the Outposts access point ARN in place of
# the bucket name. For more information about S3 on Outposts ARNs, see
- # [What is S3 on Outposts][2] in the *Amazon S3 User Guide*.
+ # [What is S3 on Outposts?][2] in the *Amazon S3 User Guide*.
#
#
#
More details
Historical runs
- unsatisfied-apt-dependencies: Unsatisfied APT dependencies: ruby-aws-sdk-core:amd64 (>= 3.179.0)
- nothing-to-do: Last upstream version 1.120.1 already imported.
- success: Merged new upstream version 1.120.1
- success: Merged new upstream version 1.119.1
- success: Merged new upstream version 1.118.0
- success: Merged new upstream version 1.117.2
- unsatisfied-apt-dependencies: Unsatisfied APT dependencies: ruby-aws-sdk-core:amd64 (>= 3.127.0)
- unsatisfied-apt-dependencies: Unsatisfied APT dependencies: ruby-aws-sdk-core:amd64 (>= 3.127.0)
- unsatisfied-apt-dependencies: Unsatisfied APT dependencies: ruby-aws-sdk-core:amd64 (>= 3.127.0)
- run-disappeared: Worker started processing new run rather than 96c0060d-3192-49c0-bf60-2afe2bc5b32e
- aborted: Killed by signal
- run-disappeared: Worker started processing new run rather than 32e62cb7-2b06-4e56-9f88-92f2c953ba6a
- worker-timeout: No keepalives received in 10:00:10.722419.