ResourceGraphClient class

Extends

Constructors

ResourceGraphClient(ServiceClientCredentials | TokenCredential, ResourceGraphClientOptions)

Initializes a new instance of the ResourceGraphClient class.

Properties

operations

Inherited Properties

acceptLanguage
credentials
longRunningOperationRetryTimeout

The retry timeout in seconds for Long Running Operations. Default value is 30.

Methods

resourceChangeDetails(ResourceChangeDetailsRequestParameters, RequestOptionsBase)

Get resource change details.

resourceChangeDetails(ResourceChangeDetailsRequestParameters, RequestOptionsBase, ServiceCallback<ResourceChangeData[]>)
resourceChangeDetails(ResourceChangeDetailsRequestParameters, ServiceCallback<ResourceChangeData[]>)
resourceChanges(ResourceChangesRequestParameters, RequestOptionsBase)

List changes to a resource for a given time interval.

resourceChanges(ResourceChangesRequestParameters, RequestOptionsBase, ServiceCallback<ResourceChangeList>)
resourceChanges(ResourceChangesRequestParameters, ServiceCallback<ResourceChangeList>)
resources(QueryRequest, RequestOptionsBase)

Queries the resources managed by Azure Resource Manager for scopes specified in the request.

resources(QueryRequest, RequestOptionsBase, ServiceCallback<QueryResponse>)
resources(QueryRequest, ServiceCallback<QueryResponse>)
resourcesHistory(ResourcesHistoryRequest, RequestOptionsBase)

List all snapshots of a resource for a given time interval.

resourcesHistory(ResourcesHistoryRequest, RequestOptionsBase, ServiceCallback<any>)
resourcesHistory(ResourcesHistoryRequest, ServiceCallback<any>)

Inherited Methods

beginLongRunningRequest(RequestPrepareOptions | WebResource, RequestOptionsBase)

Send the initial request of a LRO (long running operation) and get back an HttpLongRunningOperationResponse that provides methods for polling the LRO and checking if the LRO is finished.

restoreLROPoller(LROPollState)

Restore an LROPoller from the provided LROPollState. This method can be used to recreate an LROPoller on a different process or machine.

sendLongRunningRequest(RequestPrepareOptions | WebResource, RequestOptionsBase)

Provides a mechanism to make a request that will poll and provide the final result.

sendLRORequest(OperationArguments, OperationSpec, RequestOptionsBase)

Send the initial request of a LRO (long running operation) and get back an LROPoller that provides methods for polling the LRO and checking if the LRO is finished.

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

Send an HTTP request that is populated using the provided OperationSpec.

sendRequest(RequestPrepareOptions | WebResourceLike)

Send the provided httpRequest.

Constructor Details

ResourceGraphClient(ServiceClientCredentials | TokenCredential, ResourceGraphClientOptions)

Initializes a new instance of the ResourceGraphClient class.

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

Parameters

credentials

ServiceClientCredentials | TokenCredential

Credentials needed for the client to connect to Azure. Credentials implementing the TokenCredential interface from the @azure/identity package are recommended. For more information about these credentials, see https://www.npmjs.com/package/@azure/identity. Credentials implementing the ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and @azure/ms-rest-browserauth are also supported.

options
ResourceGraphClientOptions

The parameter options

Property Details

operations

operations: Operations

Property Value

Inherited Property Details

acceptLanguage

acceptLanguage: string

Property Value

string

Inherited From ResourceGraphClientContext.acceptLanguage

credentials

credentials: ServiceClientCredentials | TokenCredential

Property Value

Inherited From ResourceGraphClientContext.credentials

longRunningOperationRetryTimeout

The retry timeout in seconds for Long Running Operations. Default value is 30.

longRunningOperationRetryTimeout?: number

Property Value

number

Inherited From ResourceGraphClientContext.longRunningOperationRetryTimeout

Method Details

resourceChangeDetails(ResourceChangeDetailsRequestParameters, RequestOptionsBase)

Get resource change details.

function resourceChangeDetails(parameters: ResourceChangeDetailsRequestParameters, options?: RequestOptionsBase): Promise<ResourceChangeDetailsResponse>

Parameters

parameters
ResourceChangeDetailsRequestParameters

The parameters for this request for resource change details.

options
RequestOptionsBase

The optional parameters

Returns

Promise<Models.ResourceChangeDetailsResponse>

resourceChangeDetails(ResourceChangeDetailsRequestParameters, RequestOptionsBase, ServiceCallback<ResourceChangeData[]>)

function resourceChangeDetails(parameters: ResourceChangeDetailsRequestParameters, options: RequestOptionsBase, callback: ServiceCallback<ResourceChangeData[]>)

Parameters

parameters
ResourceChangeDetailsRequestParameters

The parameters for this request for resource change details.

options
RequestOptionsBase

The optional parameters

callback

ServiceCallback<ResourceChangeData[]>

The callback

resourceChangeDetails(ResourceChangeDetailsRequestParameters, ServiceCallback<ResourceChangeData[]>)

function resourceChangeDetails(parameters: ResourceChangeDetailsRequestParameters, callback: ServiceCallback<ResourceChangeData[]>)

Parameters

parameters
ResourceChangeDetailsRequestParameters

The parameters for this request for resource change details.

callback

ServiceCallback<ResourceChangeData[]>

The callback

resourceChanges(ResourceChangesRequestParameters, RequestOptionsBase)

List changes to a resource for a given time interval.

function resourceChanges(parameters: ResourceChangesRequestParameters, options?: RequestOptionsBase): Promise<ResourceChangesResponse>

