Show / Hide Table of Contents

Class BlobClient

The BlobClient allows you to manipulate Azure Storage blobs.

Inheritance
System.Object
BlobBaseClient
BlobClient
Inherited Members
BlobBaseClient.AbortCopyFromUri(String, BlobRequestConditions, CancellationToken)
BlobBaseClient.AbortCopyFromUriAsync(String, BlobRequestConditions, CancellationToken)
BlobBaseClient.AccountName
BlobBaseClient.BlobContainerName
BlobBaseClient.CanGenerateSasUri
BlobBaseClient.CreateSnapshot(IDictionary<String,String>, BlobRequestConditions, CancellationToken)
BlobBaseClient.CreateSnapshotAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken)
BlobBaseClient.Delete(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)
BlobBaseClient.DeleteAsync(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)
BlobBaseClient.DeleteIfExists(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)
BlobBaseClient.DeleteIfExistsAsync(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)
BlobBaseClient.DeleteImmutabilityPolicy(CancellationToken)
BlobBaseClient.DeleteImmutabilityPolicyAsync(CancellationToken)
BlobBaseClient.Download()
BlobBaseClient.Download(HttpRange, BlobRequestConditions, Boolean, CancellationToken)
BlobBaseClient.Download(CancellationToken)
BlobBaseClient.DownloadAsync()
BlobBaseClient.DownloadAsync(HttpRange, BlobRequestConditions, Boolean, CancellationToken)
BlobBaseClient.DownloadAsync(CancellationToken)
BlobBaseClient.DownloadContent()
BlobBaseClient.DownloadContent(BlobDownloadOptions, CancellationToken)
BlobBaseClient.DownloadContent(BlobRequestConditions, IProgress<Int64>, HttpRange, CancellationToken)
BlobBaseClient.DownloadContent(BlobRequestConditions, CancellationToken)
BlobBaseClient.DownloadContent(CancellationToken)
BlobBaseClient.DownloadContentAsync()
BlobBaseClient.DownloadContentAsync(BlobDownloadOptions, CancellationToken)
BlobBaseClient.DownloadContentAsync(BlobRequestConditions, IProgress<Int64>, HttpRange, CancellationToken)
BlobBaseClient.DownloadContentAsync(BlobRequestConditions, CancellationToken)
BlobBaseClient.DownloadContentAsync(CancellationToken)
BlobBaseClient.DownloadStreaming(HttpRange, BlobRequestConditions, Boolean, IProgress<Int64>, CancellationToken)
BlobBaseClient.DownloadStreaming(HttpRange, BlobRequestConditions, Boolean, CancellationToken)
BlobBaseClient.DownloadStreaming(BlobDownloadOptions, CancellationToken)
BlobBaseClient.DownloadStreamingAsync(HttpRange, BlobRequestConditions, Boolean, IProgress<Int64>, CancellationToken)
BlobBaseClient.DownloadStreamingAsync(HttpRange, BlobRequestConditions, Boolean, CancellationToken)
BlobBaseClient.DownloadStreamingAsync(BlobDownloadOptions, CancellationToken)
BlobBaseClient.DownloadTo(Stream)
BlobBaseClient.DownloadTo(Stream, BlobDownloadToOptions, CancellationToken)
BlobBaseClient.DownloadTo(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken)
BlobBaseClient.DownloadTo(Stream, CancellationToken)
BlobBaseClient.DownloadTo(String)
BlobBaseClient.DownloadTo(String, BlobDownloadToOptions, CancellationToken)
BlobBaseClient.DownloadTo(String, BlobRequestConditions, StorageTransferOptions, CancellationToken)
BlobBaseClient.DownloadTo(String, CancellationToken)
BlobBaseClient.DownloadToAsync(Stream)
BlobBaseClient.DownloadToAsync(Stream, BlobDownloadToOptions, CancellationToken)
BlobBaseClient.DownloadToAsync(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken)
BlobBaseClient.DownloadToAsync(Stream, CancellationToken)
BlobBaseClient.DownloadToAsync(String)
BlobBaseClient.DownloadToAsync(String, BlobDownloadToOptions, CancellationToken)
BlobBaseClient.DownloadToAsync(String, BlobRequestConditions, StorageTransferOptions, CancellationToken)
BlobBaseClient.DownloadToAsync(String, CancellationToken)
BlobBaseClient.Exists(CancellationToken)
BlobBaseClient.ExistsAsync(CancellationToken)
BlobBaseClient.GenerateSasUri(BlobSasBuilder)
BlobBaseClient.GenerateSasUri(BlobSasBuilder, String)
BlobBaseClient.GenerateSasUri(BlobSasPermissions, DateTimeOffset)
BlobBaseClient.GenerateSasUri(BlobSasPermissions, DateTimeOffset, String)
BlobBaseClient.GenerateUserDelegationSasUri(BlobSasBuilder, UserDelegationKey)
BlobBaseClient.GenerateUserDelegationSasUri(BlobSasBuilder, UserDelegationKey, String)
BlobBaseClient.GenerateUserDelegationSasUri(BlobSasPermissions, DateTimeOffset, UserDelegationKey)
BlobBaseClient.GenerateUserDelegationSasUri(BlobSasPermissions, DateTimeOffset, UserDelegationKey, String)
BlobBaseClient.GetAccountInfo(CancellationToken)
BlobBaseClient.GetAccountInfoAsync(CancellationToken)
BlobBaseClient.GetBlobLeaseClientCore(String)
BlobBaseClient.GetParentBlobContainerClientCore()
BlobBaseClient.GetProperties(BlobRequestConditions, CancellationToken)
BlobBaseClient.GetPropertiesAsync(BlobRequestConditions, CancellationToken)
BlobBaseClient.GetTags(BlobRequestConditions, CancellationToken)
BlobBaseClient.GetTagsAsync(BlobRequestConditions, CancellationToken)
BlobBaseClient.Name
BlobBaseClient.OpenRead(BlobOpenReadOptions, CancellationToken)
BlobBaseClient.OpenRead(Boolean, Int64, Nullable<Int32>, CancellationToken)
BlobBaseClient.OpenRead(Int64, Nullable<Int32>, BlobRequestConditions, CancellationToken)
BlobBaseClient.OpenReadAsync(BlobOpenReadOptions, CancellationToken)
BlobBaseClient.OpenReadAsync(Boolean, Int64, Nullable<Int32>, CancellationToken)
BlobBaseClient.OpenReadAsync(Int64, Nullable<Int32>, BlobRequestConditions, CancellationToken)
BlobBaseClient.SetAccessTier(AccessTier, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)
BlobBaseClient.SetAccessTierAsync(AccessTier, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)
BlobBaseClient.SetHttpHeaders(BlobHttpHeaders, BlobRequestConditions, CancellationToken)
BlobBaseClient.SetHttpHeadersAsync(BlobHttpHeaders, BlobRequestConditions, CancellationToken)
BlobBaseClient.SetImmutabilityPolicy(BlobImmutabilityPolicy, BlobRequestConditions, CancellationToken)
BlobBaseClient.SetImmutabilityPolicyAsync(BlobImmutabilityPolicy, BlobRequestConditions, CancellationToken)
BlobBaseClient.SetLegalHold(Boolean, CancellationToken)
BlobBaseClient.SetLegalHoldAsync(Boolean, CancellationToken)
BlobBaseClient.SetMetadata(IDictionary<String,String>, BlobRequestConditions, CancellationToken)
BlobBaseClient.SetMetadataAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken)
BlobBaseClient.SetTags(IDictionary<String,String>, BlobRequestConditions, CancellationToken)
BlobBaseClient.SetTagsAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken)
BlobBaseClient.StartCopyFromUri(Uri, BlobCopyFromUriOptions, CancellationToken)
BlobBaseClient.StartCopyFromUri(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)
BlobBaseClient.StartCopyFromUriAsync(Uri, BlobCopyFromUriOptions, CancellationToken)
BlobBaseClient.StartCopyFromUriAsync(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)
BlobBaseClient.SyncCopyFromUri(Uri, BlobCopyFromUriOptions, CancellationToken)
BlobBaseClient.SyncCopyFromUriAsync(Uri, BlobCopyFromUriOptions, CancellationToken)
BlobBaseClient.Undelete(CancellationToken)
BlobBaseClient.UndeleteAsync(CancellationToken)
BlobBaseClient.Uri
BlobBaseClient.WithSnapshotCore(String)
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Storage.Blobs.dll
Syntax
public class BlobClient : Azure.Storage.Blobs.Specialized.BlobBaseClient

