Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StartQueryCommand

Schedules a query of a log group using CloudWatch Logs Insights. You specify the log group and time range to query and the query string to use.

For more information, see CloudWatch Logs Insights Query Syntax.

Queries time out after 15 minutes of execution. If your queries are timing out, reduce the time range being searched or partition your query into a number of queries.

example

Use a bare-bones client and the command you need to make an API call.

import { CloudWatchLogsClient, StartQueryCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import
// const { CloudWatchLogsClient, StartQueryCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import
const client = new CloudWatchLogsClient(config);
const command = new StartQueryCommand(input);
const response = await client.send(command);
see

StartQueryCommandInput for command's input shape.

see

StartQueryCommandOutput for command's response shape.

see

config for CloudWatchLogsClient's config shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

Properties

Readonly input

input: StartQueryCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<StartQueryCommandInput, StartQueryCommandOutput>