azure-storage-files-datalake
Loading...
Searching...
No Matches
datalake_service_client.hpp
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#pragma once
5
6#include "azure/storage/files/datalake/datalake_options.hpp"
7#include "azure/storage/files/datalake/datalake_responses.hpp"
8
9#include <azure/core/credentials/credentials.hpp>
10#include <azure/core/internal/http/pipeline.hpp>
11#include <azure/core/response.hpp>
12#include <azure/storage/blobs/blob_service_client.hpp>
13#include <azure/storage/common/storage_credential.hpp>
14
15#include <memory>
16#include <string>
17
18namespace Azure { namespace Storage { namespace Files { namespace DataLake {
19
20 class DataLakeFileSystemClient;
21
26 public:
34 const std::string& connectionString,
36
44 const std::string& serviceUrl,
45 std::shared_ptr<StorageSharedKeyCredential> credential,
47
55 const std::string& serviceUrl,
56 std::shared_ptr<const Core::Credentials::TokenCredential> credential,
58
65 const std::string& serviceUrl,
67
73 DataLakeFileSystemClient GetFileSystemClient(const std::string& fileSystemName) const;
74
81 std::string GetUrl() const { return m_blobServiceClient.GetUrl(); }
82
94 const Azure::Core::Context& context = Azure::Core::Context()) const;
95
107 Azure::Response<Models::UserDelegationKey> GetUserDelegationKey(
108 const Azure::DateTime& expiresOn,
109 const GetUserDelegationKeyOptions& options = GetUserDelegationKeyOptions(),
110 const Azure::Core::Context& context = Azure::Core::Context()) const
111 {
112 return m_blobServiceClient.GetUserDelegationKey(expiresOn, options, context);
113 }
114
126 Azure::Response<Models::SetServicePropertiesResult> SetProperties(
127 Models::DataLakeServiceProperties properties,
128 const SetServicePropertiesOptions& options = SetServicePropertiesOptions(),
129 const Azure::Core::Context& context = Azure::Core::Context()) const
130 {
131 return m_blobServiceClient.SetProperties(properties, options, context);
132 }
133
142 Azure::Response<Models::DataLakeServiceProperties> GetProperties(
143 const GetServicePropertiesOptions& options = GetServicePropertiesOptions(),
144 const Azure::Core::Context& context = Azure::Core::Context()) const
145 {
146 return m_blobServiceClient.GetProperties(options, context);
147 }
148
149 private:
150 Azure::Core::Url m_serviceUrl;
151 Blobs::BlobServiceClient m_blobServiceClient;
152 std::shared_ptr<Azure::Core::Http::_internal::HttpPipeline> m_pipeline;
153 _detail::DatalakeClientConfiguration m_clientConfiguration;
154 };
155}}}} // namespace Azure::Storage::Files::DataLake
The DataLakeFileSystemClient allows you to manipulate Azure Storage DataLake files.
Definition datalake_file_system_client.hpp:28
The DataLakeServiceClient allows you to manipulate Azure Storage DataLake files.
Definition datalake_service_client.hpp:25
Azure::Response< Models::DataLakeServiceProperties > GetProperties(const GetServicePropertiesOptions &options=GetServicePropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Gets the properties of a storage account's datalake service, including properties for Storage Analyti...
Definition datalake_service_client.hpp:142
DataLakeServiceClient(const std::string &serviceUrl, const DataLakeClientOptions &options=DataLakeClientOptions())
Anonymous/SAS/customized pipeline auth.
DataLakeFileSystemClient GetFileSystemClient(const std::string &fileSystemName) const
Create a FileSystemClient from current DataLakeServiceClient.
Azure::Response< Models::UserDelegationKey > GetUserDelegationKey(const Azure::DateTime &expiresOn, const GetUserDelegationKeyOptions &options=GetUserDelegationKeyOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Retrieves a key that can be used to delegate Active Directory authorization to shared access signatur...
Definition datalake_service_client.hpp:107
static DataLakeServiceClient CreateFromConnectionString(const std::string &connectionString, const DataLakeClientOptions &options=DataLakeClientOptions())
Create from connection string.
ListFileSystemsPagedResponse ListFileSystems(const ListFileSystemsOptions &options=ListFileSystemsOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Returns a sequence of file systems in the storage account. Enumerating the file systems may make mult...
DataLakeServiceClient(const std::string &serviceUrl, std::shared_ptr< StorageSharedKeyCredential > credential, const DataLakeClientOptions &options=DataLakeClientOptions())
Shared key authentication client.
DataLakeServiceClient(const std::string &serviceUrl, std::shared_ptr< const Core::Credentials::TokenCredential > credential, const DataLakeClientOptions &options=DataLakeClientOptions())
Bearer token authentication client.
Azure::Response< Models::SetServicePropertiesResult > SetProperties(Models::DataLakeServiceProperties properties, const SetServicePropertiesOptions &options=SetServicePropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Sets properties for a storage account's Blob service endpoint, including properties for Storage Analy...
Definition datalake_service_client.hpp:126
std::string GetUrl() const
Gets the datalake service's primary URL endpoint. This is the endpoint used for blob storage availabl...
Definition datalake_service_client.hpp:81
Response type for Azure::Storage::Files::DataLake::DataLakeServiceClient::ListFileSystems.
Definition datalake_responses.hpp:803
Client options used to initialize all DataLake clients.
Definition datalake_options.hpp:160
Optional parameters for Azure::Storage::Files::DataLake::DataLakeServiceClient::ListFileSystems.
Definition datalake_options.hpp:217