Amazon OpenSearch Service API Opensearch Replication API

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

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /2021-01-01/opensearch/domain/{DomainName}/replication/addPeer Replicate a domain to another Region · Add Replication Peer #
Ask an LLM
“How do I set up cross-Region replication for an OpenSearch domain?”
“Can I make a domain in one Region the secondary of a domain in another Region?”
Tell an agent
Replicate domain {DomainName} to peer {PeerDomainArn}.
Dry-run replication of {DomainName} to {PeerDomainArn} with dry-run {DryRun}.
GET /2021-01-01/opensearch/domain/{DomainName}/replication Describe a domain's replication arrangement · Describe Domain Replication #
Ask an LLM
“Is my domain replicating to another Region, and what state is it in?”
“Which domain is the primary and which is the secondary in a replication pair?”
Tell an agent
Describe replication for domain {DomainName}.
Show the replication role and state of {DomainName}.
POST /2021-01-01/opensearch/domain/{DomainName}/replication/failover Promote a secondary to primary without coordination · Failover Replication #
Ask an LLM
“How do I promote a secondary domain to primary when the primary is unreachable?”
“Will I lose writes when I force a failover of a replication relationship?”
Tell an agent destructive · confirm first
Fail over replication of {DomainName} to peer {PeerDomainArn} with data loss allowed {AllowDataLoss}.
Promote {DomainName} to primary, acknowledging data loss {AllowDataLoss}, because the primary is unreachable.
POST /2021-01-01/opensearch/domain/{DomainName}/replication/removePeer Stop replicating a domain to its peer · Remove Replication Peer #
Ask an LLM
“How do I stop replicating a domain to its peer without deleting either domain?”
“Does removing a replication peer leave both domains with their data intact?”
Tell an agent
Remove peer {PeerDomainArn} from replication of {DomainName}.
Stop replication between {DomainName} and {PeerDomainArn}.
POST /2021-01-01/opensearch/domain/{DomainName}/replication/switchover Promote a secondary to primary with no data loss · Switchover Replication #
Ask an LLM
“How do I promote a secondary domain to primary without losing writes?”
“Can I switch roles between replication domains for a planned change?”
Tell an agent
Switchover replication of {DomainName} to peer {PeerDomainArn}.
Promote {DomainName} to primary while the current primary is reachable.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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'
      parameters:
      - name: DomainName
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                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:
              - PeerDomainArn
      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'
      parameters:
      - name: DomainName
        in: path
        required: true
        schema:
          type: string
      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'
      parameters:
      - name: DomainName
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                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:
              - PeerDomainArn
              - AllowDataLoss
      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'
      parameters:
      - name: DomainName
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                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:
              - PeerDomainArn
      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'
      parameters:
      - name: DomainName
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                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:
              - PeerDomainArn
      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:
    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.
    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.
    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.
    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.
    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)