BlobBaseClient.StartCopyFromUriAsync(Uri, BlobCopyFromUriOptions, CancellationToken) Method


The Azure.Storage.Blobs.Specialized.BlobBaseClient.StartCopyFromUri(System.Uri,System.Collections.Generic.IDictionary{System.String,System.String},System.Nullable{Azure.Storage.Blobs.Models.AccessTier},Azure.Storage.Blobs.Models.BlobRequestConditions,Azure.Storage.Blobs.Models.BlobRequestConditions,System.Nullable{Azure.Storage.Blobs.Models.RehydratePriority},System.Threading.CancellationToken) operation begins an asynchronous copy of the data from the source to this blob. You can check the CopyStatus returned from the GetPropertiesAsync(BlobRequestConditions, CancellationToken) to determine if the copy has completed.

For more information, see Copy Blob.

public virtual System.Threading.Tasks.Task<Azure.Storage.Blobs.Models.CopyFromUriOperation> StartCopyFromUriAsync (Uri source, Azure.Storage.Blobs.Models.BlobCopyFromUriOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member StartCopyFromUriAsync : Uri * Azure.Storage.Blobs.Models.BlobCopyFromUriOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Storage.Blobs.Models.CopyFromUriOperation>
override this.StartCopyFromUriAsync : Uri * Azure.Storage.Blobs.Models.BlobCopyFromUriOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Storage.Blobs.Models.CopyFromUriOperation>
Public Overridable Function StartCopyFromUriAsync (source As Uri, options As BlobCopyFromUriOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of CopyFromUriOperation)



Specifies the Uri of the source blob. The value may be a Uri of up to 2 KB in length that specifies a blob. A source blob in the same storage account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob must either be public or must be authenticated via a shared access signature. If the source blob is public, no authentication is required to perform the copy operation.

The source object may be a file in the Azure File service. If the source object is a file that is to be copied to a blob, then the source file must be authenticated using a shared access signature, whether it resides in the same account or in a different account.


Optional parameters.


Optional CancellationToken to propagate notifications that the operation should be cancelled.



A CopyFromUriOperation describing the state of the copy operation.


A RequestFailedException will be thrown if a failure occurs.

Applies to