Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class DescribeQueryDefinitionsCommandProtected

This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions.

You can use the queryDefinitionNamePrefix parameter to limit the results to only the query definitions that have names that start with a certain string.

Example

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

import { CloudWatchLogsClient, DescribeQueryDefinitionsCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import
// const { CloudWatchLogsClient, DescribeQueryDefinitionsCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import
const client = new CloudWatchLogsClient(config);
const input = { // DescribeQueryDefinitionsRequest
queryDefinitionNamePrefix: "STRING_VALUE",
maxResults: Number("int"),
nextToken: "STRING_VALUE",
};
const command = new DescribeQueryDefinitionsCommand(input);
const response = await client.send(command);
// { // DescribeQueryDefinitionsResponse
// queryDefinitions: [ // QueryDefinitionList
// { // QueryDefinition
// queryDefinitionId: "STRING_VALUE",
// name: "STRING_VALUE",
// queryString: "STRING_VALUE",
// lastModified: Number("long"),
// logGroupNames: [ // LogGroupNames
// "STRING_VALUE",
// ],
// },
// ],
// nextToken: "STRING_VALUE",
// };

Param

DescribeQueryDefinitionsCommandInput

Returns

DescribeQueryDefinitionsCommandOutput

See

Throws

InvalidParameterException (client fault)

A parameter is specified incorrectly.

Throws

ServiceUnavailableException (server fault)

The service cannot complete the request.

Throws

CloudWatchLogsServiceException

Base exception class for all service exceptions from CloudWatchLogs service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods