BlobLeaseClient class
ContainerClient または BlobClientのリースを管理するクライアント。
コンストラクター
Blob |
BlobLeaseClient のインスタンスを作成します。 |
プロパティ
lease |
リース ID を取得します。 |
url | URL を取得します。 |
メソッド
コンストラクターの詳細
BlobLeaseClient(BlobClient | ContainerClient, string)
BlobLeaseClient のインスタンスを作成します。
new BlobLeaseClient(client: BlobClient | ContainerClient, leaseId?: string)
パラメーター
- client
リース操作要求を行うクライアント。
- leaseId
-
string
最初に提案されたリース ID。
プロパティの詳細
leaseId
リース ID を取得します。
string leaseId
プロパティ値
string
url
URL を取得します。
string url
プロパティ値
string
メソッドの詳細
acquireLease(number, LeaseOperationOptions)
削除操作用のコンテナー、または書き込み操作と削除操作用の BLOB のロックを確立して管理します。 ロック期間は 15 ~ 60 秒にすることも、無限にすることもできます。
https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container を参照し、https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob を参照してください
function acquireLease(duration: number, options?: LeaseOperationOptions): Promise<LeaseOperationResponse>
パラメーター
- duration
-
number
15 ~ 60 秒、または無限 (-1) にする必要があります。
- options
- LeaseOperationOptions
リース管理操作を構成するオプション。
戻り値
Promise<LeaseOperationResponse>
リース操作を取得するための応答データ。
breakLease(number, LeaseOperationOptions)
リースを終了するが、現在のリース期間が切れるまで別のクライアントが新しいリースを取得できないようにするため。
https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container を参照し、https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob を参照してください
function breakLease(breakPeriod: number, options?: LeaseOperationOptions): Promise<LeaseOperationResponse>
パラメーター
- breakPeriod
-
number
中断期間
- options
- LeaseOperationOptions
リース管理操作を構成するための省略可能なオプション。
戻り値
Promise<LeaseOperationResponse>
ブレーク リース操作の応答データ。
changeLease(string, LeaseOperationOptions)
リースの ID を変更します。
https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container を参照し、https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob を参照してください
function changeLease(proposedLeaseId: string, options?: LeaseOperationOptions): Promise<LeaseOperationResponse>
パラメーター
- proposedLeaseId
-
string
提案された新しいリース ID。
- options
- LeaseOperationOptions
リース管理操作を構成するオプション。
戻り値
Promise<LeaseOperationResponse>
変更リース操作の応答データ。
releaseLease(LeaseOperationOptions)
別のクライアントがコンテナーまたは BLOB に対してリースをすぐに取得できるように、リースが不要になった場合にリースを解放する。
https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container を参照し、https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob を参照してください
function releaseLease(options?: LeaseOperationOptions): Promise<LeaseOperationResponse>
パラメーター
- options
- LeaseOperationOptions
リース管理操作を構成するオプション。
戻り値
Promise<LeaseOperationResponse>
リリース リース操作の応答データ。
renewLease(LeaseOperationOptions)
リースを更新します。
https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container を参照し、https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob を参照してください
function renewLease(options?: LeaseOperationOptions): Promise<Lease>
パラメーター
- options
- LeaseOperationOptions
リース管理操作を構成するための省略可能なオプション。
戻り値
Promise<Lease>
更新リース操作の応答データ。