> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CloudWatch Logs Get Query Results

Returns the results from the specified query.

Only the fields requested in the query are returned, along with a `@ptr` field, which is the identifier for the log record. You can use the value of `@ptr` in a [GetLogRecord](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogRecord.html) operation to get the full log record.

`GetQueryResults` does not start a query execution. To run a query, use [StartQuery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html).

If the value of the `Status` field in the output is `Running`, this operation returns only partial results. If you see a value of `Scheduled` or `Running` for the status, you can retry the operation later to see the final results.

<Note>
  External Documentation

  To learn more, visit the [AWS documentation](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter     | Description                                                                                                                                                                                                                                                               |
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | AWS Region(s) | Enter the desired AWS Region(s).<br /><br />To execute the action in multiple regions, provide a comma-separated list.<br />For example: `us-east-1,eu-west-2`.<br /><br />If you wish to run the action in all available regions, use the asterisk symbol (`*`) instead. |
  | Query ID      | The ID number of the query.                                                                                                                                                                                                                                               |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter                        | Description                                                                   |
  | -------------------------------- | ----------------------------------------------------------------------------- |
  | Disable XML To JSON Auto Convert | When checked, XML responses are not automatically converted into JSON format. |
</div>

## Example Output

```json theme={"dark"}
{
	"results": [
		[
			{
				"field": "string",
				"value": "string"
			}
		]
	],
	"statistics": {
		"bytesScanned": 0,
		"recordsMatched": 0,
		"recordsScanned": 0
	},
	"status": "string"
}
```

## Workflow Library Example

[Cloudwatch Logs Get Query Results with Aws and Send Results Via Email](https://library.blinkops.com/workflows/cloudwatch-logs-get-query-results-with-aws-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/cloudwatch-logs-get-query-results-with-aws-and-send-results-via-email/canvas" />
</div>
