Data.Cloud.AzureAPI.TAzureBlobService.PutPage

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function PutPage(ContainerName, BlobName: string; Content: TArray<Byte>;  StartPage, PageCount: Integer; const LeaseId: string = ''; const ContentMD5: string = ''; ResponseInfo: TCloudResponseInfo = nil): Boolean; overload;
function PutPage(ContainerName, BlobName: string; Content: TArray<Byte>;  StartPage, PageCount: Integer; ActionConditional: TBlobActionConditional; const ContentMD5: string = ''; const LeaseId: string = ''; ResponseInfo: TCloudResponseInfo = nil): Boolean; overload;
function PutPage(ContainerName, BlobName: string; Content: TArray<Byte>;  StartPage: Integer; ActionConditional: TBlobActionConditional; const LeaseId: string = ''; ResponseInfo: TCloudResponseInfo = nil): Boolean; overload;
function PutPage(ContainerName, BlobName: string; Content: TArray<Byte>; StartPage: Integer;  const LeaseId: string = ''; ResponseInfo: TCloudResponseInfo = nil): Boolean; overload;

C++

bool __fastcall PutPage(System::UnicodeString ContainerName, System::UnicodeString BlobName, System::DynamicArray<System::Byte> Content, int StartPage, int PageCount, const System::UnicodeString LeaseId = System::UnicodeString(), const System::UnicodeString ContentMD5 = System::UnicodeString(), Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0))/* overload */;
bool __fastcall PutPage(System::UnicodeString ContainerName, System::UnicodeString BlobName, System::DynamicArray<System::Byte> Content, int StartPage, int PageCount, const TBlobActionConditional &ActionConditional, const System::UnicodeString ContentMD5 = System::UnicodeString(), const System::UnicodeString LeaseId = System::UnicodeString(), Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0))/* overload */;
bool __fastcall PutPage(System::UnicodeString ContainerName, System::UnicodeString BlobName, System::DynamicArray<System::Byte> Content, int StartPage, const TBlobActionConditional &ActionConditional, const System::UnicodeString LeaseId = System::UnicodeString(), Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0))/* overload */;
bool __fastcall PutPage(System::UnicodeString ContainerName, System::UnicodeString BlobName, System::DynamicArray<System::Byte> Content, int StartPage, const System::UnicodeString LeaseId = System::UnicodeString(), Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0))/* overload */;

Properties

Type Visibility Source Unit Parent
function public
Data.Cloud.AzureAPI.pas
Data.Cloud.AzureAPI.hpp
Data.Cloud.AzureAPI TAzureBlobService

Description

Writes the content included in a page blob the number of times specified by the PageCount parameter.

PutPage is used to write the content included in a page blob the number of times specified by the PageCount parameter. The StartPage parameter specifies where writing starts.

The StartPage is zero-indexed and maps to the first page in a range of 1 or more pages for which content is created or modified.

There are four overloaded PutPage methods.

For the first and the second overloaded methods, each page is exactly 512 bytes, so when passing in the Content, the length must be (512 * PageCount). If the content is not long enough, be sure to pad with zeros.

For the third and the fourth overloaded methods, the number of pages is calculated dynamically based on the length of the specified content. If the content's length is not evenly divisible by 512, then it is padded with zeros.

For the second and the third overloaded methods, the supported action conditionals include:

  • IfModifiedSince
  • IfUnmodifiedSince
  • IfMatch
  • IfNoneMatch
  • if-sequence-number-lte
  • if-sequence-number-lt
  • if-sequence-number-eq

The fourth overloaded method must only be called on a page blob that already exists.

The following table describes the parameters of all four overloaded methods:

Parameter Description

ContainerName

The name of the container the blob is in.

BlobName

The name of the blob to upload the block for.

Content

The content to add. It must be evenly divisible by 512. Pad with zeros if needed.

StartPage

The zero-based index of the first page this content applies to.

Content

The block's content in bytes.

PageCount

The number of (512 byte) pages this content spans.

ActionConditional

Conditions that must be met for the action to be executed.

ContentMD5

An optional MD5 hash of the content, for verification purposes.

LeaseId

The lease ID, required if the blob is locked.

ResponseInfo

The optional class for storing response info into.


The method returns True if the creation/replacement was successful, and False otherwise.

See Also