OpenSearchService / Client / compare_domain_configuration
compare_domain_configuration¶
- OpenSearchService.Client.compare_domain_configuration(**kwargs)¶
Compares the metadata of two domains and reports where they differ. Use this operation to check that a secondary domain is configured consistently with its primary before you rely on it, because replication copies index data but does not copy domain metadata such as index templates, ingest pipelines, or security roles.
You choose which categories to compare. The response reports, for each category, how many items match, how many exist on only one domain, and which fields diverge.
See also: AWS API Documentation
Request Syntax
response = client.compare_domain_configuration( SourceDomainArn='string', TargetDomainArn='string', Categories=[ 'string', ] )
- Parameters:
SourceDomainArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the domain to compare from.
TargetDomainArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the domain to compare against.
Categories (list) –
[REQUIRED]
The metadata categories to compare. At least one is required, and only the categories you name are read and returned.
aliasesalerting_monitorscluster_settingscomponent_templatesingest_pipelinesism_policies— index state management policiessecurity_action_groupssecurity_internal_userssecurity_role_mappingssecurity_rolestemplates— index templates
The set of categories grows over time, so this list is not fixed. A category the service does not recognise is rejected with the supported categories named in the error message.
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'SourceDomainArn': 'string', 'TargetDomainArn': 'string', 'Categories': { 'string': { 'Status': 'compared'|'error', 'InSync': 123, 'SourceOnly': 123, 'TargetOnly': 123, 'Diverged': 123, 'Items': { 'SourceOnly': [ 'string', ], 'TargetOnly': [ 'string', ], 'Diverged': [ { 'Name': 'string', 'Fields': [ { 'Path': 'string', 'SourceValue': 'string', 'TargetValue': 'string', 'Policy': 'redacted' }, ] }, ] }, 'Truncated': True|False } } }
Response Structure
(dict) –
SourceDomainArn (string) –
The Amazon Resource Name (ARN) of the domain that was compared from.
TargetDomainArn (string) –
The Amazon Resource Name (ARN) of the domain that was compared against.
Categories (dict) –
The comparison result for each category you requested, keyed by category name.
(string) –
(dict) –
The result of comparing one metadata category between two domains.
Status (string) –
Whether the category was compared successfully.
comparedmeans the result is complete;errormeans the category could not be read.InSync (integer) –
The number of items that are identical on both domains.
SourceOnly (integer) –
The number of items that exist only on the source domain.
TargetOnly (integer) –
The number of items that exist only on the target domain.
Diverged (integer) –
The number of items that exist on both domains but differ.
Items (dict) –
The names of the items that differ, and for diverging items, the fields that differ.
SourceOnly (list) –
The names of items that exist only on the source domain.
(string) –
TargetOnly (list) –
The names of items that exist only on the target domain.
(string) –
Diverged (list) –
The items that exist on both domains but differ, with the diverging fields.
(dict) –
An item that exists on both domains but whose contents differ.
Name (string) –
The name of the item.
Fields (list) –
The fields of the item that differ.
(dict) –
A single field that differs between the source and target copies of an item.
Path (string) –
The location of the field within the item.
SourceValue (string) –
The field’s value on the source domain.
TargetValue (string) –
The field’s value on the target domain.
Policy (string) –
How the comparison treats this field.
Truncated (boolean) –
Whether
Itemsomits some differences because the category contained more than the response can carry. The counts remain complete when this istrue.
Exceptions