Data.Cloud.AzureAPI.TAzureBlobService.AcquireBlobLease

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function AcquireBlobLease(ContainerName, BlobName: string; out LeaseId: string;  ResponseInfo: TCloudResponseInfo = nil; LeaseDuration: Integer = -1; const ProposedLeaseID: string = ''): Boolean; overload; deprecated 'Use overloaded method instead';
function AcquireBlobLease(const AContainerName, ABlobName: string; out ALeaseId: string;  const AProposedLeaseID: string; ALeaseDuration: Integer; const AResponseInfo: TCloudResponseInfo): Boolean; overload;

C++

bool __fastcall AcquireBlobLease _DEPRECATED_ATTRIBUTE1("Use overloaded method instead") (System::UnicodeString ContainerName, System::UnicodeString BlobName, /* out */ System::UnicodeString &LeaseId, Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0), int LeaseDuration = 0xffffffff, const System::UnicodeString ProposedLeaseID = System::UnicodeString())/* overload */;
bool __fastcall AcquireBlobLease(const System::UnicodeString AContainerName, const System::UnicodeString ABlobName, /* out */ System::UnicodeString &ALeaseId, const System::UnicodeString AProposedLeaseID, int ALeaseDuration, 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

Attempts to acquire a lease on the specified blob.

You cannot acquire a lease for a snapshot.

AcquireBlobLease accepts the following parameters:

  • ContainerName: The name of the container that the blob is in.
  • BlobName: The name of the blob to acquire a lease for.
  • LeaseId: The acquired lease identifier, or empty string if failed. You may use ProposedLeaseID to propose an identifier.
    Note: You may need the value of LeaseId to call ChangeContainerLease, ReleaseContainerLease, or RenewContainerLease.
  • ResponseInfo: Optional. The class for storing response info into. Default is nil.
  • LeaseDuration: Optional. The duration of the lease in seconds. A lease establishes and manages a lock on a blob for write and delete operations. Default is -1, which is a flag for infinite lease. Valid values are between 15 and 60.
  • ProposedLeaseID: A GUID that you propose as the identifier for the new lease.

The method returns True if the lease was acquired, and False otherwise.

See Also