RoleAssignments interface
Interface representing a RoleAssignments.
Methods
Method Details
create(string, string, RoleAssignmentCreateParameters, RoleAssignmentsCreateOptionalParams)
Creates a role assignment.
function create(scope: string, roleAssignmentName: string, parameters: RoleAssignmentCreateParameters, options?: RoleAssignmentsCreateOptionalParams): Promise<RoleAssignment>
Parameters
- scope
-
string
The scope of the role assignment to create. The scope can be any REST resource instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
- roleAssignmentName
-
string
A GUID for the role assignment to create. The name must be unique and different for each role assignment.
- parameters
- RoleAssignmentCreateParameters
Parameters for the role assignment.
The options parameters.
Returns
Promise<RoleAssignment>
createById(string, RoleAssignmentCreateParameters, RoleAssignmentsCreateByIdOptionalParams)
Creates a role assignment by ID.
function createById(roleAssignmentId: string, parameters: RoleAssignmentCreateParameters, options?: RoleAssignmentsCreateByIdOptionalParams): Promise<RoleAssignment>
Parameters
- roleAssignmentId
-
string
The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}.
- parameters
- RoleAssignmentCreateParameters
Parameters for the role assignment.
The options parameters.
Returns
Promise<RoleAssignment>
delete(string, string, RoleAssignmentsDeleteOptionalParams)
Deletes a role assignment.
function delete(scope: string, roleAssignmentName: string, options?: RoleAssignmentsDeleteOptionalParams): Promise<RoleAssignment>
Parameters
- scope
-
string
The scope of the role assignment to delete.
- roleAssignmentName
-
string
The name of the role assignment to delete.
The options parameters.
Returns
Promise<RoleAssignment>
deleteById(string, RoleAssignmentsDeleteByIdOptionalParams)
Deletes a role assignment.
function deleteById(roleAssignmentId: string, options?: RoleAssignmentsDeleteByIdOptionalParams): Promise<RoleAssignment>
Parameters
- roleAssignmentId
-
string
The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}.
The options parameters.
Returns
Promise<RoleAssignment>
get(string, string, RoleAssignmentsGetOptionalParams)
Get the specified role assignment.
function get(scope: string, roleAssignmentName: string, options?: RoleAssignmentsGetOptionalParams): Promise<RoleAssignment>
Parameters
- scope
-
string
The scope of the role assignment.
- roleAssignmentName
-
string
The name of the role assignment to get.
- options
- RoleAssignmentsGetOptionalParams
The options parameters.
Returns
Promise<RoleAssignment>
getById(string, RoleAssignmentsGetByIdOptionalParams)
Gets a role assignment by ID.
function getById(roleAssignmentId: string, options?: RoleAssignmentsGetByIdOptionalParams): Promise<RoleAssignment>
Parameters
- roleAssignmentId
-
string
The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}.
The options parameters.
Returns
Promise<RoleAssignment>
list(RoleAssignmentsListOptionalParams)
Gets all role assignments for the subscription.
function list(options?: RoleAssignmentsListOptionalParams): PagedAsyncIterableIterator<RoleAssignment, RoleAssignment[], PageSettings>
Parameters
The options parameters.
Returns
listForResource(string, string, string, string, string, RoleAssignmentsListForResourceOptionalParams)
Gets role assignments for a resource.
function listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: RoleAssignmentsListForResourceOptionalParams): PagedAsyncIterableIterator<RoleAssignment, RoleAssignment[], PageSettings>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- resourceProviderNamespace
-
string
The namespace of the resource provider.
- parentResourcePath
-
string
The parent resource identity.
- resourceType
-
string
The resource type of the resource.
- resourceName
-
string
The name of the resource to get role assignments for.
The options parameters.
Returns
listForResourceGroup(string, RoleAssignmentsListForResourceGroupOptionalParams)
Gets role assignments for a resource group.
function listForResourceGroup(resourceGroupName: string, options?: RoleAssignmentsListForResourceGroupOptionalParams): PagedAsyncIterableIterator<RoleAssignment, RoleAssignment[], PageSettings>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
The options parameters.
Returns
listForScope(string, RoleAssignmentsListForScopeOptionalParams)
Gets role assignments for a scope.
function listForScope(scope: string, options?: RoleAssignmentsListForScopeOptionalParams): PagedAsyncIterableIterator<RoleAssignment, RoleAssignment[], PageSettings>
Parameters
- scope
-
string
The scope of the role assignments.
The options parameters.