BlockBlobClient.StageBlockFromUri Method

Definition

The StageBlockFromUri(Uri, String, StageBlockFromUriOptions, CancellationToken) operation creates a new block to be committed as part of a blob where the contents are read from the sourceUri.

For more information, see Put Block From URL.

public virtual Azure.Response<Azure.Storage.Blobs.Models.BlockInfo> StageBlockFromUri (Uri sourceUri, string base64BlockId, Azure.Storage.Blobs.Models.StageBlockFromUriOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member StageBlockFromUri : Uri * string * Azure.Storage.Blobs.Models.StageBlockFromUriOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlockInfo>
override this.StageBlockFromUri : Uri * string * Azure.Storage.Blobs.Models.StageBlockFromUriOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlockInfo>
Public Overridable Function StageBlockFromUri (sourceUri As Uri, base64BlockId As String, Optional options As StageBlockFromUriOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of BlockInfo)

Parameters

sourceUri
Uri

Specifies the Uri of the source blob. The value may be a URL of up to 2 KB in length that specifies a blob. 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 operation.

base64BlockId
String

A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified for the base64BlockId parameter must be the same size for each block. Note that the Base64 string will be URL-encoded.

options
StageBlockFromUriOptions

Optional parameters. StageBlockFromUriOptions.

cancellationToken
CancellationToken

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

Returns

A Response<T> describing the state of the updated block blob.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to