[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:
committed by
GitHub
parent
ccf9fcbd93
commit
b4eb8e5441
34
docs/doc_examples/fce5c03a388c893cb11a6696e068543f.asciidoc
Normal file
34
docs/doc_examples/fce5c03a388c893cb11a6696e068543f.asciidoc
Normal 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);
|
||||
----
|
||||
Reference in New Issue
Block a user