public class BlobURL extends StorageURL
Constructor and Description |
---|
BlobURL(java.net.URL url,
com.microsoft.rest.v2.http.HttpPipeline pipeline)
Creates a new
BlobURL object. |
Modifier and Type | Method and Description |
---|---|
io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobAbortCopyHeaders,java.lang.Void>> |
abortCopy(java.lang.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<com.microsoft.rest.v2.RestResponse<BlobLeaseHeaders,java.lang.Void>> |
acquireLease(java.lang.String proposedID,
int duration,
HTTPAccessConditions httpAccessConditions)
Acquires a lease on the blob for write and delete operations.
|
io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobLeaseHeaders,java.lang.Void>> |
breakLease(java.lang.Integer breakPeriodInSeconds,
HTTPAccessConditions httpAccessConditions)
BreakLease breaks the blob's previously-acquired lease (if it exists).
|
io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobLeaseHeaders,java.lang.Void>> |
changeLease(java.lang.String leaseId,
java.lang.String proposedID,
HTTPAccessConditions httpAccessConditions)
ChangeLease changes the blob's lease ID.
|
io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobTakeSnapshotHeaders,java.lang.Void>> |
createSnapshot(Metadata metadata,
BlobAccessConditions accessConditions)
Creates a read-only snapshot of a blob.
|
io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobDeleteHeaders,java.lang.Void>> |
delete(DeleteSnapshotsOptionType deleteBlobSnapshotOptions,
BlobAccessConditions accessConditions)
Deletes the specified blob or snapshot.
|
io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobGetHeaders,io.reactivex.Flowable<java.nio.ByteBuffer>>> |
getBlob(BlobRange range,
BlobAccessConditions accessConditions,
boolean rangeGetContentMD5)
Reads a range of bytes from a blob.
|
io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobGetPropertiesHeaders,java.lang.Void>> |
getPropertiesAndMetadata(BlobAccessConditions accessConditions)
Returns the blob's metadata and properties.
|
io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobLeaseHeaders,java.lang.Void>> |
releaseLease(java.lang.String leaseID,
HTTPAccessConditions httpAccessConditions)
Releases the blob's previously-acquired lease.
|
io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobLeaseHeaders,java.lang.Void>> |
renewLease(java.lang.String leaseID,
HTTPAccessConditions httpAccessConditions)
Renews the blob's previously-acquired lease.
|
io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobSetMetadataHeaders,java.lang.Void>> |
setMetadata(Metadata metadata,
BlobAccessConditions accessConditions)
Changes a blob's metadata.
|
io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobSetPropertiesHeaders,java.lang.Void>> |
setProperties(BlobHTTPHeaders headers,
BlobAccessConditions accessConditions)
Changes a blob's HTTP header properties.
|
io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobCopyHeaders,java.lang.Void>> |
startCopy(java.net.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(java.lang.String snapshot)
Creates a new
BlobURL with the given snapshot. |
createPipeline, toString, toURL
public BlobURL(java.net.URL url, com.microsoft.rest.v2.http.HttpPipeline pipeline)
BlobURL
object.url
- A java.net.URL
to a blob.pipeline
- An HttpPipeline
for sending requests.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(java.lang.String snapshot) throws java.net.MalformedURLException, java.net.UnknownHostException
BlobURL
with the given snapshot.snapshot
- A String
to set.BlobURL
object with the given pipeline.java.net.MalformedURLException
java.net.UnknownHostException
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<com.microsoft.rest.v2.RestResponse<BlobCopyHeaders,java.lang.Void>> startCopy(java.net.URL sourceURL, Metadata metadata, BlobAccessConditions sourceAccessConditions, BlobAccessConditions destAccessConditions)
sourceURL
- A java.net.URL
representing the source URL to copy from.
URLs outside of Azure may only be copied to block blobs.metadata
- A Metadata
object that specifies key value pairs to set on the blob.sourceAccessConditions
- BlobAccessConditions
object to check against the sourcedestAccessConditions
- BlobAccessConditions
object to check against the destinationSingle
which emits a RestResponse
object containing the BlobCopyHeaders
and
Void
body if successful.public io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobAbortCopyHeaders,java.lang.Void>> abortCopy(java.lang.String copyId, LeaseAccessConditions leaseAccessConditions)
copyId
- A String
representing the copy identifier provided in the x-ms-copy-id header of
the original Copy Blob operation.leaseAccessConditions
- LeaseAccessConditions
object representing lease access conditionsSingle
which emits a RestResponse
object containing the BlobAbortCopyHeaders
and
Void
body if successful.public io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobGetHeaders,io.reactivex.Flowable<java.nio.ByteBuffer>>> getBlob(BlobRange range, BlobAccessConditions accessConditions, boolean rangeGetContentMD5)
range
- A BlobRange
which bytes to read.accessConditions
- A BlobAccessConditions
object that represents the access conditions for the blob.rangeGetContentMD5
- A boolean
indicating if the contentMD5 for the specified blob range should be returned.Single
which emits a RestResponse
object containing the BlobGetHeaders
and a
Flowable
which emits ByteBuffer
as the body if successful.public io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobDeleteHeaders,java.lang.Void>> delete(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, BlobAccessConditions accessConditions)
deleteBlobSnapshotOptions
- A DeleteSnapshotsOptionType
which represents delete snapshot options.accessConditions
- A BlobAccessConditions
object that represents the access conditions for the blob.Single
which emits a RestResponse
object containing the BlobDeleteHeaders
and a
Void
body if successful.public io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobGetPropertiesHeaders,java.lang.Void>> getPropertiesAndMetadata(BlobAccessConditions accessConditions)
accessConditions
- A BlobAccessConditions
object that represents the access conditions for the blob.Single
which emits a RestResponse
containing the BlobGetPropertiesHeaders
and a
Void
body if successful.public io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobSetPropertiesHeaders,java.lang.Void>> setProperties(BlobHTTPHeaders headers, BlobAccessConditions accessConditions)
headers
- A BlobHTTPHeaders
object that specifies which properties to set on the blob.accessConditions
- A BlobAccessConditions
object that specifies under which conditions the operation should
complete.Single
which emits a RestResponse
object containing the BlobSetPropertiesHeaders
and a Void
body if successful.public io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobSetMetadataHeaders,java.lang.Void>> setMetadata(Metadata metadata, BlobAccessConditions accessConditions)
metadata
- A Metadata
object that specifies key value pairs to set on the blob.accessConditions
- A BlobAccessConditions
object that specifies under which conditions the operation should
complete.Single
which emits a RestResponse
object containing the BlobSetMetadataHeaders
and a Void
body if successful.public io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobTakeSnapshotHeaders,java.lang.Void>> createSnapshot(Metadata metadata, BlobAccessConditions accessConditions)
metadata
- A Metadata
object that specifies key value pairs to set on the blob.accessConditions
- A BlobAccessConditions
object that represents the access conditions for the blob.Single
which emits a RestResponse
object containing the BlobTakeSnapshotHeaders
and a Void
body if successful.public io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobLeaseHeaders,java.lang.Void>> acquireLease(java.lang.String proposedID, int duration, HTTPAccessConditions httpAccessConditions)
proposedID
- A String
in any valid GUID format.duration
- A Integer
specifies 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
- A HTTPAccessConditions
object that represents HTTP access conditions.Single
which emits a RestResponse
object containing the BlobLeaseHeaders
and a
Void
body if successful.public io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobLeaseHeaders,java.lang.Void>> renewLease(java.lang.String leaseID, HTTPAccessConditions httpAccessConditions)
leaseID
- A String
representing the lease on the blob.httpAccessConditions
- A HTTPAccessConditions
object that represents HTTP access conditions.Single
which emits a RestResponse
object containing the BlobLeaseHeaders
and a
Void
body if successful.public io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobLeaseHeaders,java.lang.Void>> releaseLease(java.lang.String leaseID, HTTPAccessConditions httpAccessConditions)
leaseID
- A String
representing the lease on the blob.httpAccessConditions
- A HTTPAccessConditions
object that represents HTTP access conditions.Single
which emits a RestResponse
object containing the BlobLeaseHeaders
and a
Void
body if successful.public io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobLeaseHeaders,java.lang.Void>> breakLease(java.lang.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 periodhttpAccessConditions
- A HTTPAccessConditions
object that represents HTTP access conditions.Single
which emits a RestResponse
object containing the BlobLeaseHeaders
and a
Void
body if successful.public io.reactivex.Single<com.microsoft.rest.v2.RestResponse<BlobLeaseHeaders,java.lang.Void>> changeLease(java.lang.String leaseId, java.lang.String proposedID, HTTPAccessConditions httpAccessConditions)
leaseId
- A String
representing the lease ID to change.proposedID
- A String
in any valid GUID format.httpAccessConditions
- A HTTPAccessConditions
object that represents HTTP access conditions.Single
which emits a RestResponse
object containing the BlobLeaseHeaders
and a
Void
body if successful.