From 5c86b650c1096582fedb668fb8a52254ed328274 Mon Sep 17 00:00:00 2001 From: Pervakov Grigorii Date: Thu, 21 May 2020 15:00:51 +0300 Subject: [PATCH] Add to aws S3Client constructor with custom AwsAuthSigner. --- aws-cpp-sdk-s3/include/aws/s3/S3Client.h | 8 ++++++++ aws-cpp-sdk-s3/source/S3Client.cpp | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/aws-cpp-sdk-s3/include/aws/s3/S3Client.h b/aws-cpp-sdk-s3/include/aws/s3/S3Client.h index d18987d7df08..e6bf1d95e0ae 100644 --- a/aws-cpp-sdk-s3/include/aws/s3/S3Client.h +++ b/aws-cpp-sdk-s3/include/aws/s3/S3Client.h @@ -511,6 +511,14 @@ namespace Aws S3Client(const std::shared_ptr& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration(), Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy signPayloads = Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy::Never, bool useVirtualAddressing = true, Aws::S3::US_EAST_1_REGIONAL_ENDPOINT_OPTION USEast1RegionalEndPointOption = Aws::S3::US_EAST_1_REGIONAL_ENDPOINT_OPTION::NOT_SET); + /** + * Initializes client to use specified auth signer with specified client config. If http client factory is not supplied, + * the default http client factory will be used + */ + S3Client(const std::shared_ptr& signer, + const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration(), bool useVirtualAddressing = true, Aws::S3::US_EAST_1_REGIONAL_ENDPOINT_OPTION USEast1RegionalEndPointOption = Aws::S3::US_EAST_1_REGIONAL_ENDPOINT_OPTION::NOT_SET); + + virtual ~S3Client(); inline virtual const char* GetServiceClientName() const override { return "S3"; } diff --git a/aws-cpp-sdk-s3/source/S3Client.cpp b/aws-cpp-sdk-s3/source/S3Client.cpp index ea956f28d2d1..78281bc130e6 100644 --- a/aws-cpp-sdk-s3/source/S3Client.cpp +++ b/aws-cpp-sdk-s3/source/S3Client.cpp @@ -160,6 +160,15 @@ S3Client::S3Client(const std::shared_ptr& credentialsPro init(clientConfiguration); } +S3Client::S3Client(const std::shared_ptr& signer, + const Client::ClientConfiguration& clientConfiguration, bool useVirtualAddressing, Aws::S3::US_EAST_1_REGIONAL_ENDPOINT_OPTION USEast1RegionalEndPointOption) : + BASECLASS(clientConfiguration, signer, Aws::MakeShared(ALLOCATION_TAG)), + m_executor(clientConfiguration.executor), m_useVirtualAddressing(useVirtualAddressing), m_USEast1RegionalEndpointOption(USEast1RegionalEndPointOption) +{ + init(clientConfiguration); +} + + S3Client::~S3Client() { }