BlobClient Class

Definition

The BlobClient allows you to manipulate Azure Storage blobs.

public class BlobClient : Azure.Storage.Blobs.Specialized.BlobBaseClient
type BlobClient = class
    inherit BlobBaseClient
Public Class BlobClient
Inherits BlobBaseClient
Inheritance
BlobClient

Constructors

BlobClient()

Initializes a new instance of the BlobClient class for mocking.

BlobClient(String, String, String)

Initializes a new instance of the BlobClient class.

BlobClient(String, String, String, BlobClientOptions)

Initializes a new instance of the BlobClient class.

BlobClient(Uri, BlobClientOptions)

Initializes a new instance of the BlobClient class.

BlobClient(Uri, StorageSharedKeyCredential, BlobClientOptions)

Initializes a new instance of the BlobClient class.

BlobClient(Uri, TokenCredential, BlobClientOptions)

Initializes a new instance of the BlobClient class.

Properties

AccountName

Gets the Storage account name corresponding to the blob client.

(Inherited from BlobBaseClient)
BlobContainerName

Gets the container name corresponding to the blob client.

(Inherited from BlobBaseClient)
Name

Gets the name of the blob.

(Inherited from BlobBaseClient)
Uri

Gets the blob's primary Uri endpoint.

(Inherited from BlobBaseClient)

Methods

AbortCopyFromUri(String, BlobRequestConditions, CancellationToken)

The AbortCopyFromUri(String, BlobRequestConditions, CancellationToken) operation aborts a pending CopyFromUriOperation, and leaves a this blob with zero length and full metadata.

For more information, see .

(Inherited from BlobBaseClient)
AbortCopyFromUriAsync(String, BlobRequestConditions, CancellationToken)

The AbortCopyFromUriAsync(String, BlobRequestConditions, CancellationToken) operation aborts a pending CopyFromUriOperation, and leaves a this blob with zero length and full metadata.

For more information, see .

(Inherited from BlobBaseClient)
CreateSnapshot(IDictionary<String,String>, BlobRequestConditions, CancellationToken)

The CreateSnapshot(IDictionary<String,String>, BlobRequestConditions, CancellationToken) operation creates a read-only snapshot of a blob.

For more infomration, see .

(Inherited from BlobBaseClient)
CreateSnapshotAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken)

The CreateSnapshotAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken) operation creates a read-only snapshot of a blob.

For more infomration, see .

(Inherited from BlobBaseClient)
Delete(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)

The Delete(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken) operation marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection.

Note that in order to delete a blob, you must delete all of its snapshots. You can delete both at the same time using IncludeSnapshots.

For more information, see .

(Inherited from BlobBaseClient)
DeleteAsync(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)

The DeleteAsync(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken) operation marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection.

Note that in order to delete a blob, you must delete all of its snapshots. You can delete both at the same time using IncludeSnapshots.

For more information, see .

(Inherited from BlobBaseClient)
DeleteIfExists(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)

The DeleteIfExists(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken) operation marks the specified blob or snapshot for deletion, if the blob exists. The blob is later deleted during garbage collection.

Note that in order to delete a blob, you must delete all of its snapshots. You can delete both at the same time using IncludeSnapshots.

For more information, see .

(Inherited from BlobBaseClient)
DeleteIfExistsAsync(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)

The DeleteIfExistsAsync(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken) operation marks the specified blob or snapshot for deletion, if the blob exists. The blob is later deleted during garbage collection.

Note that in order to delete a blob, you must delete all of its snapshots. You can delete both at the same time using IncludeSnapshots.

For more information, see .

(Inherited from BlobBaseClient)
Download()

The Download() operation downloads a blob from the service, including its metadata and properties.

For more information, see .

(Inherited from BlobBaseClient)
Download(CancellationToken)

The Download(CancellationToken) operation downloads a blob from the service, including its metadata and properties.

For more information, see .

(Inherited from BlobBaseClient)
Download(HttpRange, BlobRequestConditions, Boolean, CancellationToken)

The Download(HttpRange, BlobRequestConditions, Boolean, CancellationToken) operation downloads a blob from the service, including its metadata and properties.

For more information, see .

(Inherited from BlobBaseClient)
DownloadAsync()

The DownloadAsync() operation downloads a blob from the service, including its metadata and properties.

