OpenSearchService / Client / switchover_replication
switchover_replication¶
- OpenSearchService.Client.switchover_replication(**kwargs)¶
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
FailoverReplicationoperation instead.See also: AWS API Documentation
Request Syntax
response = client.switchover_replication( DomainName='string', PeerDomainArn='string' )
- 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.
- 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
SWITCHING_OVERwhile the promotion is in progress.
Exceptions