Constructors

BlobClient()

Initializes a new instance of the BlobClient class for mocking.

Declaration
protected BlobClient ();

BlobClient(Uri, BlobClientOptions)

Initializes a new instance of the BlobClient class.

Declaration
public BlobClient (Uri blobUri, Azure.Storage.Blobs.BlobClientOptions options = null);
Parameters
System.Uri blobUri

A System.Uri referencing the blob that includes the name of the account, the name of the container, and the name of the blob. This is likely to be similar to "https://{account_name}.blob.core.windows.net/{container_name}/{blob_name}".

BlobClientOptions options

Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

BlobClient(String, String, String)

Initializes a new instance of the BlobClient class.

Declaration
public BlobClient (string connectionString, string blobContainerName, string blobName);
Parameters
System.String connectionString

A connection string includes the authentication information required for your application to access data in an Azure Storage account at runtime.

For more information, Configure Azure Storage connection strings.

System.String blobContainerName

The name of the container containing this blob.

System.String blobName

The name of this blob.

BlobClient(Uri, AzureSasCredential, BlobClientOptions)

Initializes a new instance of the BlobClient class.

Declaration
public BlobClient (Uri blobUri, Azure.AzureSasCredential credential, Azure.Storage.Blobs.BlobClientOptions options = null);
Parameters
System.Uri blobUri

