Class QueryDefinition
Define a query definition for CloudWatch Logs Insights.
Inherited Members
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class QueryDefinition : Resource, IResource
Syntax (vb)
Public Class QueryDefinition
Inherits Resource
Implements IResource
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(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
QueryDefinition(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
QueryDefinition(Construct, String, IQueryDefinitionProps) |
Properties
QueryDefinitionId | The ID of the query definition. |
Constructors
QueryDefinition(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected QueryDefinition(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
QueryDefinition(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected QueryDefinition(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
QueryDefinition(Construct, String, IQueryDefinitionProps)
public QueryDefinition(Construct scope, string id, IQueryDefinitionProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IQueryDefinitionProps
Properties
QueryDefinitionId
The ID of the query definition.
public virtual string QueryDefinitionId { get; }
Property Value
System.String
Remarks
Attribute: true
Implements
Constructs.IConstruct
Constructs.IDependable