Skip to main content

query_results

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

Overview

Namequery_results
TypeResource
Idaws.internetmonitor.query_results

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
dataarrayThe 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.
fieldsarrayThe fields that the query returns data for. Fields are name-data type pairs, such as availability_score-float.
next_tokenstringThe token for the next set of results. You receive this token from a previous call.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_query_resultsselectmonitor_name, query_id, regionNextToken, MaxResultsReturn 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.

NameDatatypeDescription
monitor_namestringThe name of the monitor to return data for.
query_idstringThe ID of the query that you want to return data results for. A QueryId is an internally-generated identifier for a specific query.
regionstringAWS region (default: us-east-1)
MaxResultsintegerThe number of query results that you want to return with this call.
NextTokenstringThe token for the next set of results. You receive this token from a previous call.

SELECT examples

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 }}'
;