AppRoleBuilder
Configures an App Role that principals are assigned across the whole App.
- AppBuilder.addRole
- AppRoleDefinition for the emitted Definition
- ReadAppRoleInstance for checking the Role inside an execution
Extends
Section titled “Extends”Properties
Section titled “Properties”extends
Section titled “extends”
readonlyextends:AppRoleBuilder[]
App Roles this Role extends directly, in the order they were added.
readonlyprn:string
Platform Resource Name of the declared resource, derived from the App key and resource key.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”extend()
Section titled “extend()”extend(
role):BaseRoleBuilder
Makes this Role act as the given App Role wherever that Role is checked.
Parameters
Section titled “Parameters”App Role to extend.
Returns
Section titled “Returns”This builder for chaining.
Remarks
Section titled “Remarks”Extension is transitive: the emitted Definition lists every Role reachable through extend,
and a principal holding this Role passes checks for all of them.
Throws
Section titled “Throws”When extending role would create a cycle.
Example
Section titled “Example”Administrators are also users
const userRole = app.addRole('user', { label: 'User' });const adminRole = app.addRole('admin', { label: 'Admin' });adminRole.extend(userRole);setDescription()
Section titled “setDescription()”setDescription(
description):this
Sets the description emitted into the definition and rendered in generated reference and application assets.
Parameters
Section titled “Parameters”description
Section titled “description”string
Human-readable description of the resource.
Returns
Section titled “Returns”this
This builder for chaining.
Inherited from
Section titled “Inherited from”BaseRoleBuilder.setDescription
toDefinition()
Section titled “toDefinition()”toDefinition():
AppRoleDefinition
Emits the Role Definition, including the flattened list of extended Role PRNs.

