BlobBaseClient.StartCopyFromUriAsync Method

Definition

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 Azure.Storage.Blobs.Models.BlobProperties.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)

Parameters

source
Uri

Specifies the Uri of the source blob. The value may be a Uri of up to 2 KB in length that specifies a blob. Source Blob Authentication

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.

options
BlobCopyFromUriOptions

Optional parameters. Note that CopySourceTagsMode is not applicable to this API.

cancellationToken
CancellationToken

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

Returns

A CopyFromUriOperation describing the state of the copy operation.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to