ResourceGraphClientContext class

Extends
@azure/ms-rest-azure-js.AzureServiceClient

建構函式

ResourceGraphClientContext(ServiceClientCredentials | TokenCredential, ResourceGraphClientOptions)

初始化 ResourceGraphClient 類別的新實例。

屬性

credentials

繼承的屬性

acceptLanguage
longRunningOperationRetryTimeout

長時間執行作業的重試逾時,以秒為單位。 預設值為 30。

繼承的方法

beginLongRunningRequest(RequestPrepareOptions | WebResource, RequestOptionsBase)

傳送 LRO 的初始要求 (長時間執行的作業) ,並取得 HttpLongRunningOperationResponse,以提供輪詢 LRO 的方法,並檢查 LRO 是否已完成。

restoreLROPoller(LROPollState)

從提供的 LROPollState 還原 LROPoller。 這個方法可用來在不同的進程或電腦上重新建立 LROPoller。

sendLongRunningRequest(RequestPrepareOptions | WebResource, RequestOptionsBase)

提供一種機制,以提出將輪詢並提供最終結果的要求。

sendLRORequest(OperationArguments, OperationSpec, RequestOptionsBase)

傳送 LRO 的初始要求 (長時間執行的作業) ,並取得 LROPoller,以提供輪詢 LRO 的方法,並檢查 LRO 是否已完成。

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

傳送使用提供的 OperationSpec 填入的 HTTP 要求。

sendRequest(RequestPrepareOptions | WebResourceLike)

傳送提供的 HTTPRequest。

建構函式詳細資料

ResourceGraphClientContext(ServiceClientCredentials | TokenCredential, ResourceGraphClientOptions)

初始化 ResourceGraphClient 類別的新實例。

new ResourceGraphClientContext(credentials: ServiceClientCredentials | TokenCredential, options?: ResourceGraphClientOptions)

參數

credentials

ServiceClientCredentials | TokenCredential

用戶端連線至 Azure 所需的認證。 建議使用從套件實作 TokenCredential 介面的 @azure/identity 認證。 如需這些認證的詳細資訊,請參閱 https://www.npmjs.com/package/@azure/identity 。 從舊版套件 @azure/ms-rest-nodeauth@azure/ms-rest-browserauth 實作 ServiceClientCredentials 介面的認證也受到支援。

options
ResourceGraphClientOptions

參數選項

屬性詳細資料

credentials

credentials: ServiceClientCredentials | TokenCredential

屬性值

繼承的屬性詳細資料

acceptLanguage

acceptLanguage: string

屬性值

string

繼承自 msRestAzure.AzureServiceClient.acceptLanguage

longRunningOperationRetryTimeout

長時間執行作業的重試逾時,以秒為單位。 預設值為 30。

longRunningOperationRetryTimeout?: number

屬性值

number

繼承自 msRestAzure.AzureServiceClient.longRunningOperationRetryTimeout

繼承的方法的詳細資料

beginLongRunningRequest(RequestPrepareOptions | WebResource, RequestOptionsBase)

傳送 LRO 的初始要求 (長時間執行的作業) ,並取得 HttpLongRunningOperationResponse,以提供輪詢 LRO 的方法,並檢查 LRO 是否已完成。

function beginLongRunningRequest(request: RequestPrepareOptions | WebResource, options?: RequestOptionsBase): Promise<LROPoller>

參數

request

RequestPrepareOptions | WebResource

要求物件

options
RequestOptionsBase

提出要求時要傳送的其他選項

傳回

Promise<@azure/ms-rest-azure-js.LROPoller>

HttpLongRunningOperationResponse,提供與 LRO 互動的方法。

繼承自 msRestAzure.AzureServiceClient.beginLongRunningRequest

restoreLROPoller(LROPollState)

從提供的 LROPollState 還原 LROPoller。 這個方法可用來在不同的進程或電腦上重新建立 LROPoller。

function restoreLROPoller(lroPollState: LROPollState): LROPoller

參數

lroPollState
@azure/ms-rest-azure-js.LROPollState

傳回

@azure/ms-rest-azure-js.LROPoller

繼承自 msRestAzure.AzureServiceClient.restoreLROPoller

sendLongRunningRequest(RequestPrepareOptions | WebResource, RequestOptionsBase)

提供一種機制,以提出將輪詢並提供最終結果的要求。

function sendLongRunningRequest(request: RequestPrepareOptions | WebResource, options?: RequestOptionsBase): Promise<HttpOperationResponse>

參數

request

RequestPrepareOptions | WebResource

要求物件

options
RequestOptionsBase

提出要求時要傳送的其他選項

傳回

包含最終輪詢要求、回應和 responseBody 的 HttpOperationResponse。

繼承自 msRestAzure.AzureServiceClient.sendLongRunningRequest

sendLRORequest(OperationArguments, OperationSpec, RequestOptionsBase)

傳送 LRO 的初始要求 (長時間執行的作業) ,並取得 LROPoller,以提供輪詢 LRO 的方法,並檢查 LRO 是否已完成。

function sendLRORequest(operationArguments: OperationArguments, operationSpec: OperationSpec, options?: RequestOptionsBase): Promise<LROPoller>

參數

operationArguments
OperationArguments

作業的引數。

operationSpec
OperationSpec

作業的規格。

options
RequestOptionsBase

提出要求時要傳送的其他選項。

傳回

Promise<@azure/ms-rest-azure-js.LROPoller>

LROPoller 物件,提供與 LRO 互動的方法。

繼承自 msRestAzure.AzureServiceClient.sendLRORequest

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

傳送使用提供的 OperationSpec 填入的 HTTP 要求。

function sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback<any>): Promise<RestResponse>

參數

operationArguments
OperationArguments

HTTP 要求樣板化值的引數將會從 中填入。

operationSpec
OperationSpec

用來填入 HTTPRequest 的 OperationSpec。

callback

ServiceCallback<any>

收到回應時要呼叫的回呼。

傳回

Promise<RestResponse>

繼承自 msRestAzure.AzureServiceClient.sendOperationRequest

sendRequest(RequestPrepareOptions | WebResourceLike)

傳送提供的 HTTPRequest。

function sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise<HttpOperationResponse>

參數

傳回

繼承自 msRestAzure.AzureServiceClient.sendRequest