com.microsoft.azure.storage.blob

This package contains the classes for StorageClient. Storage Client.

Classes

AccountSASPermission

This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the values are set, this should be serialized with toString and set as the permissions field on an AccountSASSignatureValues object. It is possible to construct the permissions string without this class, but the order of the permissions is particular and this class guarantees correctness.

AccountSASResourceType

This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value to true means that any SAS which uses these permissions will grant access to that resource type. Once all the values are set, this should be serialized with toString and set as the resources field on an AccountSASSignatureValues object. It is possible to construct the resources string without this class, but the order of the resources is particular and this class guarantees correctness.

AccountSASService

This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value to true means that any SAS which uses these permissions will grant access to that service. Once all the values are set, this should be serialized with toString and set as the services field on an AccountSASSignatureValues object. It is possible to construct the services string without this class, but the order of the services is particular and this class guarantees correctness.

AccountSASSignatureValues

AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once all the values here are set appropriately, call generateSASQueryParameters to obtain a representation of the SAS which can actually be applied to blob urls. Note: that both this class and SASQueryParameters exist because the former is mutable and a logical representation while the latter is immutable and used to generate actual REST requests.

Please see here for more conceptual information on SAS:

Please see here for further descriptions of the parameters, including which are required:

AnonymousCredentials

Anonymous credentials are to be used with with HTTP(S) requests that read blobs from public containers or requests that use a Shared Access Signature (SAS). This is because Anonymous credentials will not set an Authorization header. Pass an instance of this class as the credentials parameter when creating a new pipeline (typically with StorageURL).

AppendBlobAccessConditions

This class contains values that restrict the successful completion of AppendBlock operations to certain conditions. Any field may be set to null if no access conditions are desired.

Please refer to the request header section here for more conceptual information.

AppendBlobURL

Represents a URL to an append blob. It may be obtained by direct construction or via the create method on a ContainerURL object. This class does not hold any state about a particular append blob but is instead a convenient way of sending off appropriate requests to the resource on the service. Please refer to the Azure Docs

BlobAccessConditions

This class contains values which will restrict the successful operation of a variety of requests to the conditions present. These conditions are entirely optional. The entire object or any of its properties may be set to null when passed to a method to indicate that those conditions are not desired. Please refer to the type of each field for more information on those particular access conditions.

BlobListDetails

This type allows users to specify additional information the service should return with each blob when listing blobs in a container (via a ContainerURL object). This type is immutable to ensure thread-safety of requests, so changing the details for a different listing operation requires construction of a new object. Null may be passed if none of the options are desirable.

BlobRange

This is a representation of a range of bytes on a blob, typically used during a download operation. This type is immutable to ensure thread-safety of requests, so changing the values for a different operation requires construction of a new object. Passing null as a BlobRange value will default to the entire range of the blob.

BlobSASPermission

This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the values are set, this should be serialized with toString and set as the permissions field on a ServiceSASSignatureValues object. It is possible to construct the permissions string without this class, but the order of the permissions is particular and this class guarantees correctness.

BlobURL

Represents a URL to a blob of any type: block, append, or page. It may be obtained by direct construction or via the create method on a ContainerURL object. This class does not hold any state about a particular blob but is instead a convenient way of sending off appropriate requests to the resource on the service. Please refer to the Azure Docs for more information.

BlobURLParts

A BlobURLParts object represents the components that make up an Azure Storage Container/Blob URL. You may parse an existing URL into its parts with the URLParser class. You may construct a URL from parts by calling toURL(). It is also possible to use the empty constructor to build a blobURL from scratch. NOTE: Changing any SAS-related field requires computing a new SAS signature.

BlockBlobURL

Represents a URL to a block blob. It may be obtained by direct construction or via the create method on a ContainerURL object. This class does not hold any state about a particular blob but is instead a convenient way of sending off appropriate requests to the resource on the service. Please refer to the Azure Docs for more information on block blobs.

CommonRestResponse

A generic wrapper for any type of blob REST API response. Used and returned by methods in the TransferManager class. The methods there return this type because they represent composite operations which may conclude with any of several possible REST calls depending on the data provided.

ContainerAccessConditions

This class contains values which will restrict the successful operation of a variety of requests to the conditions present. These conditions are entirely optional. The entire object or any of its properties may be set to null when passed to a method to indicate that those conditions are not desired. Please refer to the type of each field for more information on those particular access conditions.

ContainerListDetails

This type allows users to specify additional information the service should return with each container when listing containers in an account (via a ServiceURL object). This type is immutable to ensure thread-safety of requests, so changing the details for a different listing operation requires construction of a new object. Null may be passed if none of the options are desirable.

