Condividi tramite


CloudBlockBlob.PutBlock Method

Definition

Overloads

PutBlock(String, Stream, Checksum, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a single block.

PutBlock(String, Uri, Nullable<Int64>, Nullable<Int64>, Checksum, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a single block, copying from a source URI.

PutBlock(String, Uri, Nullable<Int64>, Nullable<Int64>, String, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a single block, copying from a source URI.

PutBlock(String, Stream, Checksum, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a single block.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual void PutBlock (string blockId, System.IO.Stream blockData, Microsoft.Azure.Storage.Shared.Protocol.Checksum contentChecksum, Microsoft.Azure.Storage.AccessCondition accessCondition = default, Microsoft.Azure.Storage.Blob.BlobRequestOptions options = default, Microsoft.Azure.Storage.OperationContext operationContext = default);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member PutBlock : string * System.IO.Stream * Microsoft.Azure.Storage.Shared.Protocol.Checksum * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext -> unit
override this.PutBlock : string * System.IO.Stream * Microsoft.Azure.Storage.Shared.Protocol.Checksum * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext -> unit
Public Overridable Sub PutBlock (blockId As String, blockData As Stream, contentChecksum As Checksum, Optional accessCondition As AccessCondition = Nothing, Optional options As BlobRequestOptions = Nothing, Optional operationContext As OperationContext = Nothing)

Parameters

blockId
String

A Base64-encoded string that identifies the block.

blockData
Stream

A Stream object that provides the data for the block.

contentChecksum
Checksum

A hash value used to ensure transactional integrity. May be null or Checksum.None

accessCondition
AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options
BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext
OperationContext

An OperationContext object that represents the context for the current operation.

Attributes

Remarks

Clients may send the content checksum headers for a given operation as a means to ensure transactional integrity over the wire. The contentChecksum parameter permits clients who already have access to a pre-computed checksum value for a given byte range to provide it. If the BlobRequestOptions.UseTransactionalMd5 or BlobRequestOptions.UseTransactionalCrc64 properties are set to true and the corresponding content parameter is set to null, then the client library will calculate the checksum value internally.

Applies to

PutBlock(String, Uri, Nullable<Int64>, Nullable<Int64>, Checksum, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a single block, copying from a source URI.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual void PutBlock (string blockId, Uri sourceUri, long? offset, long? count, Microsoft.Azure.Storage.Shared.Protocol.Checksum contentChecksum, Microsoft.Azure.Storage.AccessCondition accessCondition = default, Microsoft.Azure.Storage.Blob.BlobRequestOptions options = default, Microsoft.Azure.Storage.OperationContext operationContext = default);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member PutBlock : string * Uri * Nullable<int64> * Nullable<int64> * Microsoft.Azure.Storage.Shared.Protocol.Checksum * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext -> unit
override this.PutBlock : string * Uri * Nullable<int64> * Nullable<int64> * Microsoft.Azure.Storage.Shared.Protocol.Checksum * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext -> unit
Public Overridable Sub PutBlock (blockId As String, sourceUri As Uri, offset As Nullable(Of Long), count As Nullable(Of Long), contentChecksum As Checksum, Optional accessCondition As AccessCondition = Nothing, Optional options As BlobRequestOptions = Nothing, Optional operationContext As OperationContext = Nothing)

Parameters

blockId
String

A Base64-encoded string that identifies the block.

sourceUri
Uri

A Uri specifying the absolute URI to the source blob.

offset
Nullable<Int64>

The byte offset at which to begin returning content.

count
Nullable<Int64>

The number of bytes to return, or null to return all bytes through the end of the blob.

contentChecksum
Checksum

A hash value used to ensure transactional integrity. May be null or Checksum.None

accessCondition
AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options
BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext
OperationContext

An OperationContext object that represents the context for the current operation.

Attributes

Remarks

Clients may send the content checksum headers for a given operation as a means to ensure transactional integrity over the wire. The contentChecksum parameter permits clients who already have access to a pre-computed checksum value for a given byte range to provide it. If the BlobRequestOptions.UseTransactionalMd5 or BlobRequestOptions.UseTransactionalCrc64 properties are set to true and the corresponding content parameter is set to null, then the client library will calculate the checksum value internally.

Applies to

PutBlock(String, Uri, Nullable<Int64>, Nullable<Int64>, String, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a single block, copying from a source URI.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual void PutBlock (string blockId, Uri sourceUri, long? offset, long? count, string contentMD5, Microsoft.Azure.Storage.AccessCondition accessCondition = default, Microsoft.Azure.Storage.Blob.BlobRequestOptions options = default, Microsoft.Azure.Storage.OperationContext operationContext = default);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member PutBlock : string * Uri * Nullable<int64> * Nullable<int64> * string * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext -> unit
override this.PutBlock : string * Uri * Nullable<int64> * Nullable<int64> * string * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext -> unit
Public Overridable Sub PutBlock (blockId As String, sourceUri As Uri, offset As Nullable(Of Long), count As Nullable(Of Long), contentMD5 As String, Optional accessCondition As AccessCondition = Nothing, Optional options As BlobRequestOptions = Nothing, Optional operationContext As OperationContext = Nothing)

Parameters

blockId
String

A Base64-encoded string that identifies the block.

sourceUri
Uri

A Uri specifying the absolute URI to the source blob.

offset
Nullable<Int64>

The byte offset at which to begin returning content.

count
Nullable<Int64>

The number of bytes to return, or null to return all bytes through the end of the blob.

contentMD5
String

An optional hash value used to ensure transactional integrity. May be null or an empty string.

accessCondition
AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options
BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext
OperationContext

An OperationContext object that represents the context for the current operation.

Attributes

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.

Applies to