public final class CloudBlobClient extends ServiceClient
This class provides a point of access to the Blob service. The service client encapsulates the base URI for the Blob service. If the service client will be used for authenticated access, it also encapsulates the credentials for accessing the storage account.
| Constructor and Description | 
|---|
CloudBlobClient(StorageUri baseUri)
Creates an instance of the  
CloudBlobClient class using the specified Blob service endpoint and
 anonymous credentials. | 
CloudBlobClient(StorageUri storageUri,
               StorageCredentials credentials)
Creates an instance of the  
CloudBlobClient class using the specified Blob service endpoint and
 account credentials. | 
CloudBlobClient(URI baseUri)
Creates an instance of the  
CloudBlobClient class using the specified Blob service endpoint and
 anonymous credentials. | 
CloudBlobClient(URI baseUri,
               StorageCredentials credentials)
Creates an instance of the  
CloudBlobClient class using the specified Blob service endpoint and
 account credentials. | 
| Modifier and Type | Method and Description | 
|---|---|
ServiceProperties | 
downloadServiceProperties()
Retrieves the current  
ServiceProperties for the given storage service. | 
ServiceProperties | 
downloadServiceProperties(BlobRequestOptions options,
                         OperationContext opContext)
Retrieves the current  
ServiceProperties for the given storage service. | 
CloudBlobContainer | 
getContainerReference(String containerName)
Gets a  
CloudBlobContainer object with the specified name. | 
BlobRequestOptions | 
getDefaultRequestOptions()
Gets the  
BlobRequestOptions that is used for requests associated with this CloudBlobClient | 
String | 
getDirectoryDelimiter()
Returns the value for the default delimiter used for cloud blob directories. 
 | 
ServiceStats | 
getServiceStats()
Queries the service for the  
ServiceStats. | 
ServiceStats | 
getServiceStats(BlobRequestOptions options,
               OperationContext opContext)
Queries the given storage service for the  
ServiceStats. | 
Iterable<CloudBlobContainer> | 
listContainers()
Returns an enumerable collection of blob containers for this Blob service client. 
 | 
Iterable<CloudBlobContainer> | 
listContainers(String prefix)
Returns an enumerable collection of blob containers whose names begin with the specified prefix for this Blob
 service client. 
 | 
Iterable<CloudBlobContainer> | 
listContainers(String prefix,
              ContainerListingDetails detailsIncluded,
              BlobRequestOptions options,
              OperationContext opContext)
Returns an enumerable collection of blob containers whose names begin with the specified prefix for this Blob
 service client, using the specified details setting, request options, and operation context. 
 | 
ResultSegment<CloudBlobContainer> | 
listContainersSegmented()
Returns a result segment of an enumerable collection of blob containers for this Blob service client. 
 | 
ResultSegment<CloudBlobContainer> | 
listContainersSegmented(String prefix)
Returns a result segment of an enumerable collection of blob containers whose names begin with the specified
 prefix for this Blob service client. 
 | 
ResultSegment<CloudBlobContainer> | 
listContainersSegmented(String prefix,
                       ContainerListingDetails detailsIncluded,
                       Integer maxResults,
                       ResultContinuation continuationToken,
                       BlobRequestOptions options,
                       OperationContext opContext)
Returns a result segment of an enumerable collection of blob containers whose names begin with the specified
 prefix for this Blob service client, using the specified listing details options, request options, and operation
 context. 
 | 
void | 
setDefaultRequestOptions(BlobRequestOptions defaultRequestOptions)
Sets the  
BlobRequestOptions that is used for any requests associated with this
 CloudBlobClient object. | 
void | 
setDirectoryDelimiter(String directoryDelimiter)
Sets the value for the default delimiter used for cloud blob directories. 
 | 
void | 
uploadServiceProperties(ServiceProperties properties)
Uploads a new  
ServiceProperties configuration to the given storage service. | 
void | 
uploadServiceProperties(ServiceProperties properties,
                       BlobRequestOptions options,
                       OperationContext opContext)