For more information, see .

(Inherited from BlobBaseClient)
DownloadAsync(CancellationToken)

The DownloadAsync(CancellationToken) operation downloads a blob from the service, including its metadata and properties.

For more information, see .

(Inherited from BlobBaseClient)
DownloadAsync(HttpRange, BlobRequestConditions, Boolean, CancellationToken)

The DownloadAsync(HttpRange, BlobRequestConditions, Boolean, CancellationToken) operation downloads a blob from the service, including its metadata and properties.

For more information, see .

(Inherited from BlobBaseClient)
DownloadTo(Stream)

The DownloadTo(Stream) operation downloads a blob using parallel requests, and writes the content to destination.

(Inherited from BlobBaseClient)
DownloadTo(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken)

The DownloadTo(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken) operation downloads a blob using parallel requests, and writes the content to destination.

(Inherited from BlobBaseClient)
DownloadTo(Stream, CancellationToken)

The DownloadTo(Stream, CancellationToken) operation downloads a blob using parallel requests, and writes the content to destination.

(Inherited from BlobBaseClient)
DownloadTo(String)

The DownloadTo(String) operation downloads a blob using parallel requests, and writes the content to path.

(Inherited from BlobBaseClient)
DownloadTo(String, BlobRequestConditions, StorageTransferOptions, CancellationToken)

The DownloadTo(String, BlobRequestConditions, StorageTransferOptions, CancellationToken) operation downloads a blob using parallel requests, and writes the content to path.

(Inherited from BlobBaseClient)
DownloadTo(String, CancellationToken)

The DownloadTo(String, CancellationToken) operation downloads a blob using parallel requests, and writes the content to path.

(Inherited from BlobBaseClient)
DownloadToAsync(Stream)

The DownloadToAsync(Stream) downloads a blob using parallel requests, and writes the content to destination.

(Inherited from BlobBaseClient)
DownloadToAsync(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken)

The DownloadToAsync(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken) operation downloads a blob using parallel requests, and writes the content to destination.

(Inherited from BlobBaseClient)
DownloadToAsync(Stream, CancellationToken)

The DownloadToAsync(Stream, CancellationToken) operation downloads a blob using parallel requests, and writes the content to destination.

(Inherited from BlobBaseClient)
DownloadToAsync(String)

The DownloadToAsync(String) downloads a blob using parallel requests, and writes the content to path.

(Inherited from BlobBaseClient)
DownloadToAsync(String, BlobRequestConditions, StorageTransferOptions, CancellationToken)

The DownloadToAsync(String, BlobRequestConditions, StorageTransferOptions, CancellationToken) operation downloads a blob using parallel requests, and writes the content to path.

(Inherited from BlobBaseClient)
DownloadToAsync(String, CancellationToken)

The DownloadToAsync(String, CancellationToken) operation downloads a blob using parallel requests, and writes the content to path.

(Inherited from BlobBaseClient)
Exists(CancellationToken)

The Exists(CancellationToken) operation can be called on a BlobBaseClient to see if the associated blob exists in the container on the storage account in the storage service.

(Inherited from BlobBaseClient)
ExistsAsync(CancellationToken)

The ExistsAsync(CancellationToken) operation can be called on a BlobBaseClient to see if the associated blob exists in the container on the storage account in the storage service.

(Inherited from BlobBaseClient)
GetProperties(BlobRequestConditions, CancellationToken)

The GetProperties(BlobRequestConditions, CancellationToken) operation returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It does not return the content of the blob.

For more information, see .

(Inherited from BlobBaseClient)
GetPropertiesAsync(BlobRequestConditions, CancellationToken)

The GetPropertiesAsync(BlobRequestConditions, CancellationToken) operation returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It does not return the content of the blob.

For more information, see .

(Inherited from BlobBaseClient)
SetAccessTier(AccessTier, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)

The SetAccessTier(AccessTier, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken) operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage account and on a block blob in a blob storage or general purpose v2 account.

A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's ETag. For detailed information about block blob level tiering

For more information about setting the tier, see .

(Inherited from BlobBaseClient)
SetAccessTierAsync(AccessTier, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)

The SetAccessTierAsync(AccessTier, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken) operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage account and on a block blob in a blob storage or general purpose v2 account.

