Package com.azure.storage.blob.options
Class BlockBlobStageBlockFromUrlOptions
java.lang.Object
com.azure.storage.blob.options.BlockBlobStageBlockFromUrlOptions
Extended options that may be passed when staging a block from a source URL.
-
Constructor Summary
ConstructorsConstructorDescriptionBlockBlobStageBlockFromUrlOptions(String base64BlockId, String sourceUrl) Creates a new instance ofBlockBlobStageBlockFromUrlOptions. -
Method Summary
Modifier and TypeMethodDescriptionGets the block ID to assign the new block.Gets the lease ID for accessing source content.com.azure.core.http.HttpAuthorizationGets "Authorization" header for accessing source URL.byte[]Gets the MD5 of the source content.Gets the range of bytes to read from the source.Gets theBlobRequestConditionsfor accessing source content.Optional, only applicable (but required) when the source is Azure Storage Files and using token authentication.Gets the source URL to upload from.setLeaseId(String leaseId) Sets the lease ID for accessing source content.setSourceAuthorization(com.azure.core.http.HttpAuthorization sourceAuthorization) Sets "Authorization" header for accessing source URL.setSourceContentMd5(byte[] sourceContentMd5) Sets the MD5 of the source content.setSourceRange(BlobRange sourceRange) Sets the range of bytes to read from the source.setSourceRequestConditions(BlobRequestConditions sourceRequestConditions) Sets theBlobRequestConditionsfor accessing source content.setSourceShareTokenIntent(FileShareTokenIntent sourceShareTokenIntent) Optional, only applicable (but required) when the source is Azure Storage Files and using token authentication.
-
Constructor Details
-
BlockBlobStageBlockFromUrlOptions
Creates a new instance ofBlockBlobStageBlockFromUrlOptions.- Parameters:
base64BlockId- The block ID to assign the new block.sourceUrl- The source URL to copy from. URLs outside of Azure may only be copied to block blobs.
-
-
Method Details
-
getBase64BlockId
Gets the block ID to assign the new block.- Returns:
- The block ID to assign the new block.
-
getSourceUrl
Gets the source URL to upload from.- Returns:
- The source URL to upload from.
-
getSourceRange
Gets the range of bytes to read from the source.- Returns:
- Range of bytes to read from the source.
-
setSourceRange
Sets the range of bytes to read from the source.- Parameters:
sourceRange- Range of bytes to read from the source.- Returns:
- The updated options.
-
getSourceContentMd5
public byte[] getSourceContentMd5()Gets the MD5 of the source content.- Returns:
- MD5 of the source content.
-
setSourceContentMd5
Sets the MD5 of the source content.- Parameters:
sourceContentMd5- MD5 of the source content.- Returns:
- The updated options.
-
getLeaseId
Gets the lease ID for accessing source content.- Returns:
- Lease ID for accessing source content.
-
setLeaseId
Sets the lease ID for accessing source content.- Parameters:
leaseId- Lease ID for accessing source content.- Returns:
- The updated options.
-
getSourceRequestConditions
Gets theBlobRequestConditionsfor accessing source content.- Returns:
BlobRequestConditionsfor accessing source content.
-
setSourceRequestConditions
public BlockBlobStageBlockFromUrlOptions setSourceRequestConditions(BlobRequestConditions sourceRequestConditions) Sets theBlobRequestConditionsfor accessing source content.- Parameters:
sourceRequestConditions-BlobRequestConditionsfor accessing source content.- Returns:
- The updated options.
-
getSourceAuthorization
public com.azure.core.http.HttpAuthorization getSourceAuthorization()Gets "Authorization" header for accessing source URL. Currently only "Bearer" authentication is accepted by Storage.- Returns:
- auth header to access source.
-
setSourceAuthorization
public BlockBlobStageBlockFromUrlOptions setSourceAuthorization(com.azure.core.http.HttpAuthorization sourceAuthorization) Sets "Authorization" header for accessing source URL. Currently only "Bearer" authentication is accepted by Storage.- Parameters:
sourceAuthorization- auth header to access source.- Returns:
- The updated options.
-