Amazon OpenSearch Service API Opensearch Replication API

The Opensearch Replication API from Amazon OpenSearch Service API — 5 operation(s) for opensearch replication.

GitHub OpenAPI

Operations 5

POST /2021-01-01/opensearch/domain/{DomainName}/replication/addPeer Add Replication Peer #
GET /2021-01-01/opensearch/domain/{DomainName}/replication Describe Domain Replication #
POST /2021-01-01/opensearch/domain/{DomainName}/replication/failover Failover Replication #
POST /2021-01-01/opensearch/domain/{DomainName}/replication/removePeer Remove Replication Peer #
POST /2021-01-01/opensearch/domain/{DomainName}/replication/switchover Switchover Replication #

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-replication-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-replication-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon OpenSearch Service Replication 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://es.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /2021-01-01/opensearch/domain/{DomainName}/replication/addPeer:
    post:
      operationId: AddReplicationPeer
      summary: Add Replication Peer
      description: Starts replicating a domain to a peer domain in another AWS Region. A domain can have one peer. The domain
        you call becomes the primary and the peer becomes the secondary, which receives a copy of the primary's indexes and
        serves read requests. Replication is established asynchronously. Use the DescribeDomainReplication operation to check
        whether the relationship has reached the ACTIVE state.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddReplicationPeerResponse'
        '409':
          description: DisabledOperationException; ResourceAlreadyExistsException; ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledOperationException'
        '500':
          description: InternalException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddReplicationPeerRequest'
      tags:
      - Replication
  /2021-01-01/opensearch/domain/{DomainName}/replication:
    get:
      operationId: DescribeDomainReplication
      summary: Describe Domain Replication
      description: Describes the replication arrangement that a domain participates in, including the domain's role and the
        state of its relationship with each peer. A domain that is not replicating is returned with an empty Peers list and
        no Role. Returns ResourceNotFoundException if the domain does not exist.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DescribeDomainReplicationResponse'
        '409':
          description: DisabledOperationException; ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledOperationException'
        '500':
          description: InternalException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DescribeDomainReplicationRequest'
      tags:
      - Replication
  /2021-01-01/opensearch/domain/{DomainName}/replication/failover:
    post:
      operationId: FailoverReplication
      summary: Failover Replication
      description: Promotes a secondary domain to primary without coordinating with the current primary. Use this operation
        when the primary is unreachable and you cannot wait for it to recover. Writes that had not yet replicated when the
        primary became unreachable are lost. You must set AllowDataLoss to acknowledge this. To promote a domain without losing
        writes, use the SwitchoverReplication operation instead. Call this operation in the Region of the domain you want
        to promote.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailoverReplicationResponse'
        '409':
          description: DisabledOperationException; ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledOperationException'
        '500':
          description: InternalException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FailoverReplicationRequest'
      tags:
      - Replication
  /2021-01-01/opensearch/domain/{DomainName}/replication/removePeer:
    post:
      operationId: RemoveReplicationPeer
      summary: Remove Replication Peer
      description: Stops replicating a domain to its peer. Replication ends for both domains, and each domain keeps the data
        it holds at that point. Neither domain is deleted.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveReplicationPeerResponse'
        '409':
          description: DisabledOperationException; ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledOperationException'
        '500':
          description: InternalException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoveReplicationPeerRequest'
      tags:
      - Replication
  /2021-01-01/opensearch/domain/{DomainName}/replication/switchover:
    post:
      operationId: SwitchoverReplication
      summary: Switchover Replication
      description: Promotes a secondary domain to primary, coordinating with the current primary so that no writes are lost.
        Use this operation for planned role changes, such as testing your recovery procedure or moving write traffic to another
        Region. Call this operation in the Region of the domain you want to promote. If the current primary is unreachable,
        use the FailoverReplication operation instead.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwitchoverReplicationResponse'
        '409':
          description: DisabledOperationException; ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledOperationException'
        '500':
          description: InternalException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwitchoverReplicationRequest'
      tags:
      - Replication
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: es
  schemas:
    AddReplicationPeerRequest:
      type: object
      properties:
        DomainName:
          type: string
        PeerDomainArn:
          type: string
          description: The Amazon Resource Name (ARN) of the domain to replicate to. The peer must be in a different Region
            from the domain you are calling, and in the same AWS account.
        DryRun:
          type: boolean
          description: When true, validates the request and reports whether replication could be established, without changing
            either domain.
      required:
      - DomainName
      - PeerDomainArn
    AddReplicationPeerResponse:
      type: object
      properties:
        DomainArn:
          type: string
          description: The Amazon Resource Name (ARN) of the domain that is now replicating to the peer.
        Status:
          type: string
          enum:
          - PENDING_SETUP
          - ACTIVE
          - SWITCHING_OVER
          - FAILING_OVER
          - PENDING_REMOVAL
          - DETACHED
          - EJECTED
          - FAILED
          description: The state of the replication relationship. This is PENDING_SETUP immediately after the request is accepted.
    DescribeDomainReplicationRequest:
      type: object
      properties:
        DomainName:
          type: string
      required:
      - DomainName
    DescribeDomainReplicationResponse:
      type: object
      properties:
        DomainArn:
          type: string
          description: The Amazon Resource Name (ARN) of the domain described.
        Role:
          type: string
          enum:
          - PRIMARY
          - SECONDARY
          description: The domain's role in the arrangement, either PRIMARY or SECONDARY. Absent when the domain is not replicating.
        Peers:
          type: array
          items:
            $ref: '#/components/schemas/ReplicationPeer'
          description: The domains that this domain replicates with. Each entry carries the state of that one relationship.
            Empty when the domain is not replicating.
    DisabledOperationException:
      type: object
      properties:
        message:
          type: string
          description: A description of the error.
    FailoverReplicationRequest:
      type: object
      properties:
        DomainName:
          type: string
        PeerDomainArn:
          type: string
          description: The Amazon Resource Name (ARN) of the relationship's current primary. The request is rejected if this
            domain is no longer the peer of the domain you are calling.
        AllowDataLoss:
          type: boolean
          description: Acknowledges that writes which had not yet replicated are lost. You must set this to true; the request
            is rejected otherwise.
      required:
      - DomainName
      - PeerDomainArn
      - AllowDataLoss
    FailoverReplicationResponse:
      type: object
      properties:
        DomainArn:
          type: string
          description: The Amazon Resource Name (ARN) of the domain being promoted.
        Status:
          type: string
          enum:
          - PENDING_SETUP
          - ACTIVE
          - SWITCHING_OVER
          - FAILING_OVER
          - PENDING_REMOVAL
          - DETACHED
          - EJECTED
          - FAILED
          description: The state of the replication relationship. This is FAILING_OVER while the promotion is in progress.
    InternalException:
      type: object
      properties:
        message:
          type: string
          description: A description of the error.
    RemoveReplicationPeerRequest:
      type: object
      properties:
        DomainName:
          type: string
        PeerDomainArn:
          type: string
          description: The Amazon Resource Name (ARN) of the peer to stop replicating with. Both domains are named so that
            the request identifies exactly one replication relationship.
      required:
      - DomainName
      - PeerDomainArn
    RemoveReplicationPeerResponse:
      type: object
      properties:
        DomainArn:
          type: string
          description: The Amazon Resource Name (ARN) of the domain that is no longer replicating.
        Status:
          type: string
          enum:
          - PENDING_SETUP
          - ACTIVE
          - SWITCHING_OVER
          - FAILING_OVER
          - PENDING_REMOVAL
          - DETACHED
          - EJECTED
          - FAILED
          description: The state of the replication relationship. This is PENDING_REMOVAL while replication is being stopped.
    ReplicationPeer:
      type: object
      properties:
        PeerDomainArn:
          type: string
          description: The Amazon Resource Name (ARN) of the peer domain.
        PeerRole:
          type: string
          enum:
          - PRIMARY
          - SECONDARY
          description: The peer's role in the relationship, either PRIMARY or SECONDARY.
        Status:
          type: string
          enum:
          - PENDING_SETUP
          - ACTIVE
          - SWITCHING_OVER
          - FAILING_OVER
          - PENDING_REMOVAL
          - DETACHED
          - EJECTED
          - FAILED
          description: 'The state of the relationship: PENDING_SETUP - replication is being established. ACTIVE - replication
            is running. SWITCHING_OVER - a planned promotion is in progress. FAILING_OVER - an unplanned promotion is in progress.
            PENDING_REMOVAL - replication is being stopped. DETACHED - the relationship has ended. EJECTED - a failover promoted
            the other domain. The former primary keeps the data it had when it was ejected and stays read-only until you remove
            the peer, or discard that data and pair again. FAILED - setup or teardown could not complete. You can still remove
            the relationship. A relationshi'
        StatusMessage:
          type: string
          description: An explanation of why the relationship is in its current state, when more detail is available.
    SwitchoverReplicationRequest:
      type: object
      properties:
        DomainName:
          type: string
        PeerDomainArn:
          type: string
          description: The Amazon Resource Name (ARN) of the relationship's current primary. The request is rejected if this
            domain is no longer the peer of the domain you are calling.
      required:
      - DomainName
      - PeerDomainArn
    SwitchoverReplicationResponse:
      type: object
      properties:
        DomainArn:
          type: string
          description: The Amazon Resource Name (ARN) of the domain being promoted.
        Status:
          type: string
          enum:
          - PENDING_SETUP
          - ACTIVE
          - SWITCHING_OVER
          - FAILING_OVER
          - PENDING_REMOVAL
          - DETACHED
          - EJECTED
          - FAILED
          description: The state of the replication relationship. This is SWITCHING_OVER while the promotion is in progress.
    ValidationException:
      type: object
      properties:
        message:
          type: string
          description: A description of the error.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/opensearch/service/2021-01-01/opensearch-2021-01-01.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)