RoleDefinitions interface

Interface representing a RoleDefinitions.

Methods

createOrUpdate(string, string, RoleDefinition, RoleDefinitionsCreateOrUpdateOptionalParams)

Creates or updates a role definition.

delete(string, string, RoleDefinitionsDeleteOptionalParams)

Deletes a role definition.

get(string, string, RoleDefinitionsGetOptionalParams)

Get role definition by name (GUID).

getById(string, RoleDefinitionsGetByIdOptionalParams)

Gets a role definition by ID.

list(string, RoleDefinitionsListOptionalParams)

Get all role definitions that are applicable at scope and above.

Method Details

createOrUpdate(string, string, RoleDefinition, RoleDefinitionsCreateOrUpdateOptionalParams)

Creates or updates a role definition.

function createOrUpdate(scope: string, roleDefinitionId: string, roleDefinition: RoleDefinition, options?: RoleDefinitionsCreateOrUpdateOptionalParams): Promise<RoleDefinition>

Parameters

scope

string

The scope of the role definition.

roleDefinitionId

string

The ID of the role definition.

roleDefinition
RoleDefinition

The values for the role definition.

options
RoleDefinitionsCreateOrUpdateOptionalParams

The options parameters.

Returns

Promise<RoleDefinition>

delete(string, string, RoleDefinitionsDeleteOptionalParams)

Deletes a role definition.

function delete(scope: string, roleDefinitionId: string, options?: RoleDefinitionsDeleteOptionalParams): Promise<RoleDefinition>

Parameters

scope

string

The scope of the role definition.

roleDefinitionId

string

The ID of the role definition to delete.

options
RoleDefinitionsDeleteOptionalParams

The options parameters.

Returns

Promise<RoleDefinition>

get(string, string, RoleDefinitionsGetOptionalParams)

Get role definition by name (GUID).

function get(scope: string, roleDefinitionId: string, options?: RoleDefinitionsGetOptionalParams): Promise<RoleDefinition>

Parameters

scope

string

The scope of the role definition.

roleDefinitionId

string

The ID of the role definition.

options
RoleDefinitionsGetOptionalParams

The options parameters.

Returns

Promise<RoleDefinition>

getById(string, RoleDefinitionsGetByIdOptionalParams)

Gets a role definition by ID.

function getById(roleId: string, options?: RoleDefinitionsGetByIdOptionalParams): Promise<RoleDefinition>

Parameters

roleId

string

The fully qualified role definition ID. Use the format, /subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for subscription level role definitions, or /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for tenant level role definitions.

options
RoleDefinitionsGetByIdOptionalParams

The options parameters.

Returns

Promise<RoleDefinition>

list(string, RoleDefinitionsListOptionalParams)

Get all role definitions that are applicable at scope and above.

function list(scope: string, options?: RoleDefinitionsListOptionalParams): PagedAsyncIterableIterator<RoleDefinition, RoleDefinition[], PageSettings>

Parameters

scope

string

The scope of the role definition.

options
RoleDefinitionsListOptionalParams

The options parameters.

Returns