Show / Hide Table of Contents

Class QueryDefinition

Define a query definition for CloudWatch Logs Insights.

Inheritance
object
Resource
QueryDefinition
Implements
IResource
IConstruct
IDependable
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class QueryDefinition : Resource, IResource, IConstruct, IDependable
Syntax (vb)
Public Class QueryDefinition Inherits Resource Implements IResource, IConstruct, IDependable
Remarks

ExampleMetadata: infused

Examples
new QueryDefinition(this, "QueryDefinition", new QueryDefinitionProps {
                QueryDefinitionName = "MyQuery",
                QueryString = new QueryString(new QueryStringProps {
                    Fields = new [] { "@timestamp", "@message" },
                    ParseStatements = new [] { "@message \"[*] *\" as loggingType, loggingMessage", "@message \"<*>: *\" as differentLoggingType, differentLoggingMessage" },
                    FilterStatements = new [] { "loggingType = \"ERROR\"", "loggingMessage = \"A very strange error occurred!\"" },
                    Sort = "@timestamp desc",
                    Limit = 20
                })
            });

Synopsis

Constructors

QueryDefinition(Construct, string, IQueryDefinitionProps)

Define a query definition for CloudWatch Logs Insights.

Properties

PROPERTY_INJECTION_ID

Uniquely identifies this class.

QueryDefinitionId

The ID of the query definition.

Constructors

QueryDefinition(Construct, string, IQueryDefinitionProps)

Define a query definition for CloudWatch Logs Insights.

public QueryDefinition(Construct scope, string id, IQueryDefinitionProps props)
Parameters
scope Construct
id string
props IQueryDefinitionProps
Remarks

ExampleMetadata: infused

Examples
new QueryDefinition(this, "QueryDefinition", new QueryDefinitionProps {
                QueryDefinitionName = "MyQuery",
                QueryString = new QueryString(new QueryStringProps {
                    Fields = new [] { "@timestamp", "@message" },
                    ParseStatements = new [] { "@message \"[*] *\" as loggingType, loggingMessage", "@message \"<*>: *\" as differentLoggingType, differentLoggingMessage" },
                    FilterStatements = new [] { "loggingType = \"ERROR\"", "loggingMessage = \"A very strange error occurred!\"" },
                    Sort = "@timestamp desc",
                    Limit = 20
                })
            });

Properties

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

ExampleMetadata: infused

QueryDefinitionId

The ID of the query definition.

public virtual string QueryDefinitionId { get; }
Property Value

string

Remarks

Attribute: true

Implements

IResource
Constructs.IConstruct
Constructs.IDependable
Back to top Generated by DocFX