Uploads a new  
ServiceProperties configuration to the given storage service. | 
getCredentials, getEndpoint, getStorageUripublic CloudBlobClient(URI baseUri)
CloudBlobClient class using the specified Blob service endpoint and
 anonymous credentials.baseUri - A java.net.URI object that represents the Blob service endpoint used to create the
            client.public CloudBlobClient(StorageUri baseUri)
CloudBlobClient class using the specified Blob service endpoint and
 anonymous credentials.baseUri - A StorageUri object that represents the Blob service endpoint used to create the
            client.public CloudBlobClient(URI baseUri, StorageCredentials credentials)
CloudBlobClient class using the specified Blob service endpoint and
 account credentials.baseUri - A java.net.URI object that represents the Blob service endpoint used to create the
            client.credentials - A StorageCredentials object that represents the account credentials.public CloudBlobClient(StorageUri storageUri, StorageCredentials credentials)
CloudBlobClient class using the specified Blob service endpoint and
 account credentials.storageUri - A StorageUri object that represents the Blob service endpoint used to create the
            client.credentials - A StorageCredentials object that represents the account credentials.public CloudBlobContainer getContainerReference(String containerName) throws URISyntaxException, StorageException
CloudBlobContainer object with the specified name.containerName - The name of the container, which must adhere to container naming rules. The container name should not
            include any path separator characters (/).
            Container names must be lowercase, between 3-63 characters long and must start with a letter or
            number. Container names may contain only letters, numbers, and the dash (-) character.CloudBlobContainer object.URISyntaxException - If the resource URI constructed based on the containerName is invalid.StorageException - If a storage service error occurred.public String getDirectoryDelimiter()
String which represents the value for the default delimiter.@DoesServiceRequest public Iterable<CloudBlobContainer> listContainers()
CloudBlobContainer objects retrieved lazily that represent the
         containers for this client.@DoesServiceRequest public Iterable<CloudBlobContainer> listContainers(String prefix)
prefix - A String that represents the container name prefix.CloudBlobContainer objects retrieved lazily that represent the
         containers for this client whose names begin with the specified prefix.@DoesServiceRequest public Iterable<CloudBlobContainer> listContainers(String prefix, ContainerListingDetails detailsIncluded, BlobRequestOptions options, OperationContext opContext)
prefix - A String that represents the container name prefix.detailsIncluded - A ContainerListingDetails value that indicates whether container metadata will be returned.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
            null will use the default request options from the associated service client (
            CloudBlobClient).opContext - An OperationContext object that represents the context for the current operation. This object
            is used to track requests to the storage service, and to provide additional runtime information about
            the operation.CloudBlobContainer objects retrieved lazily that represents the
         containers for this client.@DoesServiceRequest public ResultSegment<CloudBlobContainer> listContainersSegmented() throws StorageException
ResultSegment object that contains a segment of the enumerable collection of
         CloudBlobContainer objects that represent the containers for this client.StorageException - If a storage service error occurred.@DoesServiceRequest public ResultSegment<CloudBlobContainer> listContainersSegmented(String prefix) throws StorageException
prefix - A String that represents the prefix of the container name.ResultSegment object that contains a segment of the enumerable collection of
         CloudBlobContainer objects that represent the containers whose names begin with the specified
         prefix.StorageException - If a storage service error occurred.@DoesServiceRequest public ResultSegment<CloudBlobContainer> listContainersSegmented(String prefix, ContainerListingDetails detailsIncluded, Integer maxResults, ResultContinuation continuationToken, BlobRequestOptions options, OperationContext opContext) throws StorageException
