---
type: resource-type
title: QueryDefinition
description: aws resource type AWS::Logs::QueryDefinition
name: QueryDefinition
lexicon: aws
resource_type: AWS::Logs::QueryDefinition
---
`AWS::Logs::QueryDefinition`, a resource type of the aws lexicon.

## Properties

- `Name` (`string`, required): A name for the saved query definition
- `QueryString` (`string`, required): The query string to use for this definition
- `LogGroupNames` (`string[]`, optional): Optionally define specific log groups as part of your query definition
- `Parameters` (`QueryDefinition_QueryParameter[]`, optional): Use this parameter to include specific query parameters as part of your query definition. Query parameters are supported only for Logs Insights QL queries. Query parameters allow you to use placeholder variables in your query string that are substituted with values at execution time. Use the {{parameterName}} syntax in your query string to reference a parameter.
- `QueryDefinitionId` (`string`, optional): Unique identifier of a query definition
- `QueryLanguage` (`"CWLI" | "PPL" | "SQL"`, optional): Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.

## Attributes

- `QueryDefinitionId`
