3 ]@s,ddlmZmZmZmZGdddeZdS))NamespacedClient query_params _make_path SKIP_IN_PATHc@seZdZedddZeddddZedddZedd d Zedd d Zedd dZ edddZ ed ddZ ed!ddZ ed"ddZ ed#ddZdS)$ CcrClientNcCs*|tkrtd|jjdtdd||dS)z ``_ :arg name: The name of the auto follow pattern. z2Empty value passed for a required argument 'name'.DELETE_ccr auto_follow)params)r ValueError transportperform_requestr)selfnamer rG/tmp/pip-build-z81i1n8o/elasticsearch/elasticsearch/client/xpack/ccr.pydelete_auto_follow_patternsz$CcrClient.delete_auto_follow_patternZwait_for_active_shardscCs>x ||fD]}|tkr tdq W|jjdt|dd||dS)a^ ``_ :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' z+Empty value passed for a required argument.PUTrfollow)r body)rr r r r)rindexrr paramrrrrs  zCcrClient.followcCs|jjdt|dd|dS)z ``_ :arg index: A comma-separated list of index patterns; use `_all` to perform the operation on all indices GETrinfo)r )r r r)rrr rrr follow_info'szCcrClient.follow_infocCs*|tkrtd|jjdt|dd|dS)z ``_ :arg index: A comma-separated list of index patterns; use `_all` to perform the operation on all indices z3Empty value passed for a required argument 'index'.rrstats)r )rr r r r)rrr rrr follow_stats3szCcrClient.follow_statscCs>x ||fD]}|tkr tdq W|jjdt|dd||dS)a ``_ :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 z+Empty value passed for a required argument.POSTrforget_follower)r r)rr r r r)rrrr rrrrrAs   zCcrClient.forget_followercCs|jjdtdd||dS)z ``_ :arg name: The name of the auto follow pattern. rrr )r )r r r)rrr rrrget_auto_follow_patternWsz!CcrClient.get_auto_follow_patterncCs*|tkrtd|jjdt|dd|dS)z ``_ :arg index: The name of the follower index that should pause following its leader index. z3Empty value passed for a required argument 'index'.rr pause_follow)r )rr r r r)rrr rrrr bszCcrClient.pause_followcCs>x ||fD]}|tkr tdq W|jjdtdd|||dS)z ``_ :arg name: The name of the auto follow pattern. :arg body: The specification of the auto follow pattern z+Empty value passed for a required argument.rrr )r r)rr r r r)rrrr rrrrput_auto_follow_patternps  z!CcrClient.put_auto_follow_patterncCs,|tkrtd|jjdt|dd||dS)a ``_ :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 z3Empty value passed for a required argument 'index'.rr resume_follow)r r)rr r r r)rrrr rrrr"s zCcrClient.resume_followcCs|jjdd|dS)zi ``_ rz /_ccr/stats)r )r r )rr rrrrszCcrClient.statscCs*|tkrtd|jjdt|dd|dS)z ``_ :arg index: The name of the follower index that should be turned into a regular index. z3Empty value passed for a required argument 'index'.rrunfollow)r )rr r r r)rrr rrrr#szCcrClient.unfollow)N)N)NN)N)N)NN)N)N)NN)N)N)__name__ __module__ __qualname__rrrrrrrr r!r"rr#rrrrrs,          rN)utilsrrrrrrrrrs