AWS Fundamentals Logo
AWS Fundamentals
AWS::Logs::QueryDefinition

Logs QueryDefinition

The resource schema for AWSLogs QueryDefinition

Properties

4 configurable properties. 2 required. Click a row to see details.

Filter:
PropertyTypeFlags
Name
string
Required
QueryString
string
Required
LogGroupNames
Array<string>
QueryLanguage
string

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
QueryDefinitionIdstringUnique identifier of a query definition

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::Logs::QueryDefinition

Resources:
  MyResource:
    Type: AWS::Logs::QueryDefinition
    Properties:
      Name: "my-name"
      QueryString: "value"

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

logs:PutQueryDefinition

read

logs:DescribeQueryDefinitions

update

logs:PutQueryDefinition

delete

logs:DeleteQueryDefinition

list

logs:DescribeQueryDefinitions

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

ServiceLogs
Properties5
Required2
TaggingNot supported
Primary IDQueryDefinitionId

Supported Operations

CreateReadUpdateDeleteList

External Links