Data.Cloud.AzureAPI.TAzureBlobService.SetBlobProperties
Delphi
function SetBlobProperties(ContainerName, BlobName: string; Properties: TStrings;
const LeaseId: string = '';
ResponseInfo: TCloudResponseInfo = nil): Boolean; overload; deprecated 'Use overloaded method instead';
function SetBlobProperties(const AContainerName, ABlobName, ALeaseId: string;
const AProperties: array of TPair<string, string>; const AResponseInfo: TCloudResponseInfo): Boolean; overload;
C++
bool __fastcall SetBlobProperties _DEPRECATED_ATTRIBUTE1("Use overloaded method instead") (System::UnicodeString ContainerName, System::UnicodeString BlobName, System::Classes::TStrings* Properties, const System::UnicodeString LeaseId = System::UnicodeString(), Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0))/* overload */;
bool __fastcall SetBlobProperties(const System::UnicodeString AContainerName, const System::UnicodeString ABlobName, const System::UnicodeString ALeaseId, const System::Generics::Collections::TPair__2<System::UnicodeString,System::UnicodeString> *AProperties, const System::NativeInt AProperties_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
Sets the given properties onto the specified blob.
SetBlobProperties is used to set the metadata for a specified blob.
The following table describes the parameters:
Parameter | Description |
---|---|
|
The name of the container the blob is in. |
|
The name of the blob to set the properties for. |
|
The properties to set. |
|
The lease ID, required if the blob is locked. |
|
The optional class for storing response info into. |
The supported properties are:
- x-ms-blob-cache-control
- x-ms-blob-content-type
- x-ms-blob-content-md5
- x-ms-blob-content-encoding
- x-ms-blob-content-language
For page blobs, these are also supported:
- x-ms-blob-content-length
- x-ms-sequence-number-action (max, update, incremen)
- x-ms-blob-sequence-number (unless x-ms-sequence-number-action = increment).
When issuing a GetBlobProperties request, the names of the properties are different:
- Cache-Control
- Content-Type
- Content-MD5
- Content-Encoding
- Content-Language
Properties passed in will be given the x-ms-blob- prefix if it is missing. All other properties will be ignored.
LeaseId
should not be an empty string if the blob is locked.
Warning: The method replaces the full set of metadata currently on the blob; it does not append to it.
Note: Updating the metadata of a snapshot is not supported.
The x-ms-blob-content-length property can be set to change the MaximumSize
value specified when PutPageBlob was executed.
The x-ms-sequence-number-action property can be one of: max, update, or increment:
- max: Use the largest integer, either the one specified with x-ms-blob-sequence-number or the one already existing on the server.
- update: Replace the value of x-ms-blob-sequence-number on the server with this one.
- increment: Increment the server's value of x-ms-blob-sequence-number by one. Do not specify the x-ms-blob-sequence-number header in this request.
The method returns True if the action was successful, and False otherwise.