queries
Creates, updates, deletes, gets or lists a queries resource.
Overview
| Name | queries |
| Type | Resource |
| Id | aws.iotsitewise.queries |
Fields
The following fields are returned by SELECT queries:
- describe_query
- list_queries
| Name | Datatype | Description |
|---|---|---|
completed_at | string (date-time) | The date and time when the query reached a terminal state, in Unix epoch time. This field is present when the query status is COMPLETED, FAILED, or CANCELED. |
error_message | string | A human-readable error description. This field is present when the query status is FAILED. |
query_id | string | The unique identifier for a query execution. (pattern: <code>[a-zA-Z0-9-]+</code>) |
statistics | object | The query execution statistics. This field is present when the query status is COMPLETED. |
status | string | The current query status. (SUBMITTED, RUNNING, COMPLETED, FAILED, CANCELED, CANCELING) |
submitted_at | string (date-time) | The date and time when the query was submitted, in Unix epoch time. |
| Name | Datatype | Description |
|---|---|---|
completed_at | string (date-time) | The date and time when the query reached a terminal state, in Unix epoch time. |
query_id | string | The unique identifier for a query execution. (pattern: <code>[a-zA-Z0-9-]+</code>) |
status | string | The current query status. (SUBMITTED, RUNNING, COMPLETED, FAILED, CANCELED, CANCELING) |
submitted_at | string (date-time) | The date and time when the query was submitted, in Unix epoch time. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_query | select | workspace_name, query_id, region | Retrieves information about a query, including its status. | |
list_queries | select | workspace_name, region | filter, maxResults, nextToken | Retrieves a paginated list of queries for a workspace. |
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 |
|---|---|---|
query_id | string | The unique identifier for the query execution. |
region | string | AWS region (default: us-east-1) |
workspace_name | string | The name of the workspace to list queries for. |
filter | string | An optional filter to return only queries with the specified status. The value must be one of the supported query statuses: SUBMITTED, RUNNING, COMPLETED, FAILED, CANCELED, or CANCELING. |
maxResults | integer | The maximum number of results to return for each paginated request. |
nextToken | string | The token to be used for the next set of paginated results. |
SELECT examples
- describe_query
- list_queries
Retrieves information about a query, including its status.
SELECT
completed_at,
error_message,
query_id,
statistics,
status,
submitted_at
FROM aws.iotsitewise.queries
WHERE workspace_name = '{{ workspace_name }}' -- required
AND query_id = '{{ query_id }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves a paginated list of queries for a workspace.
SELECT
completed_at,
query_id,
status,
submitted_at
FROM aws.iotsitewise.queries
WHERE workspace_name = '{{ workspace_name }}' -- required
AND region = '{{ region }}' -- required
AND filter = '{{ filter }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;