BlobContainerClient Class

Definition

The BlobContainerClient allows you to manipulate Azure Storage containers and their blobs.

public class BlobContainerClient
type BlobContainerClient = class
Public Class BlobContainerClient
Inheritance
BlobContainerClient

Constructors

BlobContainerClient()

Initializes a new instance of the BlobContainerClient class for mocking.

BlobContainerClient(String, String)

Initializes a new instance of the BlobContainerClient class.

BlobContainerClient(String, String, BlobClientOptions)

Initializes a new instance of the BlobContainerClient class.

BlobContainerClient(Uri, BlobClientOptions)

Initializes a new instance of the BlobContainerClient class.

BlobContainerClient(Uri, StorageSharedKeyCredential, BlobClientOptions)

Initializes a new instance of the BlobContainerClient class.

BlobContainerClient(Uri, TokenCredential, BlobClientOptions)

Initializes a new instance of the BlobContainerClient class.

Fields

LogsBlobContainerName

The Azure Storage name used to identify a storage account's logs container.

RootBlobContainerName

The Azure Storage name used to identify a storage account's root container.

WebBlobContainerName

The Azure Storage name used to identify a storage account's web content container.

Properties

AccountName

Gets the Storage account name corresponding to the container client.

Name

Gets the name of the container.

Uri

Gets the container's primary Uri endpoint.

Methods

Create(PublicAccessType, IDictionary<String,String>, CancellationToken)

The Create(PublicAccessType, IDictionary<String,String>, CancellationToken) operation creates a new container under the specified account. If the container with the same name already exists, the operation fails.

For more information, see .

CreateAsync(PublicAccessType, IDictionary<String,String>, CancellationToken)

The CreateAsync(PublicAccessType, IDictionary<String,String>, CancellationToken) operation creates a new container under the specified account. If the container with the same name already exists, the operation fails.

For more information, see .

CreateIfNotExists(PublicAccessType, IDictionary<String,String>, CancellationToken)

The CreateIfNotExists(PublicAccessType, IDictionary<String,String>, CancellationToken) operation creates a new container under the specified account. If the container with the same name already exists, the operation fails.

For more information, see .

CreateIfNotExistsAsync(PublicAccessType, IDictionary<String,String>, CancellationToken)

The CreateIfNotExistsAsync(PublicAccessType, IDictionary<String,String>, CancellationToken) operation creates a new container under the specified account. If the container with the same name already exists, the operation fails.

For more information, see .

Delete(BlobRequestConditions, CancellationToken)

The Delete(BlobRequestConditions, CancellationToken) operation marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection.

For more information, see .

DeleteAsync(BlobRequestConditions, CancellationToken)

The DeleteAsync(BlobRequestConditions, CancellationToken) operation marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection.

For more information, see .

DeleteBlob(String, DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)

