Amazon CloudWatch Cloudwatch Index Policy API

The Cloudwatch Index Policy API from Amazon CloudWatch — 3 operation(s) for cloudwatch index policy.

GitHub OpenAPI

Operations 3

POST /#DeleteIndexPolicy Delete Index Policy #
POST /#DescribeIndexPolicies Describe Index Policies #
POST /#PutIndexPolicy Put Index Policy #

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-index-policy-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-index-policy-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon CloudWatch Index Policy 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:
  /#DeleteIndexPolicy:
    post:
      operationId: DeleteIndexPolicy
      summary: Delete Index Policy
      description: Deletes a log-group level field index policy that was applied to a single log group. The indexing of the
        log events that happened before you delete the policy will still be used for as many as 30 days to improve CloudWatch
        Logs Insights queries. If the deleted policy included facet configurations, those facets will no longer be available
        for interactive exploration in the CloudWatch Logs Insights console for this log group. However, facet data is retained
        for up to 30 days. You can't use this operation to delete an account-level index policy. Instead, use DeleteAccountPolicy.
        If you delete a log-group level field index policy and there is an account-level field index policy, in a few minutes
        the log group begins using that account-wide policy to index new incoming log events. This operation only affects
        log group-level policies, including any facet configurations, and preserves any data source-based account policies
        that may apply to the log group.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DeleteIndexPolicyResponse'
        '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.DeleteIndexPolicy
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/DeleteIndexPolicyRequest'
      tags:
      - Index Policy
  /#DescribeIndexPolicies:
    post:
      operationId: DescribeIndexPolicies
      summary: Describe Index Policies
      description: Returns the field index policies of the specified log group. For more information about field index policies,
        see PutIndexPolicy. If a specified log group has a log-group level index policy, that policy is returned by this operation.
        If a specified log group doesn't have a log-group level index policy, but an account-wide index policy applies to
        it, that account-wide policy is returned by this operation. To find information about only account-level policies,
        use DescribeAccountPolicies instead.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DescribeIndexPoliciesResponse'
        '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.DescribeIndexPolicies
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/DescribeIndexPoliciesRequest'
      tags:
      - Index Policy
  /#PutIndexPolicy:
    post:
      operationId: PutIndexPolicy
      summary: Put Index Policy
      description: Creates or updates a field index policy for the specified log group. Only log groups in the Standard log
        class support field index policies. For more information about log classes, see Log classes. You can use field index
        policies to create field indexes on fields found in log events in the log group. Creating field indexes speeds up
        and lowers the costs for CloudWatch Logs Insights queries that reference those field indexes, because these queries
        attempt to skip the processing of log events that are known to not match the indexed field. Good fields to index are
        fields that you often need to query for and fields or values that match only a small fraction of the total log events.
        Common examples of indexes include request ID, session ID, userID, and instance IDs. For more information, see Create
        field indexes to improve query performance and reduce costs. You can configure indexed fields as facets to enable
        interactive exploration and filtering of your logs in the CloudWatch Logs Insights console. Facets allow you to view
        value distributions and counts for indexed fields without running queries. When you create a field index, you can
        optionally set it as a facet to enable this inter
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/PutIndexPolicyResponse'
        '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.PutIndexPolicy
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/PutIndexPolicyRequest'
      tags:
      - Index Policy
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:
    DeleteIndexPolicyRequest:
      type: object
      properties:
        logGroupIdentifier:
          type: string
          description: The log group to delete the index policy for. You can specify either the name or the ARN of the log
            group.
      required:
      - logGroupIdentifier
    DeleteIndexPolicyResponse:
      type: object
      properties: {}
    DescribeIndexPoliciesRequest:
      type: object
      properties:
        logGroupIdentifiers:
          type: array
          items:
            type: string
          description: An array containing the name or ARN of the log group that you want to retrieve field index policies
            for.
        nextToken:
          type: string
      required:
      - logGroupIdentifiers
    DescribeIndexPoliciesResponse:
      type: object
      properties:
        indexPolicies:
          type: array
          items:
            $ref: '#/components/schemas/IndexPolicy'
          description: An array containing the field index policies.
        nextToken:
          type: string
    IndexPolicy:
      type: object
      properties:
        logGroupIdentifier:
          type: string
          description: The ARN of the log group that this index policy applies to.
        lastUpdateTime:
          type: integer
          description: The date and time that this index policy was most recently updated.
        policyDocument:
          type: string
          description: The policy document for this index policy, in JSON format.
        policyName:
          type: string
          description: The name of this policy. Responses about log group-level field index policies don't have this field,
            because those policies don't have names.
        source:
          type: string
          enum:
          - ACCOUNT
          - LOG_GROUP
          description: This field indicates whether this is an account-level index policy or an index policy that applies
            only to a single log group.
    InvalidParameterException:
      type: object
      properties:
        message:
          type: string
    PutIndexPolicyRequest:
      type: object
      properties:
        logGroupIdentifier:
          type: string
          description: Specify either the log group name or log group ARN to apply this field index policy to. If you specify
            an ARN, use the format arn:aws:logs:region:account-id:log-group:log_group_name Don't include an * at the end.
        policyDocument:
          type: string
          description: 'The index policy document, in JSON format. The following is an example of an index policy document
            that creates indexes with different types. "policyDocument": "{"Fields": [ "TransactionId" ], "FieldsV2": {"RequestId":
            {"type": "FIELD_INDEX"}, "APIName": {"type": "FACET"}, "StatusCode": {"type": "FACET"}}}" You can use FieldsV2
            to specify the type for each field. Supported types are FIELD_INDEX and FACET. Field names within Fields and FieldsV2
            must be mutually exclusive. The policy document must include at least one field index. For more information about
            the fields that can be included and ot'
      required:
      - logGroupIdentifier
      - policyDocument
    PutIndexPolicyResponse:
      type: object
      properties:
        indexPolicy:
          $ref: '#/components/schemas/IndexPolicy'
    ServiceUnavailableException:
      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/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)