Update role
Update role
client.zones.roles.update(stringroleID, RoleUpdateParams { zoneId, description } params, RequestOptionsoptions?): Role { id, created_at, identifier, 4 more }
PATCH/zones/{zoneId}/roles/{roleId}
Updates a customer-owned role's description. The identifier is immutable, and platform-owned roles cannot be modified.
Parameters
roleID: string
Returns
Update role
import KeycardAPI from '@keycardai/api';
const client = new KeycardAPI({
apiKey: process.env['KEYCARD_API_API_KEY'], // This is the default and can be omitted
});
const role = await client.zones.roles.update('roleId', { zoneId: 'zoneId' });
console.log(role.id);{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"identifier": "identifier",
"owner_type": "platform",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"description": "description"
}Returns Examples
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"identifier": "identifier",
"owner_type": "platform",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"description": "description"
}