Loading [MathJax]/extensions/tex2jax.js
azure-storage-files-shares
All Classes Functions Variables Pages
share_service_client.hpp
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#pragma once
5
6#include "azure/storage/files/shares/share_options.hpp"
7#include "azure/storage/files/shares/share_responses.hpp"
8
9#include <azure/core/internal/http/pipeline.hpp>
10#include <azure/core/response.hpp>
11#include <azure/storage/common/storage_credential.hpp>
12
13#include <memory>
14#include <string>
15
16namespace Azure { namespace Storage { namespace Files { namespace Shares {
17
18 class ShareClient;
19
24 class ShareServiceClient final {
25 public:
34 const std::string& connectionString,
35 const ShareClientOptions& options = ShareClientOptions());
36
44 const std::string& serviceUrl,
45 std::shared_ptr<StorageSharedKeyCredential> credential,
46 const ShareClientOptions& options = ShareClientOptions());
47
55 const std::string& serviceUrl,
56 std::shared_ptr<Core::Credentials::TokenCredential> credential,
57 const ShareClientOptions& options = ShareClientOptions());
58
66 const std::string& serviceUrl,
67 const ShareClientOptions& options = ShareClientOptions());
68
74 ShareClient GetShareClient(const std::string& shareName) const;
75
81 std::string GetUrl() const { return m_serviceUrl.GetAbsoluteUrl(); }
82
91 const ListSharesOptions& options = ListSharesOptions(),
92 const Azure::Core::Context& context = Azure::Core::Context()) const;
93
102 Azure::Response<Models::SetServicePropertiesResult> SetProperties(
105 const Azure::Core::Context& context = Azure::Core::Context()) const;
106
113 Azure::Response<Models::ShareServiceProperties> GetProperties(
115 const Azure::Core::Context& context = Azure::Core::Context()) const;
116
117 private:
118 Azure::Core::Url m_serviceUrl;
119 std::shared_ptr<Azure::Core::Http::_internal::HttpPipeline> m_pipeline;
120 Nullable<bool> m_allowTrailingDot;
121 Nullable<bool> m_allowSourceTrailingDot;
122 Nullable<Models::ShareTokenIntent> m_shareTokenIntent;
123 };
124}}}} // namespace Azure::Storage::Files::Shares
Response type for Azure::Storage::Files::Shares::ShareServiceClient::ListShares.
Definition share_responses.hpp:765
The ShareClient allows you to manipulate Azure Storage shares and their directories and files.
Definition share_client.hpp:24
The ShareServiceClient allows you to manipulate Azure Storage shares and their directories and files.
Definition share_service_client.hpp:24
ShareClient GetShareClient(const std::string &shareName) const
Create a ShareClient from current ShareServiceClient.
static ShareServiceClient CreateFromConnectionString(const std::string &connectionString, const ShareClientOptions &options=ShareClientOptions())
Create A ShareServiceClient from connection string to manage the service related attributes.
ListSharesPagedResponse ListShares(const ListSharesOptions &options=ListSharesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Returns a paginated collection of the shares in the storage account. Enumerating the shares may make ...
ShareServiceClient(const std::string &serviceUrl, std::shared_ptr< StorageSharedKeyCredential > credential, const ShareClientOptions &options=ShareClientOptions())
Initialize a new instance of ShareServiceClient using shared key authentication.
std::string GetUrl() const
Gets the file share service's primary URL endpoint.
Definition share_service_client.hpp:81
ShareServiceClient(const std::string &serviceUrl, std::shared_ptr< Core::Credentials::TokenCredential > credential, const ShareClientOptions &options=ShareClientOptions())
Initialize a new instance of ShareServiceClient using shared key authentication.
Azure::Response< Models::SetServicePropertiesResult > SetProperties(Models::ShareServiceProperties properties, const SetServicePropertiesOptions &options=SetServicePropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Set the service's properties.
ShareServiceClient(const std::string &serviceUrl, const ShareClientOptions &options=ShareClientOptions())
Initialize a new instance of ShareServiceClient using anonymous access or shared access signature.
Azure::Response< Models::ShareServiceProperties > GetProperties(const GetServicePropertiesOptions &options=GetServicePropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Get the service's properties.
Optional parameters for Azure::Storage::Files::Shares::ShareServiceClient::GetProperties.
Definition share_options.hpp:345
Optional parameters for Azure::Storage::Files::Shares::ShareServiceClient::ListShares.
Definition share_options.hpp:304
Storage service properties.
Definition rest_client.hpp:165
Optional parameters for Azure::Storage::Files::Shares::ShareServiceClient::SetProperties.
Definition share_options.hpp:337
Client options used to initialize share clients.
Definition share_options.hpp:265