OpenSearchService / Client / failover_replication

failover_replication

OpenSearchService.Client.failover_replication(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.failover_replication(
    DomainName='string',
    PeerDomainArn='string',
    AllowDataLoss=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 relationship’s current primary. The request is rejected if this domain is no longer the peer of the domain you are calling.

  • AllowDataLoss (boolean) –

    [REQUIRED]

    Acknowledges that writes which had not yet replicated are lost. You must set this to true; the request is rejected otherwise.

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 being promoted.

    • Status (string) –

      The state of the replication relationship. This is FAILING_OVER while the promotion is in progress.

Exceptions

  • OpenSearchService.Client.exceptions.InternalException

  • OpenSearchService.Client.exceptions.ResourceNotFoundException

  • OpenSearchService.Client.exceptions.ValidationException

  • OpenSearchService.Client.exceptions.DisabledOperationException