OpenSearchService / Client / add_replication_peer

add_replication_peer

OpenSearchService.Client.add_replication_peer(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.add_replication_peer(
    DomainName='string',
    PeerDomainArn='string',
    DryRun=True|False
)
Parameters:
  • DomainName (string) –

    [REQUIRED]

    The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.

  • PeerDomainArn (string) –

    [REQUIRED]

    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 (boolean) – When true, validates the request and reports whether replication could be established, without changing either domain.

Return type:

dict

Returns:

Response Syntax

{
    'DomainArn': 'string',
    'Status': 'PENDING_SETUP'|'ACTIVE'|'SWITCHING_OVER'|'FAILING_OVER'|'PENDING_REMOVAL'|'DETACHED'|'EJECTED'|'FAILED'
}

Response Structure

  • (dict) –

    • DomainArn (string) –

      The Amazon Resource Name (ARN) of the domain that is now replicating to the peer.

    • Status (string) –

      The state of the replication relationship. This is PENDING_SETUP immediately after the request is accepted.

Exceptions