ContainerSASPermission

This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the values are set, this should be serialized with toString and set as the permissions field on a ServiceSASSignatureValues object. It is possible to construct the permissions string without this class, but the order of the permissions is particular and this class guarantees correctness.

ContainerURL

Represents a URL to a container. It may be obtained by direct construction or via the create method on a ServiceURL object. This class does not hold any state about a particular blob 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. Please refer to the Azure Docs for more information on containers.

DownloadResponse

DownloadResponse  wraps the protocol-layer response from BlobAccessConditions, boolean, com.microsoft.rest.v2.Context) to automatically retry failed reads from the body as appropriate. If the download is interrupted, theDownloadResponse  will make a request to resume the download from where it left off, allowing the user to consume the data as one continuous stream, for any interruptions are hidden. The retry behavior is defined by the options passed to the body(ReliableDownloadOptions). The download will also lock on the blob's etag to ensure consistency.

Note that the retries performed as a part of this reader are composed with those of any retries in an HttpPipeline used in conjunction with this reader. That is, if this object issues a request to resume a download, an underlying pipeline may issue several retries as a part of that request. Furthermore, this reader only retries on network errors; timeouts and unexpected status codes are not retried. Therefore, the behavior of this reader is entirely independent of and in no way coupled to an HttpPipeline's retry mechanism.

GeneratedAppendBlobs

An instance of this class provides access to all the operations defined in GeneratedAppendBlobs.

GeneratedBlobs

An instance of this class provides access to all the operations defined in GeneratedBlobs.

GeneratedBlockBlobs

An instance of this class provides access to all the operations defined in GeneratedBlockBlobs.

GeneratedContainers

An instance of this class provides access to all the operations defined in GeneratedContainers.

GeneratedPageBlobs

An instance of this class provides access to all the operations defined in GeneratedPageBlobs.

GeneratedServices

An instance of this class provides access to all the operations defined in GeneratedServices.

GeneratedStorageClient

Initializes a new instance of the GeneratedStorageClient type.

IPRange

This type specifies a continuous range of IP addresses. It is used to limit permissions on SAS tokens. Null may be set if it is not desired to confine the sas permissions to an IP range. Please refer to AccountSASSignatureValues or ServiceSASSignatureValues for more information.

ListBlobsOptions

Defines options available to configure the behavior of a call to listBlobsFlatSegment on a ContainerURL object. See the constructor for details on each of the options.

ListContainersOptions

Defines options available to configure the behavior of a call to listContainersSegment on a ServiceURL object. See the constructor for details on each of the options. Null may be passed in place of an object of this type if no options are desirable.

LoggingFactory

This is a factory which creates policies in an HttpPipeline for logging requests and responses. In most cases, it is sufficient to configure an object of the LoggingOptions type and set those as a field on a PipelineOptions structure to configure a default pipeline. The factory and policy must only be used directly when creating a custom pipeline.

LoggingOptions

Options to configure the LoggingFactory. Please refer to the Factory for more information.

Metadata

Contains metadata key/value pairs to be associated with a storage resource. The user may store any additional information about the resource that they like using this map. It is passed to create and setMetadata methods on any URL type. Null may be passed to set no metadata.

PageBlobAccessConditions

This class contains values that restrict the successful completion of PageBlob operations to certain conditions. It may be set to null if no access conditions are desired.

Please refer to the request header section here for more conceptual information.

PageBlobURL

Represents a URL to a page blob. It may be obtained by direct construction or via the create method on a ContainerURL object. This class does not hold any state about a particular blob but is instead a convenient way of sending off appropriate requests to the resource on the service. Please refer to the Azure Docs for more information.

PipelineOptions

This type encapsulates all the possible configuration for the default pipeline. It may be passed to the createPipeline method on StorageURL. All the options fields have default values if nothing is passed, and no logger will be used if it is not set. An HttpClient must be set, however.

ProgressReporter

ProgressReporterImpl  offers a convenient way to add progress tracking to a given Flowable.

ReliableDownloadOptions

ReliableDownloadOptions  contains properties which help theFlowable  returned from DownloadResponse#body(ReliableDownloadOptions) determine when to retry.

RequestIDFactory

This is a factory which creates policies in an HttpPipeline for setting a unique request ID in the x-ms-client-request-id header as is required for all requests to the service. In most cases, it is sufficient to allow the default pipeline to add this factory automatically and assume that it works. The factory and policy must only be used directly when creating a custom pipeline.

