[Backport 8.15] Added/updated snippets for docs (#2319)

(cherry picked from commit f737290d10)

Co-authored-by: Josh Mock <joshua.mock@elastic.co>
This commit is contained in:
github-actions[bot]
2024-07-29 17:10:42 -05:00
committed by GitHub
parent ccf9fcbd93
commit b4eb8e5441
3326 changed files with 67843 additions and 6751 deletions

View File

@ -0,0 +1,34 @@
// 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.security.hasPrivilegesUserProfile({
uids: [
"u_LQPnxDxEjIH0GOUoFkZr5Y57YUwSkL9Joiq-g4OCbPc_0",
"u_rzRnxDgEHIH0GOUoFkZr5Y27YUwSk19Joiq=g4OCxxB_1",
"u_does-not-exist_0",
],
privileges: {
cluster: ["monitor", "create_snapshot", "manage_ml"],
index: [
{
names: ["suppliers", "products"],
privileges: ["create_doc"],
},
{
names: ["inventory"],
privileges: ["read", "write"],
},
],
application: [
{
application: "inventory_manager",
privileges: ["read", "data:write/inventory"],
resources: ["product/1852563"],
},
],
},
});
console.log(response);
----