prefix - A String that represents the prefix of the container name.detailsIncluded - A ContainerListingDetails value that indicates whether container metadata will be returned.maxResults - The maximum number of results to retrieve.  If null or greater
           than 5000, the server will return up to 5,000 items.  Must be at least 1.continuationToken - A ResultContinuation object that represents a continuation token returned
            by a previous listing operation.options - A BlobRequestOptions object that specifies any additional options for the
            request. Specifying null will use the default request options from
            the associated service client (CloudBlobClient).opContext - An OperationContext object that represents the context for the current
            operation. This object is used to track requests to the storage service,
            and to provide additional runtime information about the operation.ResultSegment object that contains a segment of the enumerable collection of
         CloudBlobContainer objects that represent the containers for this Blob service client.StorageException - If a storage service error occurred.@DoesServiceRequest public ServiceStats getServiceStats() throws StorageException
ServiceStats.ServiceStats object for the given storage service.StorageException - If a storage service error occurred.@DoesServiceRequest public ServiceStats getServiceStats(BlobRequestOptions options, OperationContext opContext) throws StorageException
ServiceStats.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
            null will use the default request options from the associated service client (
            CloudBlobClient).opContext - An OperationContext object that represents the context for the current operation. This object
            is used to track requests to the storage service, and to provide additional runtime information about
            the operation.ServiceStats object for the given storage service.StorageException - If a storage service error occurred.@DoesServiceRequest public final ServiceProperties downloadServiceProperties() throws StorageException
ServiceProperties for the given storage service. This includes Logging,
 HourMetrics, MinuteMetrics and CORS configurations.ServiceProperties object representing the current configuration of the service.StorageException - If a storage service error occurred.@DoesServiceRequest public final ServiceProperties downloadServiceProperties(BlobRequestOptions options, OperationContext opContext) throws StorageException
ServiceProperties for the given storage service. This includes Logging,
 HourMetrics, MinuteMetrics and CORS configurations.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
            null will use the default request options from the associated service client (
            CloudBlobClient).opContext - An OperationContext object that represents the context for the current operation. This object
            is used to track requests to the storage service, and to provide additional runtime information about
            the operation.ServiceProperties object representing the current configuration of the service.StorageException - If a storage service error occurred.@DoesServiceRequest public void uploadServiceProperties(ServiceProperties properties) throws StorageException
ServiceProperties configuration to the given storage service. This includes Logging,
 HourMetrics, MinuteMetrics and CORS configurations.properties - A ServiceProperties object which specifies the service properties to upload.StorageException - If a storage service error occurred.@DoesServiceRequest public void uploadServiceProperties(ServiceProperties properties, BlobRequestOptions options, OperationContext opContext) throws StorageException
ServiceProperties configuration to the given storage service. This includes Logging,
 HourMetrics, MinuteMetrics and CORS configurations.properties - A ServiceProperties object which specifies the service properties to upload.options - A BlobRequestOptions object that specifies any additional options for the request. Specifying
            null will use the default request options from the associated service client (
            CloudBlobClient).opContext - An OperationContext object that represents the context for the current operation. This object
            is used to track requests to the storage service, and to provide additional runtime information about
            the operation.StorageException - If a storage service error occurred.public void setDirectoryDelimiter(String directoryDelimiter)
directoryDelimiter - A String that specifies the value for the default directory delimiter.public BlobRequestOptions getDefaultRequestOptions()
BlobRequestOptions that is used for requests associated with this CloudBlobClientgetDefaultRequestOptions in class ServiceClientBlobRequestOptions object containing the values used by this CloudBlobClientpublic void setDefaultRequestOptions(BlobRequestOptions defaultRequestOptions)
BlobRequestOptions that is used for any requests associated with this
 CloudBlobClient object.defaultRequestOptions - A BlobRequestOptions object which specifies the options to use./** 
* Copyright Microsoft Corporation 
* 
* Licensed under the Apache License, Version 2.0 (the "License"); 
* you may not use this file except in compliance with the License. 
* You may obtain a copy of the License at 
* http://www.apache.org/licenses/LICENSE-2.0 
* 
* Unless required by applicable law or agreed to in writing, software 
* distributed under the License is distributed on an "AS IS" BASIS, 
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
* See the License for the specific language governing permissions and 
* limitations under the License. 
*/