6#include "azure/storage/blobs/blob_options.hpp"
7#include "azure/storage/blobs/blob_responses.hpp"
8#include "azure/storage/blobs/dll_import_export.hpp"
10#include <azure/core/credentials/credentials.hpp>
11#include <azure/storage/common/storage_credential.hpp>
18namespace Azure {
namespace Storage {
namespace Files {
namespace DataLake {
19 class DataLakeFileSystemClient;
20 class DataLakeDirectoryClient;
21 class DataLakeFileClient;
24namespace Azure {
namespace Storage {
namespace Blobs {
27 AZ_STORAGE_BLOBS_DLLEXPORT
extern const Azure::Core::Context::Key
28 DataLakeInteroperabilityExtraOptionsKey;
31 class BlockBlobClient;
32 class AppendBlobClient;
34 class BlobLeaseClient;
59 const std::string& connectionString,
60 const std::string& blobContainerName,
61 const std::string& blobName,
74 const std::string& blobUrl,
75 std::shared_ptr<StorageSharedKeyCredential> credential,
88 const std::string& blobUrl,
89 std::shared_ptr<Core::Credentials::TokenCredential> credential,
102 const std::string& blobUrl,
167 const Azure::Core::Context& context = Azure::Core::Context())
const;
180 const Azure::Core::Context& context = Azure::Core::Context())
const;
191 Azure::Response<Models::SetBlobMetadataResult>
SetMetadata(
194 const Azure::Core::Context& context = Azure::Core::Context())
const;
205 Azure::Response<Models::SetBlobAccessTierResult>
SetAccessTier(
208 const Azure::Core::Context& context = Azure::Core::Context())
const;
222 Azure::Response<Models::CopyBlobFromUriResult>
CopyFromUri(
223 const std::string& sourceUri,
225 const Azure::Core::Context& context = Azure::Core::Context())
const;
241 const std::string& sourceUri,
243 const Azure::Core::Context& context = Azure::Core::Context())
const;
255 const std::string& copyId,
257 const Azure::Core::Context& context = Azure::Core::Context())
const;
268 Azure::Response<Models::DownloadBlobResult>
Download(
270 const Azure::Core::Context& context = Azure::Core::Context())
const;
283 Azure::Response<Models::DownloadBlobToResult>
DownloadTo(
287 const Azure::Core::Context& context = Azure::Core::Context())
const;
298 Azure::Response<Models::DownloadBlobToResult>
DownloadTo(
299 const std::string& fileName,
301 const Azure::Core::Context& context = Azure::Core::Context())
const;
312 const Azure::Core::Context& context = Azure::Core::Context())
const;
323 Azure::Response<Models::DeleteBlobResult>
Delete(
325 const Azure::Core::Context& context = Azure::Core::Context())
const;
337 const Azure::Core::Context& context = Azure::Core::Context())
const;
347 Azure::Response<Models::UndeleteBlobResult>
Undelete(
349 const Azure::Core::Context& context = Azure::Core::Context())
const;
359 Azure::Response<Models::SetBlobTagsResult>
SetTags(
360 std::map<std::string, std::string> tags,
362 const Azure::Core::Context& context = Azure::Core::Context())
const;
371 Azure::Response<std::map<std::string, std::string>>
GetTags(
373 const Azure::Core::Context& context = Azure::Core::Context())
const;
388 const Azure::Core::Context& context = Azure::Core::Context())
const;
399 const Azure::Core::Context& context = Azure::Core::Context())
const;
412 Azure::Response<Models::SetBlobLegalHoldResult>
SetLegalHold(
415 const Azure::Core::Context& context = Azure::Core::Context())
const;
426 const Azure::Core::Context& context = Azure::Core::Context())
const;
432 std::shared_ptr<Azure::Core::Http::_internal::HttpPipeline>
m_pipeline;
440 Azure::Core::Url blobUrl,
441 std::shared_ptr<Azure::Core::Http::_internal::HttpPipeline> pipeline,
442 Azure::Nullable<EncryptionKey> customerProvidedKey = Azure::Nullable<EncryptionKey>(),
443 Azure::Nullable<std::string> encryptionScope = Azure::Nullable<std::string>())
451 friend class Files::DataLake::DataLakeFileSystemClient;
452 friend class Files::DataLake::DataLakeDirectoryClient;
453 friend class Files::DataLake::DataLakeFileClient;
The AppendBlobClient allows you to manipulate Azure Storage append blobs.
Definition append_blob_client.hpp:21
The BlobClient allows you to manipulate Azure Storage blobs.
Definition blob_client.hpp:39
Azure::Response< Models::CreateBlobSnapshotResult > CreateSnapshot(const CreateBlobSnapshotOptions &options=CreateBlobSnapshotOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Creates a read-only snapshot of a blob.
Definition blob_client.cpp:773
PageBlobClient AsPageBlobClient() const
Creates a new PageBlobClient object with the same URL as this BlobClient. The new PageBlobClient uses...
Definition blob_client.cpp:134
Azure::Response< Models::AbortBlobCopyFromUriResult > AbortCopyFromUri(const std::string ©Id, const AbortBlobCopyFromUriOptions &options=AbortBlobCopyFromUriOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Aborts a pending StartCopyFromUri operation, and leaves this blob with zero length and full metadata.
Definition blob_client.cpp:761
Azure::Response< Models::DeleteBlobImmutabilityPolicyResult > DeleteImmutabilityPolicy(const DeleteBlobImmutabilityPolicyOptions &options=DeleteBlobImmutabilityPolicyOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Deletes the Immutability Policy associated with the Blob.
Definition blob_client.cpp:878
Azure::Response< Models::DeleteBlobResult > DeleteIfExists(const DeleteBlobOptions &options=DeleteBlobOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Marks the specified blob or snapshot for deletion if it exists.
Definition blob_client.cpp:812
Azure::Response< Models::CopyBlobFromUriResult > CopyFromUri(const std::string &sourceUri, const CopyBlobFromUriOptions &options=CopyBlobFromUriOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Copies data from the source to this blob, synchronously.
Definition blob_client.cpp:673
Azure::Response< Models::BlobProperties > GetProperties(const GetBlobPropertiesOptions &options=GetBlobPropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Returns all user-defined metadata, standard HTTP properties, and system properties for the blob....
Definition blob_client.cpp:539
Azure::Response< std::map< std::string, std::string > > GetTags(const GetBlobTagsOptions &options=GetBlobTagsOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Gets the tags associated with the underlying blob.
Definition blob_client.cpp:854
Azure::Nullable< std::string > m_encryptionScope
Encryption scope.
Definition blob_client.hpp:436
BlobClient WithSnapshot(const std::string &snapshot) const
Initializes a new instance of the BlobClient class with an identical URL source but the specified sna...
Definition blob_client.cpp:136
Azure::Nullable< EncryptionKey > m_customerProvidedKey
Customer provided encryption key.
Definition blob_client.hpp:434
static BlobClient CreateFromConnectionString(const std::string &connectionString, const std::string &blobContainerName, const std::string &blobName, const BlobClientOptions &options=BlobClientOptions())
Initialize a new instance of BlobClient.
Definition blob_client.cpp:34
Azure::Response< Models::SetBlobLegalHoldResult > SetLegalHold(bool hasLegalHold, const SetBlobLegalHoldOptions &options=SetBlobLegalHoldOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Sets a legal hold on the blob. Note that Blob Versioning must be enabled on your storage account,...
Definition blob_client.cpp:888
Azure::Response< Models::SetBlobMetadataResult > SetMetadata(Metadata metadata, const SetBlobMetadataOptions &options=SetBlobMetadataOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Sets user-defined metadata for the specified blob as one or more name-value pairs.
Definition blob_client.cpp:636
AppendBlobClient AsAppendBlobClient() const
Creates a new AppendBlobClient object with the same URL as this BlobClient. The new AppendBlobClient ...
Definition blob_client.cpp:132
Azure::Response< Models::SetBlobHttpHeadersResult > SetHttpHeaders(Models::BlobHttpHeaders httpHeaders, const SetBlobHttpHeadersOptions &options=SetBlobHttpHeadersOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Sets system properties on the blob.
Definition blob_client.cpp:614
Azure::Response< Models::SetBlobTagsResult > SetTags(std::map< std::string, std::string > tags, const SetBlobTagsOptions &options=SetBlobTagsOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Sets tags on the underlying blob.
Definition blob_client.cpp:842
Azure::Response< Models::DownloadBlobToResult > DownloadTo(uint8_t *buffer, size_t bufferSize, const DownloadBlobToOptions &options=DownloadBlobToOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Downloads a blob or a blob range from the service to a memory buffer using parallel requests.
Definition blob_client.cpp:316
Azure::Core::Url m_blobUrl
Blob Url.
Definition blob_client.hpp:430
virtual ~BlobClient()=default
Destructor.
Azure::Response< Models::UndeleteBlobResult > Undelete(const UndeleteBlobOptions &options=UndeleteBlobOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Restores the contents and metadata of a soft deleted blob and any associated soft deleted snapshots.
Definition blob_client.cpp:833
Azure::Response< Models::DeleteBlobResult > Delete(const DeleteBlobOptions &options=DeleteBlobOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collectio...
Definition blob_client.cpp:797
BlobClient WithVersionId(const std::string &versionId) const
Creates a clone of this instance that references a version ID rather than the base blob.
Definition blob_client.cpp:151
BlockBlobClient AsBlockBlobClient() const
Creates a new BlockBlobClient object with the same URL as this BlobClient. The new BlockBlobClient us...
Definition blob_client.cpp:130
Azure::Response< Models::SetBlobAccessTierResult > SetAccessTier(Models::AccessTier accessTier, const SetBlobAccessTierOptions &options=SetBlobAccessTierOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Sets the tier on a blob. The operation is allowed on a page blob in a premium storage account and on ...
Definition blob_client.cpp:660
Azure::Response< Models::SetBlobImmutabilityPolicyResult > SetImmutabilityPolicy(Models::BlobImmutabilityPolicy immutabilityPolicy, const SetBlobImmutabilityPolicyOptions &options=SetBlobImmutabilityPolicyOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Sets the immutability policy on a blob, snapshot or version. Note that Blob Versioning must be enable...
Definition blob_client.cpp:865
std::string GetUrl() const
Gets the blob's primary URL endpoint.
Definition blob_client.hpp:135
Azure::Response< Models::DownloadBlobResult > Download(const DownloadBlobOptions &options=DownloadBlobOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Downloads a blob or a blob range from the service, including its metadata and properties.
Definition blob_client.cpp:166
StartBlobCopyOperation StartCopyFromUri(const std::string &sourceUri, const StartBlobCopyFromUriOptions &options=StartBlobCopyFromUriOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Copies data at from the source to this blob.
Definition blob_client.cpp:721
Azure::Response< Models::AccountInfo > GetAccountInfo(const GetAccountInfoOptions &options=GetAccountInfoOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Returns the sku name and account kind for the specified account.
Definition blob_client.cpp:899
std::shared_ptr< Azure::Core::Http::_internal::HttpPipeline > m_pipeline
Http Pipeline.
Definition blob_client.hpp:432
A batch object allows you to batch multiple operations in a single request via Azure::Storage::Blobs:...
Definition blob_batch.hpp:149
Definition blob_container_client.hpp:21
BlobLeaseClient allows you to manipulate Azure Storage leases on containers and blobs.
Definition blob_lease_client.hpp:18
A batch object allows you to batch multiple operations in a single request via Azure::Storage::Blobs:...
Definition blob_batch.hpp:73
The BlockBlobClient allows you to manipulate Azure Storage block blobs.
Definition block_blob_client.hpp:31
Optional. Indicates the tier to be set on the blob.
Definition rest_client.hpp:937
Definition page_blob_client.hpp:23
A long-running operation to copy a blob.
Definition blob_responses.hpp:221
Optional parameters for Azure::Storage::Blobs::BlobClient::AbortCopyFromUri.
Definition blob_options.hpp:649
Client options used to initialize all kinds of blob clients.
Definition blob_options.hpp:175
Optional parameters for Azure::Storage::Blobs::BlobClient::CopyFromUri.
Definition blob_options.hpp:580
Optional parameters for Azure::Storage::Blobs::BlobClient::CreateSnapshot.
Definition blob_options.hpp:716
Optional parameters for Azure::Storage::Blobs::BlobClient::DeleteImmutabilityPolicy.
Definition blob_options.hpp:1593
Optional parameters for Azure::Storage::Blobs::BlobClient::Delete.
Definition blob_options.hpp:735
Optional parameters for Azure::Storage::Blobs::BlobClient::Download.
Definition blob_options.hpp:660
Optional parameters for Azure::Storage::Blobs::BlobClient::DownloadTo.
Definition blob_options.hpp:682
Optional parameters for Azure::Storage::Blobs::BlobServiceClient::GetAccountInfo.
Definition blob_options.hpp:277
Optional parameters for Azure::Storage::Blobs::BlobClient::GetProperties.
Definition blob_options.hpp:464
Immutability policy associated with the blob.
Definition rest_client.hpp:1121
Optional parameters for Azure::Storage::Blobs::BlobClient::SetAccessTier.
Definition blob_options.hpp:497
Optional parameters for Azure::Storage::Blobs::BlobClient::SetImmutabilityPolicy.
Definition blob_options.hpp:1575
Optional parameters for Azure::Storage::Blobs::BlobClient::SetLegalHold.
Definition blob_options.hpp:1568
Optional parameters for Azure::Storage::Blobs::BlobClient::StartCopyFromUri.
Definition blob_options.hpp:516
Optional parameters for Azure::Storage::Blobs::BlobClient::Undelete.
Definition blob_options.hpp:753