다음을 통해 공유


ShareLeaseClient class

생성자

ShareLeaseClient(ShareClient | ShareFileClient, string)

ShareLeaseClient의 인스턴스를 만듭니다.

속성

leaseId

임대 ID를 가져옵니다.

url

URL을 가져옵니다.

메서드

acquireLease(number, LeaseOperationOptions)

쓰기 및 삭제 작업을 위해 파일, 공유 또는 공유 스냅샷에 대한 잠금을 설정하고 관리합니다.

breakLease(LeaseOperationOptions)

임대를 강제로 종료합니다.

changeLease(string, LeaseOperationOptions)

기존 임대의 ID를 변경하려면

releaseLease(LeaseOperationOptions)

다른 클라이언트가 즉시 임대를 획득할 수 있도록 더 이상 필요하지 않은 경우 임대를 해제합니다.

renewLease(LeaseOperationOptions)

임대를 갱신하려면 공유 또는 공유 스냅샷에서 임대에만 사용할 수 있습니다. 해당 임대 만료 이후 공유가 다시 임대되지 않은 한 임대가 만료된 경우에도 임대가 갱신될 수 있습니다. 임대를 갱신하면 임대 기간 클록이 다시 설정됩니다.

생성자 세부 정보

ShareLeaseClient(ShareClient | ShareFileClient, string)

ShareLeaseClient의 인스턴스를 만듭니다.

new ShareLeaseClient(client: ShareClient | ShareFileClient, leaseId?: string)

매개 변수

client

ShareClient | ShareFileClient

임대 작업 요청을 수행할 클라이언트입니다.

leaseId

string

처음 제안된 임대 ID입니다.

속성 세부 정보

leaseId

임대 ID를 가져옵니다.

string leaseId

속성 값

string

url

URL을 가져옵니다.

string url

속성 값

string

메서드 세부 정보

acquireLease(number, LeaseOperationOptions)

쓰기 및 삭제 작업을 위해 파일, 공유 또는 공유 스냅샷에 대한 잠금을 설정하고 관리합니다.

function acquireLease(duration?: number, options?: LeaseOperationOptions): Promise<LeaseOperationResponse>

매개 변수

duration

number

임대 기간(초)을 지정합니다. 파일의 경우 유일하게 허용되는 값은 만료되지 않는 임대에 대해 -1. 공유의 경우 -1 15에서 60 사이여야 합니다.

options
LeaseOperationOptions

임대 관리 작업에 대한 옵션입니다.

반환

임대 작업을 획득하기 위한 응답 데이터입니다.

breakLease(LeaseOperationOptions)

임대를 강제로 종료합니다.

function breakLease(options?: LeaseOperationOptions): Promise<LeaseOperationResponse>

매개 변수

options
LeaseOperationOptions

임대 관리 작업에 대한 옵션입니다.

반환

임대 중단 작업에 대한 응답 데이터입니다.

changeLease(string, LeaseOperationOptions)

기존 임대의 ID를 변경하려면

function changeLease(proposedLeaseId: string, options?: LeaseOperationOptions): Promise<LeaseOperationResponse>

매개 변수

proposedLeaseId

string

제안된 새 임대 ID입니다.

options
LeaseOperationOptions

임대 관리 작업에 대한 옵션입니다.

반환

변경 임대 작업에 대한 응답 데이터입니다.

releaseLease(LeaseOperationOptions)

다른 클라이언트가 즉시 임대를 획득할 수 있도록 더 이상 필요하지 않은 경우 임대를 해제합니다.

function releaseLease(options?: LeaseOperationOptions): Promise<LeaseOperationResponse>

매개 변수

options
LeaseOperationOptions

임대 관리 작업에 대한 옵션입니다.

반환

릴리스 임대 작업에 대한 응답 데이터입니다.

renewLease(LeaseOperationOptions)

임대를 갱신하려면 공유 또는 공유 스냅샷에서 임대에만 사용할 수 있습니다. 해당 임대 만료 이후 공유가 다시 임대되지 않은 한 임대가 만료된 경우에도 임대가 갱신될 수 있습니다. 임대를 갱신하면 임대 기간 클록이 다시 설정됩니다.

function renewLease(options?: LeaseOperationOptions): Promise<LeaseOperationResponse>

매개 변수

options
LeaseOperationOptions

임대 관리 작업에 대한 옵션입니다.

반환

임대 갱신 작업에 대한 응답 데이터입니다.