Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RoleAssignments

Package version

Class representing a RoleAssignments.

Hierarchy

  • RoleAssignments

Index

Constructors

constructor

Methods

create

  • Creates a role assignment.

    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

      The name of the role assignment to create. It can be any valid GUID.

    • properties: RoleAssignmentProperties

      Role assignment properties.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.RoleAssignmentsCreateResponse>

    Promise<Models.RoleAssignmentsCreateResponse>

  • 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

      The name of the role assignment to create. It can be any valid GUID.

    • properties: RoleAssignmentProperties

      Role assignment properties.

    • callback: msRest.ServiceCallback<RoleAssignment>

      The callback

    Returns void

  • 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

      The name of the role assignment to create. It can be any valid GUID.

    • properties: RoleAssignmentProperties

      Role assignment properties.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<RoleAssignment>

      The callback

    Returns void

createById

  • Creates a role assignment by ID.

    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}.

    • properties: RoleAssignmentProperties

      Role assignment properties.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.RoleAssignmentsCreateByIdResponse>

    Promise<Models.RoleAssignmentsCreateByIdResponse>

  • 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}.

    • properties: RoleAssignmentProperties

      Role assignment properties.

    • callback: msRest.ServiceCallback<RoleAssignment>

      The callback

    Returns void

  • 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}.

    • properties: RoleAssignmentProperties

      Role assignment properties.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<RoleAssignment>

      The callback

    Returns void

deleteById

  • deleteById(roleAssignmentId: string, options?: msRest.RequestOptionsBase): Promise<Models.RoleAssignmentsDeleteByIdResponse>
  • deleteById(roleAssignmentId: string, callback: msRest.ServiceCallback<RoleAssignment>): void
  • deleteById(roleAssignmentId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<RoleAssignment>): void
  • Deletes a role assignment.

    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}.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.RoleAssignmentsDeleteByIdResponse>

    Promise<Models.RoleAssignmentsDeleteByIdResponse>

  • 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}.

    • callback: msRest.ServiceCallback<RoleAssignment>

      The callback

    Returns void

  • 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}.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<RoleAssignment>

      The callback

    Returns void

deleteMethod

  • deleteMethod(scope: string, roleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise<Models.RoleAssignmentsDeleteMethodResponse>
  • deleteMethod(scope: string, roleAssignmentName: string, callback: msRest.ServiceCallback<RoleAssignment>): void
  • deleteMethod(scope: string, roleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<RoleAssignment>): void
  • Deletes a role assignment.

    Parameters

    • scope: string

      The scope of the role assignment to delete.

    • roleAssignmentName: string

      The name of the role assignment to delete.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.RoleAssignmentsDeleteMethodResponse>

    Promise<Models.RoleAssignmentsDeleteMethodResponse>

  • Parameters

    • scope: string

      The scope of the role assignment to delete.

    • roleAssignmentName: string

      The name of the role assignment to delete.

    • callback: msRest.ServiceCallback<RoleAssignment>

      The callback

    Returns void

  • Parameters

    • scope: string

      The scope of the role assignment to delete.

    • roleAssignmentName: string

      The name of the role assignment to delete.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<RoleAssignment>

      The callback

    Returns void

get

  • get(scope: string, roleAssignmentName: string, options?: msRest.RequestOptionsBase): Promise<Models.RoleAssignmentsGetResponse>
  • get(scope: string, roleAssignmentName: string, callback: msRest.ServiceCallback<RoleAssignment>): void
  • get(scope: string, roleAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<RoleAssignment>): void
  • Get the specified role assignment.

    Parameters

    • scope: string

      The scope of the role assignment.

    • roleAssignmentName: string

      The name of the role assignment to get.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.RoleAssignmentsGetResponse>

    Promise<Models.RoleAssignmentsGetResponse>

  • Parameters

    • scope: string

      The scope of the role assignment.

    • roleAssignmentName: string

      The name of the role assignment to get.

    • callback: msRest.ServiceCallback<RoleAssignment>

      The callback

    Returns void

  • Parameters

    • scope: string

      The scope of the role assignment.

    • roleAssignmentName: string

      The name of the role assignment to get.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<RoleAssignment>

      The callback

    Returns void

getById

  • getById(roleAssignmentId: string, options?: msRest.RequestOptionsBase): Promise<Models.RoleAssignmentsGetByIdResponse>
  • getById(roleAssignmentId: string, callback: msRest.ServiceCallback<RoleAssignment>): void
  • getById(roleAssignmentId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<RoleAssignment>): void
  • Gets a role assignment by ID.

    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}.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.RoleAssignmentsGetByIdResponse>

    Promise<Models.RoleAssignmentsGetByIdResponse>

  • 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}.

    • callback: msRest.ServiceCallback<RoleAssignment>

      The callback

    Returns void

  • 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}.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<RoleAssignment>

      The callback

    Returns void

