CfnQueryDefinitionProps
- class aws_cdk.aws_logs.CfnQueryDefinitionProps(*, name, query_string, log_group_names=None)
Bases:
object
Properties for defining a
CfnQueryDefinition
.- Parameters:
name (
str
) – A name for the query definition. .. epigraph:: You can use the name to create a folder structure for your queries. To create a folder, use a forward slash (/) to prefix your desired query name with your desired folder name. For example,*folder-name* / *query-name*
.query_string (
str
) – The query string to use for this query definition. For more information, see CloudWatch Logs Insights Query Syntax .log_group_names (
Optional
[Sequence
[str
]]) – Use this parameter if you want the query to query only certain log groups.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-querydefinition.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_logs as logs cfn_query_definition_props = logs.CfnQueryDefinitionProps( name="name", query_string="queryString", # the properties below are optional log_group_names=["logGroupNames"] )
Attributes
- log_group_names
Use this parameter if you want the query to query only certain log groups.
- name
A name for the query definition.
You can use the name to create a folder structure for your queries. To create a folder, use a forward slash (/) to prefix your desired query name with your desired folder name. For example,
*folder-name* / *query-name*
.
- query_string
The query string to use for this query definition.
For more information, see CloudWatch Logs Insights Query Syntax .