Skip to content

StopQuery

Source: src/AWS/Logs/StopQuery.ts

Runtime binding for logs:StopQuery (CloudWatch Logs Insights).

Bind this operation to the LogGroup an Insights query was started against (via StartQuery) to cancel it while it is still Scheduled or Running — e.g. on caller timeout or shutdown.

const startQuery = yield* AWS.Logs.StartQuery(logGroup);
const stopQuery = yield* AWS.Logs.StopQuery(logGroup);
const { queryId } = yield* startQuery({ queryString, startTime, endTime });
const { success } = yield* stopQuery({ queryId: queryId! });