(cherry picked from commit f737290d10)
Co-authored-by: Josh Mock <joshua.mock@elastic.co>
22 lines
410 B
Plaintext
22 lines
410 B
Plaintext
// 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.putRole({
|
|
name: "click_role",
|
|
indices: [
|
|
{
|
|
names: ["events-*"],
|
|
privileges: ["read"],
|
|
query: {
|
|
match: {
|
|
category: "click",
|
|
},
|
|
},
|
|
},
|
|
],
|
|
});
|
|
console.log(response);
|
|
----
|