BlobURL Class

Definition

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.

public class BlobURL extends StorageURL
Inheritance
java.lang.Object
BlobURL

Inherited Members

Constructors

BlobURL(URL url, HttpPipeline pipeline)

Creates aBlobURLĀ 

</code> object pointing to the account specified by the URL and using the provided pipeline to make HTTP requests.</p>

Methods

abortCopyFromURL(String copyId, LeaseAccessConditions leaseAccessConditions, Context context)

Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata. For more information, see the Azure Docs.

acquireLease(String proposedID, int duration, ModifiedAccessConditions modifiedAccessConditions, Context context)

Acquires a lease on the blob for write and delete operations. The lease duration must be between 15 to 60 seconds, or infinite (-1). For more information, see the Azure Docs.

breakLease(Integer breakPeriodInSeconds, ModifiedAccessConditions modifiedAccessConditions, Context context)

BreakLease breaks the blob's previously-acquired lease (if it exists). Pass the LeaseBreakDefault (-1) constant to break a fixed-duration lease when it expires or an infinite lease immediately. For more information, see the Azure Docs.

changeLease(String leaseId, String proposedID, ModifiedAccessConditions modifiedAccessConditions, Context context)

ChangeLease changes the blob's lease ID. For more information, see the Azure Docs.

createSnapshot(Metadata metadata, BlobAccessConditions accessConditions, Context context)

Creates a read-only snapshot of a blob. For more information, see the Azure Docs.

delete(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, BlobAccessConditions accessConditions, Context context)

Deletes the specified blob or snapshot. Note that deleting a blob also deletes all its snapshots. For more information, see the Azure Docs.

download(BlobRange range, BlobAccessConditions accessConditions, boolean rangeGetContentMD5, Context context)

Reads a range of bytes from a blob. The response also includes the blob's properties and metadata. For more information, see the Azure Docs.

Note that the response body has reliable download functionality built in, meaning that a failed download stream will be automatically retried. This behavior may be configured with ReliableDownloadOptions.

getAccountInfo(Context context)

Returns the sku name and account kind for the account. For more information, please see the Azure Docs.

getProperties(BlobAccessConditions accessConditions, Context context)

Returns the blob's metadata and properties. For more information, see the Azure Docs.

releaseLease(String leaseID, ModifiedAccessConditions modifiedAccessConditions, Context context)

Releases the blob's previously-acquired lease. For more information, see the Azure Docs.

renewLease(String leaseID, ModifiedAccessConditions modifiedAccessConditions, Context context)

Renews the blob's previously-acquired lease. For more information, see the Azure Docs.

setHTTPHeaders(BlobHTTPHeaders headers, BlobAccessConditions accessConditions, Context context)

Changes a blob's HTTP header properties. For more information, see the Azure Docs.

setMetadata(Metadata metadata, BlobAccessConditions accessConditions, Context context)

Changes a blob's metadata. For more information, see the Azure Docs.

setTier(AccessTier tier, LeaseAccessConditions leaseAccessConditions, Context context)

Sets the tier on a blob. The operation is allowed on a page blob in a premium storage account or a block blob in a blob storage or GPV2 account. A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines the Hot/Cool/Archive storage type. This does not update the blob's etag.

For detailed information about block blob level tiering see the Azure Docs.

startCopyFromURL(URL sourceURL, Metadata metadata, ModifiedAccessConditions sourceModifiedAccessConditions, BlobAccessConditions destAccessConditions, Context context)

Copies the data at the source URL to a blob. For more information, see the Azure Docs

toAppendBlobURL()

Converts this BlobURL to an AppendBlobURL object. Note that this does not change the actual type of the blob if it has already been created.

toBlockBlobURL()

Converts this BlobURL to a BlockBlobURL object. Note that this does not change the actual type of the blob if it has already been created.

toPageBlobURL()

Converts this BlobURL to a PageBlobURL object. Note that this does not change the actual type of the blob if it has already been created.

undelete(Context context)

Undelete restores the content and metadata of a soft-deleted blob and/or any associated soft-deleted snapshots. For more information, see the Azure Docs.

withPipeline(HttpPipeline pipeline)

Creates a new BlobURL with the given pipeline.

withSnapshot(String snapshot)

Creates a new BlobURL with the given snapshot.

Applies to