Amazon CloudWatch Cloudwatch Import Task API

The Cloudwatch Import Task API from Amazon CloudWatch — 3 operation(s) for cloudwatch import task.

GitHub OpenAPI

Operations 3

POST /#CancelImportTask Cancel Import Task #
POST /#CreateImportTask Create Import Task #
POST /#DescribeImportTasks Describe Import Tasks #

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-import-task-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-import-task-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon CloudWatch Import Task API
  version: '2010-08-01'
  description: Generated from AWS's published Smithy model for Amazon CloudWatch. 3 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:
  /#CancelImportTask:
    post:
      operationId: CancelImportTask
      summary: Cancel Import Task
      description: Cancels an active import task and stops importing data from the CloudTrail Lake Event Data Store.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/CancelImportTaskResponse'
        '400':
          description: AccessDeniedException; InvalidOperationException; InvalidParameterException; ResourceNotFoundException;
            ThrottlingException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.CancelImportTask
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/CancelImportTaskRequest'
      tags:
      - Import Task
  /#CreateImportTask:
    post:
      operationId: CreateImportTask
      summary: Create Import Task
      description: 'Starts an import from a data source to CloudWatch Log and creates a managed log group as the destination
        for the imported data. Currently, CloudTrail Event Data Store is the only supported data source. The import task must
        satisfy the following constraints: The specified source must be in an ACTIVE state. The API caller must have permissions
        to access the data in the provided source and to perform iam:PassRole on the provided import role which has the same
        permissions, as described below. The provided IAM role must trust the "cloudtrail.amazonaws.com" principal and have
        the following permissions: cloudtrail:GetEventDataStoreData logs:CreateLogGroup logs:CreateLogStream logs:PutResourcePolicy
        (If source has an associated Amazon Web Services KMS Key) kms:Decrypt (If source has an associated Amazon Web Services
        KMS Key) kms:GenerateDataKey Example IAM policy for provided import role: [ { "Effect": "Allow", "Action": "iam:PassRole",
        "Resource": "arn:aws:iam::123456789012:role/apiCallerCredentials", "Condition": { "StringLike": { "iam:AssociatedResourceARN":
        "arn:aws:logs:us-east-1:123456789012:log-group:aws/cloudtrail/f1d45bff-d0e3-4868-b5d9-2eb678aa32fb:*" } } }, { "Effect":
        "Allow", '
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/CreateImportTaskResponse'
        '400':
          description: AccessDeniedException; ConflictException; InvalidOperationException; InvalidParameterException; ResourceNotFoundException;
            ThrottlingException; ValidationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.CreateImportTask
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/CreateImportTaskRequest'
      tags:
      - Import Task
  /#DescribeImportTasks:
    post:
      operationId: DescribeImportTasks
      summary: Describe Import Tasks
      description: Lists and describes import tasks, with optional filtering by import status and source ARN.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DescribeImportTasksResponse'
        '400':
          description: AccessDeniedException; InvalidOperationException; InvalidParameterException; ResourceNotFoundException;
            ThrottlingException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.DescribeImportTasks
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/DescribeImportTasksRequest'
      tags:
      - Import Task
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
    CancelImportTaskRequest:
      type: object
      properties:
        importId:
          type: string
          description: The ID of the import task to cancel.
      required:
      - importId
    CancelImportTaskResponse:
      type: object
      properties:
        importId:
          type: string
          description: The ID of the cancelled import task.
        importStatistics:
          $ref: '#/components/schemas/ImportStatistics'
        importStatus:
          type: string
          enum:
          - IN_PROGRESS
          - CANCELLED
          - COMPLETED
          - FAILED
          description: The final status of the import task. This will be set to CANCELLED.
        creationTime:
          type: integer
          description: The timestamp when the import task was created, expressed as the number of milliseconds after Jan 1,
            1970 00:00:00 UTC.
        lastUpdatedTime:
          type: integer
          description: The timestamp when the import task was cancelled, expressed as the number of milliseconds after Jan
            1, 1970 00:00:00 UTC.
    CreateImportTaskRequest:
      type: object
      properties:
        importSourceArn:
          type: string
          description: The ARN of the source to import from.
        importRoleArn:
          type: string
          description: The ARN of the IAM role that grants CloudWatch Logs permission to import from the CloudTrail Lake Event
            Data Store.
        importFilter:
          $ref: '#/components/schemas/ImportFilter'
      required:
      - importSourceArn
      - importRoleArn
    CreateImportTaskResponse:
      type: object
      properties:
        importId:
          type: string
          description: A unique identifier for the import task.
        importDestinationArn:
          type: string
          description: The ARN of the CloudWatch Logs log group created as the destination for the imported events.
        creationTime:
          type: integer
          description: The timestamp when the import task was created, expressed as the number of milliseconds after Jan 1,
            1970 00:00:00 UTC.
    DescribeImportTasksRequest:
      type: object
      properties:
        importId:
          type: string
          description: Optional filter to describe a specific import task by its ID.
        importStatus:
          type: string
          enum:
          - IN_PROGRESS
          - CANCELLED
          - COMPLETED
          - FAILED
          description: Optional filter to list imports by their status. Valid values are IN_PROGRESS, CANCELLED, COMPLETED
            and FAILED.
        importSourceArn:
          type: string
          description: Optional filter to list imports from a specific source
        limit:
          type: integer
          description: 'The maximum number of import tasks to return in the response. Default: 50'
        nextToken:
          type: string
          description: The pagination token for the next set of results.
    DescribeImportTasksResponse:
      type: object
      properties:
        imports:
          type: array
          items:
            $ref: '#/components/schemas/Import'
          description: The list of import tasks that match the request filters.
        nextToken:
          type: string
          description: The token to use when requesting the next set of results. Not present if there are no additional results
            to retrieve.
    Import:
      type: object
      properties:
        importId:
          type: string
          description: The unique identifier of the import task.
        importSourceArn:
          type: string
          description: The ARN of the CloudTrail Lake Event Data Store being imported from.
        importStatus:
          type: string
          enum:
          - IN_PROGRESS
          - CANCELLED
          - COMPLETED
          - FAILED
          description: The current status of the import task. Valid values are IN_PROGRESS, CANCELLED, COMPLETED and FAILED.
        importDestinationArn:
          type: string
          description: The ARN of the managed CloudWatch Logs log group where the events are being imported to.
        importStatistics:
          $ref: '#/components/schemas/ImportStatistics'
        importFilter:
          $ref: '#/components/schemas/ImportFilter'
        creationTime:
          type: integer
          description: The timestamp when the import task was created, expressed as the number of milliseconds after Jan 1,
            1970 00:00:00 UTC.
        lastUpdatedTime:
          type: integer
          description: The timestamp when the import task was last updated, expressed as the number of milliseconds after
            Jan 1, 1970 00:00:00 UTC.
        errorMessage:
          type: string
          description: Error message related to any failed imports
    ImportFilter:
      type: object
      properties:
        startEventTime:
          type: integer
          description: The start of the time range for events to import, expressed as the number of milliseconds after Jan
            1, 1970 00:00:00 UTC.
        endEventTime:
          type: integer
          description: The end of the time range for events to import, expressed as the number of milliseconds after Jan 1,
            1970 00:00:00 UTC.
    ImportStatistics:
      type: object
      properties:
        bytesImported:
          type: integer
          description: The total number of bytes that have been imported to the managed log group.
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)