Back to Node Auth0

Class RolesClient

docs/classes/management.SDK.RolesClient.html

5.11.05.6 KB
Original Source

Class RolesClient

Index

Constructors

constructor

Methods

listcreatedelete

Properties

_options

Constructors

constructor

new RolesClient(options: BaseClientOptions): RolesClient

Parameters

Returns RolesClient

Methods

list

list(
id: string,
request?: ListGroupRolesRequestParameters,
requestOptions?: RolesClient.RequestOptions,
): Promise<Page<Role, ListGroupRolesResponseContent>>

Lists the roles assigned to a group.

Parameters

  • id: string

Unique identifier for the group (service-generated).

Request-specific configuration.

Returns Promise<Page<Role, ListGroupRolesResponseContent>>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.groups.roles.list("id", { from: "from", take: 1 })Copy

create

create(
id: string,
request: CreateGroupRolesRequestParameters,
requestOptions?: RolesClient.RequestOptions,
): HttpResponsePromise<void>

Assign one or more roles to a specified group.

Parameters

  • id: string

Unique identifier for the group (service-generated).

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.groups.roles.create("id", { roles: ["roles"] })Copy

delete

delete(
id: string,
request: DeleteGroupRolesRequestContent,
requestOptions?: RolesClient.RequestOptions,
): HttpResponsePromise<void>

Unassign one or more roles from a specified group.

Parameters

  • id: string

Unique identifier for the group (service-generated).

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.groups.roles.delete("id", { roles: ["roles"] })Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Constructors constructor Methods listcreatedelete Properties _options