U Ec_.*@s,ddlmZmZmZmZGdddeZdS))NamespacedClient query_params _make_path SKIP_IN_PATHc@seZdZedddZeddddZedddZed d d Zed!d d Zed"d dZ ed#ddZ ed$ddZ ed%ddZ ed&ddZ ed'ddZed(ddZed)ddZdS)* CcrClientNcCs,|tkrtd|jjdtdd|||dS)z Deletes auto-follow patterns. ``_ :arg name: The name of the auto follow pattern. 2Empty value passed for a required argument 'name'.DELETE_ccr auto_followparamsheadersr ValueError transportperform_requestrselfnamer r r?/tmp/pip-target-m1bursmm/lib/python/elasticsearch/client/ccr.pydelete_auto_follow_patterns z$CcrClient.delete_auto_follow_patternZwait_for_active_shardscCs<||fD]}|tkrtdq|jjdt|dd|||dS)a Creates a new follower index configured to follow the referenced leader index. ``_ :arg index: The name of the follower index :arg body: The name of the leader index and other optional ccr related parameters :arg wait_for_active_shards: Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) Default: 0 +Empty value passed for a required argument.PUTr followr r bodyrrindexrr r paramrrrr(s   zCcrClient.followcCs,|tkrtd|jjdt|dd||dS)ac Retrieves information about all follower indices, including parameters and status for each follower index ``_ :arg index: A comma-separated list of index patterns; use `_all` to perform the operation on all indices 3Empty value passed for a required argument 'index'.GETr infor rrrr r rrr follow_infoCs  zCcrClient.follow_infocCs,|tkrtd|jjdt|dd||dS)a} Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices. ``_ :arg index: A comma-separated list of index patterns; use `_all` to perform the operation on all indices r r!r statsr rr#rrr follow_statsTs  zCcrClient.follow_statscCs<||fD]}|tkrtdq|jjdt|dd|||dS)a* Removes the follower retention leases from the leader. ``_ :arg index: the name of the leader index for which specified follower retention leases should be removed :arg body: the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index rPOSTr forget_followerrrrrrrr(es   zCcrClient.forget_followercCs|jjdtdd|||dS)a Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection. ``_ :arg name: The name of the auto follow pattern. r!r r r )rrrrrrrget_auto_follow_pattern~s  z!CcrClient.get_auto_follow_patterncCs,|tkrtd|jjdt|dd||dS)aW Pauses a follower index. The follower index will not fetch any additional operations from the leader index. ``_ :arg index: The name of the follower index that should pause following its leader index. r r'r pause_followr rr#rrrr*s  zCcrClient.pause_followcCs<||fD]}|tkrtdq|jjdtdd||||dS)a Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices. ``_ :arg name: The name of the auto follow pattern. :arg body: The specification of the auto follow pattern rrr r rr)rrrr r rrrrput_auto_follow_patterns   z!CcrClient.put_auto_follow_patterncCs.|tkrtd|jjdt|dd|||dS)aQ Resumes a follower index that has been paused ``_ :arg index: The name of the follow index to resume following. :arg body: The name of the leader index and other optional ccr related parameters r r'r resume_followrr)rrrr r rrrr,s  zCcrClient.resume_followcCs|jjdd||dS)z Gets all stats related to cross-cluster replication. ``_ r!z /_ccr/statsr )rr)rr r rrrr%s zCcrClient.statscCs,|tkrtd|jjdt|dd||dS)ar Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. ``_ :arg index: The name of the follower index that should be turned into a regular index. r r'r unfollowr rr#rrrr-s  zCcrClient.unfollowcCs.|tkrtd|jjdtdd|d||dS)a Pauses an auto-follow pattern ``_ :arg name: The name of the auto follow pattern that should pause discovering new indices to follow. rr'r r pauser rrrrrpause_auto_follow_patterns  z#CcrClient.pause_auto_follow_patterncCs.|tkrtd|jjdtdd|d||dS)a# Resumes an auto-follow pattern that has been paused ``_ :arg name: The name of the auto follow pattern to resume discovering new indices to follow. rr'r r resumer rrrrrresume_auto_follow_patterns  z$CcrClient.resume_auto_follow_pattern)NN)NN)NN)NN)NN)NNN)NN)NN)NNN)NN)NN)NN)NN)__name__ __module__ __qualname__rrrr$r&r(r)r*r+r,r%r-r/r1rrrrrs4            rN)utilsrrrrrrrrrs