U Ec_@s,ddlmZmZmZmZGdddeZdS))NamespacedClient query_params _make_path SKIP_IN_PATHc@seZdZedddZedddddZeddd Zedd d Zedd d ZedddZ edddZ edddZ ed ddZ ed!ddZ dS)" IlmClientNcCs,|tkrtd|jjdtdd|||dS)a Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted. ``_ :arg policy: The name of the index lifecycle policy 4Empty value passed for a required argument 'policy'.DELETE_ilmpolicyparamsheadersr ValueError transportperform_requestrselfr r r r?/tmp/pip-target-m1bursmm/lib/python/elasticsearch/client/ilm.pydelete_lifecycles  zIlmClient.delete_lifecycleZ only_errorsZ only_managedcCs,|tkrtd|jjdt|dd||dS)a Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step. ``_ :arg index: The name of the index to explain :arg only_errors: filters the indices included in the response to ones in an ILM error state, implies only_managed :arg only_managed: filters the indices included in the response to ones managed by ILM 3Empty value passed for a required argument 'index'.GETr explainr rrindexr r rrrexplain_lifecycle)s  zIlmClient.explain_lifecyclecCs|jjdtdd|||dS)a Returns the specified policy definition. Includes the policy version and last modified date. ``_ :arg policy: The name of the index lifecycle policy rr r r )rrrrrrr get_lifecycle=s  zIlmClient.get_lifecyclecCs|jjdd||dS)z Retrieves the current index lifecycle management (ILM) status. ``_ rz /_ilm/statusr rrrr r rrr get_statusJs zIlmClient.get_statuscCs.|tkrtd|jjdtdd||||dS)aF Manually moves an index into the specified step and executes that step. ``_ :arg index: The name of the index whose lifecycle step is to change :arg body: The new lifecycle step to move to rPOSTr mover r bodyr)rrr$r r rrr move_to_stepTs  zIlmClient.move_to_stepcCs.|tkrtd|jjdtdd||||dS)a Creates a lifecycle policy ``_ :arg policy: The name of the index lifecycle policy :arg body: The lifecycle policy definition to register rPUTr r r#r)rr r$r r rrr put_lifecycleis  zIlmClient.put_lifecyclecCs,|tkrtd|jjdt|dd||dS)z Removes the assigned lifecycle policy and stops managing the specified index ``_ :arg index: The name of the index to remove policy on rr!r remover rrrrr remove_policy}s zIlmClient.remove_policycCs,|tkrtd|jjdt|dd||dS)a+ Retries executing the policy for an index that is in the ERROR step. ``_ :arg index: The name of the indices (comma-separated) whose failed lifecycle step is to be retry rr!r retryr rrrrrr*s  zIlmClient.retrycCs|jjdd||dS)z Start the index lifecycle management (ILM) plugin. ``_ r!z /_ilm/startr rrrrrstarts zIlmClient.startcCs|jjdd||dS)z Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin ``_ r!z /_ilm/stopr rrrrrstops zIlmClient.stop)NN)NN)NNN)NN)NNN)NNN)NN)NN)NN)NN)__name__ __module__ __qualname__rrrrr r%r'r)r*r+r,rrrrrs(         rN)utilsrrrrrrrrrs