A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's ETag. For detailed information about block blob level tiering

For more information about setting the tier, see .

(Inherited from BlobBaseClient)
SetHttpHeaders(BlobHttpHeaders, BlobRequestConditions, CancellationToken)

The SetHttpHeaders(BlobHttpHeaders, BlobRequestConditions, CancellationToken) operation sets system properties on the blob.

For more information, see .

(Inherited from BlobBaseClient)
SetHttpHeadersAsync(BlobHttpHeaders, BlobRequestConditions, CancellationToken)

The SetHttpHeadersAsync(BlobHttpHeaders, BlobRequestConditions, CancellationToken) operation sets system properties on the blob.

For more information, see .

(Inherited from BlobBaseClient)
SetMetadata(IDictionary<String,String>, BlobRequestConditions, CancellationToken)

The SetMetadata(IDictionary<String,String>, BlobRequestConditions, CancellationToken) operation sets user-defined metadata for the specified blob as one or more name-value pairs.

For more information, see .

(Inherited from BlobBaseClient)
SetMetadataAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken)

The SetMetadataAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken) operation sets user-defined metadata for the specified blob as one or more name-value pairs.

For more information, see .

(Inherited from BlobBaseClient)
StartCopyFromUri(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)

The StartCopyFromUri(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken) operation copies data at from the source to this blob. You can check the CopyStatus returned from the GetProperties(BlobRequestConditions, CancellationToken) to determine if the copy has completed.

For more information, see .

(Inherited from BlobBaseClient)
StartCopyFromUriAsync(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)

The StartCopyFromUri(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken) operation copies data at from the source to this blob. You can check the CopyStatus returned from the GetPropertiesAsync(BlobRequestConditions, CancellationToken) to determine if the copy has completed.

For more information, see .

(Inherited from BlobBaseClient)
Undelete(CancellationToken)

The Undelete(CancellationToken) operation restores the contents and metadata of a soft deleted blob and any associated soft deleted snapshots.

For more information, see .

(Inherited from BlobBaseClient)
UndeleteAsync(CancellationToken)

The UndeleteAsync(CancellationToken) operation restores the contents and metadata of a soft deleted blob and any associated soft deleted snapshots.

For more information, see .

(Inherited from BlobBaseClient)
Upload(Stream)

The Upload(Stream) operation creates a new block blob or updates 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 .

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 creates a new block blob or updates 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 .

Upload(Stream, Boolean, CancellationToken)

The Upload(Stream, CancellationToken) operation creates a new block blob or updates 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 .

Upload(Stream, CancellationToken)

The Upload(Stream, CancellationToken) operation creates a new block blob or updates 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 .

Upload(String)

The Upload(String) operation creates a new block blob or updates 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 .

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 creates a new block blob or updates 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 .

Upload(String, Boolean, CancellationToken)

The Upload(String, CancellationToken) operation creates a new block blob or updates 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 .

Upload(String, CancellationToken)

The Upload(String, CancellationToken) operation creates a new block blob or updates 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 .

UploadAsync(Stream)

The UploadAsync(Stream) operation creates a new block blob or updates 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 .

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 creates a new block blob or updates 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 .

UploadAsync(Stream, Boolean, CancellationToken)

The UploadAsync(Stream, CancellationToken) operation creates a new block blob or updates 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 .

UploadAsync(Stream, CancellationToken)

The UploadAsync(Stream, CancellationToken) operation creates a new block blob or updates 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 .

UploadAsync(String)

The UploadAsync(String) operation creates a new block blob or updates 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 .

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 creates a new block blob or updates 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 .

UploadAsync(String, Boolean, CancellationToken)

The UploadAsync(String, CancellationToken) operation creates a new block blob or updates 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 .

UploadAsync(String, CancellationToken)

The UploadAsync(String, CancellationToken) operation creates a new block blob or updates 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 .

WithSnapshot(String)

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

For more information, see .

(Inherited from BlobBaseClient)
WithSnapshotCore(String)

Creates a new instance of the BlobBaseClient class with an identical Uri source but the specified snapshot timestamp.

(Inherited from BlobBaseClient)

Extension Methods

GetBlobLeaseClient(BlobBaseClient, String)

Initializes a new instance of the BlobLeaseClient class.

Applies to