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

[source, js]
----
const response = await client.security.putRoleMapping({
  name: "mapping4",
  roles: ["superuser"],
  enabled: true,
  rules: {
    any: [
      {
        field: {
          username: "esadmin",
        },
      },
      {
        field: {
          groups: ["cn=admins,dc=example,dc=com", "cn=other,dc=example,dc=com"],
        },
      },
    ],
  },
});
console.log(response);
----
