BlobContainerClient.ExistsAsync(CancellationToken) Method

Definition

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.

public virtual System.Threading.Tasks.Task<Azure.Response<bool>> ExistsAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member ExistsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<bool>>
override this.ExistsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<bool>>
Public Overridable Function ExistsAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of Boolean))

Parameters

cancellationToken
CancellationToken

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

Returns

Returns true if the container exists.

Remarks

A 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.

Applies to