a YG@s,ddlmZmZmZmZGdddeZdS))NamespacedClient query_params _make_path SKIP_IN_PATHc@seZdZedddddZeddddZedddd d Zedd dd d ZedddddZedd ddddZ eddd ddZ eddd!ddZ edd d"ddZ dS)#SnapshotClientmaster_timeoutwait_for_completionNcCs:||fD]}|tvrtdq|jjdtd||||dS)a Create a snapshot in repository ``_ :arg repository: A repository name :arg snapshot: A snapshot name :arg body: The snapshot definition :arg master_timeout: Explicit operation timeout for connection to master node :arg wait_for_completion: Should this request wait until the operation has completed before returning, default False +Empty value passed for a required argument.PUT _snapshotparamsbodyr ValueError transportperform_requestrself repositorysnapshotrr paramrD/Users/ymaher/Downloads/lambdas_org/elasticsearch/client/snapshot.pycreates   zSnapshotClient.createcCs8||fD]}|tvrtdq|jjdtd|||dS)aO Deletes a snapshot from a repository. ``_ :arg repository: A repository name :arg snapshot: A snapshot name :arg master_timeout: Explicit operation timeout for connection to master node r DELETEr r rrrrr rrrrdeletes   zSnapshotClient.deleteignore_unavailablecCs8||fD]}|tvrtdq|jjdtd|||dS)a Retrieve information about a snapshot. ``_ :arg repository: A repository name :arg snapshot: A comma-separated list of snapshot names :arg ignore_unavailable: Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown :arg master_timeout: Explicit operation timeout for connection to master node r GETr rrrrrrget)s   zSnapshotClient.gettimeoutcCs(|tvrtd|jjdtd||dS)au Removes a shared file system repository. ``_ :arg repository: A comma-separated list of repository names :arg master_timeout: Explicit operation timeout for connection to master node :arg timeout: Explicit operation timeout 8Empty value passed for a required argument 'repository'.rr rrrrr rrrdelete_repository<s  z SnapshotClient.delete_repositorylocalcCs|jjdtd||dS)a Return information about registered repositories. ``_ :arg repository: A comma-separated list of repository names :arg local: Return local information, do not retrieve the state from master node (default: false) :arg master_timeout: Explicit operation timeout for connection to master node r r rrrrr$rrrget_repositoryLs zSnapshotClient.get_repositoryverifycCs8||fD]}|tvrtdq|jjdtd|||dS)a Registers a shared file system repository. ``_ :arg repository: A repository name :arg body: The repository definition :arg master_timeout: Explicit operation timeout for connection to master node :arg timeout: Explicit operation timeout :arg verify: Whether to verify the repository after creation r r r r r)rrrr rrrrcreate_repository[s   z SnapshotClient.create_repositorycCs<||fD]}|tvrtdq|jjdtd||d||dS)a Restore a snapshot. ``_ :arg repository: A repository name :arg snapshot: A snapshot name :arg body: Details of what to restore :arg master_timeout: Explicit operation timeout for connection to master node :arg wait_for_completion: Should this request wait until the operation has completed before returning, default False r POSTr Z_restorer rrrrrrestorens   zSnapshotClient.restorecCs|jjdtd||d|dS)a Return information about all currently running snapshots. By specifying a repository name, it's possible to limit the results to a particular repository. ``_ :arg repository: A repository name :arg snapshot: A comma-separated list of snapshot names :arg ignore_unavailable: Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown :arg master_timeout: Explicit operation timeout for connection to master node r r Z_statusrr')rrrr rrrstatuss  zSnapshotClient.statuscCs*|tvrtd|jjdtd|d|dS)a Returns a list of nodes where repository was successfully verified or an error message if verification process failed. ``_ :arg repository: A repository name :arg master_timeout: Explicit operation timeout for connection to master node :arg timeout: Explicit operation timeout r#r+r _verifyrrr$rrrverify_repositorys  z SnapshotClient.verify_repository)NN)N)N)N)NN)N)NN)NNN)N) __name__ __module__ __qualname__rrrr!r%r(r*r,r-r/rrrrrs$         rN)utilsrrrrrrrrrs