CloudBlob.AcquireLease Methode

Definition

Ruft eine Lease für dieses Blob ab.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual string AcquireLease (TimeSpan? leaseTime, string proposedLeaseId, 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 AcquireLease : Nullable<TimeSpan> * string * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext -> string
override this.AcquireLease : Nullable<TimeSpan> * string * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext -> string
Public Overridable Function AcquireLease (leaseTime As Nullable(Of TimeSpan), proposedLeaseId As String, Optional accessCondition As AccessCondition = Nothing, Optional options As BlobRequestOptions = Nothing, Optional operationContext As OperationContext = Nothing) As String

Parameter

leaseTime
Nullable<TimeSpan>

Eine TimeSpan, die die Zeitspanne für die Leasedauer darstellt und auf Sekunden abgerundet wird. Bei Festlegung auf null wird eine unbegrenzte Lease erworben. Wenn nicht NULL, muss dies 15 bis 60 Sekunden betragen.

proposedLeaseId
String

Eine Zeichenfolge, die die vorgeschlagene Lease-ID für die neue Lease darstellt, oder null, wenn keine Lease-ID vorgeschlagen wird.

accessCondition
AccessCondition

Ein AccessCondition-Objekt, das die Bedingung darstellt, die erfüllt werden muss, damit die Anforderung fortgesetzt werden kann. Wenn null, wird keine Bedingung verwendet.

options
BlobRequestOptions

Ein BlobRequestOptions-Objekt, das zusätzliche Optionen für die Anforderung angibt. Wenn null, werden standardoptionen auf die Anforderung angewendet.

operationContext
OperationContext

Ein OperationContext-Objekt, das den Kontext für den aktuellen Vorgang darstellt.

Gibt zurück

Die ID der erworbenen Lease.

Attribute

Gilt für: