Package com.azure.storage.blob.options
Class BlobUploadFromUrlOptions
java.lang.Object
com.azure.storage.blob.options.BlobUploadFromUrlOptions
Extended options that may be passed when uploading a Block Blob from URL.
-
Constructor Summary
ConstructorsConstructorDescriptionBlobUploadFromUrlOptions
(String sourceUrl) Creates a new instance ofBlobUploadFromUrlOptions
. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Gets the MD5 hash of the content.Gets the copy source tags modeGets theBlobRequestConditions
.Gets theBlobHttpHeaders
.com.azure.core.http.HttpAuthorization
Gets "Authorization" header for accessing source URL.Gets theBlobRequestConditions
.Gets the source URL to upload from.getTags()
Gets the tags to associate with the blob.getTier()
Gets theAccessTier
.Optional, default is true.setContentMd5
(byte[] contentMd5) Sets the MD5 hash of the content.setCopySourceBlobProperties
(Boolean copySourceBlobProperties) Optional, default is true.setCopySourceTagsMode
(BlobCopySourceTagsMode copySourceTags) Sets the copy source tags modesetDestinationRequestConditions
(BlobRequestConditions destinationRequestConditions) Sets theBlobRequestConditions
.setHeaders
(BlobHttpHeaders headers) Sets theBlobHttpHeaders
.setSourceAuthorization
(com.azure.core.http.HttpAuthorization sourceAuthorization) Sets "Authorization" header for accessing source URL.setSourceRequestConditions
(BlobRequestConditions sourceRequestConditions) Sets theBlobRequestConditions
.Sets the tags to associate with the blob.setTier
(AccessTier tier) Sets theAccessTier
.
-
Constructor Details
-
BlobUploadFromUrlOptions
Creates a new instance ofBlobUploadFromUrlOptions
.- Parameters:
sourceUrl
- The source URL to upload from.
-
-
Method Details
-
getSourceUrl
Gets the source URL to upload from.- Returns:
- The source URL to upload from.
-
getHeaders
Gets theBlobHttpHeaders
.- Returns:
BlobHttpHeaders
-
setHeaders
Sets theBlobHttpHeaders
.- Parameters:
headers
-BlobHttpHeaders
- Returns:
- The updated options
-
getTags
Gets the tags to associate with the blob.- Returns:
- The tags to associate with the blob.
-
setTags
Sets the tags to associate with the blob.- Parameters:
tags
- The tags to associate with the blob.- Returns:
- The updated options.
-
getTier
Gets theAccessTier
.- Returns:
AccessTier
-
setTier
Sets theAccessTier
.- Parameters:
tier
-AccessTier
- Returns:
- The updated options.
-
getContentMd5
public byte[] getContentMd5()Gets the MD5 hash of the content.- Returns:
- An MD5 hash of the content. This hash is used to verify the integrity of the content during transport. When this header is specified, the storage service compares the hash of the content that has arrived with this header value. Note that this MD5 hash is not stored with the blob. If the two hashes do not match, the operation will fail.
-
setContentMd5
Sets the MD5 hash of the content.- Parameters:
contentMd5
- An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport. When this header is specified, the storage service compares the hash of the content that has arrived with this header value. Note that this MD5 hash is not stored with the blob. If the two hashes do not match, the operation will fail.- Returns:
- The updated options
-
getDestinationRequestConditions
Gets theBlobRequestConditions
.- Returns:
BlobRequestConditions
-
setDestinationRequestConditions
public BlobUploadFromUrlOptions setDestinationRequestConditions(BlobRequestConditions destinationRequestConditions) Sets theBlobRequestConditions
.- Parameters:
destinationRequestConditions
-BlobRequestConditions
- Returns:
- The updated options.
-
getSourceRequestConditions
Gets theBlobRequestConditions
.- Returns:
BlobRequestConditions
-
setSourceRequestConditions
public BlobUploadFromUrlOptions setSourceRequestConditions(BlobRequestConditions sourceRequestConditions) Sets theBlobRequestConditions
.- Parameters:
sourceRequestConditions
-BlobRequestConditions
- Returns:
- The updated options.
-
isCopySourceBlobProperties
Optional, default is true. Indicates if properties from the source blob should be copied.- Returns:
- Whether properties from the source blob should be copied.
-
setCopySourceBlobProperties
Optional, default is true. Indicates if properties from the source blob should be copied.- Parameters:
copySourceBlobProperties
- Whether properties from the source blob should be copied.- 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 for access to source.
-
setSourceAuthorization
public BlobUploadFromUrlOptions 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 for access to source.- Returns:
- The updated options.
-
getCopySourceTagsMode
Gets the copy source tags mode- Returns:
- The copy source tags mode.
-
setCopySourceTagsMode
Sets the copy source tags mode- Parameters:
copySourceTags
- Indicates if a legal hold should be placed on the blob.- Returns:
- The updated options.
-