A System.Uri referencing the blob that includes the name of the account, the name of the container, and the name of the blob. This is likely to be similar to "https://{account_name}.blob.core.windows.net/{container_name}/{blob_name}". Must not contain shared access signature, which should be passed in the second parameter.

Azure.AzureSasCredential credential

The shared access signature credential used to sign requests.

BlobClientOptions options

Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

Remarks

This constructor should only be used when shared access signature needs to be updated during lifespan of this client.

BlobClient(Uri, TokenCredential, BlobClientOptions)

Initializes a new instance of the BlobClient class.

Declaration
public BlobClient (Uri blobUri, Azure.Core.TokenCredential credential, Azure.Storage.Blobs.BlobClientOptions options = null);
Parameters
System.Uri blobUri

A System.Uri referencing the blob that includes the name of the account, the name of the container, and the name of the blob. This is likely to be similar to "https://{account_name}.blob.core.windows.net/{container_name}/{blob_name}".

Azure.Core.TokenCredential credential

The token credential used to sign requests.

BlobClientOptions options

Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

BlobClient(Uri, StorageSharedKeyCredential, BlobClientOptions)

Initializes a new instance of the BlobClient class.

Declaration
public BlobClient (Uri blobUri, Azure.Storage.StorageSharedKeyCredential credential, Azure.Storage.Blobs.BlobClientOptions options = null);
Parameters
System.Uri blobUri

A System.Uri referencing the blob that includes the name of the account, the name of the container, and the name of the blob. This is likely to be similar to "https://{account_name}.blob.core.windows.net/{container_name}/{blob_name}".

Azure.Storage.StorageSharedKeyCredential credential

The shared key credential used to sign requests.

BlobClientOptions options

Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

BlobClient(String, String, String, BlobClientOptions)

Initializes a new instance of the BlobClient class.

Declaration
public BlobClient (string connectionString, string blobContainerName, string blobName, Azure.Storage.Blobs.BlobClientOptions options);
Parameters
System.String connectionString

A connection string includes the authentication information required for your application to access data in an Azure Storage account at runtime.

For more information, Configure Azure Storage connection strings.

System.String blobContainerName

The name of the container containing this blob.

System.String blobName

The name of this blob.

BlobClientOptions options

Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

Methods

OpenWrite(Boolean, BlobOpenWriteOptions, CancellationToken)

Opens a stream for writing to the blob. If the blob exists, it will be overwritten.

