# Identity and Access Management (IAM) v1 API - Class ListRolesRequest (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.ListRolesRequest)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.4.0/Google.Cloud.Iam.Admin.V1.ListRolesRequest)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.3.0/Google.Cloud.Iam.Admin.V1.ListRolesRequest)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.2.0/Google.Cloud.Iam.Admin.V1.ListRolesRequest)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.1.0/Google.Cloud.Iam.Admin.V1.ListRolesRequest)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.0.0/Google.Cloud.Iam.Admin.V1.ListRolesRequest)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/1.2.0/Google.Cloud.Iam.Admin.V1.ListRolesRequest)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/1.1.0/Google.Cloud.Iam.Admin.V1.ListRolesRequest)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/1.0.0/Google.Cloud.Iam.Admin.V1.ListRolesRequest)

    public sealed class ListRolesRequest : IMessage<ListRolesRequest>, IEquatable<ListRolesRequest>, IDeepCloneable<ListRolesRequest>, IBufferMessage, IMessage, IPageRequest

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

The request to get all roles defined under a resource.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ListRolesRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.ListRolesRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ListRolesRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.ListRolesRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ListRolesRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.ListRolesRequest), [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), [IPageRequest](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.IPageRequest.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

### ListRolesRequest()

    public ListRolesRequest()

### ListRolesRequest(ListRolesRequest)

    public ListRolesRequest(ListRolesRequest other)

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

## Properties

### PageSize

    public int PageSize { get; set; }

Optional limit on the number of roles to include in the response.

The default is 300, and the maximum is 1,000.

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

### PageToken

    public string PageToken { get; set; }

Optional pagination token returned in an earlier ListRolesResponse.

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

### Parent

    public string Parent { get; set; }

The `parent` parameter's value depends on the target resource for the
request, namely
[`roles`](https://cloud.google.com/iam/reference/rest/v1/roles),
[`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 `parent` value format is described below:

- [`roles.list()`](https://cloud.google.com/iam/reference/rest/v1/roles/list): An empty string.
  This method doesn't require a resource; it simply returns all
  [predefined
  roles](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles)
  in Cloud IAM. Example request URL: `https://iam.googleapis.com/v1/roles`

- [`projects.roles.list()`](https://cloud.google.com/iam/reference/rest/v1/projects.roles/list):
  `projects/{PROJECT_ID}`. This method lists all project-level
  [custom
  roles](https://cloud.google.com/iam/docs/understanding-custom-roles).
  Example request URL:
  `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles`

- [`organizations.roles.list()`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles/list):
  `organizations/{ORGANIZATION_ID}`. This method lists all
  organization-level [custom
  roles](https://cloud.google.com/iam/docs/understanding-custom-roles).
  Example request URL:
  `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles`

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` |   |

### ParentAsResourceName

    public IResourceName ParentAsResourceName { get; set; }

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

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

### ShowDeleted

    public bool ShowDeleted { get; set; }

Include Roles that have been deleted.

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

### View

    public RoleView View { get; set; }

Optional view for the returned Role objects. When `FULL` is specified,
the `includedPermissions` field is returned, which includes a list of all
permissions in the role. The default value is `BASIC`, which does not
return the `includedPermissions` field.

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