query_results
Creates, updates, deletes, gets or lists a query_results resource.
Overview
| Name | query_results |
| Type | Resource |
| Id | aws.internetmonitor.query_results |
Fields
The following fields are returned by SELECT queries:
- get_query_results
| Name | Datatype | Description |
|---|---|---|
data | array | The data results that the query returns. Data is returned in arrays, aligned with the Fields for the query, which creates a repository of Amazon CloudWatch Internet Monitor information for your application. Then, you can filter the information in the repository by using FilterParameters that you define. |
fields | array | The fields that the query returns data for. Fields are name-data type pairs, such as availability_score-float. |
next_token | string | The token for the next set of results. You receive this token from a previous call. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_query_results | select | monitor_name, query_id, region | NextToken, MaxResults | Return the data for a query with the Amazon CloudWatch Internet Monitor query interface. Specify the query that you want to return results for by providing a QueryId and a monitor name. For more information about using the query interface, including examples, see Using the Amazon CloudWatch Internet Monitor query interface in the Amazon CloudWatch Internet Monitor User Guide. |
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 |
|---|---|---|
monitor_name | string | The name of the monitor to return data for. |
query_id | string | The ID of the query that you want to return data results for. A QueryId is an internally-generated identifier for a specific query. |
region | string | AWS region (default: us-east-1) |
MaxResults | integer | The number of query results that you want to return with this call. |
NextToken | string | The token for the next set of results. You receive this token from a previous call. |
SELECT examples
- get_query_results
Return the data for a query with the Amazon CloudWatch Internet Monitor query interface. Specify the query that you want to return results for by providing a QueryId and a monitor name. For more information about using the query interface, including examples, see Using the Amazon CloudWatch Internet Monitor query interface in the Amazon CloudWatch Internet Monitor User Guide.
SELECT
data,
fields,
next_token
FROM aws.internetmonitor.query_results
WHERE monitor_name = '{{ monitor_name }}' -- required
AND query_id = '{{ query_id }}' -- required
AND region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;