BlobServiceClient Class
Definition
Client to a storage account. It may only be instantiated through a BlobServiceClientBuilder. This class does not hold any state about a particular storage account but is instead a convenient way of sending off appropriate requests to the resource on the service. It may also be used to construct URLs to blobs and containers.
This client contains operations on a blob. Operations on a container are available on BlobContainerClient through getBlobContainerClient(String containerName), and operations on a blob are available on BlobClient.
Please see here for more information on containers.
public final class BlobServiceClient
- Inheritance
-
java.lang.ObjectBlobServiceClient
Inherited Members
Methods
| createBlobContainer(String containerName) |
Creates a new container within a storage account. If a container with the same name already exists, the operation fails. For more information, see the Azure Docs. Code Samples
|
| createBlobContainerWithResponse(String containerName, Map<String,String> metadata, PublicAccessType accessType, Context context) |
Creates a new container within a storage account. If a container with the same name already exists, the operation fails. For more information, see the Azure Docs. Code Samples
|
| deleteBlobContainer(String containerName) |
Deletes the specified container in the storage account. If the container doesn't exist the operation fails. For more information see the Azure Docs. Code Samples
|
| deleteBlobContainerWithResponse(String containerName, Context context) |
Deletes the specified container in the storage account. If the container doesn't exist the operation fails. For more information see the Azure Docs. |
| findBlobsByTags(FindBlobsOptions options, Duration timeout, Context context) |
Returns a lazy loaded list of blobs in this account whose tags match the query expression. The returned PagedIterable<T> can be consumed while new items are automatically retrieved as needed. For more information, including information on the query syntax, see the Azure Docs. Code Samples
|
| findBlobsByTags(String query) |
Returns a lazy loaded list of blobs in this account whose tags match the query expression. The returned PagedIterable<T> can be consumed while new items are automatically retrieved as needed. For more information, including information on the query syntax, see the Azure Docs. Code Samples
|
| generateAccountSas(AccountSasSignatureValues accountSasSignatureValues) |
Generates an account SAS for the Azure Storage account using the specified AccountSasSignatureValues. Note : The client must be authenticated via StorageSharedKeyCredential See AccountSasSignatureValues for more information on how to construct an account SAS. Generating an account SAS The snippet below generates an AccountSasSignatureValues object that lasts for two days and gives the user read and list access to blob and file shares.
|
| generateAccountSas(AccountSasSignatureValues accountSasSignatureValues, Context context) |
Generates an account SAS for the Azure Storage account using the specified AccountSasSignatureValues. Note : The client must be authenticated via StorageSharedKeyCredential See AccountSasSignatureValues for more information on how to construct an account SAS. Generating an account SAS The snippet below generates an AccountSasSignatureValues object that lasts for two days and gives the user read and list access to blob and file shares.
|
| getAccountInfo() |
Returns the sku name and account kind for the account. For more information, please see the Azure Docs. Code Samples
|
| getAccountInfoWithResponse(Duration timeout, Context context) |
Returns the sku name and account kind for the account. For more information, please see the Azure Docs. |
| getAccountName() |
Get associated account name. |
| getAccountUrl() |
Gets the URL of the storage account represented by this client. |
| getBlobContainerClient(String containerName) |
Initializes a BlobContainerClient object pointing to the specified container. This method does not create a container. It simply constructs the URL to the container and offers access to methods relevant to containers. Code Samples
|
| getHttpPipeline() |
Gets the HttpPipeline powering this client. |
| getProperties() |
Gets the properties of a storage account\u2019s Blob service. For more information, see the Azure Docs. Code Samples
|
| getPropertiesWithResponse(Duration timeout, Context context) |
Gets the properties of a storage account\u2019s Blob service. For more information, see the Azure Docs. Code Samples
|
| getServiceVersion() |
Gets the service version the client is using. |
| getStatistics() |
Retrieves statistics related to replication for the Blob service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account. For more information, see the Azure Docs. Code Samples
|
| getStatisticsWithResponse(Duration timeout, Context context) |
Retrieves statistics related to replication for the Blob service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account. For more information, see the Azure Docs. Code Samples
|
| getUserDelegationKey(OffsetDateTime start, OffsetDateTime expiry) |
Gets a user delegation key for use with this account's blob storage. Note: This method call is only valid when using TokenCredential in this object's HttpPipeline. Code Samples
|
| getUserDelegationKeyWithResponse(OffsetDateTime start, OffsetDateTime expiry, Duration timeout, Context context) |
Gets a user delegation key for use with this account's blob storage. Note: This method call is only valid when using TokenCredential in this object's HttpPipeline. Code Samples
|
| listBlobContainers() |
Returns a lazy loaded list of containers in this account. The returned PagedIterable<T> can be consumed while new items are automatically retrieved as needed. For more information, see the Azure Docs. Code Samples
|
| listBlobContainers(ListBlobContainersOptions options, Duration timeout) |
Returns a lazy loaded list of containers in this account. The returned PagedIterable<T> can be consumed while new items are automatically retrieved as needed. For more information, see the Azure Docs. Code Samples
|
| setProperties(BlobServiceProperties properties) |
Sets properties for a storage account's Blob service endpoint. For more information, see the Azure Docs. Note that setting the default service version has no effect when using this client because this client explicitly sets the version header on each request, overriding the default. This method checks to ensure the properties being sent follow the specifications indicated in the Azure Docs. If CORS policies are set, CORS parameters that are not set default to the empty string. Code Samples
|
| setPropertiesWithResponse(BlobServiceProperties properties, Duration timeout, Context context) |
Sets properties for a storage account's Blob service endpoint. For more information, see the Azure Docs. Note that setting the default service version has no effect when using this client because this client explicitly sets the version header on each request, overriding the default. This method checks to ensure the properties being sent follow the specifications indicated in the Azure Docs. If CORS policies are set, CORS parameters that are not set default to the empty string. Code Samples
|
| undeleteBlobContainer(String deletedContainerName, String deletedContainerVersion) |
Restores a previously deleted container. If the container associated with provided Code Samples
|
| undeleteBlobContainerWithResponse(UndeleteBlobContainerOptions options, Duration timeout, Context context) |
Restores a previously deleted container. The restored container will be renamed to the Code Samples
|