permit.api.roles.update()
Update an existing role.
Parameters
roleKey
- The ID of the role. This can also be the role key.
roleData
- An object that contains the information about the new role. The payload is defined below.
Payload
name
- The name of the role.
description
- optional - The description string explaining what this role represents, or what permissions are granted to it.
permissions
- optional - The list of action keys that define what actions this resource role is permitted to do.
Implementation
import io.permit.sdk.openapi.models.RoleUpdate;
permit.api.roles.update("admin", new RoleUpdate().withDescription("new description"));