list

listForResource

  • listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: Models.RoleAssignmentsListForResourceOptionalParams): Promise<Models.RoleAssignmentsListForResourceResponse>
  • listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback<RoleAssignmentListResult>): void
  • listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options: RoleAssignmentsListForResourceOptionalParams, callback: msRest.ServiceCallback<RoleAssignmentListResult>): void
  • Gets role assignments for a resource.

    Parameters

    • resourceGroupName: string

      The name of the resource group.

    • 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.

    • Optional options: Models.RoleAssignmentsListForResourceOptionalParams

    Returns Promise<Models.RoleAssignmentsListForResourceResponse>

    Promise<Models.RoleAssignmentsListForResourceResponse>

  • Parameters

    • resourceGroupName: string

      The name of the resource group.

    • 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.

    • callback: msRest.ServiceCallback<RoleAssignmentListResult>

      The callback

    Returns void

  • Parameters

    • resourceGroupName: string

      The name of the resource group.

    • 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.

    • options: RoleAssignmentsListForResourceOptionalParams

      The optional parameters

    • callback: msRest.ServiceCallback<RoleAssignmentListResult>

      The callback

    Returns void

listForResourceGroup

listForResourceGroupNext

  • listForResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.RoleAssignmentsListForResourceGroupNextResponse>
  • listForResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<RoleAssignmentListResult>): void
  • listForResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<RoleAssignmentListResult>): void
  • Gets role assignments for a resource group.

    Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.RoleAssignmentsListForResourceGroupNextResponse>

    Promise<Models.RoleAssignmentsListForResourceGroupNextResponse>

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • callback: msRest.ServiceCallback<RoleAssignmentListResult>

      The callback

    Returns void

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<RoleAssignmentListResult>

      The callback

    Returns void

listForResourceNext

  • listForResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.RoleAssignmentsListForResourceNextResponse>
  • listForResourceNext(nextPageLink: string, callback: msRest.ServiceCallback<RoleAssignmentListResult>): void
  • listForResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<RoleAssignmentListResult>): void
  • Gets role assignments for a resource.

    Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.RoleAssignmentsListForResourceNextResponse>

    Promise<Models.RoleAssignmentsListForResourceNextResponse>

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • callback: msRest.ServiceCallback<RoleAssignmentListResult>

      The callback

    Returns void

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<RoleAssignmentListResult>

      The callback

    Returns void

listForScope

listForScopeNext

  • listForScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.RoleAssignmentsListForScopeNextResponse>
  • listForScopeNext(nextPageLink: string, callback: msRest.ServiceCallback<RoleAssignmentListResult>): void
  • listForScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<RoleAssignmentListResult>): void
  • Gets role assignments for a scope.

    Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.RoleAssignmentsListForScopeNextResponse>

    Promise<Models.RoleAssignmentsListForScopeNextResponse>

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • callback: msRest.ServiceCallback<RoleAssignmentListResult>

      The callback

    Returns void

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<RoleAssignmentListResult>

      The callback

    Returns void

listNext

  • listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.RoleAssignmentsListNextResponse>
  • listNext(nextPageLink: string, callback: msRest.ServiceCallback<RoleAssignmentListResult>): void
  • listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<RoleAssignmentListResult>): void
  • Gets all role assignments for the subscription.

    Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.RoleAssignmentsListNextResponse>

    Promise<Models.RoleAssignmentsListNextResponse>

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • callback: msRest.ServiceCallback<RoleAssignmentListResult>

      The callback

    Returns void

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<RoleAssignmentListResult>

      The callback

    Returns void

Generated using TypeDoc