Parameters

parameters
ResourceChangesRequestParameters

the parameters for this request for changes.

options
RequestOptionsBase

The optional parameters

Returns

Promise<Models.ResourceChangesResponse>

resourceChanges(ResourceChangesRequestParameters, RequestOptionsBase, ServiceCallback<ResourceChangeList>)

function resourceChanges(parameters: ResourceChangesRequestParameters, options: RequestOptionsBase, callback: ServiceCallback<ResourceChangeList>)

Parameters

parameters
ResourceChangesRequestParameters

the parameters for this request for changes.

options
RequestOptionsBase

The optional parameters

callback

ServiceCallback<ResourceChangeList>

The callback

resourceChanges(ResourceChangesRequestParameters, ServiceCallback<ResourceChangeList>)

function resourceChanges(parameters: ResourceChangesRequestParameters, callback: ServiceCallback<ResourceChangeList>)

Parameters

parameters
ResourceChangesRequestParameters

the parameters for this request for changes.

callback

ServiceCallback<ResourceChangeList>

The callback

resources(QueryRequest, RequestOptionsBase)

Queries the resources managed by Azure Resource Manager for scopes specified in the request.

function resources(query: QueryRequest, options?: RequestOptionsBase): Promise<ResourcesResponse>

Parameters

query
QueryRequest

Request specifying query and its options.

options
RequestOptionsBase

The optional parameters

Returns

Promise<Models.ResourcesResponse>

resources(QueryRequest, RequestOptionsBase, ServiceCallback<QueryResponse>)

function resources(query: QueryRequest, options: RequestOptionsBase, callback: ServiceCallback<QueryResponse>)

Parameters

query
QueryRequest

Request specifying query and its options.

options
RequestOptionsBase

The optional parameters

callback

ServiceCallback<QueryResponse>

The callback

resources(QueryRequest, ServiceCallback<QueryResponse>)

function resources(query: QueryRequest, callback: ServiceCallback<QueryResponse>)

Parameters

query
QueryRequest

Request specifying query and its options.

callback

ServiceCallback<QueryResponse>

The callback

resourcesHistory(ResourcesHistoryRequest, RequestOptionsBase)

List all snapshots of a resource for a given time interval.

function resourcesHistory(request: ResourcesHistoryRequest, options?: RequestOptionsBase): Promise<ResourcesHistoryResponse>

Parameters

options
RequestOptionsBase

The optional parameters

Returns

Promise<Models.ResourcesHistoryResponse>

resourcesHistory(ResourcesHistoryRequest, RequestOptionsBase, ServiceCallback<any>)

function resourcesHistory(request: ResourcesHistoryRequest, options: RequestOptionsBase, callback: ServiceCallback<any>)

Parameters

options
RequestOptionsBase

The optional parameters

callback

ServiceCallback<any>

The callback

resourcesHistory(ResourcesHistoryRequest, ServiceCallback<any>)

function resourcesHistory(request: ResourcesHistoryRequest, callback: ServiceCallback<any>)

Parameters

callback

ServiceCallback<any>

The callback

Inherited Method Details

beginLongRunningRequest(RequestPrepareOptions | WebResource, RequestOptionsBase)

Send the initial request of a LRO (long running operation) and get back an HttpLongRunningOperationResponse that provides methods for polling the LRO and checking if the LRO is finished.

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

Parameters

request

RequestPrepareOptions | WebResource

The request object

options
RequestOptionsBase

Additional options to be sent while making the request

Returns

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

The HttpLongRunningOperationResponse that provides methods for interacting with the LRO.

Inherited From ResourceGraphClientContext.beginLongRunningRequest

restoreLROPoller(LROPollState)

Restore an LROPoller from the provided LROPollState. This method can be used to recreate an LROPoller on a different process or machine.

function restoreLROPoller(lroPollState: LROPollState): LROPoller

Parameters

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

Returns

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

Inherited From ResourceGraphClientContext.restoreLROPoller

sendLongRunningRequest(RequestPrepareOptions | WebResource, RequestOptionsBase)

Provides a mechanism to make a request that will poll and provide the final result.

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

Parameters

request

RequestPrepareOptions | WebResource

The request object

options
RequestOptionsBase

Additional options to be sent while making the request

Returns

The HttpOperationResponse containing the final polling request, response and the responseBody.

Inherited From ResourceGraphClientContext.sendLongRunningRequest

sendLRORequest(OperationArguments, OperationSpec, RequestOptionsBase)

Send the initial request of a LRO (long running operation) and get back an LROPoller that provides methods for polling the LRO and checking if the LRO is finished.

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

Parameters

operationArguments
OperationArguments

The arguments to the operation.

operationSpec
OperationSpec

The specification for the operation.

options
RequestOptionsBase

Additional options to be sent while making the request.

Returns

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

The LROPoller object that provides methods for interacting with the LRO.

Inherited From ResourceGraphClientContext.sendLRORequest

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

Send an HTTP request that is populated using the provided OperationSpec.

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

Parameters

operationArguments
OperationArguments

The arguments that the HTTP request's templated values will be populated from.

operationSpec
OperationSpec

The OperationSpec to use to populate the httpRequest.

callback

ServiceCallback<any>

The callback to call when the response is received.

Returns

Promise<RestResponse>

Inherited From ResourceGraphClientContext.sendOperationRequest

sendRequest(RequestPrepareOptions | WebResourceLike)

Send the provided httpRequest.

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

Parameters

Returns

Inherited From ResourceGraphClientContext.sendRequest