AppendBlobClient
The AppendBlobClient allows you to manipulate Azure
Storage append blobs.
An append blob is comprised of blocks and is optimized for append
operations. When you modify an append blob, blocks are added to the
end of the blob only, via the AppendBlockAsync
operation. Updating or deleting of existing blocks is not supported.
Unlike a block blob, an append blob does not expose its block IDs.
Each block in an append blob can be a different size.
Beginning with x-ms-version 2022-11-02, the maximum append size is 100 MB.
For previous versions, the maximum append size is 4 MB.
Append blobs can include up to 50,000 blocks.
Gets the maximum number of bytes that can be sent in a call
to AppendBlock.
Gets the maximum number of blocks allowed in an append blob.
protected AppendBlobClient()
Initializes a new instance of the AppendBlobClient
class for mocking.
Initializes a new instance of the AppendBlobClient
class.
public AppendBlobClient(string connectionString, string blobContainerName, string blobName, BlobClientOptions options)
Initializes a new instance of the AppendBlobClient
class.
Initializes a new instance of the AppendBlobClient
class.
public AppendBlobClient(Uri blobUri, StorageSharedKeyCredential credential, BlobClientOptions options = null)
Initializes a new instance of the AppendBlobClient
class.
public AppendBlobClient(Uri blobUri, AzureSasCredential credential, BlobClientOptions options = null)
Initializes a new instance of the AppendBlobClient
class.
Initializes a new instance of the AppendBlobClient
class.
public virtual Response<BlobAppendInfo> AppendBlock(Stream content, byte[] transactionalContentHash, AppendBlobRequestConditions conditions, IProgress<long> progressHandler, CancellationToken cancellationToken)
The AppendBlock operation commits a new block
of data, represented by the content Stream,
to the end of the existing append blob. The AppendBlock
operation is only permitted if the blob was created as an append
blob.
For more information, see
Append Block.
public virtual Response<BlobAppendInfo> AppendBlock(Stream content, AppendBlobAppendBlockOptions options = null, CancellationToken cancellationToken = default)
The AppendBlock operation commits a new block
of data, represented by the content Stream,
to the end of the existing append blob. The AppendBlock
operation is only permitted if the blob was created as an append
blob.
For more information, see
Append Block.
public virtual Task<Response<BlobAppendInfo>> AppendBlockAsync(Stream content, byte[] transactionalContentHash, AppendBlobRequestConditions conditions, IProgress<long> progressHandler, CancellationToken cancellationToken)
The AppendBlockAsync operation commits a new block
of data, represented by the content Stream,
to the end of the existing append blob. The AppendBlockAsync
operation is only permitted if the blob was created as an append
blob.
For more information, see
Append Block.
public virtual Task<Response<BlobAppendInfo>> AppendBlockAsync(Stream content, AppendBlobAppendBlockOptions options = null, CancellationToken cancellationToken = default)
The AppendBlockAsync operation commits a new block
of data, represented by the content Stream,
to the end of the existing append blob. The AppendBlockAsync
operation is only permitted if the blob was created as an append
blob.
For more information, see
Append Block.
public virtual Response<BlobAppendInfo> AppendBlockFromUri(Uri sourceUri, AppendBlobAppendBlockFromUriOptions options = null, CancellationToken cancellationToken = default)
The AppendBlockFromUri
operation commits a new block of data, represented by the sourceUri,
to the end of the existing append blob. The
AppendBlockFromUri
operation is only permitted if the blob was created as an append blob.
For more information, see
Append Block From URL.
public virtual Response<BlobAppendInfo> AppendBlockFromUri(Uri sourceUri, HttpRange sourceRange, byte[] sourceContentHash, AppendBlobRequestConditions conditions, AppendBlobRequestConditions sourceConditions, CancellationToken cancellationToken)
The AppendBlockFromUriAsync
operation commits a new block of data, represented by the sourceUri,
to the end of the existing append blob. The
AppendBlockFromUriAsync
operation is only permitted if the blob was created as an append blob.
For more information, see
Append Block From URL.
public virtual Task<Response<BlobAppendInfo>> AppendBlockFromUriAsync(Uri sourceUri, AppendBlobAppendBlockFromUriOptions options = null, CancellationToken cancellationToken = default)
The AppendBlockFromUriAsync
operation commits a new block of data, represented by the sourceUri,
to the end of the existing append blob. The
AppendBlockFromUriAsync
operation is only permitted if the blob was created as an append blob.
For more information, see
Append Block From URL.
public virtual Task<Response<BlobAppendInfo>> AppendBlockFromUriAsync(Uri sourceUri, HttpRange sourceRange, byte[] sourceContentHash, AppendBlobRequestConditions conditions, AppendBlobRequestConditions sourceConditions, CancellationToken cancellationToken)
The AppendBlockFromUriAsync
operation commits a new block of data, represented by the sourceUri,
to the end of the existing append blob. The
AppendBlockFromUriAsync
operation is only permitted if the blob was created as an append blob.
For more information, see
Append Block From URL.
public virtual Response<BlobContentInfo> Create(AppendBlobCreateOptions options, CancellationToken cancellationToken = default)
The Create
operation creates a new 0-length append blob. The content of any existing
blob is overwritten with the newly initialized append blob. To add content
to the append blob, call the AppendBlock operation.
public virtual Response<BlobContentInfo> Create(BlobHttpHeaders httpHeaders = null, IDictionary<string, string> metadata = null, AppendBlobRequestConditions conditions = null, CancellationToken cancellationToken = default)
The Create
operation creates a new 0-length append blob. The content of any existing blob is overwritten with
the newly initialized append blob. To add content to the append
blob, call the AppendBlock operation.
For more information, see
Put Blob.
public virtual Task<Response<BlobContentInfo>> CreateAsync(AppendBlobCreateOptions options, CancellationToken cancellationToken = default)
The CreateAsync
operation creates a new 0-length append blob. The content of any existing
blob is overwritten with the newly initialized append blob. To add content
to the append blob, call the AppendBlock operation.
public virtual Task<Response<BlobContentInfo>> CreateAsync(BlobHttpHeaders httpHeaders = null, IDictionary<string, string> metadata = null, AppendBlobRequestConditions conditions = null, CancellationToken cancellationToken = default)
The CreateAsync
operation creates a new 0-length append blob. The content of any existing blob is overwritten with
the newly initialized append blob. To add content to the append
blob, call the AppendBlockAsync operation.
For more information, see
Put Blob.
public virtual Response<BlobContentInfo> CreateIfNotExists(AppendBlobCreateOptions options, CancellationToken cancellationToken = default)
The CreateIfNotExists
operation creates a new 0-length append blob. If the append blob already exists,
the content of the existing append blob will remain unchanged. To add content to
the append blob, call the AppendBlockAsync operation.
For more information, see
Put Blob.
public virtual Response<BlobContentInfo> CreateIfNotExists(BlobHttpHeaders httpHeaders = null, IDictionary<string, string> metadata = null, CancellationToken cancellationToken = default)
The CreateIfNotExists
operation creates a new 0-length append blob. If the append blob already exists,
the content of the existing append blob will remain unchanged. To add content to
the append blob, call the AppendBlockAsync operation.
For more information, see
Put Blob.
public virtual Task<Response<BlobContentInfo>> CreateIfNotExistsAsync(AppendBlobCreateOptions options, CancellationToken cancellationToken = default)
The CreateIfNotExistsAsync
operation creates a new 0-length append blob. If the append blob already exists,
the content of the existing append blob will remain unchanged. To add content to
the append blob, call the AppendBlockAsync operation.
For more information, see
Put Blob.
public virtual Task<Response<BlobContentInfo>> CreateIfNotExistsAsync(BlobHttpHeaders httpHeaders = null, IDictionary<string, string> metadata = null, CancellationToken cancellationToken = default)
The CreateIfNotExistsAsync
operation creates a new 0-length append blob. If the append blob already exists,
the content of the existing append blob will remain unchanged. To add content to the append
blob, call the AppendBlockAsync operation.
For more information, see
Put Blob.
public virtual Stream OpenWrite(bool overwrite, AppendBlobOpenWriteOptions options = null, CancellationToken cancellationToken = default)
Opens a stream for writing to the blob.
public virtual Task<Stream> OpenWriteAsync(bool overwrite, AppendBlobOpenWriteOptions options = null, CancellationToken cancellationToken = default)
Opens a stream for writing to the blob.
public virtual Response<BlobInfo> Seal(AppendBlobRequestConditions conditions = null, CancellationToken cancellationToken = default)
Seals the append blob, making it read only.
Any subsequent appends will fail.
public virtual Task<Response<BlobInfo>> SealAsync(AppendBlobRequestConditions conditions = null, CancellationToken cancellationToken = default)
Seals the append blob, making it read only.
Any subsequent appends will fail.
Initializes a new instance of the AppendBlobClient
class with an identical Uri source but the specified
customerProvidedKey.
Initializes a new instance of the AppendBlobClient
class with an identical Uri source but the specified
encryptionScope.
Initializes a new instance of the AppendBlobClient
class with an identical Uri source but the specified
snapshot timestamp.
For more information, see
Create a snapshot of a blob.
Initializes a new instance of the AppendBlobClient
class with an identical Uri source but the specified
versionId timestamp.