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 theBlobRequestConditionsfor the destination.Gets theBlobImmutabilityPolicy.Gets the metadata to associate with the destination blob.com.azure.core.http.HttpAuthorizationGets "Authorization" header for accessing source URL.com.azure.core.http.RequestConditionsGets theRequestConditionsfor the source.Optional, only applicable (but required) when the source is Azure Storage Files and using token authentication.getTags()Gets the tags to associate with the blob.getTier()Gets theAccessTierfor 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 theBlobRequestConditionsfor 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 theRequestConditionsfor the source.setSourceShareTokenIntent(FileShareTokenIntent sourceShareTokenIntent) Optional, only applicable (but required) when the source is Azure Storage Files and using token authentication.Sets the tags to associate with the blob.setTier(AccessTier tier) Sets theAccessTierfor 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- IfcopySourceis 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 theAccessTierfor the destination blob.- Returns:
AccessTierfor the destination blob.
-
setTier
Sets theAccessTierfor the destination blob.- Parameters:
tier-AccessTierfor the destination blob.- Returns:
- The updated options.
-
getSourceRequestConditions
public com.azure.core.http.RequestConditions getSourceRequestConditions()Gets theRequestConditionsfor the source.- Returns:
RequestConditionsfor the source.
-
setSourceRequestConditions
public BlobCopyFromUrlOptions setSourceRequestConditions(com.azure.core.http.RequestConditions sourceRequestConditions) Sets theRequestConditionsfor the source.- Parameters:
sourceRequestConditions-RequestConditionsfor the source.- Returns:
- The updated options.
-
getDestinationRequestConditions
Gets theBlobRequestConditionsfor the destination.- Returns:
BlobRequestConditionsfor the destination.
-
setDestinationRequestConditions
public BlobCopyFromUrlOptions setDestinationRequestConditions(BlobRequestConditions destinationRequestConditions) Sets theBlobRequestConditionsfor the destination.- Parameters:
destinationRequestConditions-BlobRequestConditionsfor 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.
-