Skip to main content

searches

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

Overview

Namesearches
TypeResource
Idaws.iotsitewise.searches

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
group_idstringThe 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_statementstringThe natural-language query that was submitted for the search.
search_idstringThe 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_typestringThe search strategy used for the search. (DEEP, QUICK)
started_atstring (date-time)The time at which the search was started.
statusstringThe current status of the search. (QUEUED, RUNNING, SUCCEEDED, FAILED)
status_reasonstringA human-readable explanation of the current status. Populated when the search has FAILED.
workspace_namestringThe name of the workspace the search runs against. (pattern: <code>^[a-zA-Z0-9_-]+$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_searchselectworkspace_name, search_id, regionReturns 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_searchesselectworkspace_name, regionLists 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
search_idstringThe identifier of the search to describe.
workspace_namestringThe name of the workspace whose searches are listed.

SELECT examples

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
;