Package com.azure.storage.blob.options
Class BlobCopyFromUrlOptions
java.lang.Object
com.azure.storage.blob.options.BlobCopyFromUrlOptions
Extended options that may be passed when copying a blob.
-
Constructor Summary
ConstructorsConstructorDescriptionBlobCopyFromUrlOptions
(String copySource) Creates a new instance ofBlobCopyFromUrlOptions
. -
Method Summary
Modifier and TypeMethodDescriptionGets the source URL to copy from.Gets the copy source tags mode.Gets theBlobRequestConditions
for the destination.Gets theBlobImmutabilityPolicy
.Gets the metadata to associate with the destination blob.com.azure.core.http.HttpAuthorization
Gets "Authorization" header for accessing source URL.com.azure.core.http.RequestConditions
Gets theRequestConditions
for the source.getTags()
Gets the tags to associate with the blob.getTier()
Gets theAccessTier
for the destination blob.Gets if a legal hold should be placed on the blob.setCopySourceTagsMode
(BlobCopySourceTagsMode copySourceTags) Sets the copy source tags modesetDestinationRequestConditions
(BlobRequestConditions destinationRequestConditions) Sets theBlobRequestConditions
for the destination.setImmutabilityPolicy
(BlobImmutabilityPolicy immutabilityPolicy) Sets theBlobImmutabilityPolicy
.setLegalHold
(Boolean legalHold) Sets if a legal hold should be placed on the blob.setMetadata
(Map<String, String> metadata) Sets the metadata to associate with the destination blob.setSourceAuthorization
(com.azure.core.http.HttpAuthorization sourceAuthorization) Sets "Authorization" header for accessing source URL.setSourceRequestConditions
(com.azure.core.http.RequestConditions sourceRequestConditions) Sets theRequestConditions
for the source.Sets the tags to associate with the blob.setTier
(AccessTier tier) Sets theAccessTier
for the destination blob.
-
Constructor Details
-
BlobCopyFromUrlOptions
Creates a new instance ofBlobCopyFromUrlOptions
.- Parameters:
copySource
- The source URL to copy from. URLs outside of Azure may only be copied to block blobs.- Throws:
NullPointerException
- IfcopySource
is null.
-
-
Method Details
-
getCopySource
Gets the source URL to copy from.- Returns:
- The source URL to copy from. URLs outside of Azure may only be copied to block blobs.
-
getMetadata
Gets the metadata to associate with the destination blob.- Returns:
- The metadata to associate with the destination blob.
-
setMetadata
Sets the metadata to associate with the destination blob.- Parameters:
metadata
- The metadata to associate with the destination blob.- 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
for the destination blob.- Returns:
AccessTier
for the destination blob.
-
setTier
Sets theAccessTier
for the destination blob.- Parameters:
tier
-AccessTier
for the destination blob.- Returns:
- The updated options.
-
getSourceRequestConditions
public com.azure.core.http.RequestConditions getSourceRequestConditions()Gets theRequestConditions
for the source.- Returns:
RequestConditions
for the source.
-
setSourceRequestConditions
public BlobCopyFromUrlOptions setSourceRequestConditions(com.azure.core.http.RequestConditions sourceRequestConditions) Sets theRequestConditions
for the source.- Parameters:
sourceRequestConditions
-RequestConditions
for the source.- Returns:
- The updated options.
-
getDestinationRequestConditions
Gets theBlobRequestConditions
for the destination.- Returns:
BlobRequestConditions
for the destination.
-
setDestinationRequestConditions
public BlobCopyFromUrlOptions setDestinationRequestConditions(BlobRequestConditions destinationRequestConditions) Sets theBlobRequestConditions
for the destination.- Parameters:
destinationRequestConditions
-BlobRequestConditions
for the destination.- 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 BlobCopyFromUrlOptions 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.
-
getImmutabilityPolicy
Gets theBlobImmutabilityPolicy
.- Returns:
BlobImmutabilityPolicy
-
setImmutabilityPolicy
Sets theBlobImmutabilityPolicy
.Note that this parameter is only applicable to a blob within a container that has immutable storage with versioning enabled.
- Parameters:
immutabilityPolicy
-BlobImmutabilityPolicy
- Returns:
- The updated options.
-
hasLegalHold
Gets if a legal hold should be placed on the blob.- Returns:
- If a legal hold should be placed on the blob.
-
setLegalHold
Sets if a legal hold should be placed on the blob.Note that this parameter is only applicable to a blob within a container that has immutable storage with versioning enabled.
- Parameters:
legalHold
- Indicates if a legal hold should be placed on the blob.- 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.
-