Amazon OpenSearch Service API Opensearch Lifecycle Policy API

The Opensearch Lifecycle Policy API from Amazon OpenSearch Service API — 5 operation(s) for opensearch lifecycle policy.

GitHub OpenAPI

Operations 5

POST /#BatchGetLifecyclePolicy Batch Get Lifecycle Policy #
POST /#CreateLifecyclePolicy Create Lifecycle Policy #
POST /#UpdateLifecyclePolicy Update Lifecycle Policy #
POST /#DeleteLifecyclePolicy Delete Lifecycle Policy #
POST /#ListLifecyclePolicies List Lifecycle Policies #

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-opensearch:amazon-opensearch-lifecycle-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-opensearch-lifecycle-policy-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon OpenSearch Service Lifecycle Policy API
  version: '2021-01-01'
  description: Generated from AWS's published Smithy model for Amazon OpenSearch Service. 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://aoss.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#BatchGetLifecyclePolicy:
    post:
      operationId: BatchGetLifecyclePolicy
      summary: Batch Get Lifecycle Policy
      description: Returns one or more configured OpenSearch Serverless lifecycle policies. For more information, see Viewing
        data lifecycle policies.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/BatchGetLifecyclePolicyResponse'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '400':
          description: ValidationException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/AossValidationException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - OpenSearchServerless.BatchGetLifecyclePolicy
      requestBody:
        required: true
        content:
          application/x-amz-json-1.0:
            schema:
              $ref: '#/components/schemas/BatchGetLifecyclePolicyRequest'
      tags:
      - Lifecycle Policy
  /#CreateLifecyclePolicy:
    post:
      operationId: CreateLifecyclePolicy
      summary: Create Lifecycle Policy
      description: Creates a lifecyle policy to be applied to OpenSearch Serverless indexes. Lifecycle policies define the
        number of days or hours to retain the data on an OpenSearch Serverless index. For more information, see Creating data
        lifecycle policies.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/CreateLifecyclePolicyResponse'
        '409':
          description: ConflictException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/AossConflictException'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '402':
          description: ServiceQuotaExceededException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/AossServiceQuotaExceededException'
        '400':
          description: ValidationException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/AossValidationException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - OpenSearchServerless.CreateLifecyclePolicy
      requestBody:
        required: true
        content:
          application/x-amz-json-1.0:
            schema:
              $ref: '#/components/schemas/CreateLifecyclePolicyRequest'
      tags:
      - Lifecycle Policy
  /#UpdateLifecyclePolicy:
    post:
      operationId: UpdateLifecyclePolicy
      summary: Update Lifecycle Policy
      description: Updates an OpenSearch Serverless access policy. For more information, see Updating data lifecycle policies.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/UpdateLifecyclePolicyResponse'
        '409':
          description: ConflictException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/AossConflictException'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/AossResourceNotFoundException'
        '402':
          description: ServiceQuotaExceededException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/AossServiceQuotaExceededException'
        '400':
          description: ValidationException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/AossValidationException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - OpenSearchServerless.UpdateLifecyclePolicy
      requestBody:
        required: true
        content:
          application/x-amz-json-1.0:
            schema:
              $ref: '#/components/schemas/UpdateLifecyclePolicyRequest'
      tags:
      - Lifecycle Policy
  /#DeleteLifecyclePolicy:
    post:
      operationId: DeleteLifecyclePolicy
      summary: Delete Lifecycle Policy
      description: Deletes an OpenSearch Serverless lifecycle policy. For more information, see Deleting data lifecycle policies.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/DeleteLifecyclePolicyResponse'
        '409':
          description: ConflictException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/AossConflictException'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/AossResourceNotFoundException'
        '400':
          description: ValidationException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/AossValidationException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - OpenSearchServerless.DeleteLifecyclePolicy
      requestBody:
        required: true
        content:
          application/x-amz-json-1.0:
            schema:
              $ref: '#/components/schemas/DeleteLifecyclePolicyRequest'
      tags:
      - Lifecycle Policy
  /#ListLifecyclePolicies:
    post:
      operationId: ListLifecyclePolicies
      summary: List Lifecycle Policies
      description: Returns a list of OpenSearch Serverless lifecycle policies. For more information, see Viewing data lifecycle
        policies.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/ListLifecyclePoliciesResponse'
        '500':
          description: InternalServerException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '400':
          description: ValidationException
          content:
            application/x-amz-json-1.0:
              schema:
                $ref: '#/components/schemas/AossValidationException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - OpenSearchServerless.ListLifecyclePolicies
      requestBody:
        required: true
        content:
          application/x-amz-json-1.0:
            schema:
              $ref: '#/components/schemas/ListLifecyclePoliciesRequest'
      tags:
      - Lifecycle 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: aoss
  schemas:
    AossConflictException:
      type: object
      properties:
        message:
          type: string
    AossResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
    AossServiceQuotaExceededException:
      type: object
      properties:
        message:
          type: string
          description: Description of the error.
        resourceId:
          type: string
          description: Identifier of the resource affected.
        resourceType:
          type: string
          description: Type of the resource affected.
        serviceCode:
          type: string
          description: Service Quotas requirement to identify originating service.
        quotaCode:
          type: string
          description: Service Quotas requirement to identify originating quota.
      required:
      - message
      - serviceCode
    AossValidationException:
      type: object
      properties:
        message:
          type: string
    BatchGetLifecyclePolicyRequest:
      type: object
      properties:
        identifiers:
          type: array
          items:
            $ref: '#/components/schemas/LifecyclePolicyIdentifier'
          description: The unique identifiers of policy types and policy names.
      required:
      - identifiers
    BatchGetLifecyclePolicyResponse:
      type: object
      properties:
        lifecyclePolicyDetails:
          type: array
          items:
            $ref: '#/components/schemas/LifecyclePolicyDetail'
          description: A list of lifecycle policies matched to the input policy name and policy type.
        lifecyclePolicyErrorDetails:
          type: array
          items:
            $ref: '#/components/schemas/LifecyclePolicyErrorDetail'
          description: A list of lifecycle policy names and policy types for which retrieval failed.
    CreateLifecyclePolicyRequest:
      type: object
      properties:
        type:
          type: string
          description: The type of lifecycle policy.
        name:
          type: string
          description: The name of the lifecycle policy.
        description:
          type: string
          description: A description of the lifecycle policy.
        policy:
          type: string
          description: The JSON policy document to use as the content for the lifecycle policy.
        clientToken:
          type: string
          description: A unique, case-sensitive identifier to ensure idempotency of the request.
      required:
      - type
      - name
      - policy
    CreateLifecyclePolicyResponse:
      type: object
      properties:
        lifecyclePolicyDetail:
          $ref: '#/components/schemas/LifecyclePolicyDetail'
    DeleteLifecyclePolicyRequest:
      type: object
      properties:
        type:
          type: string
          description: The type of lifecycle policy.
        name:
          type: string
          description: The name of the policy to delete.
        clientToken:
          type: string
          description: Unique, case-sensitive identifier to ensure idempotency of the request.
      required:
      - type
      - name
    DeleteLifecyclePolicyResponse:
      type: object
      properties: {}
    InternalServerException:
      type: object
      properties:
        message:
          type: string
    LifecyclePolicyDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of lifecycle policy.
        name:
          type: string
          description: The name of the lifecycle policy.
        policyVersion:
          type: string
          description: The version of the lifecycle policy.
        description:
          type: string
          description: The description of the lifecycle policy.
        policy:
          type: object
          description: The JSON policy document without any whitespaces.
        createdDate:
          type: integer
          description: The date the lifecycle policy was created.
        lastModifiedDate:
          type: integer
          description: The timestamp of when the lifecycle policy was last modified.
    LifecyclePolicyErrorDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of lifecycle policy.
        name:
          type: string
          description: The name of the lifecycle policy.
        errorMessage:
          type: string
          description: A description of the error. For example, The specified Lifecycle Policy is not found.
        errorCode:
          type: string
          description: The error code for the request. For example, NOT_FOUND.
    LifecyclePolicyIdentifier:
      type: object
      properties:
        type:
          type: string
          description: The type of lifecycle policy.
        name:
          type: string
          description: The name of the lifecycle policy.
      required:
      - type
      - name
    LifecyclePolicySummary:
      type: object
      properties:
        type:
          type: string
          description: The type of lifecycle policy.
        name:
          type: string
          description: The name of the lifecycle policy.
        policyVersion:
          type: string
          description: The version of the lifecycle policy.
        description:
          type: string
          description: The description of the lifecycle policy.
        createdDate:
          type: integer
          description: The Epoch time when the lifecycle policy was created.
        lastModifiedDate:
          type: integer
          description: The date and time when the lifecycle policy was last modified.
    ListLifecyclePoliciesRequest:
      type: object
      properties:
        type:
          type: string
          description: The type of lifecycle policy.
        resources:
          type: array
          items:
            type: string
          description: Resource filters that policies can apply to. Currently, the only supported resource type is index.
        nextToken:
          type: string
          description: If your initial ListLifecyclePolicies operation returns a nextToken, you can include the returned nextToken
            in subsequent ListLifecyclePolicies operations, which returns results in the next page.
        maxResults:
          type: integer
          description: An optional parameter that specifies the maximum number of results to return. You can use use nextToken
            to get the next page of results. The default is 10.
      required:
      - type
    ListLifecyclePoliciesResponse:
      type: object
      properties:
        lifecyclePolicySummaries:
          type: array
          items:
            $ref: '#/components/schemas/LifecyclePolicySummary'
          description: Details about the requested lifecycle policies.
        nextToken:
          type: string
          description: When nextToken is returned, there are more results available. The value of nextToken is a unique pagination
            token for each page. Make the call again using the returned token to retrieve the next page.
    UpdateLifecyclePolicyRequest:
      type: object
      properties:
        type:
          type: string
          description: The type of lifecycle policy.
        name:
          type: string
          description: The name of the policy.
        policyVersion:
          type: string
          description: The version of the policy being updated.
        description:
          type: string
          description: A description of the lifecycle policy.
        policy:
          type: string
          description: The JSON policy document to use as the content for the lifecycle policy.
        clientToken:
          type: string
          description: A unique, case-sensitive identifier to ensure idempotency of the request.
      required:
      - type
      - name
      - policyVersion
    UpdateLifecyclePolicyResponse:
      type: object
      properties:
        lifecyclePolicyDetail:
          $ref: '#/components/schemas/LifecyclePolicyDetail'
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/opensearchserverless/service/2021-11-01/opensearchserverless-2021-11-01.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)