# Identity and Access Management (IAM) v1 API - Class UpdateRoleRequest (2.5.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.5.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.4.0/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.3.0/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.2.0/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.1.0/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.0.0/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/1.2.0/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/1.1.0/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/1.0.0/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest)

    public sealed class UpdateRoleRequest : IMessage<UpdateRoleRequest>, IEquatable<UpdateRoleRequest>, IDeepCloneable<UpdateRoleRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Identity and Access Management (IAM) v1 API class UpdateRoleRequest.

The request to update a role.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> UpdateRoleRequest

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[UpdateRoleRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[UpdateRoleRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[UpdateRoleRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Iam.Admin.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1)

## Assembly

Google.Cloud.Iam.Admin.V1.dll

## Constructors

### UpdateRoleRequest()

    public UpdateRoleRequest()

### UpdateRoleRequest(UpdateRoleRequest)

    public UpdateRoleRequest(UpdateRoleRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest` |

## Properties

### Name

    public string Name { get; set; }

The `name` parameter's value depends on the target resource for the
request, namely
[`projects`](https://cloud.google.com/iam/reference/rest/v1/projects.roles)
or
[`organizations`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles).
Each resource type's `name` value format is described below:

- [`projects.roles.patch()`](https://cloud.google.com/iam/reference/rest/v1/projects.roles/patch):
  `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only
  [custom
  roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that
  have been created at the project level. Example request URL:
  `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`

- [`organizations.roles.patch()`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles/patch):
  `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method
  updates only [custom
  roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that
  have been created at the organization level. Example request URL:
  `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`

Note: Wildcard (\*) values are invalid; you must specify a complete project
ID or organization ID.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ResourceName

    public IResourceName ResourceName { get; set; }

[IResourceName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.UpdateRoleRequest#Google_Cloud_Iam_Admin_V1_UpdateRoleRequest_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html` |   |

### Role

    public Role Role { get; set; }

The updated role.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.Role` |   |

### UpdateMask

    public FieldMask UpdateMask { get; set; }

A mask describing which fields in the Role have changed.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` |   |