public class BlobURL extends StorageURL
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.storageClient
Constructor and Description |
---|
BlobURL(URL url,
com.microsoft.rest.v2.http.HttpPipeline pipeline)
Creates a new
BlobURL object. |
Modifier and Type | Method and Description |
---|---|
io.reactivex.Single<BlobsAbortCopyFromURLResponse> |
abortCopyFromURL(String copyId,
LeaseAccessConditions leaseAccessConditions)
Stops a pending copy that was previously started and leaves a destination blob with 0 length and metadata.
|
io.reactivex.Single<BlobsAcquireLeaseResponse> |
acquireLease(String proposedID,
int duration,
HTTPAccessConditions httpAccessConditions)
Acquires a lease on the blob for write and delete operations.
|
io.reactivex.Single<BlobsBreakLeaseResponse> |
breakLease(Integer breakPeriodInSeconds,
HTTPAccessConditions httpAccessConditions)
BreakLease breaks the blob's previously-acquired lease (if it exists).
|
io.reactivex.Single<BlobsChangeLeaseResponse> |
changeLease(String leaseId,
String proposedID,
HTTPAccessConditions httpAccessConditions)
ChangeLease changes the blob's lease ID.
|
io.reactivex.Single<BlobsCreateSnapshotResponse> |
createSnapshot(Metadata metadata,
BlobAccessConditions accessConditions)
Creates a read-only snapshot of a blob.
|
io.reactivex.Single<BlobsDeleteResponse> |
delete(DeleteSnapshotsOptionType deleteBlobSnapshotOptions,
BlobAccessConditions accessConditions)
Deletes the specified blob or snapshot.
|
io.reactivex.Single<BlobsDownloadResponse> |
download(BlobRange range,
BlobAccessConditions accessConditions,
boolean rangeGetContentMD5)
Reads a range of bytes from a blob.
|
io.reactivex.Single<BlobsGetPropertiesResponse> |
getProperties(BlobAccessConditions accessConditions)
Returns the blob's metadata and properties.
|
io.reactivex.Single<BlobsReleaseLeaseResponse> |
releaseLease(String leaseID,
HTTPAccessConditions httpAccessConditions)
Releases the blob's previously-acquired lease.
|
io.reactivex.Single<BlobsRenewLeaseResponse> |
renewLease(String leaseID,
HTTPAccessConditions httpAccessConditions)
Renews the blob's previously-acquired lease.
|
io.reactivex.Single<BlobsSetHTTPHeadersResponse> |
setHTTPHeaders(BlobHTTPHeaders headers,
BlobAccessConditions accessConditions)
Changes a blob's HTTP header properties.
|
io.reactivex.Single<BlobsSetMetadataResponse> |
setMetadata(Metadata metadata,
BlobAccessConditions accessConditions)
Changes a blob's metadata.
|
io.reactivex.Single<BlobsStartCopyFromURLResponse> |
startCopyFromURL(URL sourceURL,
Metadata metadata,
BlobAccessConditions sourceAccessConditions,
BlobAccessConditions destAccessConditions)
Copies the data at the source URL to a blob.
|
AppendBlobURL |
toAppendBlobURL()
Converts this BlobURL to an
AppendBlobURL object. |
BlockBlobURL |
toBlockBlobURL()
Converts this BlobURL to a
BlockBlobURL object. |
PageBlobURL |
toPageBlobURL()
Converts this BlobURL to a
PageBlobURL object. |
BlobURL |
withPipeline(com.microsoft.rest.v2.http.HttpPipeline pipeline)
Creates a new
BlobURL with the given pipeline. |
BlobURL |
withSnapshot(String snapshot)
Creates a new
BlobURL with the given snapshot. |
appendToURLPath, createPipeline, toString, toURL
public BlobURL withPipeline(com.microsoft.rest.v2.http.HttpPipeline pipeline)
BlobURL
with the given pipeline.pipeline
- An HttpPipeline
object to set.BlobURL
object with the given pipeline.public BlobURL withSnapshot(String snapshot) throws MalformedURLException, UnknownHostException
BlobURL
with the given snapshot.snapshot
- A String
to set.BlobURL
object with the given pipeline.MalformedURLException
- Appending the specified snapshot produced an invalid URL.UnknownHostException
- If the url contains an improperly formatted ipaddress or unknown host address.public BlockBlobURL toBlockBlobURL()
BlockBlobURL
object. Note that this does not change the actual type of the
blob if it has already been created.BlockBlobURL
object.public AppendBlobURL toAppendBlobURL()
AppendBlobURL
object. Note that this does not change the actual type of the
blob if it has already been created.AppendBlobURL
object.public PageBlobURL toPageBlobURL()
PageBlobURL
object. Note that this does not change the actual type of the blob
if it has already been created.PageBlobURL
object.public io.reactivex.Single<BlobsStartCopyFromURLResponse> startCopyFromURL(URL sourceURL, Metadata metadata, BlobAccessConditions sourceAccessConditions, BlobAccessConditions destAccessConditions)
sourceURL
- The source URL to copy from. URLs outside of Azure may only be copied to block blobs.metadata
- Metadata
sourceAccessConditions
- BlobAccessConditions
against the source.destAccessConditions
- BlobAccessConditions
against the destination.public io.reactivex.Single<BlobsAbortCopyFromURLResponse> abortCopyFromURL(String copyId, LeaseAccessConditions leaseAccessConditions)
copyId
- The id of the copy operation to abort. Returned as the copyId
field on the
BlobsStartCopyFromURLHeaders
object.leaseAccessConditions
- LeaseAccessConditions
public io.reactivex.Single<BlobsDownloadResponse> download(BlobRange range, BlobAccessConditions accessConditions, boolean rangeGetContentMD5)
range
- BlobRange
accessConditions
- BlobAccessConditions
rangeGetContentMD5
- Whether the contentMD5 for the specified blob range should be returned.public io.reactivex.Single<BlobsDeleteResponse> delete(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, BlobAccessConditions accessConditions)
deleteBlobSnapshotOptions
- Specifies the behavior for deleting the snapshots on this blob. Include
will delete the base blob
and all snapshots. Only
will delete only the snapshots. If a snapshot is being deleted, you must
pass null.accessConditions
- BlobAccessConditions
public io.reactivex.Single<BlobsGetPropertiesResponse> getProperties(BlobAccessConditions accessConditions)
accessConditions
- BlobAccessConditions
public io.reactivex.Single<BlobsSetHTTPHeadersResponse> setHTTPHeaders(BlobHTTPHeaders headers, BlobAccessConditions accessConditions)
headers
- BlobHTTPHeaders
accessConditions
- BlobAccessConditions
public io.reactivex.Single<BlobsSetMetadataResponse> setMetadata(Metadata metadata, BlobAccessConditions accessConditions)
metadata
- Metadata
accessConditions
- BlobAccessConditions
public io.reactivex.Single<BlobsCreateSnapshotResponse> createSnapshot(Metadata metadata, BlobAccessConditions accessConditions)
metadata
- Metadata
accessConditions
- BlobAccessConditions
public io.reactivex.Single<BlobsAcquireLeaseResponse> acquireLease(String proposedID, int duration, HTTPAccessConditions httpAccessConditions)
proposedID
- A String
in any valid GUID format. May be null.duration
- The duration of the lease, in seconds, or negative one (-1) for a lease that
never expires. A non-infinite lease can be between 15 and 60 seconds.httpAccessConditions
- HTTPAccessConditions
public io.reactivex.Single<BlobsRenewLeaseResponse> renewLease(String leaseID, HTTPAccessConditions httpAccessConditions)
leaseID
- The leaseId of the active lease on the blob.httpAccessConditions
- HTTPAccessConditions
public io.reactivex.Single<BlobsReleaseLeaseResponse> releaseLease(String leaseID, HTTPAccessConditions httpAccessConditions)
leaseID
- The leaseId of the active lease on the blob.httpAccessConditions
- HTTPAccessConditions
public io.reactivex.Single<BlobsBreakLeaseResponse> breakLease(Integer breakPeriodInSeconds, HTTPAccessConditions httpAccessConditions)
breakPeriodInSeconds
- An optional Integer
representing the proposed duration of seconds that the lease should continue
before it is broken, between 0 and 60 seconds. This break period is only used if it is shorter than the time
remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be
available before the break period has expired, but the lease may be held for longer than the break period.httpAccessConditions
- HTTPAccessConditions
public io.reactivex.Single<BlobsChangeLeaseResponse> changeLease(String leaseId, String proposedID, HTTPAccessConditions httpAccessConditions)
leaseId
- The leaseId of the active lease on the blob.proposedID
- A String
in any valid GUID format.httpAccessConditions
- HTTPAccessConditions
Copyright © 2018. All rights reserved.