BlobLeaseClient.AcquireAsync メソッド

定義

オーバーロード

AcquireAsync(TimeSpan, RequestConditions, RequestContext)

操作は AcquireAsync(TimeSpan, RequestConditions, RequestContext) 、BLOB またはコンテナーのリースを取得します。 リース duration は 15 から 60 秒、または無限 (-1) の間である必要があります。

コンテナーにアクティブなリースがない場合、BLOB サービスは BLOB またはコンテナーにリースを作成し、それを返します。 コンテナーにアクティブなリースがある場合は、アクティブなリース ID を として LeaseId使用して新しいリースのみを要求できますが、新 durationしい を指定することはできます。

詳細については、「 リース コンテナー

AcquireAsync(TimeSpan, RequestConditions, CancellationToken)

操作は AcquireAsync(TimeSpan, RequestConditions, CancellationToken) 、BLOB またはコンテナーのリースを取得します。 リース duration は 15 から 60 秒、または無限 (-1) の間である必要があります。

コンテナーにアクティブなリースがない場合、BLOB サービスは BLOB またはコンテナーにリースを作成し、それを返します。 コンテナーにアクティブなリースがある場合は、アクティブなリース ID を として LeaseId使用して新しいリースのみを要求できますが、新 durationしい を指定することはできます。

詳細については、「 リース コンテナー

AcquireAsync(TimeSpan, RequestConditions, RequestContext)

ソース:
BlobLeaseClient.cs
ソース:
BlobLeaseClient.cs

操作は AcquireAsync(TimeSpan, RequestConditions, RequestContext) 、BLOB またはコンテナーのリースを取得します。 リース duration は 15 から 60 秒、または無限 (-1) の間である必要があります。

コンテナーにアクティブなリースがない場合、BLOB サービスは BLOB またはコンテナーにリースを作成し、それを返します。 コンテナーにアクティブなリースがある場合は、アクティブなリース ID を として LeaseId使用して新しいリースのみを要求できますが、新 durationしい を指定することはできます。

詳細については、「 リース コンテナー

public virtual System.Threading.Tasks.Task<Azure.Response> AcquireAsync (TimeSpan duration, Azure.RequestConditions conditions, Azure.RequestContext context);
abstract member AcquireAsync : TimeSpan * Azure.RequestConditions * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.AcquireAsync : TimeSpan * Azure.RequestConditions * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function AcquireAsync (duration As TimeSpan, conditions As RequestConditions, context As RequestContext) As Task(Of Response)

パラメーター

duration
TimeSpan

リースの期間を秒単位で指定するか、期限切れのないリースを指定 InfiniteLeaseDuration します。 無限リースでない場合は、15 ~ 60 秒を指定できます。 RenewAsync(RequestConditions, CancellationToken) または ChangeAsync(String, RequestConditions, CancellationToken) を使用して、リース期間を変更することはできません。

conditions
RequestConditions

リースの取得に関する条件を追加する場合は省略可能 BlobLeaseRequestConditions です。

context
RequestContext

操作の省略可能 RequestContext

戻り値

Responseストレージ サービスによって返される 。

注釈

RequestFailedExceptionエラーが発生すると、 がスローされます。

適用対象

AcquireAsync(TimeSpan, RequestConditions, CancellationToken)

ソース:
BlobLeaseClient.cs
ソース:
BlobLeaseClient.cs

操作は AcquireAsync(TimeSpan, RequestConditions, CancellationToken) 、BLOB またはコンテナーのリースを取得します。 リース duration は 15 から 60 秒、または無限 (-1) の間である必要があります。

コンテナーにアクティブなリースがない場合、BLOB サービスは BLOB またはコンテナーにリースを作成し、それを返します。 コンテナーにアクティブなリースがある場合は、アクティブなリース ID を として LeaseId使用して新しいリースのみを要求できますが、新 durationしい を指定することはできます。

詳細については、「 リース コンテナー

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobLease>> AcquireAsync (TimeSpan duration, Azure.RequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AcquireAsync : TimeSpan * Azure.RequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobLease>>
override this.AcquireAsync : TimeSpan * Azure.RequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobLease>>
Public Overridable Function AcquireAsync (duration As TimeSpan, Optional conditions As RequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BlobLease))

パラメーター

duration
TimeSpan

リースの期間を秒単位で指定するか、期限切れのないリースを指定 InfiniteLeaseDuration します。 無限リースでない場合は、15 ~ 60 秒を指定できます。 RenewAsync(RequestConditions, CancellationToken) または ChangeAsync(String, RequestConditions, CancellationToken) を使用して、リース期間を変更することはできません。

conditions
RequestConditions

リースの取得に関する条件を追加する場合は省略可能 BlobLeaseRequestConditions です。

cancellationToken
CancellationToken

操作を取り消す必要があることを示す通知を伝達する場合は省略可能 CancellationToken です。

戻り値

Response<T>リースを記述する 。

注釈

RequestFailedExceptionエラーが発生すると、 がスローされます。

適用対象