Loading [MathJax]/extensions/tex2jax.js
azure-storage-blobs
All Classes Functions Variables Pages
append_blob_client.hpp
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#pragma once
5
6#include "azure/storage/blobs/blob_client.hpp"
7
8#include <memory>
9#include <string>
10
11namespace Azure { namespace Storage { namespace Blobs {
12
21 class AppendBlobClient final : public BlobClient {
22 public:
35 const std::string& connectionString,
36 const std::string& blobContainerName,
37 const std::string& blobName,
38 const BlobClientOptions& options = BlobClientOptions());
39
51 explicit AppendBlobClient(
52 const std::string& blobUrl,
53 std::shared_ptr<StorageSharedKeyCredential> credential,
54 const BlobClientOptions& options = BlobClientOptions());
55
66 explicit AppendBlobClient(
67 const std::string& blobUrl,
68 std::shared_ptr<Core::Credentials::TokenCredential> credential,
69 const BlobClientOptions& options = BlobClientOptions());
70
81 explicit AppendBlobClient(
82 const std::string& blobUrl,
83 const BlobClientOptions& options = BlobClientOptions());
84
94 AppendBlobClient WithSnapshot(const std::string& snapshot) const;
95
104 AppendBlobClient WithVersionId(const std::string& versionId) const;
105
114 Azure::Response<Models::CreateAppendBlobResult> Create(
116 const Azure::Core::Context& context = Azure::Core::Context()) const;
117
127 Azure::Response<Models::CreateAppendBlobResult> CreateIfNotExists(
129 const Azure::Core::Context& context = Azure::Core::Context()) const;
130
140 Azure::Response<Models::AppendBlockResult> AppendBlock(
141 Azure::Core::IO::BodyStream& content,
142 const AppendBlockOptions& options = AppendBlockOptions(),
143 const Azure::Core::Context& context = Azure::Core::Context()) const;
144
157 Azure::Response<Models::AppendBlockFromUriResult> AppendBlockFromUri(
158 const std::string& sourceUri,
160 const Azure::Core::Context& context = Azure::Core::Context()) const;
161
169 Azure::Response<Models::SealAppendBlobResult> Seal(
171 const Azure::Core::Context& context = Azure::Core::Context()) const;
172
173 private:
174 explicit AppendBlobClient(BlobClient blobClient);
175 friend class BlobClient;
176 };
177
178}}} // namespace Azure::Storage::Blobs
The AppendBlobClient allows you to manipulate Azure Storage append blobs.
Definition append_blob_client.hpp:21
Azure::Response< Models::SealAppendBlobResult > Seal(const SealAppendBlobOptions &options=SealAppendBlobOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Seals the append blob, making it read only. Any subsequent appends will fail.
Definition append_blob_client.cpp:227
Azure::Response< Models::CreateAppendBlobResult > CreateIfNotExists(const CreateAppendBlobOptions &options=CreateAppendBlobOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Creates a new 0-length append blob. The content keeps unchanged if the blob already exists.
Definition append_blob_client.cpp:114
AppendBlobClient WithVersionId(const std::string &versionId) const
Creates a clone of this instance that references a version ID rather than the base blob.
Definition append_blob_client.cpp:62
static AppendBlobClient CreateFromConnectionString(const std::string &connectionString, const std::string &blobContainerName, const std::string &blobName, const BlobClientOptions &options=BlobClientOptions())
Initialize a new instance of AppendBlobClient.
Definition append_blob_client.cpp:13
Azure::Response< Models::AppendBlockResult > AppendBlock(Azure::Core::IO::BodyStream &content, const AppendBlockOptions &options=AppendBlockOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Commits a new block of data, represented by the content BodyStream to the end of the existing append ...
Definition append_blob_client.cpp:138
AppendBlobClient WithSnapshot(const std::string &snapshot) const
Initializes a new instance of the AppendBlobClient class with an identical URL source but the specifi...
Definition append_blob_client.cpp:47
Azure::Response< Models::AppendBlockFromUriResult > AppendBlockFromUri(const std::string &sourceUri, const AppendBlockFromUriOptions &options=AppendBlockFromUriOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Commits a new block of data, represented by the content BodyStream to the end of the existing append ...
Definition append_blob_client.cpp:176
Azure::Response< Models::CreateAppendBlobResult > Create(const CreateAppendBlobOptions &options=CreateAppendBlobOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Creates a new 0-length append blob. The content of any existing blob is overwritten with the newly in...
Definition append_blob_client.cpp:77
The BlobClient allows you to manipulate Azure Storage blobs.
Definition blob_client.hpp:39
Optional parameters for Azure::Storage::Blobs::AppendBlobClient::AppendBlockFromUri.
Definition blob_options.hpp:1344
Optional parameters for Azure::Storage::Blobs::AppendBlobClient::AppendBlock.
Definition blob_options.hpp:1326
Client options used to initialize all kinds of blob clients.
Definition blob_options.hpp:175
Optional parameters for Azure::Storage::Blobs::AppendBlobClient::Create.
Definition blob_options.hpp:1290
Optional parameters for Azure::Storage::Blobs::AppendBlobClient::Seal.
Definition blob_options.hpp:1375