Amazon CloudWatch Cloudwatch Scheduled Query API

The Cloudwatch Scheduled Query API from Amazon CloudWatch — 5 operation(s) for cloudwatch scheduled query.

GitHub OpenAPI

Operations 5

POST /#CreateScheduledQuery Create Scheduled Query #
POST /#DeleteScheduledQuery Delete Scheduled Query #
POST /#GetScheduledQuery Get Scheduled Query #
POST /#ListScheduledQueries List Scheduled Queries #
POST /#UpdateScheduledQuery Update Scheduled Query #

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-cloudwatch:amazon-cloudwatch-scheduled-query-api"
All apis
curl "https://apis.io/api/v1/apis?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.

OpenAPI Specification

amazon-cloudwatch-scheduled-query-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon CloudWatch Scheduled Query API
  version: '2010-08-01'
  description: Generated from AWS's published Smithy model for Amazon CloudWatch. 5 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://logs.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#CreateScheduledQuery:
    post:
      operationId: CreateScheduledQuery
      summary: Create Scheduled Query
      description: Creates a scheduled query that runs CloudWatch Logs Insights queries at regular intervals. Scheduled queries
        enable proactive monitoring by automatically executing queries to detect patterns and anomalies in your log data.
        Query results can be delivered to Amazon S3 for analysis or further processing.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/CreateScheduledQueryResponse'
        '400':
          description: AccessDeniedException; ConflictException; ResourceNotFoundException; ServiceQuotaExceededException;
            ThrottlingException; ValidationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.CreateScheduledQuery
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/CreateScheduledQueryRequest'
      tags:
      - Scheduled Query
  /#DeleteScheduledQuery:
    post:
      operationId: DeleteScheduledQuery
      summary: Delete Scheduled Query
      description: Deletes a scheduled query and stops all future executions. This operation also removes any configured actions
        and associated resources.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DeleteScheduledQueryResponse'
        '400':
          description: AccessDeniedException; ResourceNotFoundException; ThrottlingException; ValidationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.DeleteScheduledQuery
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/DeleteScheduledQueryRequest'
      tags:
      - Scheduled Query
  /#GetScheduledQuery:
    post:
      operationId: GetScheduledQuery
      summary: Get Scheduled Query
      description: Retrieves details about a specific scheduled query, including its configuration, execution status, and
        metadata.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetScheduledQueryResponse'
        '400':
          description: AccessDeniedException; ResourceNotFoundException; ThrottlingException; ValidationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.GetScheduledQuery
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetScheduledQueryRequest'
      tags:
      - Scheduled Query
  /#ListScheduledQueries:
    post:
      operationId: ListScheduledQueries
      summary: List Scheduled Queries
      description: Lists all scheduled queries in your account and region. You can filter results by state to show only enabled
        or disabled queries.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ListScheduledQueriesResponse'
        '400':
          description: AccessDeniedException; ThrottlingException; ValidationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.ListScheduledQueries
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/ListScheduledQueriesRequest'
      tags:
      - Scheduled Query
  /#UpdateScheduledQuery:
    post:
      operationId: UpdateScheduledQuery
      summary: Update Scheduled Query
      description: Updates an existing scheduled query with new configuration. This operation uses PUT semantics, allowing
        modification of query parameters, schedule, and destinations.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/UpdateScheduledQueryResponse'
        '400':
          description: AccessDeniedException; ConflictException; ResourceNotFoundException; ThrottlingException; ValidationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.UpdateScheduledQuery
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/UpdateScheduledQueryRequest'
      tags:
      - Scheduled Query
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: logs
  schemas:
    AccessDeniedException:
      type: object
      properties:
        message:
          type: string
    CreateScheduledQueryRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the scheduled query. The name must be unique within your account and region. Length must
            be between 1 and 300 characters.
        description:
          type: string
          description: An optional description for the scheduled query to help identify its purpose and functionality.
        queryLanguage:
          type: string
          enum:
          - CWLI
          - SQL
          - PPL
          description: The query language to use for the scheduled query. Valid values are CWLI, PPL, and SQL.
        queryString:
          type: string
          description: The query string to execute. This is the same query syntax used in CloudWatch Logs Insights. Maximum
            length is 10,000 characters.
        logGroupIdentifiers:
          type: array
          items:
            type: string
          description: An array of log group names or ARNs to query. You can specify between 1 and 50 log groups. Log groups
            can be identified by name or full ARN.
        scheduleExpression:
          type: string
          description: A cron expression that defines when the scheduled query runs. The expression uses standard cron syntax
            and supports minute-level precision. Maximum length is 256 characters.
        timezone:
          type: string
          description: The timezone for evaluating the schedule expression. This determines when the scheduled query executes
            relative to the specified timezone.
        startTimeOffset:
          type: integer
          description: The time offset in seconds that defines the lookback period for the query. This determines how far
            back in time the query searches from the execution time.
        endTimeOffset:
          type: integer
          description: The time offset in seconds that defines the end of the lookback period for the query. Together with
            startTimeOffset, this determines the time window relative to the execution time over which the query runs.
        destinationConfiguration:
          $ref: '#/components/schemas/DestinationConfiguration'
        scheduleStartTime:
          type: integer
          description: The start time for the scheduled query in Unix epoch format. The query will not execute before this
            time.
        scheduleEndTime:
          type: integer
          description: The end time for the scheduled query in Unix epoch format. The query will stop executing after this
            time.
        executionRoleArn:
          type: string
          description: The ARN of the IAM role that grants permissions to execute the query and deliver results to the specified
            destination. The role must have permissions to read from the specified log groups and write to the destination.
        state:
          type: string
          enum:
          - ENABLED
          - DISABLED
          description: The initial state of the scheduled query. Valid values are ENABLED and DISABLED. Default is ENABLED.
        tags:
          type: object
          additionalProperties:
            type: string
          description: Key-value pairs to associate with the scheduled query for resource management and cost allocation.
      required:
      - name
      - queryLanguage
      - queryString
      - scheduleExpression
      - executionRoleArn
    CreateScheduledQueryResponse:
      type: object
      properties:
        scheduledQueryArn:
          type: string
          description: The ARN of the created scheduled query.
        state:
          type: string
          enum:
          - ENABLED
          - DISABLED
          description: The current state of the scheduled query.
    DeleteScheduledQueryRequest:
      type: object
      properties:
        identifier:
          type: string
          description: The ARN or name of the scheduled query to delete.
      required:
      - identifier
    DeleteScheduledQueryResponse:
      type: object
      properties: {}
    DestinationConfiguration:
      type: object
      properties:
        s3Configuration:
          $ref: '#/components/schemas/S3Configuration'
        lookupTableConfiguration:
          $ref: '#/components/schemas/LookupTableConfiguration'
    GetScheduledQueryRequest:
      type: object
      properties:
        identifier:
          type: string
          description: The ARN or name of the scheduled query to retrieve.
      required:
      - identifier
    GetScheduledQueryResponse:
      type: object
      properties:
        scheduledQueryArn:
          type: string
          description: The ARN of the scheduled query.
        name:
          type: string
          description: The name of the scheduled query.
        description:
          type: string
          description: The description of the scheduled query.
        queryLanguage:
          type: string
          enum:
          - CWLI
          - SQL
          - PPL
          description: The query language used by the scheduled query.
        queryString:
          type: string
          description: The query string executed by the scheduled query.
        logGroupIdentifiers:
          type: array
          items:
            type: string
          description: The log groups queried by the scheduled query.
        scheduleExpression:
          type: string
          description: The cron expression that defines when the scheduled query runs.
        timezone:
          type: string
          description: The timezone used for evaluating the schedule expression.
        startTimeOffset:
          type: integer
          description: The time offset in seconds that defines the lookback period for the query.
        endTimeOffset:
          type: integer
          description: The time offset in seconds that defines the end of the lookback period for the query.
        destinationConfiguration:
          $ref: '#/components/schemas/DestinationConfiguration'
        state:
          type: string
          enum:
          - ENABLED
          - DISABLED
          description: The current state of the scheduled query.
        scheduleType:
          type: string
          enum:
          - CUSTOMER_MANAGED
          - AWS_MANAGED
          description: The schedule type of the scheduled query. Valid values are CUSTOMER_MANAGED and AWS_MANAGED.
        lastTriggeredTime:
          type: integer
          description: The timestamp when the scheduled query was last executed.
        lastExecutionStatus:
          type: string
          enum:
          - Running
          - InvalidQuery
          - Complete
          - Failed
          - Timeout
          description: The status of the most recent execution of the scheduled query.
        scheduleStartTime:
          type: integer
          description: The start time for the scheduled query in Unix epoch format.
        scheduleEndTime:
          type: integer
          description: The end time for the scheduled query in Unix epoch format.
        executionRoleArn:
          type: string
          description: The ARN of the IAM role used to execute the query and deliver results.
        creationTime:
          type: integer
          description: The timestamp when the scheduled query was created.
        lastUpdatedTime:
          type: integer
          description: The timestamp when the scheduled query was last updated.
    InternalServerException:
      type: object
      properties:
        message:
          type: string
    ListScheduledQueriesRequest:
      type: object
      properties:
        maxResults:
          type: integer
          description: The maximum number of scheduled queries to return. Valid range is 1 to 1000.
        nextToken:
          type: string
        state:
          type: string
          enum:
          - ENABLED
          - DISABLED
          description: Filter scheduled queries by state. Valid values are ENABLED and DISABLED. If not specified, all scheduled
            queries are returned.
        scheduleType:
          type: string
          enum:
          - CUSTOMER_MANAGED
          - AWS_MANAGED
          description: Filter scheduled queries by schedule type. Valid values are CUSTOMER_MANAGED and AWS_MANAGED. If not
            specified, scheduled queries of all schedule types are returned.
    ListScheduledQueriesResponse:
      type: object
      properties:
        nextToken:
          type: string
        scheduledQueries:
          type: array
          items:
            $ref: '#/components/schemas/ScheduledQuerySummary'
          description: An array of scheduled query summary information.
    LookupTableConfiguration:
      type: object
      properties:
        tableName:
          type: string
          description: The name of the lookup table to create or update with query results. The name can contain only alphanumeric
            characters and underscores.
        roleArn:
          type: string
          description: The ARN of the IAM role that grants permissions to create or update the lookup table with query results.
        description:
          type: string
          description: A description of the lookup table.
        kmsKeyId:
          type: string
          description: The ARN of the KMS key to use to encrypt the lookup table data. If you don't specify a key, the data
            is encrypted with an Amazon Web Services-owned key.
        tags:
          type: object
          additionalProperties:
            type: string
          description: Key-value pairs to associate with the lookup table for resource management and cost allocation. The
            service applies tags only during initial table creation.
      required:
      - tableName
      - roleArn
    S3Configuration:
      type: object
      properties:
        destinationIdentifier:
          type: string
          description: The Amazon S3 URI where query results are delivered. Must be a valid S3 URI format.
        roleArn:
          type: string
          description: The ARN of the IAM role that grants permissions to write query results to the specified Amazon S3 destination.
        ownerAccountId:
          type: string
          description: The Amazon Web Services accountId for the bucket owning account.
        kmsKeyId:
          type: string
          description: The Amazon Resource Name (ARN) of the KMS encryption key. Must belong to the same Amazon Web Services
            Region as the destination Amazon S3 bucket.
      required:
      - destinationIdentifier
      - roleArn
    ScheduledQuerySummary:
      type: object
      properties:
        scheduledQueryArn:
          type: string
          description: The ARN of the scheduled query.
        name:
          type: string
          description: The name of the scheduled query.
        state:
          type: string
          enum:
          - ENABLED
          - DISABLED
          description: The current state of the scheduled query.
        scheduleType:
          type: string
          enum:
          - CUSTOMER_MANAGED
          - AWS_MANAGED
          description: The schedule type of the scheduled query. Valid values are CUSTOMER_MANAGED and AWS_MANAGED.
        lastTriggeredTime:
          type: integer
          description: The timestamp when the scheduled query was last executed.
        lastExecutionStatus:
          type: string
          enum:
          - Running
          - InvalidQuery
          - Complete
          - Failed
          - Timeout
          description: The status of the most recent execution.
        scheduleExpression:
          type: string
          description: The cron expression that defines when the scheduled query runs.
        timezone:
          type: string
          description: The timezone used for evaluating the schedule expression.
        destinationConfiguration:
          $ref: '#/components/schemas/DestinationConfiguration'
        creationTime:
          type: integer
          description: The timestamp when the scheduled query was created.
        lastUpdatedTime:
          type: integer
          description: The timestamp when the scheduled query was last updated.
    UpdateScheduledQueryRequest:
      type: object
      properties:
        identifier:
          type: string
          description: The ARN or name of the scheduled query to update.
        description:
          type: string
          description: An updated description for the scheduled query.
        queryLanguage:
          type: string
          enum:
          - CWLI
          - SQL
          - PPL
          description: The updated query language for the scheduled query.
        queryString:
          type: string
          description: The updated query string to execute.
        logGroupIdentifiers:
          type: array
          items:
            type: string
          description: The updated array of log group names or ARNs to query.
        scheduleExpression:
          type: string
          description: The updated cron expression that defines when the scheduled query runs.
        timezone:
          type: string
          description: The updated timezone for evaluating the schedule expression.
        startTimeOffset:
          type: integer
          description: The updated time offset in seconds that defines the lookback period for the query.
        endTimeOffset:
          type: integer
          description: The updated time offset in seconds that defines the end of the lookback period for the query.
        destinationConfiguration:
          $ref: '#/components/schemas/DestinationConfiguration'
        scheduleStartTime:
          type: integer
          description: The updated start time for the scheduled query in Unix epoch format.
        scheduleEndTime:
          type: integer
          description: The updated end time for the scheduled query in Unix epoch format.
        executionRoleArn:
          type: string
          description: The updated ARN of the IAM role that grants permissions to execute the query and deliver results.
        state:
          type: string
          enum:
          - ENABLED
          - DISABLED
          description: The updated state of the scheduled query.
      required:
      - identifier
      - queryLanguage
      - queryString
      - scheduleExpression
      - executionRoleArn
    UpdateScheduledQueryResponse:
      type: object
      properties:
        scheduledQueryArn:
          type: string
          description: The ARN of the updated scheduled query.
        name:
          type: string
          description: The name of the updated scheduled query.
        description:
          type: string
          description: The description of the updated scheduled query.
        queryLanguage:
          type: string
          enum:
          - CWLI
          - SQL
          - PPL
          description: The query language of the updated scheduled query.
        queryString:
          type: string
          description: The query string of the updated scheduled query.
        logGroupIdentifiers:
          type: array
          items:
            type: string
          description: The log groups queried by the updated scheduled query.
        scheduleExpression:
          type: string
          description: The cron expression of the updated scheduled query.
        timezone:
          type: string
          description: The timezone of the updated scheduled query.
        startTimeOffset:
          type: integer
          description: The time offset of the updated scheduled query.
        endTimeOffset:
          type: integer
          description: The end time offset in seconds of the updated scheduled query.
        destinationConfiguration:
          $ref: '#/components/schemas/DestinationConfiguration'
        state:
          type: string
          enum:
          - ENABLED
          - DISABLED
          description: The state of the updated scheduled query.
        scheduleType:
          type: string
          enum:
          - CUSTOMER_MANAGED
          - AWS_MANAGED
          description: The schedule type of the updated scheduled query.
        lastTriggeredTime:
          type: integer
          description: The timestamp when the updated scheduled query was last executed.
        lastExecutionStatus:
          type: string
          enum:
          - Running
          - InvalidQuery
          - Complete
          - Failed
          - Timeout
          description: The status of the most recent execution of the updated scheduled query.
        scheduleStartTime:
          type: integer
          description: The start time of the updated scheduled query.
        scheduleEndTime:
          type: integer
          description: The end time of the updated scheduled query.
        executionRoleArn:
          type: string
          description: The execution role ARN of the updated scheduled query.
        creationTime:
          type: integer
          description: The timestamp when the scheduled query was originally created.
        lastUpdatedTime:
          type: integer
          description: The timestamp when the scheduled query was last updated.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/cloudwatch-logs/service/2014-03-28/cloudwatch-logs-2014-03-28.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)