CfnQueryDefinitionProps
- class aws_cdk.aws_logs.CfnQueryDefinitionProps(*, name, query_string, log_group_names=None, parameters=None, query_language=None)
Bases:
objectProperties 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[Union[str,ILogGroupRef]]]) – Use this parameter if you want the query to query only certain log groups.parameters (
Union[IResolvable,Sequence[Union[IResolvable,QueryParameterProperty,Dict[str,Any]]],None]) – 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.query_language (
Optional[str]) – The query language used for this query. For more information about the query languages that CloudWatch Logs supports, see Supported query languages . Default: - “CWLI”
- 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"], parameters=[logs.CfnQueryDefinition.QueryParameterProperty( name="name", # the properties below are optional default_value="defaultValue", description="description" )], query_language="queryLanguage" )
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*.
- parameters
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.
- query_language
The query language used for this query.
For more information about the query languages that CloudWatch Logs supports, see Supported query languages .
- query_string
The query string to use for this query definition.
For more information, see CloudWatch Logs Insights Query Syntax .