tools
Creates, updates, deletes, gets or lists a tools resource.
Overview
| Name | tools |
| Type | Resource |
| Id | azure.ai_discovery.tools |
Fields
The following fields are returned by SELECT queries:
- get_run_status
- get_operations
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the operation. Required. |
error | object | Error object that describes the error when status is "Failed". |
result | object | The result of the operation. |
status | string | The status of the operation. Required. Known values are: "NotStarted", "Running", "Succeeded", "Failed", and "Canceled". (NotStarted, Running, Succeeded, Failed, Canceled) |
| Name | Datatype | Description |
|---|---|---|
nextLink | string | The link to the next page of items. |
value | array | The Operation items on this page. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_run_status | select | project_name, operation_id, endpoint | logCount | Used for to poll status of a Tool run. |
get_operations | select | project_name, endpoint | skip, top, maxPageSize | List tool runs. |
get_compute_usage | exec | project_name, endpoint | Examine compute usage. | |
run | exec | project_name, endpoint | Run the specified tool in the context of the specified project. | |
cancel_run | exec | project_name, operation_id, endpoint | Cancel 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.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
operation_id | string | ID of the operation to cancel. Required. |
project_name | string | Name of the associated Project. Required. |
logCount | integer | Number of log lines to return (0-2500). Default value is None. |
maxPageSize | integer | Bound the number of results that come back in one response (pagination control). Default value is None. |
skip | integer | Skip results (pagination control). Default value is None. |
top | integer | Query the top results (pagination control). Default value is None. |
SELECT examples
- get_run_status
- get_operations
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 }}'
;
List tool runs.
SELECT
nextLink,
value
FROM azure.ai_discovery.tools
WHERE project_name = '{{ project_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND skip = '{{ skip }}'
AND top = '{{ top }}'
AND maxPageSize = '{{ maxPageSize }}'
;
Lifecycle Methods
- get_compute_usage
- run
- cancel_run
Examine compute usage.
EXEC azure.ai_discovery.tools.get_compute_usage
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Run the specified tool in the context of the specified project.
EXEC azure.ai_discovery.tools.run
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Cancel an ongoing tool run.
EXEC azure.ai_discovery.tools.cancel_run
@project_name='{{ project_name }}' --required,
@operation_id='{{ operation_id }}' --required,
@endpoint='{{ endpoint }}' --required
;