From 6dc58c07d55ba11e50e86457ac898e22260b43d8 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Tue, 29 Oct 2024 15:01:38 -0700 Subject: [PATCH] Remove TableServiceClient ctor that only accepts options with no url or auth mechanism. (#6140) * Remove TableServiceClient ctor that only accepts options with no url or auth mechanism. * Add CL entry. * Fix wording of CL. --- sdk/tables/azure-data-tables/CHANGELOG.md | 1 + .../inc/azure/data/tables/tables_clients.hpp | 8 -------- .../azure-data-tables/src/tables_clients.cpp | 19 +------------------ 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/sdk/tables/azure-data-tables/CHANGELOG.md b/sdk/tables/azure-data-tables/CHANGELOG.md index ed5555ce4..2a11c50f5 100644 --- a/sdk/tables/azure-data-tables/CHANGELOG.md +++ b/sdk/tables/azure-data-tables/CHANGELOG.md @@ -7,6 +7,7 @@ ### Breaking Changes - Removed ServiceVersion type and changed the ApiVersion field within `TableClientOptions` to be std::string. +- Removed the `TableServiceClient` constructor that only accepts one defaulted options parameter. ### Bugs Fixed diff --git a/sdk/tables/azure-data-tables/inc/azure/data/tables/tables_clients.hpp b/sdk/tables/azure-data-tables/inc/azure/data/tables/tables_clients.hpp index 5b81973ec..4d2eab04c 100644 --- a/sdk/tables/azure-data-tables/inc/azure/data/tables/tables_clients.hpp +++ b/sdk/tables/azure-data-tables/inc/azure/data/tables/tables_clients.hpp @@ -343,14 +343,6 @@ namespace Azure { namespace Data { namespace Tables { */ class TableServiceClient final { public: - /** - * @brief Initializes a new instance of tableServiceClient. - * - * @param options Optional client options that define the transport pipeline policies for - * authentication, retries, etc., that are applied to every request. - */ - explicit TableServiceClient(const TableClientOptions& options = {}); - /** * @brief Initializes a new instance of tableClient. * diff --git a/sdk/tables/azure-data-tables/src/tables_clients.cpp b/sdk/tables/azure-data-tables/src/tables_clients.cpp index 1dc347e3f..89fbcd5bc 100644 --- a/sdk/tables/azure-data-tables/src/tables_clients.cpp +++ b/sdk/tables/azure-data-tables/src/tables_clients.cpp @@ -19,21 +19,6 @@ using namespace Azure::Data::Tables::_detail::Xml; using namespace Azure::Data::Tables::Credentials::_detail; using namespace Azure::Data::Tables::_detail; -TableServiceClient::TableServiceClient(const TableClientOptions& options) -{ - TableClientOptions newOptions = options; - std::vector> perRetryPolicies; - std::vector> perOperationPolicies; - perRetryPolicies.emplace_back(std::make_unique()); - perOperationPolicies.emplace_back(std::make_unique(newOptions.ApiVersion)); - m_pipeline = std::make_shared( - newOptions, - _detail::TablesServicePackageName, - PackageVersion::ToString(), - std::move(perRetryPolicies), - std::move(perOperationPolicies)); -} - TableServiceClient::TableServiceClient( const std::string& serviceUrl, const TableClientOptions& options) @@ -55,8 +40,6 @@ TableServiceClient::TableServiceClient( const std::string& serviceUrl, std::shared_ptr credential, const TableClientOptions& options) - : TableServiceClient(options) - { m_tokenCredential = credential; TableClientOptions newOptions = options; @@ -160,7 +143,7 @@ TableServiceClient TableServiceClient::CreateFromConnectionString( } else { - return TableServiceClient(options); + return TableServiceClient(tablesUrl.GetAbsoluteUrl(), options); } }