BlobServiceClient Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The BlobServiceClient allows you to manipulate Azure Storage service resources and blob containers. The storage account provides the top-level namespace for the Blob service.
public class BlobServiceClient
type BlobServiceClient = class
Public Class BlobServiceClient
- Inheritance
-
BlobServiceClient
Constructors
BlobServiceClient() |
Initializes a new instance of the BlobServiceClient class for mocking. |
BlobServiceClient(String, BlobClientOptions) |
Initializes a new instance of the BlobServiceClient class. |
BlobServiceClient(String) |
Initializes a new instance of the BlobServiceClient class. |
BlobServiceClient(Uri, AzureSasCredential, BlobClientOptions) |
Initializes a new instance of the BlobServiceClient class. |
BlobServiceClient(Uri, BlobClientOptions) |
Initializes a new instance of the BlobServiceClient class. |
BlobServiceClient(Uri, StorageSharedKeyCredential, BlobClientOptions) |
Initializes a new instance of the BlobServiceClient class. |
BlobServiceClient(Uri, TokenCredential, BlobClientOptions) |
Initializes a new instance of the BlobServiceClient class. |
Properties
AccountName |
Gets the Storage account name corresponding to the service client. |
CanGenerateAccountSasUri |
Determines whether the client is able to generate a SAS. If the client is authenticated with a StorageSharedKeyCredential. |
Uri |
Gets the blob service's primary Uri endpoint. |
Methods
CreateBlobContainer(String, PublicAccessType, IDictionary<String,String>, CancellationToken) |
The CreateBlobContainer(String, PublicAccessType, IDictionary<String,String>, CancellationToken) operation creates a new blob container under the specified account. If the container with the same name already exists, the operation fails. For more information, see Create Container. |
CreateBlobContainerAsync(String, PublicAccessType, IDictionary<String,String>, CancellationToken) |
The CreateBlobContainerAsync(String, PublicAccessType, IDictionary<String,String>, CancellationToken) operation creates a new blob container under the specified account. If the container with the same name already exists, the operation fails. For more information, see Create Container. |
CreateClient(Uri, BlobClientOptions, HttpPipelinePolicy, HttpPipeline, StorageSharedKeyCredential, AzureSasCredential, TokenCredential) |
Intended for DataLake to create a backing blob client. Initializes a new instance of the BlobServiceClient class. |
DeleteBlobContainer(String, BlobRequestConditions, CancellationToken) |
The DeleteBlobContainer(String, BlobRequestConditions, CancellationToken) operation marks the specified blob container for deletion. The container and any blobs contained within it are later deleted during garbage collection which could take several minutes. For more information, see Delete Container. |
DeleteBlobContainerAsync(String, BlobRequestConditions, CancellationToken) |
The DeleteBlobContainerAsync(String, BlobRequestConditions, CancellationToken) operation marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection which could take several minutes. For more information, see Delete Container. |
FindBlobsByTags(String, CancellationToken) |
The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search expression and only the tags appearing in the expression will be returned. Filter blobs searches across all containers within a storage account but can be scoped within the expression to a single container. For more information, see Find Blobs by Tags. |
FindBlobsByTagsAsync(String, CancellationToken) |
The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search expression. Filter blobs searches across all containers within a storage account but can be scoped within the expression to a single container. For more information, see Find Blobs by Tags. |
GenerateAccountSasUri(AccountSasBuilder) |
The GenerateAccountSasUri(AccountSasBuilder) returns a Uri that generates a Blob Account Shared Access Signature (SAS) 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 CanGenerateAccountSasUri. For more information, see Constructing an Account SAS. |
GenerateAccountSasUri(AccountSasPermissions, DateTimeOffset, AccountSasResourceTypes) |
The GenerateAccountSasUri(AccountSasPermissions, DateTimeOffset, AccountSasResourceTypes) returns a Uri that generates a Blob Account Shared Access Signature (SAS) 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 CanGenerateAccountSasUri. For more information, see Constructing an Account SAS. |
GetAccountInfo(CancellationToken) |
The GetAccountInfo(CancellationToken) operation returns the sku name and account kind for the specified account. For more information, see Get Account Information. |
GetAccountInfoAsync(CancellationToken) |
The GetAccountInfoAsync(CancellationToken) operation returns the sku name and account kind for the specified account. For more information, see Get Account Information. |
GetAuthenticationPolicy(BlobServiceClient) |
Get a BlobServiceClient's authentication HttpPipelinePolicy for creating child clients. |
GetBlobContainerClient(String) |
Create a new BlobContainerClient object by appending
|
GetBlobContainers(BlobContainerTraits, BlobContainerStates, String, CancellationToken) |
The GetBlobContainers(BlobContainerTraits, BlobContainerStates, String, CancellationToken) operation returns a sequence of blob containers in the storage account. Enumerating the blob containers may make multiple requests to the service while fetching all the values. Containers are ordered lexicographically by name. For more information, see List Containers. |
GetBlobContainersAsync(BlobContainerTraits, BlobContainerStates, String, CancellationToken) |
The GetBlobContainersAsync(BlobContainerTraits, BlobContainerStates, String, CancellationToken) operation returns an async sequence of blob containers in the storage account. Enumerating the blob containers may make multiple requests to the service while fetching all the values. Containers are ordered lexicographically by name. For more information, see List Containers. |
GetClientOptions(BlobServiceClient) |
Get a BlobServiceClient's BlobClientOptions for creating child clients. |
GetHttpPipeline(BlobServiceClient) |
Get a BlobServiceClient's HttpPipeline for creating child clients. |
GetProperties(CancellationToken) |
The GetProperties(CancellationToken) operation gets the properties of a storage account’s blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. For more information, see Get Blob Service Properties. |
GetPropertiesAsync(CancellationToken) |
The GetPropertiesAsync(CancellationToken) operation gets the properties of a storage account’s blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. For more information, see Get Blob Service Properties. |
GetStatistics(CancellationToken) |
The GetStatistics(CancellationToken) operation retrieves statistics related to replication for the Blob service. It is only available on the secondary location endpoint when read-access geo-redundant replication (StandardRagrs) is enabled for the storage account. For more information, see Get Blob Service Stats. |
GetStatisticsAsync(CancellationToken) |
The GetStatisticsAsync(CancellationToken) operation retrieves statistics related to replication for the Blob service. It is only available on the secondary location endpoint when read-access geo-redundant replication (StandardRagrs) is enabled for the storage account. For more information, see Get Blob Service Stats. |
GetUserDelegationKey(Nullable<DateTimeOffset>, DateTimeOffset, CancellationToken) |
The GetUserDelegationKey(Nullable<DateTimeOffset>, DateTimeOffset, CancellationToken) operation retrieves a key that can be used to delegate Active Directory authorization to shared access signatures created with BlobSasBuilder. |
GetUserDelegationKeyAsync(Nullable<DateTimeOffset>, DateTimeOffset, CancellationToken) |
The GetUserDelegationKeyAsync(Nullable<DateTimeOffset>, DateTimeOffset, CancellationToken) operation retrieves a key that can be used to delegate Active Directory authorization to shared access signatures created with BlobSasBuilder. |
SetProperties(BlobServiceProperties, CancellationToken) |
The SetProperties(BlobServiceProperties, CancellationToken) operation sets properties for a storage account’s Blob service endpoint, including properties for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. You can also use this operation to set the default request version for all incoming requests to the Blob service that do not have a version specified. For more information, see Set Blob Service Properties. |
SetPropertiesAsync(BlobServiceProperties, CancellationToken) |
The SetPropertiesAsync(BlobServiceProperties, CancellationToken) operation sets properties for a storage account’s Blob service endpoint, including properties for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. You can also use this operation to set the default request version for all incoming requests to the Blob service that do not have a version specified. For more information, see Set Blob Service Properties. |
UndeleteBlobContainer(String, String, CancellationToken) |
Restores a previously deleted container. This API is only functional is Container Soft Delete is enabled for the storage account associated with the container. |
UndeleteBlobContainerAsync(String, String, CancellationToken) |
Restores a previously deleted container. This API is only functional is Container Soft Delete is enabled for the storage account associated with the container. |
Extension Methods
GetChangeFeedClient(BlobServiceClient, BlobChangeFeedClientOptions) |
GetChangeFeedClient. |
GetBlobBatchClient(BlobServiceClient) |
Create a new BlobBatchClient object for the same account as the BlobServiceClient. The new BlobBatchClient uses the same request policy pipeline as the BlobServiceClient. |