Skip to main content

tools

Creates, updates, deletes, gets or lists a tools resource.

Overview

Nametools
TypeResource
Idazure.ai_discovery.tools

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique ID of the operation. Required.
errorobjectError object that describes the error when status is "Failed".
resultobjectThe result of the operation.
statusstringThe status of the operation. Required. Known values are: "NotStarted", "Running", "Succeeded", "Failed", and "Canceled". (NotStarted, Running, Succeeded, Failed, Canceled)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_run_statusselectproject_name, operation_id, endpointlogCountUsed for to poll status of a Tool run.
get_operationsselectproject_name, endpointskip, top, maxPageSizeList tool runs.
get_compute_usageexecproject_name, endpointExamine compute usage.
runexecproject_name, endpointRun the specified tool in the context of the specified project.
cancel_runexecproject_name, operation_id, endpointCancel an ongoing tool run.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
operation_idstringID of the operation to cancel. Required.
project_namestringName of the associated Project. Required.
logCountintegerNumber of log lines to return (0-2500). Default value is None.
maxPageSizeintegerBound the number of results that come back in one response (pagination control). Default value is None.
skipintegerSkip results (pagination control). Default value is None.
topintegerQuery the top results (pagination control). Default value is None.

SELECT examples

Used for to poll status of a Tool run.

SELECT
id,
error,
result,
status
FROM azure.ai_discovery.tools
WHERE project_name = '{{ project_name }}' -- required
AND operation_id = '{{ operation_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND logCount = '{{ logCount }}'
;

Lifecycle Methods

Examine compute usage.

EXEC azure.ai_discovery.tools.get_compute_usage 
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
;