[[reference-slm-get_stats]]

////////
===========================================================================================================================
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
||        ██████╗ ███████╗ █████╗ ██████╗ ███╗   ███╗███████╗                                                            ||
||        ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝                                                            ||
||        ██████╔╝█████╗  ███████║██║  ██║██╔████╔██║█████╗                                                              ||
||        ██╔══██╗██╔══╝  ██╔══██║██║  ██║██║╚██╔╝██║██╔══╝                                                              ||
||        ██║  ██║███████╗██║  ██║██████╔╝██║ ╚═╝ ██║███████╗                                                            ||
||        ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═════╝ ╚═╝     ╚═╝╚══════╝                                                            ||
||                                                                                                                       ||
||                                                                                                                       ||
||    This file is autogenerated, DO NOT send pull requests that changes this file directly.                             ||
||    You should update the script that does the generation, which can be found in:                                      ||
||    https://github.com/elastic/elastic-client-generator-js                                                             ||
||                                                                                                                       ||
||    You can run the script with the following command:                                                                 ||
||       npm run elasticsearch -- --version <version>                                                                    ||
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
===========================================================================================================================
////////

[discrete]
=== client.slm.getStats

Returns global and policy-level statistics about actions taken by snapshot lifecycle management.

{ref}/slm-api-get-stats.html[{es} documentation]

[discrete]
==== Function signature

[source,ts]
----
(SlmGetStatsRequest, options?): Promise<SlmGetStatsResponse>
----

[discrete]
==== SlmGetStatsRequest

[pass]
++++
<pre>
++++
interface SlmGetStatsRequest extends <<RequestBase>> {
}

[pass]
++++
</pre>
++++
[discrete]
==== SlmGetStatsResponse

[pass]
++++
<pre>
++++
interface SlmGetStatsResponse {
  retention_deletion_time: <<Duration>>
  retention_deletion_time_millis: <<DurationValue>><<<UnitMillis>>>
  retention_failed: <<_long, long>>
  retention_runs: <<_long, long>>
  retention_timed_out: <<_long, long>>
  total_snapshots_deleted: <<_long, long>>
  total_snapshot_deletion_failures: <<_long, long>>
  total_snapshots_failed: <<_long, long>>
  total_snapshots_taken: <<_long, long>>
  policy_stats: string[]
}

[pass]
++++
</pre>
++++
