We recommend new projects start with resources from the AWS provider.
published on Monday, Apr 20, 2026 by Pulumi
We recommend new projects start with resources from the AWS provider.
published on Monday, Apr 20, 2026 by Pulumi
The resource schema for AWSLogs QueryDefinition
Create QueryDefinition Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new QueryDefinition(name: string, args: QueryDefinitionArgs, opts?: CustomResourceOptions);@overload
def QueryDefinition(resource_name: str,
args: QueryDefinitionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def QueryDefinition(resource_name: str,
opts: Optional[ResourceOptions] = None,
query_string: Optional[str] = None,
log_group_names: Optional[Sequence[str]] = None,
name: Optional[str] = None,
parameters: Optional[Sequence[QueryDefinitionQueryParameterArgs]] = None,
query_language: Optional[QueryDefinitionQueryLanguage] = None)func NewQueryDefinition(ctx *Context, name string, args QueryDefinitionArgs, opts ...ResourceOption) (*QueryDefinition, error)public QueryDefinition(string name, QueryDefinitionArgs args, CustomResourceOptions? opts = null)
public QueryDefinition(String name, QueryDefinitionArgs args)
public QueryDefinition(String name, QueryDefinitionArgs args, CustomResourceOptions options)
type: aws-native:logs:QueryDefinition
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args QueryDefinitionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args QueryDefinitionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args QueryDefinitionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args QueryDefinitionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args QueryDefinitionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
QueryDefinition Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The QueryDefinition resource accepts the following input properties:
- Query
String string - The query string to use for this definition
- Log
Group List<string>Names - Optionally define specific log groups as part of your query definition
- Name string
- A name for the saved query definition
- Parameters
List<Pulumi.
Aws Native. Logs. Inputs. Query Definition Query Parameter> - 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 Pulumi.Aws Native. Logs. Query Definition Query Language - Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.
- Query
String string - The query string to use for this definition
- Log
Group []stringNames - Optionally define specific log groups as part of your query definition
- Name string
- A name for the saved query definition
- Parameters
[]Query
Definition Query Parameter Args - 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 QueryDefinition Query Language - Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.
- query
String String - The query string to use for this definition
- log
Group List<String>Names - Optionally define specific log groups as part of your query definition
- name String
- A name for the saved query definition
- parameters
List<Query
Definition Query Parameter> - 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 QueryDefinition Query Language - Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.
- query
String string - The query string to use for this definition
- log
Group string[]Names - Optionally define specific log groups as part of your query definition
- name string
- A name for the saved query definition
- parameters
Query
Definition Query Parameter[] - 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 QueryDefinition Query Language - Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.
- query_
string str - The query string to use for this definition
- log_
group_ Sequence[str]names - Optionally define specific log groups as part of your query definition
- name str
- A name for the saved query definition
- parameters
Sequence[Query
Definition Query Parameter Args] - 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 QueryDefinition Query Language - Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.
- query
String String - The query string to use for this definition
- log
Group List<String>Names - Optionally define specific log groups as part of your query definition
- name String
- A name for the saved query definition
- parameters List<Property Map>
- 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 "CWLI" | "SQL" | "PPL" - Query language of the query string. Possible values are CWLI, SQL, PPL, with CWLI being the default.
Outputs
All input properties are implicitly available as output properties. Additionally, the QueryDefinition resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Query
Definition stringId - Unique identifier of a query definition
- Id string
- The provider-assigned unique ID for this managed resource.
- Query
Definition stringId - Unique identifier of a query definition
- id String
- The provider-assigned unique ID for this managed resource.
- query
Definition StringId - Unique identifier of a query definition
- id string
- The provider-assigned unique ID for this managed resource.
- query
Definition stringId - Unique identifier of a query definition
- id str
- The provider-assigned unique ID for this managed resource.
- query_
definition_ strid - Unique identifier of a query definition
- id String
- The provider-assigned unique ID for this managed resource.
- query
Definition StringId - Unique identifier of a query definition
Supporting Types
QueryDefinitionQueryLanguage, QueryDefinitionQueryLanguageArgs
- Cwli
CWLI- Sql
SQL- Ppl
PPL
- Query
Definition Query Language Cwli CWLI- Query
Definition Query Language Sql SQL- Query
Definition Query Language Ppl PPL
- Cwli
CWLI- Sql
SQL- Ppl
PPL
- Cwli
CWLI- Sql
SQL- Ppl
PPL
- CWLI
CWLI- SQL
SQL- PPL
PPL
- "CWLI"
CWLI- "SQL"
SQL- "PPL"
PPL
QueryDefinitionQueryParameter, QueryDefinitionQueryParameterArgs
This structure defines a query parameter for a saved CloudWatch Logs Insights query definition. Query parameters are supported only for Logs Insights QL queries. They are placeholder variables that you can reference in a query string using the {{parameterName}} syntax. Each parameter can include a default value and a description.- Name string
- The name of the query parameter. A query parameter name must start with a letter or underscore, and contain only letters, digits, and underscores.
- Default
Value string - The default value to use for this query parameter if no value is supplied at execution time.
- Description string
- A description of the query parameter that explains its purpose or expected values.
- Name string
- The name of the query parameter. A query parameter name must start with a letter or underscore, and contain only letters, digits, and underscores.
- Default
Value string - The default value to use for this query parameter if no value is supplied at execution time.
- Description string
- A description of the query parameter that explains its purpose or expected values.
- name String
- The name of the query parameter. A query parameter name must start with a letter or underscore, and contain only letters, digits, and underscores.
- default
Value String - The default value to use for this query parameter if no value is supplied at execution time.
- description String
- A description of the query parameter that explains its purpose or expected values.
- name string
- The name of the query parameter. A query parameter name must start with a letter or underscore, and contain only letters, digits, and underscores.
- default
Value string - The default value to use for this query parameter if no value is supplied at execution time.
- description string
- A description of the query parameter that explains its purpose or expected values.
- name str
- The name of the query parameter. A query parameter name must start with a letter or underscore, and contain only letters, digits, and underscores.
- default_
value str - The default value to use for this query parameter if no value is supplied at execution time.
- description str
- A description of the query parameter that explains its purpose or expected values.
- name String
- The name of the query parameter. A query parameter name must start with a letter or underscore, and contain only letters, digits, and underscores.
- default
Value String - The default value to use for this query parameter if no value is supplied at execution time.
- description String
- A description of the query parameter that explains its purpose or expected values.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.
published on Monday, Apr 20, 2026 by Pulumi