RequestRetryFactory

This is a factory which creates policies in an HttpPipeline for retrying a given HTTP request. The request that is retried will be identical each time it is reissued. In most cases, it is sufficient to configure a RequestRetryOptions object and set those as a field on a PipelineOptions object to configure a default pipeline. Retries will try against a secondary if one is specified and the type of operation/error indicates that the secondary can handle the request. Exponential and fixed backoff are supported. The factory and policy must only be used directly when creating a custom pipeline.

RequestRetryOptions

Options for configuring the RequestRetryFactory. Please refer to the Factory for more information. Note that there is no option for overall operation timeout. This is because Rx object have a timeout field which provides this functionality.

SASQueryParameters

Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly by the user; it is only generated by the AccountSASSignatureValues and ServiceSASSignatureValues types. Once generated, it can be set on a BlobURLParts object to be constructed as part of a URL or it can be encoded into aString  and appended to a URL directly (though caution should be taken here in case there are existing query parameters, which might affect the appropriate means of appending these query parameters). NOTE: Instances of this class are immutable to ensure thread safety.

ServiceSASSignatureValues

ServiceSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage service. Once all the values here are set appropriately, call generateSASQueryParameters to obtain a representation of the SAS which can actually be applied to blob urls. Note: that both this class and SASQueryParameters exist because the former is mutable and a logical representation while the latter is immutable and used to generate actual REST requests.

Please see here for more conceptual information on SAS.

Please see here for more details on each value, including which are required.

ServiceURL

Represents a URL to a blob service. 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. Please see here for more information on containers.

SharedKeyCredentials

SharedKeyCredentials are a means of signing and authenticating storage requests. The key can be obtained from the Azure portal. This factory will create policies which take care of all the details of creating strings to sign, signing them, and setting the Authentication header. While this is a common way of authenticating with the service, recommended practice is using TokenCredentials. Pass this as the credentials in the construction of a new HttpPipeline via the StorageURL type.

StorageException

AStorageException  is thrown whenever Azure Storage successfully returns an error code that is not 200-level. Users can inspect the status code and error code to determine the cause of the error response. The exception message may also contain more detailed information depending on the type of error. The user may also inspect the raw HTTP response or call toString to get the full payload of the error response if present. Note that even some expected "errors" will be thrown as aStorageException  . For example, some users may perform a getProperties request on an entity to determine whether it exists or not. If it does not exists, an exception will be thrown even though this may be considered an expected indication of absence in this case.

StorageURL

Represents a URL to a Azure storage object. Typically this class is only needed to generate a new pipeline. In most cases, one of the other URL types will be more useful.

TelemetryFactory

This is a factory which creates policies in an HttpPipeline for adding telemetry to a given HTTP request. In most cases, it is sufficient to configure a TelemetryOptions object and set those as a field on a PipelineOptions object to configure a default pipeline. The factory and policy must only be used directly when creating a custom pipeline.

TelemetryOptions

Options for configuring the TelemetryFactory. Please refer to the Factory for more information.

TokenCredentials

TokenCredentials are a means of authenticating requests to Azure Storage via OAuth user tokens. This is the preferred way of authenticating with Azure Storage.

TransferManager

This class contains a collection of methods (and structures associated with those methods) which perform higher-level operations. Whereas operations on the URL types guarantee a single REST request and make no assumptions on desired behavior, these methods will often compose several requests to provide a convenient way of performing more complex operations. Further, we will make our own assumptions and optimizations for common cases that may not be ideal for rarer cases.

TransferManagerDownloadFromBlobOptions

Configures the parallel download behavior for methods on the TransferManager.

TransferManagerUploadToBlockBlobOptions

Configures the parallel upload behavior for methods on the TransferManager.

URLParser

A class used to conveniently parse URLs into BlobURLParts to modify the components of the URL.

Interfaces

ICredentials

Credentials represent any credential type it is used to create a credential policy Factory.

IProgressReceiver

AnIProgressReceiver  is an object that can be used to report progress on network transfers. When specified on transfer operations, thereportProgress  method will be called periodically with the total number of bytes transferred. The user may configure this method to report progress in whatever format desired. It is recommended that this type be used in conjunction with ProgressReporter#addProgressReporting(Flowable, IProgressReceiver).

Enums

RetryPolicyType

This type holds possible options for retry backoff algorithms. They may be used with RequestRetryOptions.

SASProtocol

Specifies the set of possible permissions for a shared access signature protocol. Values of this type can be used to set the fields on the AccountSASSignatureValues and ServiceSASSignatureValues types.