Show / Hide Table of Contents

Class BlobContainerClient

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

Inheritance
System.Object
BlobContainerClient
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Storage.Blobs.dll
Syntax
public class BlobContainerClient

Constructors

BlobContainerClient()

Initializes a new instance of the BlobContainerClient class for mocking.

Declaration
protected BlobContainerClient ();

BlobContainerClient(String, String)

Initializes a new instance of the BlobContainerClient class with Connection string and Blob Container name.

Declaration
public BlobContainerClient (string connectionString, string blobContainerName);
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 blob container in the storage account to reference.

BlobContainerClient(Uri, BlobClientOptions)

Initializes a new instance of the BlobContainerClient class with Blob Container URI and BlobClientOptions.

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

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

BlobClientOptions options

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

BlobContainerClient(String, String, BlobClientOptions)

Initializes a new instance of the BlobContainerClient class with Connection string, Blob Container name, and BlobClientOptions.

Declaration
public BlobContainerClient (string connectionString, string blobContainerName, 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 in the storage account to reference.

BlobClientOptions options

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

BlobContainerClient(Uri, AzureSasCredential, BlobClientOptions)

Initializes a new instance of the BlobContainerClient class with Blob Container URI, Azure.AzureSasCredential, and BlobClientOptions.

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

A Uri referencing the blob container that includes the name of the account and the name of the container. This is likely to be similar to "https://{account_name}.blob.core.windows.net/{container_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.

BlobContainerClient(Uri, TokenCredential, BlobClientOptions)

Initializes a new instance of the BlobContainerClient class with Blob Container URI, Azure.Core.TokenCredential, and BlobClientOptions.

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

A Uri referencing the blob container that includes the name of the account and the name of the container. This is likely to be similar to "https://{account_name}.blob.core.windows.net/{container_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.

BlobContainerClient(Uri, StorageSharedKeyCredential, BlobClientOptions)

Initializes a new instance of the BlobContainerClient class with Blob Container URI, Azure.Storage.StorageSharedKeyCredential, and BlobClientOptions.

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

A Uri referencing the blob container that includes the name of the account and the name of the container. This is likely to be similar to "https://{account_name}.blob.core.windows.net/{container_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.

Fields

LogsBlobContainerName

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

Declaration
public static readonly string LogsBlobContainerName;
Field Value
System.String

RootBlobContainerName

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

Declaration
public static readonly string RootBlobContainerName;
Field Value
System.String

WebBlobContainerName

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

Declaration
public static readonly string WebBlobContainerName;
Field Value
System.String

Properties

AccountName

Gets the Storage account name corresponding to the container client.

Declaration
public virtual string AccountName { get; }
Property Value
System.String

CanGenerateSasUri

Indicates whether the client is able to generate a SAS uri. Client can generate a SAS url if it is authenticated with a Azure.Storage.StorageSharedKeyCredential.

Declaration
public virtual bool CanGenerateSasUri { get; }
Property Value
System.Boolean

Name

Gets the name of the container.

Declaration
public virtual string Name { get; }
Property Value
System.String

Uri

Gets the container's primary Uri endpoint.

Declaration
public virtual Uri Uri { get; }
Property Value
System.Uri

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 Create Container.

Declaration
[System.ComponentModel.EditorBrowsable]
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo> Create (Azure.Storage.Blobs.Models.PublicAccessType publicAccessType, System.Collections.Generic.IDictionary<string,string> metadata, System.Threading.CancellationToken cancellationToken);
Parameters
PublicAccessType publicAccessType

Optionally specifies whether data in the container may be accessed publicly and the level of access. BlobContainer specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. Blob specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. None specifies that the container data is private to the account owner.

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

Optional custom metadata to set for this container.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response<BlobContainerInfo>

A Azure.Response describing the newly created blob container.

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.

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

The Create(PublicAccessType, IDictionary<String,String>, BlobContainerEncryptionScopeOptions, 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 Create Container.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo> Create (Azure.Storage.Blobs.Models.PublicAccessType publicAccessType = Azure.Storage.Blobs.Models.PublicAccessType.None, System.Collections.Generic.IDictionary<string,string> metadata = null, Azure.Storage.Blobs.Models.BlobContainerEncryptionScopeOptions encryptionScopeOptions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
PublicAccessType publicAccessType

Optionally specifies whether data in the container may be accessed publicly and the level of access. BlobContainer specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. Blob specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. None specifies that the container data is private to the account owner.

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

Optional custom metadata to set for this container.

BlobContainerEncryptionScopeOptions encryptionScopeOptions

Optional encryption scope options to set for this container.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response<BlobContainerInfo>

A Azure.Response describing the newly created blob container.

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.

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 Create Container.

Declaration
[System.ComponentModel.EditorBrowsable]
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo>> CreateAsync (Azure.Storage.Blobs.Models.PublicAccessType publicAccessType, System.Collections.Generic.IDictionary<string,string> metadata, System.Threading.CancellationToken cancellationToken);
Parameters
PublicAccessType publicAccessType

Optionally specifies whether data in the container may be accessed publicly and the level of access. BlobContainer specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. Blob specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. None specifies that the container data is private to the account owner.

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

Optional custom metadata to set for this container.

System.Threading.CancellationToken cancellationToken

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

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

A Azure.Response describing the newly created container.

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.

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

The CreateAsync(PublicAccessType, IDictionary<String,String>, BlobContainerEncryptionScopeOptions, 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 Create Container.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo>> CreateAsync (Azure.Storage.Blobs.Models.PublicAccessType publicAccessType = Azure.Storage.Blobs.Models.PublicAccessType.None, System.Collections.Generic.IDictionary<string,string> metadata = null, Azure.Storage.Blobs.Models.BlobContainerEncryptionScopeOptions encryptionScopeOptions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
PublicAccessType publicAccessType

Optionally specifies whether data in the container may be accessed publicly and the level of access. BlobContainer specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. Blob specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. None specifies that the container data is private to the account owner.

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

Optional custom metadata to set for this container.

BlobContainerEncryptionScopeOptions encryptionScopeOptions

Optional encryption scope options to set for this container.

System.Threading.CancellationToken cancellationToken

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

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

A Azure.Response describing the newly created container.

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.

CreateClient(Uri, BlobClientOptions, HttpPipeline)

Initializes a new instance of the BlobContainerClient class with Blob Container URI, BlobClientOptions, and Azure.Core.Pipeline.HttpPipeline.

Declaration
protected static Azure.Storage.Blobs.BlobContainerClient CreateClient (Uri containerUri, Azure.Storage.Blobs.BlobClientOptions options, Azure.Core.Pipeline.HttpPipeline pipeline);
Parameters
System.Uri containerUri

A Uri referencing the block blob that includes the name of the account, the name of the container, and the name of the blob.

BlobClientOptions options

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

Azure.Core.Pipeline.HttpPipeline pipeline

The transport pipeline used to send every request.

Returns
BlobContainerClient

New instance of the BlobContainerClient class.

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

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

For more information, see Create Container.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo> CreateIfNotExists (Azure.Storage.Blobs.Models.PublicAccessType publicAccessType = Azure.Storage.Blobs.Models.PublicAccessType.None, System.Collections.Generic.IDictionary<string,string> metadata = null, Azure.Storage.Blobs.Models.BlobContainerEncryptionScopeOptions encryptionScopeOptions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
PublicAccessType publicAccessType

Optionally specifies whether data in the container may be accessed publicly and the level of access. BlobContainer specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. Blob specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. None specifies that the container data is private to the account owner.

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

Optional custom metadata to set for this container.

BlobContainerEncryptionScopeOptions encryptionScopeOptions

Optional encryption scope options to set for this container.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response<BlobContainerInfo>

If the container does not already exist, a Azure.Response describing the newly created container. If the container already exists, null.

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.

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, it is not changed.

For more information, see Create Container.

Declaration
[System.ComponentModel.EditorBrowsable]
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo> CreateIfNotExists (Azure.Storage.Blobs.Models.PublicAccessType publicAccessType, System.Collections.Generic.IDictionary<string,string> metadata, System.Threading.CancellationToken cancellationToken);
Parameters
PublicAccessType publicAccessType

Optionally specifies whether data in the container may be accessed publicly and the level of access. BlobContainer specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. Blob specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. None specifies that the container data is private to the account owner.

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

Optional custom metadata to set for this container.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response<BlobContainerInfo>

If the container does not already exist, a Azure.Response describing the newly created container. If the container already exists, null.

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.

CreateIfNotExistsAsync(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, it is not changed.

For more information, see Create Container.

Declaration
[System.ComponentModel.EditorBrowsable]
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo>> CreateIfNotExistsAsync (Azure.Storage.Blobs.Models.PublicAccessType publicAccessType, System.Collections.Generic.IDictionary<string,string> metadata, System.Threading.CancellationToken cancellationToken);
Parameters
PublicAccessType publicAccessType

Optionally specifies whether data in the container may be accessed publicly and the level of access. BlobContainer specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. Blob specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. None specifies that the container data is private to the account owner.

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

Optional custom metadata to set for this container.

System.Threading.CancellationToken cancellationToken

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

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

A Azure.Response describing the newly created container.

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.

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

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

For more information, see Create Container.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo>> CreateIfNotExistsAsync (Azure.Storage.Blobs.Models.PublicAccessType publicAccessType = Azure.Storage.Blobs.Models.PublicAccessType.None, System.Collections.Generic.IDictionary<string,string> metadata = null, Azure.Storage.Blobs.Models.BlobContainerEncryptionScopeOptions encryptionScopeOptions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
PublicAccessType publicAccessType

Optionally specifies whether data in the container may be accessed publicly and the level of access. BlobContainer specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. Blob specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. None specifies that the container data is private to the account owner.

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

Optional custom metadata to set for this container.

BlobContainerEncryptionScopeOptions encryptionScopeOptions

Optional encryption scope options to set for this container.

System.Threading.CancellationToken cancellationToken

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

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

A Azure.Response describing the newly created container.

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.

Delete(BlobRequestConditions, CancellationToken)

The Delete(BlobRequestConditions, CancellationToken) operation marks the specified container for deletion.

For more information, see Delete Container.

Declaration
public virtual Azure.Response Delete (Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on the deletion of this container.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response

A Azure.Response on successfully marking for deletion.

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.

DeleteAsync(BlobRequestConditions, CancellationToken)

The DeleteAsync(BlobRequestConditions, CancellationToken) operation marks the specified container for deletion.

For more information, see Delete Container.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteAsync (Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on the deletion of this container.

System.Threading.CancellationToken cancellationToken

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

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

A Azure.Response on successfully marking for deletion.

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.

DeleteBlob(String, DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)

The DeleteBlob(String, DeleteSnapshotsOption, BlobRequestConditions, CancellationToken) operation marks the specified blob or snapshot for deletion.

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 Delete Blob.

Declaration
public virtual Azure.Response DeleteBlob (string blobName, Azure.Storage.Blobs.Models.DeleteSnapshotsOption snapshotsOption = Azure.Storage.Blobs.Models.DeleteSnapshotsOption.None, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String blobName

The name of the blob to delete.

DeleteSnapshotsOption snapshotsOption

Specifies options for deleting blob snapshots.

BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on deleting this blob.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response

A Azure.Response on successfully marking for deletion.

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.

DeleteBlobAsync(String, DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)

The DeleteBlobAsync(String, DeleteSnapshotsOption, BlobRequestConditions, CancellationToken) operation marks the specified blob or snapshot for deletion.

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 Delete Blob.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteBlobAsync (string blobName, Azure.Storage.Blobs.Models.DeleteSnapshotsOption snapshotsOption = Azure.Storage.Blobs.Models.DeleteSnapshotsOption.None, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String blobName

The name of the blob to delete.

DeleteSnapshotsOption snapshotsOption

Specifies options for deleting blob snapshots.

BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on deleting this blob.

System.Threading.CancellationToken cancellationToken

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

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

A Azure.Response on successfully marking for deletion.

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.

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.

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 Delete Blob.

Declaration
public virtual Azure.Response<bool> DeleteBlobIfExists (string blobName, Azure.Storage.Blobs.Models.DeleteSnapshotsOption snapshotsOption = Azure.Storage.Blobs.Models.DeleteSnapshotsOption.None, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String blobName

The name of the blob to delete.

DeleteSnapshotsOption snapshotsOption

Specifies options for deleting blob snapshots.

BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on deleting this blob.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response<System.Boolean>

A Azure.Response on successfully marking for deletion.

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.

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.

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 Delete Blob.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<bool>> DeleteBlobIfExistsAsync (string blobName, Azure.Storage.Blobs.Models.DeleteSnapshotsOption snapshotsOption = Azure.Storage.Blobs.Models.DeleteSnapshotsOption.None, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String blobName

The name of the blob to delete.

DeleteSnapshotsOption snapshotsOption

Specifies options for deleting blob snapshots.

BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on deleting this blob.

System.Threading.CancellationToken cancellationToken

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

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

A Azure.Response on successfully marking for deletion.

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.

DeleteIfExists(BlobRequestConditions, CancellationToken)

The DeleteIfExists(BlobRequestConditions, CancellationToken) operation marks the specified container for deletion if it exists.

For more information, see Delete Container.

Declaration
public virtual Azure.Response<bool> DeleteIfExists (Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on the deletion of this container.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response<System.Boolean>

A Azure.Response Returns true if container exists and was marked for deletion, return false otherwise.

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.

DeleteIfExistsAsync(BlobRequestConditions, CancellationToken)

The DeleteIfExistsAsync(BlobRequestConditions, CancellationToken) operation marks the specified container for deletion if it exists.

For more information, see Delete Container.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<bool>> DeleteIfExistsAsync (Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on the deletion of this container.

System.Threading.CancellationToken cancellationToken

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

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

A Azure.Response Returns true if container exists and was marked for deletion, return false otherwise.

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.

Exists(CancellationToken)

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

Declaration
public virtual Azure.Response<bool> Exists (System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response<System.Boolean>

Returns true if the container exists.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If you want to create the container if it doesn't exist, use CreateIfNotExists(PublicAccessType, IDictionary<String,String>, BlobContainerEncryptionScopeOptions, CancellationToken) instead. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

ExistsAsync(CancellationToken)

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

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<bool>> ExistsAsync (System.Threading.CancellationToken cancellationToken = null);
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<System.Boolean>>

Returns true if the container exists.

Remarks

A Azure.RequestFailedException will be thrown if a failure occurs. If you want to create the container if it doesn't exist, use CreateIfNotExists(PublicAccessType, IDictionary<String,String>, BlobContainerEncryptionScopeOptions, CancellationToken) instead. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

FindBlobsByTags(String, CancellationToken)

The Filter Blobs operation enables callers to list blobs in the container whose tags match a given search expression and only the tags appearing in the expression will be returned.

For more information, see Find Blobs by Tags.

Declaration
public virtual Azure.Pageable<Azure.Storage.Blobs.Models.TaggedBlobItem> FindBlobsByTags (string tagFilterSqlExpression, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String tagFilterSqlExpression

The where parameter finds blobs in the storage account whose tags match a given expression. The expression must evaluate to true for a blob to be returned in the result set. The storage service supports a subset of the ANSI SQL WHERE clause grammar for the value of the where=expression query parameter. The following operators are supported: =, >, >=, <, <=, AND. Example expression: "tagKey"='tagValue'.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Pageable<TaggedBlobItem>

An Azure.AsyncPageable describing the blobs.

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.

FindBlobsByTagsAsync(String, CancellationToken)

The Filter Blobs operation enables callers to list blobs in the container whose tags match a given search expression and only the tags appearing in the expression will be returned.

For more information, see Find Blobs by Tags.

Declaration
public virtual Azure.AsyncPageable<Azure.Storage.Blobs.Models.TaggedBlobItem> FindBlobsByTagsAsync (string tagFilterSqlExpression, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String tagFilterSqlExpression

The where parameter finds blobs in the storage account whose tags match a given expression. The expression must evaluate to true for a blob to be returned in the result set. The storage service supports a subset of the ANSI SQL WHERE clause grammar for the value of the where=expression query parameter. The following operators are supported: =, >, >=, <, <=, AND. Example expression: "tagKey"='tagValue'.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.AsyncPageable<TaggedBlobItem>

An Azure.AsyncPageable describing the blobs.

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.

GenerateSasUri(BlobSasBuilder, String)

The GenerateSasUri(BlobSasBuilder) returns a Uri that generates a Blob Container Service Shared Access Signature (SAS) Uri based on the Client properties and builder passed. The SAS is signed by the shared key credential of the client.

To check if the client is able to sign a Service Sas see CanGenerateSasUri.

For more information, see Constructing a Service SAS.

Declaration
[System.ComponentModel.EditorBrowsable]
public virtual Uri GenerateSasUri (Azure.Storage.Sas.BlobSasBuilder builder, out string stringToSign);
Parameters
BlobSasBuilder builder

Used to generate a Shared Access Signature (SAS).

System.String stringToSign

For debugging purposes only. This string will be overwritten with the string to sign that was used to generate the SAS Uri.

Returns
System.Uri

A Uri containing the SAS Uri.

Remarks

A System.Exception will be thrown if a failure occurs.

GenerateSasUri(BlobContainerSasPermissions, DateTimeOffset, String)

The GenerateSasUri(BlobContainerSasPermissions, DateTimeOffset) returns a Uri that generates a Blob Container Service Shared Access Signature (SAS) Uri based on the Client properties and parameters passed. The SAS is signed by the shared key credential of the client.

To check if the client is able to sign a Service Sas see CanGenerateSasUri.

For more information, see Constructing a service SAS.

Declaration
[System.ComponentModel.EditorBrowsable]
public virtual Uri GenerateSasUri (Azure.Storage.Sas.BlobContainerSasPermissions permissions, DateTimeOffset expiresOn, out string stringToSign);
Parameters
BlobContainerSasPermissions permissions

Required. Specifies the list of permissions to be associated with the SAS. See BlobContainerSasPermissions.

System.DateTimeOffset expiresOn

Required. Specifies the time at which the SAS becomes invalid. This field must be omitted if it has been specified in an associated stored access policy.

System.String stringToSign

For debugging purposes only. This string will be overwritten with the string to sign that was used to generate the SAS Uri.

Returns
System.Uri

A Uri containing the SAS Uri.

Remarks

A System.Exception will be thrown if a failure occurs.

GenerateSasUri(BlobSasBuilder)

The GenerateSasUri(BlobSasBuilder) returns a Uri that generates a Blob Container Service Shared Access Signature (SAS) Uri based on the Client properties and builder passed. The SAS is signed by the shared key credential of the client.

To check if the client is able to sign a Service Sas see CanGenerateSasUri.

For more information, see Constructing a Service SAS.

Declaration
public virtual Uri GenerateSasUri (Azure.Storage.Sas.BlobSasBuilder builder);
Parameters
BlobSasBuilder builder

Used to generate a Shared Access Signature (SAS).

Returns
System.Uri

A Uri containing the SAS Uri.

Remarks

A System.Exception will be thrown if a failure occurs.

GenerateSasUri(BlobContainerSasPermissions, DateTimeOffset)

The GenerateSasUri(BlobContainerSasPermissions, DateTimeOffset) returns a Uri that generates a Blob Container Service Shared Access Signature (SAS) Uri based on the Client properties and parameters passed. The SAS is signed by the shared key credential of the client.

To check if the client is able to sign a Service Sas see CanGenerateSasUri.

For more information, see Constructing a service SAS.

Declaration
public virtual Uri GenerateSasUri (Azure.Storage.Sas.BlobContainerSasPermissions permissions, DateTimeOffset expiresOn);
Parameters
BlobContainerSasPermissions permissions

Required. Specifies the list of permissions to be associated with the SAS. See BlobContainerSasPermissions.

System.DateTimeOffset expiresOn

Required. Specifies the time at which the SAS becomes invalid. This field must be omitted if it has been specified in an associated stored access policy.

Returns
System.Uri

A Uri containing the SAS Uri.

Remarks

A System.Exception will be thrown if a failure occurs.

GenerateUserDelegationSasUri(BlobSasBuilder, UserDelegationKey)

The GenerateUserDelegationSasUri(BlobSasBuilder, UserDelegationKey) returns a Uri representing a Blob Container Service Shared Access Signature (SAS) Uri based on the Client properties and builder passed. The SAS is signed by the user delegation key that is passed in.

For more information, see Creating an user delegation SAS.

Declaration
public virtual Uri GenerateUserDelegationSasUri (Azure.Storage.Sas.BlobSasBuilder builder, Azure.Storage.Blobs.Models.UserDelegationKey userDelegationKey);
Parameters
BlobSasBuilder builder

Required. Used to generate a Shared Access Signature (SAS).

UserDelegationKey userDelegationKey

Required. A UserDelegationKey returned from GetUserDelegationKeyAsync(Nullable<DateTimeOffset>, DateTimeOffset, CancellationToken).

Returns
System.Uri

A Uri containing the SAS Uri.

Remarks

A System.Exception will be thrown if a failure occurs.

GenerateUserDelegationSasUri(BlobContainerSasPermissions, DateTimeOffset, UserDelegationKey)

The GenerateUserDelegationSasUri(BlobContainerSasPermissions, DateTimeOffset, UserDelegationKey) returns a Uri representing a Blob Container Service Shared Access Signature (SAS) Uri based on the Client properties and parameters passed. The SAS is signed by the user delegation key that is passed in.

For more information, see Creating an user delegation SAS.

Declaration
public virtual Uri GenerateUserDelegationSasUri (Azure.Storage.Sas.BlobContainerSasPermissions permissions, DateTimeOffset expiresOn, Azure.Storage.Blobs.Models.UserDelegationKey userDelegationKey);
Parameters
BlobContainerSasPermissions permissions

Required. Specifies the list of permissions to be associated with the SAS. See BlobContainerSasPermissions.

System.DateTimeOffset expiresOn

Required. Specifies the time at which the SAS becomes invalid. This field must be omitted if it has been specified in an associated stored access policy.

UserDelegationKey userDelegationKey

Required. A UserDelegationKey returned from GetUserDelegationKeyAsync(Nullable<DateTimeOffset>, DateTimeOffset, CancellationToken).

Returns
System.Uri

A Uri containing the SAS Uri.

Remarks

A System.Exception will be thrown if a failure occurs.

GenerateUserDelegationSasUri(BlobSasBuilder, UserDelegationKey, String)

The GenerateUserDelegationSasUri(BlobSasBuilder, UserDelegationKey, String) returns a Uri representing a Blob Container Service Shared Access Signature (SAS) Uri based on the Client properties and builder passed. The SAS is signed by the user delegation key that is passed in.

For more information, see Creating an user delegation SAS.

Declaration
[System.ComponentModel.EditorBrowsable]
public virtual Uri GenerateUserDelegationSasUri (Azure.Storage.Sas.BlobSasBuilder builder, Azure.Storage.Blobs.Models.UserDelegationKey userDelegationKey, out string stringToSign);
Parameters
BlobSasBuilder builder

Required. Used to generate a Shared Access Signature (SAS).

UserDelegationKey userDelegationKey

Required. A UserDelegationKey returned from GetUserDelegationKeyAsync(Nullable<DateTimeOffset>, DateTimeOffset, CancellationToken).

System.String stringToSign

For debugging purposes only. This string will be overwritten with the string to sign that was used to generate the SAS Uri.

Returns
System.Uri

A Uri containing the SAS Uri.

Remarks

A System.Exception will be thrown if a failure occurs.

GenerateUserDelegationSasUri(BlobContainerSasPermissions, DateTimeOffset, UserDelegationKey, String)

The GenerateUserDelegationSasUri(BlobContainerSasPermissions, DateTimeOffset, UserDelegationKey, String) returns a Uri representing a Blob Container Service Shared Access Signature (SAS) Uri based on the Client properties and parameters passed. The SAS is signed by the user delegation key that is passed in.

For more information, see Creating an user delegation SAS.

Declaration
[System.ComponentModel.EditorBrowsable]
public virtual Uri GenerateUserDelegationSasUri (Azure.Storage.Sas.BlobContainerSasPermissions permissions, DateTimeOffset expiresOn, Azure.Storage.Blobs.Models.UserDelegationKey userDelegationKey, out string stringToSign);
Parameters
BlobContainerSasPermissions permissions

Required. Specifies the list of permissions to be associated with the SAS. See BlobContainerSasPermissions.

System.DateTimeOffset expiresOn

Required. Specifies the time at which the SAS becomes invalid. This field must be omitted if it has been specified in an associated stored access policy.

UserDelegationKey userDelegationKey

Required. A UserDelegationKey returned from GetUserDelegationKeyAsync(Nullable<DateTimeOffset>, DateTimeOffset, CancellationToken).

System.String stringToSign

For debugging purposes only. This string will be overwritten with the string to sign that was used to generate the SAS Uri.

Returns
System.Uri

A Uri containing the SAS Uri.

Remarks

A System.Exception will be thrown if a failure occurs.

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 Get Container ACL.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContainerAccessPolicy> GetAccessPolicy (Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on getting the blob container's access policy.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response<BlobContainerAccessPolicy>

A Azure.Response describing the container's access policy.

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.

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 Get Container ACL.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContainerAccessPolicy>> GetAccessPolicyAsync (Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on getting the blob container's access policy.

System.Threading.CancellationToken cancellationToken

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

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

A Azure.Response describing the container's access policy.

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.

GetAccountInfo(CancellationToken)

The GetAccountInfo(CancellationToken) operation returns the sku name and account kind for the specified account.

For more information, see Get Account Information.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.AccountInfo> GetAccountInfo (System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response<AccountInfo>

A Azure.Response describing the account.

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.

GetAccountInfoAsync(CancellationToken)

The GetAccountInfoAsync(CancellationToken) operation returns the sku name and account kind for the specified account.

For more information, see Get Account Information.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.AccountInfo>> GetAccountInfoAsync (System.Threading.CancellationToken cancellationToken = null);
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<AccountInfo>>

A Azure.Response describing the account.

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.

GetAppendBlobClientCore(String)

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

Declaration
protected internal virtual Azure.Storage.Blobs.Specialized.AppendBlobClient GetAppendBlobClientCore (string blobName);
Parameters
System.String blobName

The name of the append blob.

Returns
AppendBlobClient

A new AppendBlobClient instance.

GetBlobBaseClientCore(String)

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

Declaration
protected internal virtual Azure.Storage.Blobs.Specialized.BlobBaseClient GetBlobBaseClientCore (string blobName);
Parameters
System.String blobName

The name of the blob.

Returns
BlobBaseClient

A new BlobBaseClient instance.

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.

Declaration
public virtual Azure.Storage.Blobs.BlobClient GetBlobClient (string blobName);
Parameters
System.String blobName

The name of the blob.

Returns
BlobClient

A new BlobClient instance.

GetBlobLeaseClientCore(String)

Initializes a new instance of the BlobLeaseClient class.

Declaration
protected internal virtual Azure.Storage.Blobs.Specialized.BlobLeaseClient GetBlobLeaseClientCore (string leaseId);
Parameters
System.String leaseId

An optional lease ID. If no lease ID is provided, a random lease ID will be created.

Returns
BlobLeaseClient

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 List Blobs.

Declaration
public virtual Azure.Pageable<Azure.Storage.Blobs.Models.BlobItem> GetBlobs (Azure.Storage.Blobs.Models.BlobTraits traits = Azure.Storage.Blobs.Models.BlobTraits.None, Azure.Storage.Blobs.Models.BlobStates states = Azure.Storage.Blobs.Models.BlobStates.None, string prefix = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobTraits traits

Specifies trait options for shaping the blobs.

BlobStates states

Specifies state options for filtering the blobs.

System.String prefix

Specifies a string that filters the results to return only blobs whose name begins with the specified prefix.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Pageable<BlobItem>

An Azure.Pageable of BlobItem describing the blobs in the container.

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.

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 List Blobs.

Declaration
public virtual Azure.AsyncPageable<Azure.Storage.Blobs.Models.BlobItem> GetBlobsAsync (Azure.Storage.Blobs.Models.BlobTraits traits = Azure.Storage.Blobs.Models.BlobTraits.None, Azure.Storage.Blobs.Models.BlobStates states = Azure.Storage.Blobs.Models.BlobStates.None, string prefix = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobTraits traits

Specifies trait options for shaping the blobs.

BlobStates states

Specifies state options for filtering the blobs.

System.String prefix

Specifies a string that filters the results to return only blobs whose name begins with the specified prefix.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.AsyncPageable<BlobItem>

An Azure.AsyncPageable describing the blobs in the container.

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.

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 List Blobs.

Declaration
public virtual Azure.Pageable<Azure.Storage.Blobs.Models.BlobHierarchyItem> GetBlobsByHierarchy (Azure.Storage.Blobs.Models.BlobTraits traits = Azure.Storage.Blobs.Models.BlobTraits.None, Azure.Storage.Blobs.Models.BlobStates states = Azure.Storage.Blobs.Models.BlobStates.None, string delimiter = null, string prefix = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobTraits traits

Specifies trait options for shaping the blobs.

BlobStates states

Specifies state options for filtering the blobs.

System.String delimiter

A delimiter that can be used to traverse a virtual hierarchy of blobs as though it were a file system. The delimiter may be a single character or a string. Prefix will be returned in place of all blobs whose names begin with the same substring up to the appearance of the delimiter character. The value of a prefix is substring+delimiter, where substring is the common substring that begins one or more blob names, and delimiter is the value of delimiter. You can use the value of prefix to make a subsequent call to list the blobs that begin with this prefix, by specifying the value of the prefix for the prefix.

Note that each BlobPrefix element returned counts toward the maximum result, just as each Blob element does.

System.String prefix

Specifies a string that filters the results to return only blobs whose name begins with the specified prefix.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Pageable<BlobHierarchyItem>

An Azure.Pageable of BlobHierarchyItem describing the blobs in the container.

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.

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 List Blobs.

Declaration
public virtual Azure.AsyncPageable<Azure.Storage.Blobs.Models.BlobHierarchyItem> GetBlobsByHierarchyAsync (Azure.Storage.Blobs.Models.BlobTraits traits = Azure.Storage.Blobs.Models.BlobTraits.None, Azure.Storage.Blobs.Models.BlobStates states = Azure.Storage.Blobs.Models.BlobStates.None, string delimiter = null, string prefix = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobTraits traits

Specifies trait options for shaping the blobs.

BlobStates states

Specifies state options for filtering the blobs.

System.String delimiter

A delimiter that can be used to traverse a virtual hierarchy of blobs as though it were a file system. The delimiter may be a single character or a string. Prefix will be returned in place of all blobs whose names begin with the same substring up to the appearance of the delimiter character. The value of a prefix is substring+delimiter, where substring is the common substring that begins one or more blob names, and delimiter is the value of delimiter. You can use the value of prefix to make a subsequent call to list the blobs that begin with this prefix, by specifying the value of the prefix for the prefix.

Note that each BlobPrefix element returned counts toward the maximum result, just as each Blob element does.

System.String prefix

Specifies a string that filters the results to return only blobs whose name begins with the specified prefix.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.AsyncPageable<BlobHierarchyItem>

An Azure.AsyncPageable describing the blobs in the container.

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.

GetBlockBlobClientCore(String)

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

Declaration
protected internal virtual Azure.Storage.Blobs.Specialized.BlockBlobClient GetBlockBlobClientCore (string blobName);
Parameters
System.String blobName

The name of the block blob.

Returns
BlockBlobClient

A new BlockBlobClient instance.

GetPageBlobClientCore(String)

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

Declaration
protected internal virtual Azure.Storage.Blobs.Specialized.PageBlobClient GetPageBlobClientCore (string blobName);
Parameters
System.String blobName

The name of the page blob.

Returns
PageBlobClient

A new PageBlobClient instance.

GetParentBlobServiceClientCore()

Create a new BlobServiceClient that pointing to this BlobContainerClient's blob service. The new BlobServiceClient uses the same request policy pipeline as the BlobContainerClient.

Declaration
protected internal virtual Azure.Storage.Blobs.BlobServiceClient GetParentBlobServiceClientCore ();
Returns
BlobServiceClient

A new BlobServiceClient instance.

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 Get Container Properties.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContainerProperties> GetProperties (Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on getting the blob container's properties.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response<BlobContainerProperties>

A Azure.Response describing the container and its properties.

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.

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 Get Container Properties.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContainerProperties>> GetPropertiesAsync (Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on getting the blob container's properties.

System.Threading.CancellationToken cancellationToken

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

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

A Azure.Response describing the container and its properties.

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.

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 Set Container ACL.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo> SetAccessPolicy (Azure.Storage.Blobs.Models.PublicAccessType accessType = Azure.Storage.Blobs.Models.PublicAccessType.None, System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobSignedIdentifier> permissions = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
PublicAccessType accessType

Optionally specifies whether data in the container may be accessed publicly and the level of access. BlobContainer specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. Blob specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. None specifies that the container data is private to the account owner.

System.Collections.Generic.IEnumerable<BlobSignedIdentifier> permissions

Stored access policies that you can use to provide fine grained control over container permissions.

BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on setting this blob container's access policy.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response<BlobContainerInfo>

A Azure.Response describing the updated container.

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.

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 Set Container ACL.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo>> SetAccessPolicyAsync (Azure.Storage.Blobs.Models.PublicAccessType accessType = Azure.Storage.Blobs.Models.PublicAccessType.None, System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobSignedIdentifier> permissions = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
PublicAccessType accessType

Optionally specifies whether data in the container may be accessed publicly and the level of access. BlobContainer specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. Blob specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. None specifies that the container data is private to the account owner.

System.Collections.Generic.IEnumerable<BlobSignedIdentifier> permissions

Stored access policies that you can use to provide fine grained control over container permissions.

BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on setting this blob container's access policy.

System.Threading.CancellationToken cancellationToken

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

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

A Azure.Response describing the updated container.

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.

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 Set Container Metadata.

Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo> SetMetadata (System.Collections.Generic.IDictionary<string,string> metadata, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Collections.Generic.IDictionary<System.String,System.String> metadata

Custom metadata to set for this container.

BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on the deletion of this container.

System.Threading.CancellationToken cancellationToken

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

Returns
Azure.Response<BlobContainerInfo>

A Azure.Response if successful.

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.

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 Set Container Metadata.

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo>> SetMetadataAsync (System.Collections.Generic.IDictionary<string,string> metadata, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Collections.Generic.IDictionary<System.String,System.String> metadata

Custom metadata to set for this container.

BlobRequestConditions conditions

Optional BlobRequestConditions to add conditions on the deletion of this container.

System.Threading.CancellationToken cancellationToken

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

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

A Azure.Response if successful.

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.

UploadBlob(String, BinaryData, CancellationToken)

The UploadBlob(String, BinaryData, CancellationToken) operation creates a new block 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> UploadBlob (string blobName, BinaryData content, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String blobName

The name of the blob to upload.

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 the blob already exists. To overwrite an existing block blob, get a BlobClient by calling GetBlobClient(String), and then call UploadAsync(Stream, Boolean, CancellationToken) with the override parameter set to true. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadBlob(String, Stream, CancellationToken)

The UploadBlob(String, Stream, CancellationToken) operation creates a new block 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> UploadBlob (string blobName, System.IO.Stream content, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String blobName

The name of the blob to upload.

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 the blob already exists. To overwrite an existing block blob, get a BlobClient by calling GetBlobClient(String), and then call UploadAsync(Stream, Boolean, CancellationToken) with the override parameter set to true. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadBlobAsync(String, BinaryData, CancellationToken)

The UploadBlobAsync(String, BinaryData, CancellationToken) operation creates a new block 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>> UploadBlobAsync (string blobName, BinaryData content, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String blobName

The name of the blob to upload.

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 the blob already exists. To overwrite an existing block blob, get a BlobClient by calling GetBlobClient(String), and then call Upload(Stream, Boolean, CancellationToken) with the override parameter set to true. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

UploadBlobAsync(String, Stream, CancellationToken)

The UploadBlobAsync(String, Stream, CancellationToken) operation creates a new block 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>> UploadBlobAsync (string blobName, System.IO.Stream content, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String blobName

The name of the blob to upload.

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 the blob already exists. To overwrite an existing block blob, get a BlobClient by calling GetBlobClient(String), and then call Upload(Stream, Boolean, CancellationToken) with the override parameter set to true. If multiple failures occur, an System.AggregateException will be thrown, containing each failure instance.

Extension Methods

SpecializedBlobExtensions.GetAppendBlobClient(BlobContainerClient, String)
SpecializedBlobExtensions.GetBlobBaseClient(BlobContainerClient, String)
SpecializedBlobExtensions.GetBlobLeaseClient(BlobContainerClient, String)
SpecializedBlobExtensions.GetBlockBlobClient(BlobContainerClient, String)
SpecializedBlobExtensions.GetPageBlobClient(BlobContainerClient, String)
SpecializedBlobExtensions.GetParentBlobServiceClient(BlobContainerClient)
Back to top Azure SDK for .NET