Amazon CloudWatch Cloudwatch Log Anomaly Detector API

The Cloudwatch Log Anomaly Detector API from Amazon CloudWatch — 5 operation(s) for cloudwatch log anomaly detector.

GitHub OpenAPI

Operations 5

POST /#CreateLogAnomalyDetector Create Log Anomaly Detector #
POST /#DeleteLogAnomalyDetector Delete Log Anomaly Detector #
POST /#GetLogAnomalyDetector Get Log Anomaly Detector #
POST /#ListLogAnomalyDetectors List Log Anomaly Detectors #
POST /#UpdateLogAnomalyDetector Update Log Anomaly Detector #

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-log-anomaly-detector-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-log-anomaly-detector-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon CloudWatch Log Anomaly Detector 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:
  /#CreateLogAnomalyDetector:
    post:
      operationId: CreateLogAnomalyDetector
      summary: Create Log Anomaly Detector
      description: 'Creates an anomaly detector that regularly scans one or more log groups and look for patterns and anomalies
        in the logs. An anomaly detector can help surface issues by automatically discovering anomalies in your log event
        traffic. An anomaly detector uses machine learning algorithms to scan log events and find patterns. A pattern is a
        shared text structure that recurs among your log fields. Patterns provide a useful tool for analyzing large sets of
        logs because a large number of log events can often be compressed into a few patterns. The anomaly detector uses pattern
        recognition to find anomalies, which are unusual log events. It uses the evaluationFrequency to compare current log
        events and patterns with trained baselines. Fields within a pattern are called tokens. Fields that vary within a pattern,
        such as a request ID or timestamp, are referred to as dynamic tokens and represented by . The following is an example
        of a pattern: [INFO] Request time: ms This pattern represents log events like [INFO] Request time: 327 ms and other
        similar log events that differ only by the number, in this csse 327. When the pattern is displayed, the different
        numbers are replaced by Any parts of log'
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/CreateLogAnomalyDetectorResponse'
        '400':
          description: InvalidParameterException; LimitExceededException; OperationAbortedException; ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InvalidParameterException'
        '500':
          description: ServiceUnavailableException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.CreateLogAnomalyDetector
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/CreateLogAnomalyDetectorRequest'
      tags:
      - Log Anomaly Detector
  /#DeleteLogAnomalyDetector:
    post:
      operationId: DeleteLogAnomalyDetector
      summary: Delete Log Anomaly Detector
      description: Deletes the specified CloudWatch Logs anomaly detector.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                type: string
        '400':
          description: InvalidParameterException; OperationAbortedException; ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InvalidParameterException'
        '500':
          description: ServiceUnavailableException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.DeleteLogAnomalyDetector
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/DeleteLogAnomalyDetectorRequest'
      tags:
      - Log Anomaly Detector
  /#GetLogAnomalyDetector:
    post:
      operationId: GetLogAnomalyDetector
      summary: Get Log Anomaly Detector
      description: Retrieves information about the log anomaly detector that you specify. The KMS key ARN detected is valid.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetLogAnomalyDetectorResponse'
        '400':
          description: InvalidParameterException; OperationAbortedException; ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InvalidParameterException'
        '500':
          description: ServiceUnavailableException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.GetLogAnomalyDetector
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetLogAnomalyDetectorRequest'
      tags:
      - Log Anomaly Detector
  /#ListLogAnomalyDetectors:
    post:
      operationId: ListLogAnomalyDetectors
      summary: List Log Anomaly Detectors
      description: Retrieves a list of the log anomaly detectors in the account.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ListLogAnomalyDetectorsResponse'
        '400':
          description: InvalidParameterException; OperationAbortedException; ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InvalidParameterException'
        '500':
          description: ServiceUnavailableException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.ListLogAnomalyDetectors
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/ListLogAnomalyDetectorsRequest'
      tags:
      - Log Anomaly Detector
  /#UpdateLogAnomalyDetector:
    post:
      operationId: UpdateLogAnomalyDetector
      summary: Update Log Anomaly Detector
      description: Updates an existing log anomaly detector.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                type: string
        '400':
          description: InvalidParameterException; OperationAbortedException; ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InvalidParameterException'
        '500':
          description: ServiceUnavailableException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - Logs_20140328.UpdateLogAnomalyDetector
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/UpdateLogAnomalyDetectorRequest'
      tags:
      - Log Anomaly Detector
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:
    CreateLogAnomalyDetectorRequest:
      type: object
      properties:
        logGroupArnList:
          type: array
          items:
            type: string
          description: An array containing the ARN of the log group that this anomaly detector will watch. You can specify
            only one log group ARN.
        detectorName:
          type: string
          description: A name for this anomaly detector.
        evaluationFrequency:
          type: string
          enum:
          - ONE_MIN
          - FIVE_MIN
          - TEN_MIN
          - FIFTEEN_MIN
          - THIRTY_MIN
          - ONE_HOUR
          description: Specifies how often the anomaly detector is to run and look for anomalies. Set this value according
            to the frequency that the log group receives new logs. For example, if the log group receives new log events every
            10 minutes, then 15 minutes might be a good setting for evaluationFrequency .
        filterPattern:
          type: string
          description: You can use this parameter to limit the anomaly detection model to examine only log events that match
            the pattern you specify here. For more information, see Filter and Pattern Syntax.
        kmsKeyId:
          type: string
          description: Optionally assigns a KMS key to secure this anomaly detector and its findings. If a key is assigned,
            the anomalies found and the model used by this detector are encrypted at rest with the key. If a key is assigned
            to an anomaly detector, a user must have permissions for both this key and for the anomaly detector to retrieve
            information about the anomalies that it finds. Make sure the value provided is a valid KMS key ARN. For more information
            about using a KMS key and to see the required IAM policy, see Use a KMS key with an anomaly detector.
        anomalyVisibilityTime:
          type: integer
          description: The number of days to have visibility on an anomaly. After this time period has elapsed for an anomaly,
            it will be automatically baselined and the anomaly detector will treat new occurrences of a similar anomaly as
            normal. Therefore, if you do not correct the cause of an anomaly during the time period specified in anomalyVisibilityTime,
            it will be considered normal going forward and will not be detected as an anomaly.
        tags:
          type: object
          additionalProperties:
            type: string
          description: An optional list of key-value pairs to associate with the resource. For more information about tagging,
            see Tagging Amazon Web Services resources
      required:
      - logGroupArnList
    CreateLogAnomalyDetectorResponse:
      type: object
      properties:
        anomalyDetectorArn:
          type: string
          description: The ARN of the log anomaly detector that you just created.
    DeleteLogAnomalyDetectorRequest:
      type: object
      properties:
        anomalyDetectorArn:
          type: string
          description: The ARN of the anomaly detector to delete. You can find the ARNs of log anomaly detectors in your account
            by using the ListLogAnomalyDetectors operation.
      required:
      - anomalyDetectorArn
    GetLogAnomalyDetectorRequest:
      type: object
      properties:
        anomalyDetectorArn:
          type: string
          description: The ARN of the anomaly detector to retrieve information about. You can find the ARNs of log anomaly
            detectors in your account by using the ListLogAnomalyDetectors operation.
      required:
      - anomalyDetectorArn
    GetLogAnomalyDetectorResponse:
      type: object
      properties:
        detectorName:
          type: string
          description: The name of the log anomaly detector
        logGroupArnList:
          type: array
          items:
            type: string
          description: An array of structures, where each structure contains the ARN of a log group associated with this anomaly
            detector.
        evaluationFrequency:
          type: string
          enum:
          - ONE_MIN
          - FIVE_MIN
          - TEN_MIN
          - FIFTEEN_MIN
          - THIRTY_MIN
          - ONE_HOUR
          description: Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the
            frequency that the log group receives new logs. For example, if the log group receives new log events every 10
            minutes, then setting evaluationFrequency to FIFTEEN_MIN might be appropriate.
        filterPattern:
          type: string
        anomalyDetectorStatus:
          type: string
          enum:
          - INITIALIZING
          - TRAINING
          - ANALYZING
          - FAILED
          - DELETED
          - PAUSED
          description: Specifies whether the anomaly detector is currently active. To change its status, use the enabled parameter
            in the UpdateLogAnomalyDetector operation.
        kmsKeyId:
          type: string
          description: The ARN of the KMS key assigned to this anomaly detector, if any.
        creationTimeStamp:
          type: integer
          description: The date and time when this anomaly detector was created.
        lastModifiedTimeStamp:
          type: integer
          description: The date and time when this anomaly detector was most recently modified.
        anomalyVisibilityTime:
          type: integer
          description: The number of days used as the life cycle of anomalies. After this time, anomalies are automatically
            baselined and the anomaly detector model will treat new occurrences of similar event as normal.
    InvalidParameterException:
      type: object
      properties:
        message:
          type: string
    ListLogAnomalyDetectorsRequest:
      type: object
      properties:
        filterLogGroupArn:
          type: string
          description: Use this to optionally filter the results to only include anomaly detectors that are associated with
            the specified log group.
        limit:
          type: integer
          description: The maximum number of items to return. If you don't specify a value, the default maximum value of 50
            items is used.
        nextToken:
          type: string
    ListLogAnomalyDetectorsResponse:
      type: object
      properties:
        anomalyDetectors:
          type: array
          items:
            $ref: '#/components/schemas/LogsAnomalyDetector'
          description: An array of structures, where each structure in the array contains information about one anomaly detector.
        nextToken:
          type: string
    LogsAnomalyDetector:
      type: object
      properties:
        anomalyDetectorArn:
          type: string
          description: The ARN of the anomaly detector.
        detectorName:
          type: string
          description: The name of the anomaly detector.
        logGroupArnList:
          type: array
          items:
            type: string
          description: A list of the ARNs of the log groups that this anomaly detector watches.
        evaluationFrequency:
          type: string
          enum:
          - ONE_MIN
          - FIVE_MIN
          - TEN_MIN
          - FIFTEEN_MIN
          - THIRTY_MIN
          - ONE_HOUR
          description: Specifies how often the anomaly detector runs and look for anomalies.
        filterPattern:
          type: string
        anomalyDetectorStatus:
          type: string
          enum:
          - INITIALIZING
          - TRAINING
          - ANALYZING
          - FAILED
          - DELETED
          - PAUSED
          description: Specifies the current status of the anomaly detector. To pause an anomaly detector, use the enabled
            parameter in the UpdateLogAnomalyDetector operation.
        kmsKeyId:
          type: string
          description: The ARN of the KMS key assigned to this anomaly detector, if any.
        creationTimeStamp:
          type: integer
          description: The date and time when this anomaly detector was created.
        lastModifiedTimeStamp:
          type: integer
          description: The date and time when this anomaly detector was most recently modified.
        anomalyVisibilityTime:
          type: integer
          description: The number of days used as the life cycle of anomalies. After this time, anomalies are automatically
            baselined and the anomaly detector model will treat new occurrences of similar event as normal.
    ServiceUnavailableException:
      type: object
      properties:
        message:
          type: string
    UpdateLogAnomalyDetectorRequest:
      type: object
      properties:
        anomalyDetectorArn:
          type: string
          description: The ARN of the anomaly detector that you want to update.
        evaluationFrequency:
          type: string
          enum:
          - ONE_MIN
          - FIVE_MIN
          - TEN_MIN
          - FIFTEEN_MIN
          - THIRTY_MIN
          - ONE_HOUR
          description: Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the
            frequency that the log group receives new logs. For example, if the log group receives new log events every 10
            minutes, then setting evaluationFrequency to FIFTEEN_MIN might be appropriate.
        filterPattern:
          type: string
        anomalyVisibilityTime:
          type: integer
          description: The number of days to use as the life cycle of anomalies. After this time, anomalies are automatically
            baselined and the anomaly detector model will treat new occurrences of similar event as normal. Therefore, if
            you do not correct the cause of an anomaly during this time, it will be considered normal going forward and will
            not be detected.
        enabled:
          type: boolean
          description: Use this parameter to pause or restart the anomaly detector.
      required:
      - anomalyDetectorArn
      - enabled
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)