The DeleteBlob(String, 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 .

DeleteBlobAsync(String, DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)

The DeleteBlobAsync(String, 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 .

DeleteBlobIfExists(String, DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)

The DeleteBlobIfExists(String, DeleteSnapshotsOption, BlobRequestConditions, CancellationToken) operation marks the specified blob or snapshot for deletion, if the blob or snapshot 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 .

DeleteBlobIfExistsAsync(String, DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)

The DeleteBlobIfExistsAsync(String, DeleteSnapshotsOption, BlobRequestConditions, CancellationToken) operation marks the specified blob or snapshot for deletion, if the blob or snapshot 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 .

DeleteIfExists(BlobRequestConditions, CancellationToken)

The DeleteIfExists(BlobRequestConditions, CancellationToken) operation marks the specified container for deletion if it exists. The container and any blobs contained within it are later deleted during garbage collection.

For more information, see .

DeleteIfExistsAsync(BlobRequestConditions, CancellationToken)

The DeleteIfExistsAsync(BlobRequestConditions, CancellationToken) operation marks the specified container for deletion if it exists. The container and any blobs contained within it are later deleted during garbage collection.

For more information, see .

GetAccessPolicy(BlobRequestConditions, CancellationToken)

The GetAccessPolicy(BlobRequestConditions, CancellationToken) operation gets the permissions for this container. The permissions indicate whether container data may be accessed publicly.

For more information, see .

GetAccessPolicyAsync(BlobRequestConditions, CancellationToken)

The GetAccessPolicyAsync(BlobRequestConditions, CancellationToken) operation gets the permissions for this container. The permissions indicate whether container data may be accessed publicly.

For more information, see .

GetBlobClient(String)

Create a new BlobClient object by appending blobName to the end of Uri. The new BlobClient uses the same request policy pipeline as the BlobContainerClient.

GetBlobs(BlobTraits, BlobStates, String, CancellationToken)

The GetBlobs(BlobTraits, BlobStates, String, CancellationToken) operation returns an async sequence of blobs in this container. Enumerating the blobs may make multiple requests to the service while fetching all the values. Blobs are ordered lexicographically by name.

For more information, see .

GetBlobsAsync(BlobTraits, BlobStates, String, CancellationToken)

The GetBlobsAsync(BlobTraits, BlobStates, String, CancellationToken) operation returns an async sequence of blobs in this container. Enumerating the blobs may make multiple requests to the service while fetching all the values. Blobs are ordered lexicographically by name.

For more information, see .

GetBlobsByHierarchy(BlobTraits, BlobStates, String, String, CancellationToken)

The GetBlobsByHierarchy(BlobTraits, BlobStates, String, String, CancellationToken) operation returns an async collection of blobs in this container. Enumerating the blobs may make multiple requests to the service while fetching all the values. Blobs are ordered lexicographically by name. A delimiter can be used to traverse a virtual hierarchy of blobs as though it were a file system.

For more information, see .

GetBlobsByHierarchyAsync(BlobTraits, BlobStates, String, String, CancellationToken)

The GetBlobsByHierarchyAsync(BlobTraits, BlobStates, String, String, CancellationToken) operation returns an async collection of blobs in this container. Enumerating the blobs may make multiple requests to the service while fetching all the values. Blobs are ordered lexicographically by name. A delimiter can be used to traverse a virtual hierarchy of blobs as though it were a file system.

For more information, see .

GetProperties(BlobRequestConditions, CancellationToken)

The GetProperties(BlobRequestConditions, CancellationToken) operation returns all user-defined metadata and system properties for the specified container. The data returned does not include the container's list of blobs.

For more information, see .

GetPropertiesAsync(BlobRequestConditions, CancellationToken)

The GetPropertiesAsync(BlobRequestConditions, CancellationToken) operation returns all user-defined metadata and system properties for the specified container. The data returned does not include the container's list of blobs.

For more information, see .

SetAccessPolicy(PublicAccessType, IEnumerable<BlobSignedIdentifier>, BlobRequestConditions, CancellationToken)

The SetAccessPolicy(PublicAccessType, IEnumerable<BlobSignedIdentifier>, BlobRequestConditions, CancellationToken) operation sets the permissions for the specified container. The permissions indicate whether blob container data may be accessed publicly.

For more information, see .

SetAccessPolicyAsync(PublicAccessType, IEnumerable<BlobSignedIdentifier>, BlobRequestConditions, CancellationToken)

The SetAccessPolicyAsync(PublicAccessType, IEnumerable<BlobSignedIdentifier>, BlobRequestConditions, CancellationToken) operation sets the permissions for the specified container. The permissions indicate whether blob container data may be accessed publicly.

For more information, see .

SetMetadata(IDictionary<String,String>, BlobRequestConditions, CancellationToken)

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

For more information, see .

SetMetadataAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken)

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

For more information, see .

UploadBlob(String, Stream, CancellationToken)

The UploadBlob(String, Stream, CancellationToken) operation creates a new block blob or updates the content of an existing block blob in this container. 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 .

UploadBlobAsync(String, Stream, CancellationToken)

The UploadBlobAsync(String, Stream, CancellationToken) operation creates a new block blob or updates the content of an existing block blob in this container. 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 .

Extension Methods

GetAppendBlobClient(BlobContainerClient, String)

Create a new AppendBlobClient object by concatenating blobName to the end of the client's Uri. The new AppendBlobClient uses the same request policy pipeline as the BlobContainerClient.

GetBlobBaseClient(BlobContainerClient, String)

Create a new BlobClient object by concatenating blobName to the end of the client's Uri. The new BlobClient uses the same request policy pipeline as the BlobContainerClient.

GetBlobLeaseClient(BlobContainerClient, String)

Initializes a new instance of the BlobLeaseClient class.

GetBlockBlobClient(BlobContainerClient, String)

Create a new BlockBlobClient object by concatenating blobName to the end of the client's Uri. The new BlockBlobClient uses the same request policy pipeline as the BlobContainerClient.

GetPageBlobClient(BlobContainerClient, String)

Create a new PageBlobClient object by concatenating blobName to the end of the client's Uri. The new PageBlobClient uses the same request policy pipeline as the BlobContainerClient.

Applies to