searches
Creates, updates, deletes, gets or lists a searches resource.
Overview
| Name | searches |
| Type | Resource |
| Id | aws.iotsitewise.searches |
Fields
The following fields are returned by SELECT queries:
- describe_search
- list_searches
| Name | Datatype | Description |
|---|---|---|
group_id | string | The group identifier associated with the search, if one was supplied on the request. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]*</code>) |
query_statement | string | The natural-language query that was submitted for the search. |
search_id | string | The unique identifier of a search, assigned by the service when the search is started. (pattern: <code>[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*</code>) |
search_type | string | The search strategy used for the search. (DEEP, QUICK) |
started_at | string (date-time) | The time at which the search was started. |
status | string | The current status of the search. (QUEUED, RUNNING, SUCCEEDED, FAILED) |
status_reason | string | A human-readable explanation of the current status. Populated when the search has FAILED. |
workspace_name | string | The name of the workspace the search runs against. (pattern: <code>^[a-zA-Z0-9_-]+$</code>) |
| Name | Datatype | Description |
|---|---|---|
group_id | string | A caller-supplied identifier used to group related searches together. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]*</code>) |
query_statement | string | The natural-language query that was submitted for the search. |
search_id | string | The unique identifier of a search, assigned by the service when the search is started. (pattern: <code>[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*</code>) |
search_type | string | The search strategy, which trades off latency against recall. DEEP runs the full semantic and structured search for the highest-quality matches; QUICK returns faster, lower-recall results. When searchType is omitted on a request, the search defaults to QUICK. (DEEP, QUICK) |
started_at | string (date-time) | The time at which the search was started. |
status | string | The lifecycle status of a search. (QUEUED, RUNNING, SUCCEEDED, FAILED) |
status_reason | string | A human-readable explanation of the current status. Populated when the search has FAILED. |
workspace_name | string | The name of the workspace the search runs against. (pattern: <code>^[a-zA-Z0-9_-]+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_search | select | workspace_name, search_id, region | Returns the current status and metadata of a single search, including the query that was submitted, the search type, and — when the search has failed — the reason. Use this to poll a search started with StartSearch until it reaches a terminal status (SUCCEEDED or FAILED). | |
list_searches | select | workspace_name, region | Lists the searches in a workspace, most recently started first. Results can be narrowed with optional filters (status, search type, group, and started-at time range) and are paginated: when nextToken is present, pass it on a subsequent call to retrieve the next page. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
search_id | string | The identifier of the search to describe. |
workspace_name | string | The name of the workspace whose searches are listed. |
SELECT examples
- describe_search
- list_searches
Returns the current status and metadata of a single search, including the query that was submitted, the search type, and — when the search has failed — the reason. Use this to poll a search started with StartSearch until it reaches a terminal status (SUCCEEDED or FAILED).
SELECT
group_id,
query_statement,
search_id,
search_type,
started_at,
status,
status_reason,
workspace_name
FROM aws.iotsitewise.searches
WHERE workspace_name = '{{ workspace_name }}' -- required
AND search_id = '{{ search_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the searches in a workspace, most recently started first. Results can be narrowed with optional filters (status, search type, group, and started-at time range) and are paginated: when nextToken is present, pass it on a subsequent call to retrieve the next page.
SELECT
group_id,
query_statement,
search_id,
search_type,
started_at,
status,
status_reason,
workspace_name
FROM aws.iotsitewise.searches
WHERE workspace_name = '{{ workspace_name }}' -- required
AND region = '{{ region }}' -- required
;