BlobContainerClient Class
Definition
Client to a container. It may only be instantiated through a BlobContainerClientBuilder or via the method getBlobContainerClient(String containerName). This class does not hold any state about a particular container 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.
This client contains operations on a container. Operations on a blob are available on BlobClient through getBlobClient(String blobName), and operations on the service are available on BlobServiceClient.
Please refer to the Azure Docs for more information on containers.
public final class BlobContainerClient
- Inheritance
-
java.lang.ObjectBlobContainerClient
Inherited Members
Fields
| LOG_CONTAINER_NAME |
Special container name for the logs container in the Storage account. |
| ROOT_CONTAINER_NAME |
Special container name for the root container in the Storage account. |
| STATIC_WEBSITE_CONTAINER_NAME |
Special container name for the static website container in the Storage account. |
Methods
| create() |
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
|
| createWithResponse(Map<String,String> metadata, PublicAccessType accessType, Duration timeout, 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
|
| delete() |
Marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection. For more information, see the Azure Docs. Code Samples
|
| deleteWithResponse(BlobRequestConditions requestConditions, Duration timeout, Context context) |
Marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection. For more information, see the Azure Docs. Code Samples
|
| exists() |
Gets if the container this client represents exists in the cloud. Code Samples
|
| existsWithResponse(Duration timeout, Context context) |
Gets if the container this client represents exists in the cloud. Code Samples
|
| 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 container 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 TODO
|
| generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues) |
Generates a service SAS for the container using the specified BlobServiceSasSignatureValues Note : The client must be authenticated via StorageSharedKeyCredential See BlobServiceSasSignatureValues for more information on how to construct a service SAS. Code Samples
|
| generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, Context context) |
Generates a service SAS for the container using the specified BlobServiceSasSignatureValues Note : The client must be authenticated via StorageSharedKeyCredential See BlobServiceSasSignatureValues for more information on how to construct a service SAS. Code Samples
|
| generateUserDelegationSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, UserDelegationKey userDelegationKey) |
Generates a user delegation SAS for the container using the specified BlobServiceSasSignatureValues. See BlobServiceSasSignatureValues for more information on how to construct a user delegation SAS. Code Samples
|
| generateUserDelegationSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, UserDelegationKey userDelegationKey, String accountName, Context context) |
Generates a user delegation SAS for the container using the specified BlobServiceSasSignatureValues. See BlobServiceSasSignatureValues for more information on how to construct a user delegation SAS. Code Samples
|
| getAccessPolicy() |
Returns the container's permissions. The permissions indicate whether container's blobs may be accessed publicly. For more information, see the Azure Docs. Code Samples
|
| getAccessPolicyWithResponse(String leaseId, Duration timeout, Context context) |
Returns the container's permissions. The permissions indicate whether container's blobs may be accessed publicly. For more information, see the Azure Docs. Code Samples
|
| getAccountInfo(Duration timeout) |
Returns the sku name and account kind for the account. For more information, please see the Azure Docs. |
| getAccountInfoWithResponse(Duration timeout, Context context) |
Returns the sku name and account kind for the account. For more information, please see the Azure Docs. Code Samples
|
| getAccountName() |
Get associated account name. |
| getAccountUrl() |
Get the url of the storage account. |
| getBlobClient(String blobName) |
Initializes a new BlobClient object by concatenating blobName to the end of ContainerAsyncClient's URL. The new BlobClient uses the same request policy pipeline as the ContainerAsyncClient. |
| getBlobClient(String blobName, String snapshot) |
Initializes a new BlobClient object by concatenating blobName to the end of ContainerAsyncClient's URL. The new BlobClient uses the same request policy pipeline as the ContainerAsyncClient. Code Samples
|
| getBlobContainerName() |
Get the container name. Code Samples
|
| getBlobContainerUrl() |
Gets the URL of the container represented by this client. |
| getBlobVersionClient(String blobName, String versionId) |
Initializes a new BlobClient object by concatenating blobName to the end of ContainerAsyncClient's URL. The new BlobClient uses the same request policy pipeline as the ContainerAsyncClient. |
| getCustomerProvidedKey() |
Gets the CpkInfo associated with this client that will be passed to BlobClient when getBlobClient(String blobName) is called. |
| getEncryptionScope() |
Gets the |
| getHttpPipeline() |
Gets the HttpPipeline powering this client. |
| getProperties() |
Returns the container's metadata and system properties. For more information, see the Azure Docs. Code Samples
|
| getPropertiesWithResponse(String leaseId, Duration timeout, Context context) |
Returns the container's metadata and system properties. For more information, see the Azure Docs. Code Samples
|
| getServiceClient() |
Get a client pointing to the account. |
| getServiceVersion() |
Gets the service version the client is using. |
| listBlobs() |
Returns a lazy loaded list of blobs in this container, with folder structures flattened. The returned PagedIterable<T> can be consumed through while new items are automatically retrieved as needed. Blob names are returned in lexicographic order. For more information, see the Azure Docs. Code Samples
|
| listBlobs(ListBlobsOptions options, String continuationToken, Duration timeout) |
Returns a lazy loaded list of blobs in this container, with folder structures flattened. The returned PagedIterable<T> can be consumed through while new items are automatically retrieved as needed. Blob names are returned in lexicographic order. For more information, see the Azure Docs. Code Samples
|
| listBlobs(ListBlobsOptions options, Duration timeout) |
Returns a lazy loaded list of blobs in this container, with folder structures flattened. The returned PagedIterable<T> can be consumed through while new items are automatically retrieved as needed. Blob names are returned in lexicographic order. For more information, see the Azure Docs. Code Samples
|
| listBlobsByHierarchy(String directory) |
Returns a reactive Publisher emitting all the blobs and directories (prefixes) under the given directory (prefix). Directories will have isPrefix() set to true. Blob names are returned in lexicographic order. For more information, see the Azure Docs. E.g. listing a container containing a 'foo' folder, which contains blobs 'foo1' and 'foo2', and a blob on the root level 'bar', will return the following results when prefix=null:
will return the following results when prefix="foo/":
Code Samples
|
| listBlobsByHierarchy(String delimiter, ListBlobsOptions options, Duration timeout) |
Returns a reactive Publisher emitting all the blobs and prefixes (directories) under the given prefix (directory). Directories will have isPrefix() set to true. Blob names are returned in lexicographic order. For more information, see the Azure Docs. E.g. listing a container containing a 'foo' folder, which contains blobs 'foo1' and 'foo2', and a blob on the root level 'bar', will return the following results when prefix=null:
will return the following results when prefix="foo/":
Code Samples
|
| setAccessPolicy(PublicAccessType accessType, List<BlobSignedIdentifier> identifiers) |
Sets the container's permissions. The permissions indicate whether blobs in a container may be accessed publicly. Note that, for each signed identifier, we will truncate the start and expiry times to the nearest second to ensure the time formatting is compatible with the service. For more information, see the Azure Docs. Code Samples
|
| setAccessPolicyWithResponse(PublicAccessType accessType, List<BlobSignedIdentifier> identifiers, BlobRequestConditions requestConditions, Duration timeout, Context context) |
Sets the container's permissions. The permissions indicate whether blobs in a container may be accessed publicly. Note that, for each signed identifier, we will truncate the start and expiry times to the nearest second to ensure the time formatting is compatible with the service. For more information, see the Azure Docs. Code Samples
|
| setMetadata(Map<String,String> metadata) |
Sets the container's metadata. For more information, see the Azure Docs. Code Samples
|
| setMetadataWithResponse(Map<String,String> metadata, BlobRequestConditions requestConditions, Duration timeout, Context context) |
Sets the container's metadata. For more information, see the Azure Docs. Code Samples
|