From 75774ebf3fdfc334677e5435bfbd716e0b29bdae Mon Sep 17 00:00:00 2001 From: Sai Charan Date: Tue, 5 Nov 2019 13:34:49 -0800 Subject: [PATCH] Add a public set_storage_credentials method in cloud_client This is useful/needed to swap between primary and secondary shared access keys without recreating the client, in conjunction with retries and retry handling in azure::storage::operation_context::set_response_received. --- .../includes/was/service_client.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Microsoft.WindowsAzure.Storage/includes/was/service_client.h b/Microsoft.WindowsAzure.Storage/includes/was/service_client.h index 5202d49a..6f1fc8bf 100644 --- a/Microsoft.WindowsAzure.Storage/includes/was/service_client.h +++ b/Microsoft.WindowsAzure.Storage/includes/was/service_client.h @@ -69,7 +69,16 @@ namespace azure { namespace storage { { return m_base_uri; } - + + /// + /// Sets the storage credentials to use for the service client. + /// + /// The to use. + void set_storage_credentials(azure::storage::storage_credentials credentials) + { + m_credentials = std::move(credentials); + } + /// /// Gets the storage account credentials for the service client. ///