// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.snapshot.restore({
  repository: "my_repository",
  snapshot: "snapshot_2",
  wait_for_completion: "true",
  indices: "index_1,index_2",
  ignore_unavailable: true,
  include_global_state: false,
  rename_pattern: "index_(.+)",
  rename_replacement: "restored_index_$1",
  include_aliases: false,
});
console.log(response);
----
