Added/updated snippets for docs (#2318)
This commit is contained in:
27
docs/doc_examples/9684e5fa8c22a07a372feb6fc1f5f7c0.asciidoc
Normal file
27
docs/doc_examples/9684e5fa8c22a07a372feb6fc1f5f7c0.asciidoc
Normal file
@ -0,0 +1,27 @@
|
||||
// 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.hasPrivileges({
|
||||
cluster: ["monitor", "manage"],
|
||||
index: [
|
||||
{
|
||||
names: ["suppliers", "products"],
|
||||
privileges: ["read"],
|
||||
},
|
||||
{
|
||||
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