10 #include "azure/storage/blobs/blob_client.hpp"
12 namespace Azure {
namespace Storage {
namespace Blobs {
37 const std::string& connectionString,
38 const std::string& blobContainerName,
39 const std::string& blobName,
54 const std::string& blobUrl,
55 std::shared_ptr<StorageSharedKeyCredential> credential,
69 const std::string& blobUrl,
70 std::shared_ptr<Core::Credentials::TokenCredential> credential,
84 const std::string& blobUrl,
118 Azure::Response<Models::CreatePageBlobResult>
Create(
121 const Azure::Core::Context& context = Azure::Core::Context())
const;
135 int64_t blobContentLength,
137 const Azure::Core::Context& context = Azure::Core::Context())
const;
150 Azure::Response<Models::UploadPagesResult>
UploadPages(
152 Azure::Core::IO::BodyStream& content,
154 const Azure::Core::Context& context = Azure::Core::Context())
const;
173 int64_t destinationOffset,
174 std::string sourceUri,
175 Azure::Core::Http::HttpRange sourceRange,
177 const Azure::Core::Context& context = Azure::Core::Context())
const;
190 Azure::Response<Models::ClearPagesResult>
ClearPages(
191 Azure::Core::Http::HttpRange range,
193 const Azure::Core::Context& context = Azure::Core::Context())
const;
206 Azure::Response<Models::ResizePageBlobResult>
Resize(
209 const Azure::Core::Context& context = Azure::Core::Context())
const;
220 const Azure::Core::Context& context = Azure::Core::Context())
const;
235 const std::string& previousSnapshot,
237 const Azure::Core::Context& context = Azure::Core::Context())
const;
254 const std::string& previousSnapshotUrl,
256 const Azure::Core::Context& context = Azure::Core::Context())
const;
271 const std::string& sourceUri,
273 const Azure::Core::Context& context = Azure::Core::Context())
const;
GetPageRangesPagedResponse GetPageRanges(const GetPageRangesOptions &options=GetPageRangesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Returns the list of valid page ranges for a page blob or snapshot of a page blob.
Definition: page_blob_client.cpp:236
Azure::Response< Models::ClearPagesResult > ClearPages(Azure::Core::Http::HttpRange range, const ClearPagesOptions &options=ClearPagesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Clears one or more pages from the page blob, as specificed by range.
Definition: page_blob_client.cpp:188
Optional parameters for Azure::Storage::Blobs::PageBlobClient::GetPageRanges.
Definition: blob_options.hpp:1016
Optional parameters for Azure::Storage::Blobs::PageBlobClient::ClearPages.
Definition: blob_options.hpp:994
The BlobClient allows you to manipulate Azure Storage blobs.
Definition: blob_client.hpp:34
Azure::Response< Models::CreatePageBlobResult > CreateIfNotExists(int64_t blobContentLength, const CreatePageBlobOptions &options=CreatePageBlobOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Creates a new page blob of the specified size. The content keeps unchanged if the blob already exists...
Definition: page_blob_client.cpp:106
Optional parameters for Azure::Storage::Blobs::PageBlobClient::UploadPages.
Definition: blob_options.hpp:958
Optional parameters for Azure::Storage::Blobs::PageBlobClient::Create.
Definition: blob_options.hpp:926
Azure::Response< Models::CreatePageBlobResult > Create(int64_t blobSize, const CreatePageBlobOptions &options=CreatePageBlobOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Creates a new page blob of the specified size. The content of any existing blob is overwritten with t...
Definition: page_blob_client.cpp:78
GetPageRangesDiffPagedResponse GetPageRangesDiff(const std::string &previousSnapshot, const GetPageRangesOptions &options=GetPageRangesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Returns the list of page ranges that differ between a previous snapshot and this page blob....
Definition: page_blob_client.cpp:266
Optional parameters for Azure::Storage::Blobs::PageBlobClient::UploadPagesFromUri.
Definition: blob_options.hpp:976
Optional parameters for Azure::Storage::Blobs::PageBlobClient::StartCopyIncremental.
Definition: blob_options.hpp:1033
Azure::Response< Models::UploadPagesResult > UploadPages(int64_t offset, Azure::Core::IO::BodyStream &content, const UploadPagesOptions &options=UploadPagesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Writes content to a range of pages in a page blob, starting at offset.
Definition: page_blob_client.cpp:131
PageBlobClient WithSnapshot(const std::string &snapshot) const
Initializes a new instance of the PageBlobClient class with an identical URL source but the specified...
Definition: page_blob_client.cpp:48
Definition: page_blob_client.hpp:23
Client options used to initialize all kinds of blob clients.
Definition: blob_options.hpp:135
Azure::Response< Models::UploadPagesFromUriResult > UploadPagesFromUri(int64_t destinationOffset, std::string sourceUri, Azure::Core::Http::HttpRange sourceRange, const UploadPagesFromUriOptions &options=UploadPagesFromUriOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Writes a range of pages to a page blob where the contents are read from a uri.
Definition: page_blob_client.cpp:158
A long-running operation to copy a blob.
Definition: blob_responses.hpp:171
Azure::Response< Models::ResizePageBlobResult > Resize(int64_t blobSize, const ResizePageBlobOptions &options=ResizePageBlobOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Resizes the page blob to the specified size (which must be a multiple of 512). If the specified value...
Definition: page_blob_client.cpp:212
Response type for Azure::Storage::Blobs::PageBlobClient::GetPageRangesDiff and Azure::Storage::Blobs:...
Definition: blob_responses.hpp:394
StartBlobCopyOperation StartCopyIncremental(const std::string &sourceUri, const StartBlobCopyIncrementalOptions &options=StartBlobCopyIncrementalOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Starts copying a snapshot of the sourceUri page blob to this page blob. The snapshot is copied such t...
Definition: page_blob_client.cpp:334
Response type for Azure::Storage::Blobs::PageBlobClient::GetPageRanges.
Definition: blob_responses.hpp:357
PageBlobClient WithVersionId(const std::string &versionId) const
Creates a clone of this instance that references a version ID rather than the base blob.
Definition: page_blob_client.cpp:63
Optional parameters for Azure::Storage::Blobs::PageBlobClient::Resize.
Definition: blob_options.hpp:1005
static PageBlobClient CreateFromConnectionString(const std::string &connectionString, const std::string &blobContainerName, const std::string &blobName, const BlobClientOptions &options=BlobClientOptions())
Initialize a new instance of PageBlobClient.
Definition: page_blob_client.cpp:14
PageBlobClient(const std::string &blobUrl, std::shared_ptr< StorageSharedKeyCredential > credential, const BlobClientOptions &options=BlobClientOptions())
Initialize a new instance of PageBlobClient.
Definition: page_blob_client.cpp:25
GetPageRangesDiffPagedResponse GetManagedDiskPageRangesDiff(const std::string &previousSnapshotUrl, const GetPageRangesOptions &options=GetPageRangesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Returns the list of page ranges that differ between a previous snapshot URL and this page blob....
Definition: page_blob_client.cpp:300