Declaration
public virtual System.IO.Stream OpenWrite (bool overwrite, Azure.Storage.Blobs.Models.BlobOpenWriteOptions options = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Boolean overwrite

Whether an existing blob should be deleted and recreated. The only valid value for this operation is true.

BlobOpenWriteOptions options

Optional parameters.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.IO.Stream

A stream to write to the Append Blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

OpenWriteAsync(Boolean, BlobOpenWriteOptions, CancellationToken)

Opens a stream for writing to the blob. If the blob exists, it will be overwritten.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<System.IO.Stream> OpenWriteAsync (bool overwrite, Azure.Storage.Blobs.Models.BlobOpenWriteOptions options = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Boolean overwrite

Whether an existing blob should be deleted and recreated. The only valid value for this operation is true.

BlobOpenWriteOptions options

Optional parameters.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.Threading.Tasks.Task<System.IO.Stream>

A stream to write to the Append Blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(String, BlobHttpHeaders, IDictionary<String,String>, BlobRequestConditions, IProgress<Int64>, Nullable<AccessTier>, StorageTransferOptions, CancellationToken)

The Upload(String, BlobHttpHeaders, IDictionary<String,String>, BlobRequestConditions, IProgress<Int64>, Nullable<AccessTier>, StorageTransferOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through BlobRequestConditions to avoid overwriting existing data.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
[System.ComponentModel.EditorBrowsable]
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (string path, Azure.Storage.Blobs.Models.BlobHttpHeaders httpHeaders = null, System.Collections.Generic.IDictionary<string,string> metadata = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, IProgress<long> progressHandler = null, Nullable<Azure.Storage.Blobs.Models.AccessTier> accessTier = null, Azure.Storage.StorageTransferOptions transferOptions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String path

A file path containing the content to upload.

BlobHttpHeaders httpHeaders

Optional standard HTTP header properties that can be set for the block blob.

System.Collections.Generic.IDictionary<System.String,System.String> metadata

Optional custom metadata to set for this block blob.

BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on the creation of this new block blob.

System.IProgress<System.Int64> progressHandler

Optional System.IProgress to provide progress updates about data transfers.

System.Nullable<AccessTier> accessTier

Optional AccessTier Indicates the tier to be set on the blob.

Azure.Storage.StorageTransferOptions transferOptions

Optional Azure.Storage.StorageTransferOptions to configure parallel transfer behavior.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(Stream, BlobHttpHeaders, IDictionary<String,String>, BlobRequestConditions, IProgress<Int64>, Nullable<AccessTier>, StorageTransferOptions, CancellationToken)

The Upload(Stream, BlobHttpHeaders, IDictionary<String,String>, BlobRequestConditions, IProgress<Int64>, Nullable<AccessTier>, StorageTransferOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through BlobRequestConditions to avoid overwriting existing data.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, Put Blob.

Declaration
[System.ComponentModel.EditorBrowsable]
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (System.IO.Stream content, Azure.Storage.Blobs.Models.BlobHttpHeaders httpHeaders = null, System.Collections.Generic.IDictionary<string,string> metadata = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, IProgress<long> progressHandler = null, Nullable<Azure.Storage.Blobs.Models.AccessTier> accessTier = null, Azure.Storage.StorageTransferOptions transferOptions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.IO.Stream content

A System.IO.Stream containing the content to upload.

BlobHttpHeaders httpHeaders

Optional standard HTTP header properties that can be set for the block blob.

System.Collections.Generic.IDictionary<System.String,System.String> metadata

Optional custom metadata to set for this block blob.

BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on the creation of this new block blob.

System.IProgress<System.Int64> progressHandler

Optional System.IProgress to provide progress updates about data transfers.

System.Nullable<AccessTier> accessTier

Optional AccessTier Indicates the tier to be set on the blob.

Azure.Storage.StorageTransferOptions transferOptions

Optional Azure.Storage.StorageTransferOptions to configure parallel transfer behavior.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(String, BlobUploadOptions, CancellationToken)

The Upload(String, BlobUploadOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through Conditions to avoid overwriting existing data.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (string path, Azure.Storage.Blobs.Models.BlobUploadOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String path

A file path containing the content to upload.

BlobUploadOptions options

Optional parameters.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(Stream, Boolean, CancellationToken)

The Upload(Stream, CancellationToken) operation creates a new block blob or throws if the blob already exists.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (System.IO.Stream content, bool overwrite = false, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.IO.Stream content

A System.IO.Stream containing the content to upload.

System.Boolean overwrite

Whether the upload should overwrite any existing blobs. The default value is false.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(Stream, BlobUploadOptions, CancellationToken)

The Upload(Stream, BlobUploadOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through Conditions to avoid overwriting existing data.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (System.IO.Stream content, Azure.Storage.Blobs.Models.BlobUploadOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.IO.Stream content

A System.IO.Stream containing the content to upload.

BlobUploadOptions options

Optional parameters.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(BinaryData, Boolean, CancellationToken)

The Upload(BinaryData, Boolean, CancellationToken) operation creates a new block blob or throws if the blob already exists. Setting overwrite to true allows updating the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (BinaryData content, bool overwrite = false, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.BinaryData content

A System.IO.Stream containing the content to upload.

System.Boolean overwrite

Whether the upload should overwrite any existing blobs. The default value is false.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(String, Boolean, CancellationToken)

The Upload(String, CancellationToken) operation creates a new block blob or throws if the blob already exists.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (string path, bool overwrite = false, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String path

A file path containing the content to upload.

System.Boolean overwrite

Whether the upload should overwrite any existing blobs. The default value is false.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(String, CancellationToken)

The Upload(String, CancellationToken) operation creates a new block blob or throws if the blob already exists.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (string path, System.Threading.CancellationToken cancellationToken);
Parameters
System.String path

A file path containing the content to upload.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(Stream, CancellationToken)

The Upload(Stream, CancellationToken) operation creates a new block blob or throws if the blob already exists.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (System.IO.Stream content, System.Threading.CancellationToken cancellationToken);
Parameters
System.IO.Stream content

A System.IO.Stream containing the content to upload.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(BinaryData, CancellationToken)

The Upload(BinaryData, CancellationToken) operation creates a new block blob or throws if the blob already exists.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (BinaryData content, System.Threading.CancellationToken cancellationToken);
Parameters
System.BinaryData content

A System.BinaryData containing the content to upload.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(String)

The Upload(String) operation creates a new block blob or throws if the blob already exists.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (string path);
Parameters
System.String path

A file path containing the content to upload.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(Stream)

The Upload(Stream) operation creates a new block blob or throws if the blob already exists.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (System.IO.Stream content);
Parameters
System.IO.Stream content

A System.IO.Stream containing the content to upload.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(BinaryData)

The Upload(BinaryData) operation creates a new block blob or throws if the blob already exists.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (BinaryData content);
Parameters
System.BinaryData content

A System.BinaryData containing the content to upload.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Upload(BinaryData, BlobUploadOptions, CancellationToken)

The Upload(BinaryData, BlobUploadOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through Conditions to avoid overwriting existing data.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> Upload (BinaryData content, Azure.Storage.Blobs.Models.BlobUploadOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.BinaryData content

A System.BinaryData containing the content to upload.

BlobUploadOptions options

Optional parameters.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
Azure.Response<BlobContentInfo>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(String, BlobHttpHeaders, IDictionary<String,String>, BlobRequestConditions, IProgress<Int64>, Nullable<AccessTier>, StorageTransferOptions, CancellationToken)

The UploadAsync(String, BlobHttpHeaders, IDictionary<String,String>, BlobRequestConditions, IProgress<Int64>, Nullable<AccessTier>, StorageTransferOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through BlobRequestConditions to avoid overwriting existing data.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
[System.ComponentModel.EditorBrowsable]
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (string path, Azure.Storage.Blobs.Models.BlobHttpHeaders httpHeaders = null, System.Collections.Generic.IDictionary<string,string> metadata = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, IProgress<long> progressHandler = null, Nullable<Azure.Storage.Blobs.Models.AccessTier> accessTier = null, Azure.Storage.StorageTransferOptions transferOptions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String path

A file path containing the content to upload.

BlobHttpHeaders httpHeaders

Optional standard HTTP header properties that can be set for the block blob.

System.Collections.Generic.IDictionary<System.String,System.String> metadata

Optional custom metadata to set for this block blob.

BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on the creation of this new block blob.

System.IProgress<System.Int64> progressHandler

Optional System.IProgress to provide progress updates about data transfers.

System.Nullable<AccessTier> accessTier

Optional AccessTier Indicates the tier to be set on the blob.

Azure.Storage.StorageTransferOptions transferOptions

Optional Azure.Storage.StorageTransferOptions to configure parallel transfer behavior.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(Stream, BlobHttpHeaders, IDictionary<String,String>, BlobRequestConditions, IProgress<Int64>, Nullable<AccessTier>, StorageTransferOptions, CancellationToken)

The UploadAsync(Stream, BlobHttpHeaders, IDictionary<String,String>, BlobRequestConditions, IProgress<Int64>, Nullable<AccessTier>, StorageTransferOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through BlobRequestConditions to avoid overwriting existing data.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
[System.ComponentModel.EditorBrowsable]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (System.IO.Stream content, Azure.Storage.Blobs.Models.BlobHttpHeaders httpHeaders = null, System.Collections.Generic.IDictionary<string,string> metadata = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, IProgress<long> progressHandler = null, Nullable<Azure.Storage.Blobs.Models.AccessTier> accessTier = null, Azure.Storage.StorageTransferOptions transferOptions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.IO.Stream content

A System.IO.Stream containing the content to upload.

BlobHttpHeaders httpHeaders

Optional standard HTTP header properties that can be set for the block blob.

System.Collections.Generic.IDictionary<System.String,System.String> metadata

Optional custom metadata to set for this block blob.

BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on the creation of this new block blob.

System.IProgress<System.Int64> progressHandler

Optional System.IProgress to provide progress updates about data transfers.

System.Nullable<AccessTier> accessTier

Optional AccessTier Indicates the tier to be set on the blob.

Azure.Storage.StorageTransferOptions transferOptions

Optional Azure.Storage.StorageTransferOptions to configure parallel transfer behavior.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(String, Boolean, CancellationToken)

The UploadAsync(String, CancellationToken) operation creates a new block blob or throws if the blob already exists. Setting overwrite to true allows updating the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (string path, bool overwrite = false, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String path

A file path containing the content to upload.

System.Boolean overwrite

Whether the upload should overwrite any existing blobs. The default value is false.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(String, BlobUploadOptions, CancellationToken)

The UploadAsync(Stream, BlobUploadOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through Conditions to avoid overwriting existing data.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob..

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (string path, Azure.Storage.Blobs.Models.BlobUploadOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String path

A file path containing the content to upload.

BlobUploadOptions options

Optional parameters.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(Stream, Boolean, CancellationToken)

The UploadAsync(Stream, Boolean, CancellationToken) operation creates a new block blob or throws if the blob already exists. Setting overwrite to true allows updating the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (System.IO.Stream content, bool overwrite = false, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.IO.Stream content

A System.IO.Stream containing the content to upload.

System.Boolean overwrite

Whether the upload should overwrite any existing blobs. The default value is false.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(Stream, BlobUploadOptions, CancellationToken)

The UploadAsync(Stream, BlobUploadOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through Conditions to avoid overwriting existing data.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (System.IO.Stream content, Azure.Storage.Blobs.Models.BlobUploadOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.IO.Stream content

A System.IO.Stream containing the content to upload.

BlobUploadOptions options

Optional parameters.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(BinaryData, Boolean, CancellationToken)

The UploadAsync(BinaryData, Boolean, CancellationToken) operation creates a new block blob or throws if the blob already exists. Setting overwrite to true allows updating the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (BinaryData content, bool overwrite = false, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.BinaryData content

A System.BinaryData containing the content to upload.

System.Boolean overwrite

Whether the upload should overwrite any existing blobs. The default value is false.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(String, CancellationToken)

The UploadAsync(String, CancellationToken) operation creates a new block blob or throws if the blob already exists.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (string path, System.Threading.CancellationToken cancellationToken);
Parameters
System.String path

A file path containing the content to upload.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(Stream, CancellationToken)

The UploadAsync(Stream, CancellationToken) operation creates a new block blob or throws if the blob already exists.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (System.IO.Stream content, System.Threading.CancellationToken cancellationToken);
Parameters
System.IO.Stream content

A System.IO.Stream containing the content to upload.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(BinaryData, CancellationToken)

The UploadAsync(BinaryData, CancellationToken) operation creates a new block blob or throws if the blob already exists.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (BinaryData content, System.Threading.CancellationToken cancellationToken);
Parameters
System.BinaryData content

A System.BinaryData containing the content to upload.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(String)

The UploadAsync(String) operation creates a new block blob or throws if the blob already exists.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (string path);
Parameters
System.String path

A file path containing the content to upload.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(Stream)

The UploadAsync(Stream) operation creates a new block blob or throws an exception if the blob already exists. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (System.IO.Stream content);
Parameters
System.IO.Stream content

A System.IO.Stream containing the content to upload.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(BinaryData)

The UploadAsync(BinaryData) operation creates a new block blob or throws an exception if the blob already exists. Updating an existing block blob overwrites any existing metadata on the blob.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (BinaryData content);
Parameters
System.BinaryData content

A System.BinaryData containing the content to upload.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadAsync(BinaryData, BlobUploadOptions, CancellationToken)

The UploadAsync(BinaryData, BlobUploadOptions, CancellationToken) operation overwrites the contents of the blob, creating a new block blob if none exists. Overwriting an existing block blob replaces any existing metadata on the blob.

Set access conditions through Conditions to avoid overwriting existing data.

For partial block blob updates and other advanced features, please see BlockBlobClient. To create or modify page or append blobs, please see PageBlobClient or AppendBlobClient.

For more information, see Put Blob.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo>> UploadAsync (BinaryData content, Azure.Storage.Blobs.Models.BlobUploadOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.BinaryData content

A System.BinaryData containing the content to upload.

BlobUploadOptions options

Optional parameters.

System.Threading.CancellationToken cancellationToken

Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled.

Returns
System.Threading.Tasks.Task<Azure.Response<BlobContentInfo>>

A Azure.Response describing the state of the updated block blob.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

WithClientSideEncryptionOptionsCore(ClientSideEncryptionOptions)

Creates a new instance of the BlobClient class, maintaining all the same internals but specifying new Azure.Storage.ClientSideEncryptionOptions.

Declaration
protected internal virtual Azure.Storage.Blobs.BlobClient WithClientSideEncryptionOptionsCore (Azure.Storage.ClientSideEncryptionOptions clientSideEncryptionOptions);
Parameters
Azure.Storage.ClientSideEncryptionOptions clientSideEncryptionOptions

New encryption options. Setting this to

default
will clear client-side encryption.

Returns
BlobClient

New instance with provided options and same internals otherwise.

WithCustomerProvidedKey(Nullable<CustomerProvidedKey>)

Initializes a new instance of the BlobClient class with an identical System.Uri source but the specified customerProvidedKey.

Declaration
public Azure.Storage.Blobs.BlobClient WithCustomerProvidedKey (Nullable<Azure.Storage.Blobs.Models.CustomerProvidedKey> customerProvidedKey);
Parameters
System.Nullable<CustomerProvidedKey> customerProvidedKey

The customer provided key.

Returns
BlobClient

A new BlobClient instance.

Remarks

Pass null to remove the customer provide key in the returned BlobClient.

WithEncryptionScope(String)

Initializes a new instance of the BlobClient class with an identical System.Uri source but the specified encryptionScope.

Declaration
public Azure.Storage.Blobs.BlobClient WithEncryptionScope (string encryptionScope);
Parameters
System.String encryptionScope

The encryption scope.

Returns
BlobClient

A new BlobClient instance.

Remarks

Pass null to remove the encryption scope in the returned BlobClient.

WithSnapshot(String)

Initializes a new instance of the BlobClient class with an identical System.Uri source but the specified snapshot timestamp.

For more information, see Create a snapshot of a blob.

Declaration
public Azure.Storage.Blobs.BlobClient WithSnapshot (string snapshot);
Parameters
System.String snapshot

The snapshot identifier.

Returns
BlobClient

A new BlobClient instance.

Remarks

Pass null or empty string to remove the snapshot returning a URL

to the base blob.

WithVersion(String)

Initializes a new instance of the BlobClient class with an identical System.Uri source but the specified versionId timestamp.

Declaration
public Azure.Storage.Blobs.BlobClient WithVersion (string versionId);
Parameters
System.String versionId

The version identifier.

Returns
BlobClient

A new BlobClient instance.

Remarks

Pass null or empty string to remove the version returning a URL

to the base blob.

Extension Methods

SpecializedBlobExtensions.GetBlobLeaseClient(BlobBaseClient, String)
SpecializedBlobExtensions.GetParentBlobContainerClient(BlobBaseClient)
SpecializedBlobExtensions.UpdateClientSideKeyEncryptionKey(BlobClient, ClientSideEncryptionOptions, BlobRequestConditions, CancellationToken)
SpecializedBlobExtensions.UpdateClientSideKeyEncryptionKeyAsync(BlobClient, ClientSideEncryptionOptions, BlobRequestConditions, CancellationToken)
SpecializedBlobExtensions.WithClientSideEncryptionOptions(BlobClient, ClientSideEncryptionOptions)
Back to top Azure SDK for .NET