// This file is autogenerated, DO NOT EDIT
// security/authorization/mapping-roles.asciidoc:138

[source, python]
----
resp = client.security.put_role_mapping(
    name="admins",
    roles=[
        "monitoring",
        "user"
    ],
    rules={
        "field": {
            "groups": "cn=admins,dc=example,dc=com"
        }
    },
    enabled=True,
)
print(resp)
----
