Amazon CloudWatch · Schema
PutQueryDefinitionRequest
Amazon Web ServicesCloudWatchMonitoringObservabilityMetricsLogs
Properties
| Name | Type | Description |
|---|---|---|
| queryLanguage | string | Specify the query language to use for this query. The options are Logs Insights QL, OpenSearch PPL, and OpenSearch SQL. For more information about the query languages that CloudWatch Logs supports, se |
| name | string | A name for the query definition. If you are saving numerous query definitions, we recommend that you name them. This way, you can find the ones you want by using the first part of the name as a filter |
| queryDefinitionId | string | If you are updating a query definition, use this parameter to specify the ID of the query definition that you want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved que |
| logGroupNames | array | Use this parameter to include specific log groups as part of your query definition. If your query uses the OpenSearch Service query language, you specify the log group names inside the querystring ins |
| queryString | string | The query string to use for this definition. For more information, see CloudWatch Logs Insights Query Syntax. |
| clientToken | string | Used as an idempotency token, to avoid returning an exception if the service receives the same request twice because of a network error. |
| parameters | array | 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 placeholde |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/amazon-cloudwatch/json-schema/amazon-cloudwatch-put-query-definition-request-schema.json",
"title": "PutQueryDefinitionRequest",
"x-generated": "2026-11-11",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/amazon-cloudwatch-query-definition-api-openapi.yml#/components/schemas/PutQueryDefinitionRequest",
"type": "object",
"properties": {
"queryLanguage": {
"type": "string",
"enum": [
"CWLI",
"SQL",
"PPL"
],
"description": "Specify the query language to use for this query. The options are Logs Insights QL, OpenSearch PPL, and OpenSearch SQL. For more information about the query languages that CloudWatch Logs supports, see Supported query languages."
},
"name": {
"type": "string",
"description": "A name for the query definition. If you are saving numerous query definitions, we recommend that you name them. This way, you can find the ones you want by using the first part of the name as a filter in the queryDefinitionNamePrefix parameter of DescribeQueryDefinitions."
},
"queryDefinitionId": {
"type": "string",
"description": "If you are updating a query definition, use this parameter to specify the ID of the query definition that you want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions. If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID for the new query definition and include it in the response to this operation."
},
"logGroupNames": {
"type": "array",
"items": {
"type": "string"
},
"description": "Use this parameter to include specific log groups as part of your query definition. If your query uses the OpenSearch Service query language, you specify the log group names inside the querystring instead of here. If you are updating an existing query definition for the Logs Insights QL or OpenSearch Service PPL and you omit this parameter, then the updated definition will contain no log groups."
},
"queryString": {
"type": "string",
"description": "The query string to use for this definition. For more information, see CloudWatch Logs Insights Query Syntax."
},
"clientToken": {
"type": "string",
"description": "Used as an idempotency token, to avoid returning an exception if the service receives the same request twice because of a network error."
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/$defs/QueryParameter"
},
"description": "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."
}
},
"required": [
"name",
"queryString"
],
"$defs": {
"QueryParameter": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the query parameter. A query parameter name must start with a letter or underscore, and contain only letters, digits, and underscores."
},
"defaultValue": {
"type": "string",
"description": "The default value to use for this query parameter if no value is supplied at execution time."
},
"description": {
"type": "string",
"description": "A description of the query parameter that explains its purpose or expected values."
}
},
"required": [
"name"
]
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/amazon-cloudwatch-put-query-definition-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.