U Ec_6@s,ddlmZmZmZmZGdddeZdS))NamespacedClient query_params _make_path SKIP_IN_PATHc@seZdZedddZedddZedddZeddd Zedd d Zedd d Z edddZ edddZ edddZ dS) SlmClientNcCs,|tkrtd|jjdtdd|||dS)z Deletes an existing snapshot lifecycle policy. ``_ :arg policy_id: The id of the snapshot lifecycle policy to remove 7Empty value passed for a required argument 'policy_id'.DELETE_slmpolicyparamsheadersr ValueError transportperform_requestrself policy_idr r r?/tmp/pip-target-m1bursmm/lib/python/elasticsearch/client/slm.pydelete_lifecycles  zSlmClient.delete_lifecyclecCs.|tkrtd|jjdtdd|d||dS)aG Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time. ``_ :arg policy_id: The id of the snapshot lifecycle policy to be executed rPUTr r Z_executer rrrrrexecute_lifecycle)s  zSlmClient.execute_lifecyclecCs|jjdd||dS)z Deletes any snapshots that are expired according to the policy's retention rules. ``_ POSTz/_slm/_execute_retentionr rrrr r rrrexecute_retention=s zSlmClient.execute_retentioncCs|jjdtdd|||dS)aO Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts. ``_ :arg policy_id: Comma-separated list of snapshot lifecycle policies to retrieve GETr r r )rrrrrrr get_lifecycleHs  zSlmClient.get_lifecyclecCs|jjdd||dS)z Returns global and policy-level statistics about actions taken by snapshot lifecycle management. ``_ rz /_slm/statsr rrrrr get_statsYs zSlmClient.get_statscCs.|tkrtd|jjdtdd||||dS)a+ Creates or updates a snapshot lifecycle policy. ``_ :arg policy_id: The id of the snapshot lifecycle policy :arg body: The snapshot lifecycle policy definition to register rrr r )r r bodyr)rrr!r r rrr put_lifecycleds  zSlmClient.put_lifecyclecCs|jjdd||dS)z Retrieves the status of snapshot lifecycle management (SLM). ``_ rz /_slm/statusr rrrrr get_statusxs zSlmClient.get_statuscCs|jjdd||dS)z Turns on snapshot lifecycle management (SLM). ``_ rz /_slm/startr rrrrrstarts zSlmClient.startcCs|jjdd||dS)z Turns off snapshot lifecycle management (SLM). ``_ rz /_slm/stopr rrrrrstops zSlmClient.stop)NN)NN)NN)NNN)NN)NNN)NN)NN)NN) __name__ __module__ __qualname__rrrrrr r"r#r$r%rrrrrs$        rN)utilsrrrrrrrrrs