Data.Cloud.AzureAPI.TAzureBlobService.PutBlockBlob

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function PutBlockBlob(ContainerName, BlobName: string; Content: TArray<Byte>;  LeaseId: string = ''; OptionalHeaders: TStrings = nil; Metadata: TStrings = nil; ResponseInfo: TCloudResponseInfo = nil): Boolean; overload; deprecated 'Use overloaded method instead';
function PutBlockBlob(const AContainerName, ABlobName, ALeaseID: string; const AContent: TArray<Byte>;  const AOptionalHeaders, AMetadata: array of TPair<string, string>; const AResponseInfo: TCloudResponseInfo): Boolean; overload;

C++

bool __fastcall PutBlockBlob _DEPRECATED_ATTRIBUTE1("Use overloaded method instead") (System::UnicodeString ContainerName, System::UnicodeString BlobName, System::DynamicArray<System::Byte> Content, System::UnicodeString LeaseId = System::UnicodeString(), System::Classes::TStrings* OptionalHeaders = (System::Classes::TStrings*)(0x0), System::Classes::TStrings* Metadata = (System::Classes::TStrings*)(0x0), Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0))/* overload */;
bool __fastcall PutBlockBlob(const System::UnicodeString AContainerName, const System::UnicodeString ABlobName, const System::UnicodeString ALeaseID, const System::DynamicArray<System::Byte> AContent, const System::Generics::Collections::TPair__2<System::UnicodeString,System::UnicodeString> *AOptionalHeaders, const int AOptionalHeaders_High, const System::Generics::Collections::TPair__2<System::UnicodeString,System::UnicodeString> *AMetadata, const int AMetadata_High, Data::Cloud::Cloudapi::TCloudResponseInfo* const AResponseInfo)/* overload */;

Properties

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

Description

Creates a new block blob or updates an existing one in the given container.

PutBlockBlob is used to create or replace an existing block blob in the given container.

The following table describes the parameters:

Parameter Description

ContainerName

The name of the blob's container.

BlobName

The name of the blob.

Content

The content to set into the blob.

LeaseId

The optional lease ID.

OptionalHeaders

The optional headers.

Metadata

The metadata to set onto the blob.

ResponseInfo

The optional class for storing response info into.

If a block blob with the given name (in the specified container) already exists, then its content will be replaced with the data from this call.

Note that LeaseId should be set as an empty string, except when a blob with the given name already exists and is currently locked.

The OptionalHeaders can be set onto the request. Such optional headers are:

  • Content-Type (or x-ms-blob-content-type)
  • Content-Encoding (or x-ms-blob-content-encoding)
  • Content-Language (or x-ms-blob-content-language)
  • Content-MD5 (or x-ms-blob-content-md5)
  • Cache-Control (or x-ms-blob-cache-control)
  • If-Modified-Since
  • If-Unmodified-Since
  • If-Match (Compares the resource's entity tag (Etag) value to the value of this header)
  • If-None-Match (Compares the resource's Etag value to the value of this header)

The optional metadata names should start with 'x-ms-meta-'. If they do not, this prefix will be added.

The maximum allowed Content-Length of a block blob is 64 MB. If it is larger than that, then you need to upload it as blocks.

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

See Also