Amazon Billing And Cost Management Anomaly Detection API

Detect and manage cost anomalies

GitHub OpenAPI
Business capability
IT Financial Management BC-600.80

Operations 3

POST /#CreateAnomalyMonitor Create Anomaly Monitor #
POST /#CreateAnomalySubscription Create Anomaly Subscription #
POST /#GetAnomalies Get Anomalies #

Documentation

Specifications

Schemas & Data

Other Resources

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-billing-and-cost-management:amazon-billing-and-cost-management-anomaly-detection-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-billing-and-cost-management-anomaly-detection-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS Cost Explorer Service Anomaly Detection API
  version: '2017-10-25'
  description: Generated from AWS's published Smithy model for AWS Cost Explorer Service. 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://ce.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#CreateAnomalyMonitor:
    post:
      operationId: CreateAnomalyMonitor
      summary: Create Anomaly Monitor
      description: Creates a new cost anomaly detection monitor with the requested type and monitor specification.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/CreateAnomalyMonitorResponse'
        '400':
          description: LimitExceededException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/LimitExceededException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AWSInsightsIndexService.CreateAnomalyMonitor
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/CreateAnomalyMonitorRequest'
      tags:
      - Anomaly Detection
  /#CreateAnomalySubscription:
    post:
      operationId: CreateAnomalySubscription
      summary: Create Anomaly Subscription
      description: Adds an alert subscription to a cost anomaly detection monitor. You can use each subscription to define
        subscribers with email or SNS notifications. Email subscribers can set an absolute or percentage threshold and a time
        frequency for receiving notifications.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/CreateAnomalySubscriptionResponse'
        '400':
          description: LimitExceededException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/LimitExceededException'
        '404':
          description: UnknownMonitorException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/UnknownMonitorException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AWSInsightsIndexService.CreateAnomalySubscription
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/CreateAnomalySubscriptionRequest'
      tags:
      - Anomaly Detection
  /#GetAnomalies:
    post:
      operationId: GetAnomalies
      summary: Get Anomalies
      description: Retrieves all of the cost anomalies detected on your account during the time period that's specified by
        the DateInterval object. Anomalies are available for up to 90 days.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetAnomaliesResponse'
        '400':
          description: InvalidNextTokenException; LimitExceededException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InvalidNextTokenException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AWSInsightsIndexService.GetAnomalies
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetAnomaliesRequest'
      tags:
      - Anomaly Detection
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: ce
  schemas:
    Anomaly:
      type: object
      properties:
        AnomalyId:
          type: string
          description: The unique identifier for the anomaly.
        AnomalyStartDate:
          type: string
          description: The first day the anomaly is detected.
        AnomalyEndDate:
          type: string
          description: The last day the anomaly is detected.
        DimensionValue:
          type: string
          description: The dimension for the anomaly (for example, an Amazon Web Services service in a service monitor).
        RootCauses:
          type: array
          items:
            $ref: '#/components/schemas/RootCause'
          description: The list of identified root causes for the anomaly.
        AnomalyScore:
          $ref: '#/components/schemas/AnomalyScore'
        Impact:
          $ref: '#/components/schemas/Impact'
        MonitorArn:
          type: string
          description: The Amazon Resource Name (ARN) for the cost monitor that generated this anomaly.
        Feedback:
          type: string
          enum:
          - 'YES'
          - 'NO'
          - PLANNED_ACTIVITY
          description: The feedback value.
      required:
      - AnomalyId
      - AnomalyScore
      - Impact
      - MonitorArn
    AnomalyDateInterval:
      type: object
      properties:
        StartDate:
          type: string
          description: The first date an anomaly was observed.
        EndDate:
          type: string
          description: The last date an anomaly was observed.
      required:
      - StartDate
    AnomalyMonitor:
      type: object
      properties:
        MonitorArn:
          type: string
          description: The Amazon Resource Name (ARN) value.
        MonitorName:
          type: string
          description: The name of the monitor.
        CreationDate:
          type: string
          description: The date when the monitor was created.
        LastUpdatedDate:
          type: string
          description: The date when the monitor was last updated.
        LastEvaluatedDate:
          type: string
          description: The date when the monitor last evaluated for anomalies.
        MonitorType:
          type: string
          enum:
          - DIMENSIONAL
          - CUSTOM
          description: The type of the monitor. Set this to DIMENSIONAL for an Amazon Web Services managed monitor. Amazon
            Web Services managed monitors automatically track up to the top 5,000 values by cost within a dimension of your
            choosing. Each dimension value is evaluated independently. If you start incurring cost in a new value of your
            chosen dimension, it will automatically be analyzed by an Amazon Web Services managed monitor. Set this to CUSTOM
            for a customer managed monitor. Customer managed monitors let you select specific dimension values that get monitored
            in aggregate. For more information about monit
        MonitorDimension:
          type: string
          enum:
          - SERVICE
          - LINKED_ACCOUNT
          - TAG
          - COST_CATEGORY
          description: For customer managed monitors, do not specify this field. For Amazon Web Services managed monitors,
            this field controls which cost dimension is automatically analyzed by the monitor. For TAG and COST_CATEGORY dimensions,
            you must also specify MonitorSpecification to configure the specific tag or cost category key to analyze.
        MonitorSpecification:
          $ref: '#/components/schemas/Expression'
        DimensionalValueCount:
          type: integer
          description: The value for evaluated dimensions.
      required:
      - MonitorName
      - MonitorType
    AnomalyScore:
      type: object
      properties:
        MaxScore:
          type: number
          description: The maximum score that's observed during the AnomalyDateInterval.
        CurrentScore:
          type: number
          description: The last observed score.
      required:
      - MaxScore
      - CurrentScore
    AnomalySubscription:
      type: object
      properties:
        SubscriptionArn:
          type: string
          description: The AnomalySubscription Amazon Resource Name (ARN).
        AccountId:
          type: string
          description: Your unique account identifier.
        MonitorArnList:
          type: array
          items:
            type: string
          description: A list of cost anomaly monitors.
        Subscribers:
          type: array
          items:
            $ref: '#/components/schemas/Subscriber'
          description: A list of subscribers to notify.
        Threshold:
          type: number
          description: (deprecated) An absolute dollar value that must be exceeded by the anomaly's total impact (see Impact
            for more details) for an anomaly notification to be generated. This field has been deprecated. To specify a threshold,
            use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.
            One of Threshold or ThresholdExpression is required for this resource. You cannot specify both.
        Frequency:
          type: string
          enum:
          - DAILY
          - IMMEDIATE
          - WEEKLY
          description: The frequency that anomaly notifications are sent. Notifications are sent either over email (for DAILY
            and WEEKLY frequencies) or SNS (for IMMEDIATE frequency). For more information, see Creating an Amazon SNS topic
            for anomaly notifications.
        SubscriptionName:
          type: string
          description: The name for the subscription.
        ThresholdExpression:
          $ref: '#/components/schemas/Expression'
      required:
      - MonitorArnList
      - Subscribers
      - Frequency
      - SubscriptionName
    CostCategoryValues:
      type: object
      properties:
        Key:
          type: string
        Values:
          type: array
          items:
            type: string
          description: The specific value of the cost category.
        MatchOptions:
          type: array
          items:
            type: string
            enum:
            - EQUALS
            - ABSENT
            - STARTS_WITH
            - ENDS_WITH
            - CONTAINS
            - CASE_SENSITIVE
            - CASE_INSENSITIVE
            - GREATER_THAN_OR_EQUAL
          description: The match options that you can use to filter your results. MatchOptions is only applicable for actions
            related to cost category. The default values for MatchOptions is EQUALS and CASE_SENSITIVE.
    CreateAnomalyMonitorRequest:
      type: object
      properties:
        AnomalyMonitor:
          $ref: '#/components/schemas/AnomalyMonitor'
        ResourceTags:
          type: array
          items:
            $ref: '#/components/schemas/ResourceTag'
          description: 'An optional list of tags to associate with the specified AnomalyMonitor . You can use resource tags
            to control access to your monitor using IAM policies. Each tag consists of a key and a value, and each key must
            be unique for the resource. The following restrictions apply to resource tags: Although the maximum number of
            array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for
            Amazon Web Services use The maximum length of a key is 128 characters The maximum length of a value is 256 characters
            Keys and values can only contain alphanumeric cha'
      required:
      - AnomalyMonitor
    CreateAnomalyMonitorResponse:
      type: object
      properties:
        MonitorArn:
          type: string
          description: The unique identifier of your newly created cost anomaly detection monitor.
      required:
      - MonitorArn
    CreateAnomalySubscriptionRequest:
      type: object
      properties:
        AnomalySubscription:
          $ref: '#/components/schemas/AnomalySubscription'
        ResourceTags:
          type: array
          items:
            $ref: '#/components/schemas/ResourceTag'
          description: 'An optional list of tags to associate with the specified AnomalySubscription . You can use resource
            tags to control access to your subscription using IAM policies. Each tag consists of a key and a value, and each
            key must be unique for the resource. The following restrictions apply to resource tags: Although the maximum number
            of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved
            for Amazon Web Services use The maximum length of a key is 128 characters The maximum length of a value is 256
            characters Keys and values can only contain alphan'
      required:
      - AnomalySubscription
    CreateAnomalySubscriptionResponse:
      type: object
      properties:
        SubscriptionArn:
          type: string
          description: The unique identifier of your newly created cost anomaly subscription.
      required:
      - SubscriptionArn
    DimensionValues:
      type: object
      properties:
        Key:
          type: string
          enum:
          - AZ
          - INSTANCE_TYPE
          - LINKED_ACCOUNT
          - PAYER_ACCOUNT
          - LINKED_ACCOUNT_NAME
          - OPERATION
          - PURCHASE_TYPE
          - REGION
          - SERVICE
          - SERVICE_CODE
          - USAGE_TYPE
          - USAGE_TYPE_GROUP
          - RECORD_TYPE
          - OPERATING_SYSTEM
          - TENANCY
          - SCOPE
          - PLATFORM
          - SUBSCRIPTION_ID
          - LEGAL_ENTITY_NAME
          - DEPLOYMENT_OPTION
          - DATABASE_ENGINE
          - CACHE_ENGINE
          - INSTANCE_TYPE_FAMILY
          - BILLING_ENTITY
          - RESERVATION_ID
          - RESOURCE_ID
          - RIGHTSIZING_TYPE
          - SAVINGS_PLANS_TYPE
          - SAVINGS_PLAN_ARN
          - PAYMENT_OPTION
          - AGREEMENT_END_DATE_TIME_AFTER
          - AGREEMENT_END_DATE_TIME_BEFORE
          - INVOICING_ENTITY
          - ANOMALY_TOTAL_IMPACT_ABSOLUTE
          - ANOMALY_TOTAL_IMPACT_PERCENTAGE
          - PRODUCT_ATTRIBUTE
          description: The names of the metadata types that you can use to filter and group your results. For example, AZ
            returns a list of Availability Zones. Not all dimensions are supported in each API. Refer to the documentation
            for each specific API to see what is supported. LINKED_ACCOUNT_NAME and SERVICE_CODE can only be used in CostCategoryRule.
            ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE can only be used in AnomalySubscriptions. Use
            PRODUCT_ATTRIBUTE only as the Dimension in GetDimensionValues. To filter or group by product attributes, use the
            ProductAttributes field of Expression or t
        Values:
          type: array
          items:
            type: string
          description: The metadata values that you can use to filter and group your results. You can use GetDimensionValues
            to find specific values.
        MatchOptions:
          type: array
          items:
            type: string
            enum:
            - EQUALS
            - ABSENT
            - STARTS_WITH
            - ENDS_WITH
            - CONTAINS
            - CASE_SENSITIVE
            - CASE_INSENSITIVE
            - GREATER_THAN_OR_EQUAL
          description: The match options that you can use to filter your results. MatchOptions is only applicable for actions
            related to cost category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what
            is supported. The default values for MatchOptions are EQUALS and CASE_SENSITIVE.
    Expression:
      type: object
      properties:
        Or:
          type: array
          items:
            $ref: '#/components/schemas/Expression'
          description: Return results that match either Dimension object.
        And:
          type: array
          items:
            $ref: '#/components/schemas/Expression'
          description: Return results that match both Dimension objects.
        Not:
          $ref: '#/components/schemas/Expression'
        Dimensions:
          $ref: '#/components/schemas/DimensionValues'
        Tags:
          $ref: '#/components/schemas/TagValues'
        CostCategories:
          $ref: '#/components/schemas/CostCategoryValues'
        ProductAttributes:
          $ref: '#/components/schemas/ProductAttributeValues'
    GetAnomaliesRequest:
      type: object
      properties:
        MonitorArn:
          type: string
          description: Retrieves all of the cost anomalies detected for a specific cost anomaly monitor Amazon Resource Name
            (ARN).
        DateInterval:
          $ref: '#/components/schemas/AnomalyDateInterval'
        Feedback:
          type: string
          enum:
          - 'YES'
          - 'NO'
          - PLANNED_ACTIVITY
          description: Filters anomaly results by the feedback field on the anomaly object.
        TotalImpact:
          $ref: '#/components/schemas/TotalImpactFilter'
        NextPageToken:
          type: string
          description: The token to retrieve the next set of results. Amazon Web Services provides the token when the response
            from a previous call has more results than the maximum page size.
        MaxResults:
          type: integer
          description: The number of entries a paginated response contains.
      required:
      - DateInterval
    GetAnomaliesResponse:
      type: object
      properties:
        Anomalies:
          type: array
          items:
            $ref: '#/components/schemas/Anomaly'
          description: A list of cost anomalies.
        NextPageToken:
          type: string
          description: The token to retrieve the next set of results. Amazon Web Services provides the token when the response
            from a previous call has more results than the maximum page size.
      required:
      - Anomalies
    Impact:
      type: object
      properties:
        MaxImpact:
          type: number
          description: The maximum dollar value that's observed for an anomaly.
        TotalImpact:
          type: number
          description: The cumulative dollar difference between the total actual spend and total expected spend. It is calculated
            as TotalActualSpend - TotalExpectedSpend.
        TotalActualSpend:
          type: number
          description: The cumulative dollar amount that was actually spent during the anomaly.
        TotalExpectedSpend:
          type: number
          description: The cumulative dollar amount that was expected to be spent during the anomaly. It is calculated using
            advanced machine learning models to determine the typical spending pattern based on historical data for a customer.
        TotalImpactPercentage:
          type: number
          description: The cumulative percentage difference between the total actual spend and total expected spend. It is
            calculated as (TotalImpact / TotalExpectedSpend) * 100. When TotalExpectedSpend is zero, this field is omitted.
            Expected spend can be zero in situations such as when you start to use a service for the first time.
      required:
      - MaxImpact
    InvalidNextTokenException:
      type: object
      properties:
        Message:
          type: string
    LimitExceededException:
      type: object
      properties:
        Message:
          type: string
    ProductAttributeValues:
      type: object
      properties:
        Key:
          type: string
          description: 'The name of the product attribute, such as model. The keys that are available depend on the service.
            For the keys of each supported service, see ProductAttributeValues . Keys are case-sensitive. A key that doesn''t
            exist doesn''t return an error: EQUALS matches no costs, and ABSENT matches all costs of supported services.'
        Values:
          type: array
          items:
            type: string
          description: The specific values of the product attribute, such as Claude Sonnet 5 for the model key. Values are
            matched exactly, including case. To list the values of a key, use GetDimensionValues with Dimension set to PRODUCT_ATTRIBUTE
            and DimensionKey set to the key. To match costs that have no value for the key, set MatchOptions to ABSENT and
            omit Values. Otherwise, Values is required.
        MatchOptions:
          type: array
          items:
            type: string
            enum:
            - EQUALS
            - ABSENT
            - STARTS_WITH
            - ENDS_WITH
            - CONTAINS
            - CASE_SENSITIVE
            - CASE_INSENSITIVE
            - GREATER_THAN_OR_EQUAL
          description: 'The match options that you can use to filter your results. Valid values: EQUALS - Matches the values
            that you specify. ABSENT - Matches costs that have no value for the key. Omit Values. CASE_SENSITIVE - Use only
            with EQUALS. Values are always matched case-sensitively. Default values are EQUALS and CASE_SENSITIVE.'
      required:
      - Key
    ResourceTag:
      type: object
      properties:
        Key:
          type: string
          description: The key that's associated with the tag.
        Value:
          type: string
          description: The value that's associated with the tag.
      required:
      - Key
      - Value
    RootCause:
      type: object
      properties:
        Service:
          type: string
          description: The Amazon Web Services service name that's associated with the cost anomaly.
        Region:
          type: string
          description: The Amazon Web Services Region that's associated with the cost anomaly.
        LinkedAccount:
          type: string
          description: The member account value that's associated with the cost anomaly.
        LinkedAccountName:
          type: string
          description: The member account name value that's associated with the cost anomaly.
        UsageType:
          type: string
          description: The UsageType value that's associated with the cost anomaly.
        Impact:
          $ref: '#/components/schemas/RootCauseImpact'
    RootCauseImpact:
      type: object
      properties:
        Contribution:
          type: number
          description: The dollar amount that this root cause contributed to the anomaly's TotalImpact.
      required:
      - Contribution
    Subscriber:
      type: object
      properties:
        Address:
          type: string
          description: The email address or SNS Amazon Resource Name (ARN). This depends on the Type.
        Type:
          type: string
          enum:
          - EMAIL
          - SNS
          description: The notification delivery channel.
        Status:
          type: string
          enum:
          - CONFIRMED
          - DECLINED
          description: Indicates if the subscriber accepts the notifications.
    TagValues:
      type: object
      properties:
        Key:
          type: string
          description: The key for the tag.
        Values:
          type: array
          items:
            type: string
          description: The specific value of the tag.
        MatchOptions:
          type: array
          items:
            type: string
            enum:
            - EQUALS
            - ABSENT
            - STARTS_WITH
            - ENDS_WITH
            - CONTAINS
            - CASE_SENSITIVE
            - CASE_INSENSITIVE
            - GREATER_THAN_OR_EQUAL
          description: The match options that you can use to filter your results. MatchOptions is only applicable for actions
            related to cost category. The default values for MatchOptions are EQUALS and CASE_SENSITIVE.
    TotalImpactFilter:
      type: object
      properties:
        NumericOperator:
          type: string
          enum:
          - EQUAL
          - GREATER_THAN_OR_EQUAL
          - LESS_THAN_OR_EQUAL
          - GREATER_THAN
          - LESS_THAN
          - BETWEEN
          description: The comparing value that's used in the filter.
        StartValue:
          type: number
          description: The lower bound dollar value that's used in the filter.
        EndValue:
          type: number
          description: The upper bound dollar value that's used in the filter.
      required:
      - NumericOperator
      - StartValue
    UnknownMonitorException:
      type: object
      properties:
        Message:
          type: string
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/cost-explorer/service/2017-10-25/cost-explorer-2017-10-25.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)