I
InsightNexus

Class RoleAssignmentResource | Azure SDK for .NET

Author

Emma Terry

Published Feb 16, 2026

A Class representing a RoleAssignment along with the instance operations that can be performed on it. If you have a Azure.Core.ResourceIdentifier you can construct a RoleAssignmentResourcefrom an instance of Azure.ResourceManager.ArmClient using the GetRoleAssignmentResource method. Otherwise you can get one from its parent resource Azure.ResourceManager.ArmResource using the GetRoleAssignment method.

Inheritance

Azure.ResourceManager.ArmResource

RoleAssignmentResource

Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.ResourceManager.Authorization.dll
Syntax
public class RoleAssignmentResource : Azure.ResourceManager.ArmResource

Constructors

RoleAssignmentResource()

Declaration
protected RoleAssignmentResource ();

Fields

ResourceType

Gets the resource type for the operations.

Declaration
public static readonly Azure.Core.ResourceType ResourceType;
Field Value
Azure.Core.ResourceType

Properties

Data

Gets the data representing this Feature.

Declaration
public virtual Azure.ResourceManager.Authorization.RoleAssignmentData Data { get; }
Property Value
Exceptions
System.InvalidOperationException

Throws if there is no data loaded in the current instance.

HasData

Gets whether or not the current instance has data.

Declaration
public virtual bool HasData { get; }
Property Value
System.Boolean

Methods

CreateResourceIdentifier(String, String)

Declaration
public static Azure.Core.ResourceIdentifier CreateResourceIdentifier (string scope, string roleAssignmentName);
Parameters
System.String scope
System.String roleAssignmentName
Returns
Azure.Core.ResourceIdentifier

Delete(WaitUntil, CancellationToken)

Deletes a role assignment. Request Path: /{scope}/providers/ Operation Id: RoleAssignments_Delete

Declaration
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Authorization.RoleAssignmentResource> Delete (Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = null);
Parameters
Azure.WaitUntil waitUntil

Azure.WaitUntil.Completed if the method should wait to return until the long-running operation has completed on the service; Azure.WaitUntil.Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

System.Threading.CancellationToken cancellationToken

The cancellation token to use.

Returns

DeleteAsync(WaitUntil, CancellationToken)

Deletes a role assignment. Request Path: /{scope}/providers/ Operation Id: RoleAssignments_Delete

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Authorization.RoleAssignmentResource>> DeleteAsync (Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = null);
Parameters
Azure.WaitUntil waitUntil

Azure.WaitUntil.Completed if the method should wait to return until the long-running operation has completed on the service; Azure.WaitUntil.Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

System.Threading.CancellationToken cancellationToken

The cancellation token to use.

Returns

Get(CancellationToken)

Get the specified role assignment. Request Path: /{scope}/providers/ Operation Id: RoleAssignments_Get

Declaration
public virtual Azure.Response<Azure.ResourceManager.Authorization.RoleAssignmentResource> Get (System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Threading.CancellationToken cancellationToken

The cancellation token to use.

Returns

GetAsync(CancellationToken)

Get the specified role assignment. Request Path: /{scope}/providers/ Operation Id: RoleAssignments_Get

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Authorization.RoleAssignmentResource>> GetAsync (System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Threading.CancellationToken cancellationToken

The cancellation token to use.

Returns

Update(WaitUntil, RoleAssignmentCreateOrUpdateContent, CancellationToken)

Creates a role assignment. Request Path: /{scope}/providers/ Operation Id: RoleAssignments_Create

Declaration
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Authorization.RoleAssignmentResource> Update (Azure.WaitUntil waitUntil, Azure.ResourceManager.Authorization.Models.RoleAssignmentCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = null);
Parameters
Azure.WaitUntil waitUntil

Azure.WaitUntil.Completed if the method should wait to return until the long-running operation has completed on the service; Azure.WaitUntil.Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

RoleAssignmentCreateOrUpdateContent content

Parameters for the role assignment.

System.Threading.CancellationToken cancellationToken

The cancellation token to use.

Returns
Exceptions
System.ArgumentNullException

content is null.

UpdateAsync(WaitUntil, RoleAssignmentCreateOrUpdateContent, CancellationToken)

Creates a role assignment. Request Path: /{scope}/providers/ Operation Id: RoleAssignments_Create

Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Authorization.RoleAssignmentResource>> UpdateAsync (Azure.WaitUntil waitUntil, Azure.ResourceManager.Authorization.Models.RoleAssignmentCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = null);
Parameters
Azure.WaitUntil waitUntil

Azure.WaitUntil.Completed if the method should wait to return until the long-running operation has completed on the service; Azure.WaitUntil.Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

RoleAssignmentCreateOrUpdateContent content

Parameters for the role assignment.

System.Threading.CancellationToken cancellationToken

The cancellation token to use.

Returns
Exceptions
System.ArgumentNullException

content is null.