1.0.0-beta03 (latest) 1.0.0-beta02

    public abstract class AccessPoliciesClient

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

AccessPolicies client wrapper, for convenient use.

## Inheritance

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

## 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.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

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

## Namespace

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

## Assembly

Google.Cloud.Iam.V3.dll

## Remarks

Manages Identity and Access Management (IAM) access policies.

## Properties

### CreateAccessPolicyOperationsClient

    public virtual OperationsClient CreateAccessPolicyOperationsClient { get; }

The long-running operations client for `CreateAccessPolicy`.

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

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the AccessPolicies service, which is a host of "iam.googleapis.com" and a port of 443.

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

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default AccessPolicies scopes.

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

**Remarks** The default AccessPolicies scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

### DeleteAccessPolicyOperationsClient

    public virtual OperationsClient DeleteAccessPolicyOperationsClient { get; }

The long-running operations client for `DeleteAccessPolicy`.

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

### GrpcClient

    public virtual AccessPolicies.AccessPoliciesClient GrpcClient { get; }

The underlying gRPC AccessPolicies client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicieshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicies.AccessPoliciesClient` |   |

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

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

### UpdateAccessPolicyOperationsClient

    public virtual OperationsClient UpdateAccessPolicyOperationsClient { get; }

The long-running operations client for `UpdateAccessPolicy`.

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

## Methods

### Create()

    public static AccessPoliciesClient Create()

Synchronously creates a [AccessPoliciesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClient) using the default credentials, endpoint and settings. To specify custom credentials or other settings, use [AccessPoliciesClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClient` | The created [AccessPoliciesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClient). |

### CreateAccessPolicy(LocationName, AccessPolicy, string, CallSettings)

    public virtual Operation<AccessPolicy, OperationMetadata> CreateAccessPolicy(LocationName parent, AccessPolicy accessPolicy, string accessPolicyId, CallSettings callSettings = null)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource where this access policy will be created. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `accessPolicy` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` Required. The access policy to create. |
| `accessPolicyId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the access policy, which will become the final component of the access policy's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /\[a-z\]\[a-z0-9-.\]{2,62}/. This value must be unique among all access policies with the same parent. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    AccessPolicy accessPolicy = new AccessPolicy();
    string accessPolicyId = "";
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = accessPoliciesClient.CreateAccessPolicy(parent, accessPolicy, accessPolicyId);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = accessPoliciesClient.PollOnceCreateAccessPolicy(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicy(CreateAccessPolicyRequest, CallSettings)

    public virtual Operation<AccessPolicy, OperationMetadata> CreateAccessPolicy(CreateAccessPolicyRequest request, CallSettings callSettings = null)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.CreateAccessPolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    CreateAccessPolicyRequest request = new CreateAccessPolicyRequest
    {
        ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
        AccessPolicyId = "",
        AccessPolicy = new AccessPolicy(),
        ValidateOnly = false,
    };
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = accessPoliciesClient.CreateAccessPolicy(request);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = accessPoliciesClient.PollOnceCreateAccessPolicy(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicy(FolderLocationName, AccessPolicy, string, CallSettings)

    public virtual Operation<AccessPolicy, OperationMetadata> CreateAccessPolicy(FolderLocationName parent, AccessPolicy accessPolicy, string accessPolicyId, CallSettings callSettings = null)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.FolderLocationName` Required. The parent resource where this access policy will be created. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `accessPolicy` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` Required. The access policy to create. |
| `accessPolicyId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the access policy, which will become the final component of the access policy's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /\[a-z\]\[a-z0-9-.\]{2,62}/. This value must be unique among all access policies with the same parent. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    FolderLocationName parent = FolderLocationName.FromFolderLocation("[FOLDER]", "[LOCATION]");
    AccessPolicy accessPolicy = new AccessPolicy();
    string accessPolicyId = "";
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = accessPoliciesClient.CreateAccessPolicy(parent, accessPolicy, accessPolicyId);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = accessPoliciesClient.PollOnceCreateAccessPolicy(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicy(OrganizationLocationName, AccessPolicy, string, CallSettings)

    public virtual Operation<AccessPolicy, OperationMetadata> CreateAccessPolicy(OrganizationLocationName parent, AccessPolicy accessPolicy, string accessPolicyId, CallSettings callSettings = null)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OrganizationLocationName` Required. The parent resource where this access policy will be created. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `accessPolicy` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` Required. The access policy to create. |
| `accessPolicyId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the access policy, which will become the final component of the access policy's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /\[a-z\]\[a-z0-9-.\]{2,62}/. This value must be unique among all access policies with the same parent. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    AccessPolicy accessPolicy = new AccessPolicy();
    string accessPolicyId = "";
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = accessPoliciesClient.CreateAccessPolicy(parent, accessPolicy, accessPolicyId);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = accessPoliciesClient.PollOnceCreateAccessPolicy(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicy(string, AccessPolicy, string, CallSettings)

    public virtual Operation<AccessPolicy, OperationMetadata> CreateAccessPolicy(string parent, AccessPolicy accessPolicy, string accessPolicyId, CallSettings callSettings = null)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource where this access policy will be created. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `accessPolicy` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` Required. The access policy to create. |
| `accessPolicyId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the access policy, which will become the final component of the access policy's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /\[a-z\]\[a-z0-9-.\]{2,62}/. This value must be unique among all access policies with the same parent. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    AccessPolicy accessPolicy = new AccessPolicy();
    string accessPolicyId = "";
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = accessPoliciesClient.CreateAccessPolicy(parent, accessPolicy, accessPolicyId);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = accessPoliciesClient.PollOnceCreateAccessPolicy(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicyAsync(LocationName, AccessPolicy, string, CallSettings)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> CreateAccessPolicyAsync(LocationName parent, AccessPolicy accessPolicy, string accessPolicyId, CallSettings callSettings = null)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource where this access policy will be created. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `accessPolicy` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` Required. The access policy to create. |
| `accessPolicyId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the access policy, which will become the final component of the access policy's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /\[a-z\]\[a-z0-9-.\]{2,62}/. This value must be unique among all access policies with the same parent. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    AccessPolicy accessPolicy = new AccessPolicy();
    string accessPolicyId = "";
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = await accessPoliciesClient.CreateAccessPolicyAsync(parent, accessPolicy, accessPolicyId);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceCreateAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicyAsync(LocationName, AccessPolicy, string, CancellationToken)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> CreateAccessPolicyAsync(LocationName parent, AccessPolicy accessPolicy, string accessPolicyId, CancellationToken cancellationToken)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource where this access policy will be created. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `accessPolicy` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` Required. The access policy to create. |
| `accessPolicyId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the access policy, which will become the final component of the access policy's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /\[a-z\]\[a-z0-9-.\]{2,62}/. This value must be unique among all access policies with the same parent. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    AccessPolicy accessPolicy = new AccessPolicy();
    string accessPolicyId = "";
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = await accessPoliciesClient.CreateAccessPolicyAsync(parent, accessPolicy, accessPolicyId);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceCreateAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicyAsync(CreateAccessPolicyRequest, CallSettings)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> CreateAccessPolicyAsync(CreateAccessPolicyRequest request, CallSettings callSettings = null)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.CreateAccessPolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    CreateAccessPolicyRequest request = new CreateAccessPolicyRequest
    {
        ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
        AccessPolicyId = "",
        AccessPolicy = new AccessPolicy(),
        ValidateOnly = false,
    };
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = await accessPoliciesClient.CreateAccessPolicyAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceCreateAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicyAsync(CreateAccessPolicyRequest, CancellationToken)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> CreateAccessPolicyAsync(CreateAccessPolicyRequest request, CancellationToken cancellationToken)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.CreateAccessPolicyRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    CreateAccessPolicyRequest request = new CreateAccessPolicyRequest
    {
        ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
        AccessPolicyId = "",
        AccessPolicy = new AccessPolicy(),
        ValidateOnly = false,
    };
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = await accessPoliciesClient.CreateAccessPolicyAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceCreateAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicyAsync(FolderLocationName, AccessPolicy, string, CallSettings)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> CreateAccessPolicyAsync(FolderLocationName parent, AccessPolicy accessPolicy, string accessPolicyId, CallSettings callSettings = null)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.FolderLocationName` Required. The parent resource where this access policy will be created. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `accessPolicy` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` Required. The access policy to create. |
| `accessPolicyId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the access policy, which will become the final component of the access policy's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /\[a-z\]\[a-z0-9-.\]{2,62}/. This value must be unique among all access policies with the same parent. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    FolderLocationName parent = FolderLocationName.FromFolderLocation("[FOLDER]", "[LOCATION]");
    AccessPolicy accessPolicy = new AccessPolicy();
    string accessPolicyId = "";
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = await accessPoliciesClient.CreateAccessPolicyAsync(parent, accessPolicy, accessPolicyId);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceCreateAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicyAsync(FolderLocationName, AccessPolicy, string, CancellationToken)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> CreateAccessPolicyAsync(FolderLocationName parent, AccessPolicy accessPolicy, string accessPolicyId, CancellationToken cancellationToken)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.FolderLocationName` Required. The parent resource where this access policy will be created. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `accessPolicy` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` Required. The access policy to create. |
| `accessPolicyId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the access policy, which will become the final component of the access policy's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /\[a-z\]\[a-z0-9-.\]{2,62}/. This value must be unique among all access policies with the same parent. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    FolderLocationName parent = FolderLocationName.FromFolderLocation("[FOLDER]", "[LOCATION]");
    AccessPolicy accessPolicy = new AccessPolicy();
    string accessPolicyId = "";
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = await accessPoliciesClient.CreateAccessPolicyAsync(parent, accessPolicy, accessPolicyId);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceCreateAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicyAsync(OrganizationLocationName, AccessPolicy, string, CallSettings)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> CreateAccessPolicyAsync(OrganizationLocationName parent, AccessPolicy accessPolicy, string accessPolicyId, CallSettings callSettings = null)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OrganizationLocationName` Required. The parent resource where this access policy will be created. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `accessPolicy` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` Required. The access policy to create. |
| `accessPolicyId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the access policy, which will become the final component of the access policy's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /\[a-z\]\[a-z0-9-.\]{2,62}/. This value must be unique among all access policies with the same parent. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    AccessPolicy accessPolicy = new AccessPolicy();
    string accessPolicyId = "";
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = await accessPoliciesClient.CreateAccessPolicyAsync(parent, accessPolicy, accessPolicyId);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceCreateAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicyAsync(OrganizationLocationName, AccessPolicy, string, CancellationToken)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> CreateAccessPolicyAsync(OrganizationLocationName parent, AccessPolicy accessPolicy, string accessPolicyId, CancellationToken cancellationToken)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OrganizationLocationName` Required. The parent resource where this access policy will be created. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `accessPolicy` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` Required. The access policy to create. |
| `accessPolicyId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the access policy, which will become the final component of the access policy's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /\[a-z\]\[a-z0-9-.\]{2,62}/. This value must be unique among all access policies with the same parent. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    AccessPolicy accessPolicy = new AccessPolicy();
    string accessPolicyId = "";
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = await accessPoliciesClient.CreateAccessPolicyAsync(parent, accessPolicy, accessPolicyId);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceCreateAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicyAsync(string, AccessPolicy, string, CallSettings)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> CreateAccessPolicyAsync(string parent, AccessPolicy accessPolicy, string accessPolicyId, CallSettings callSettings = null)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource where this access policy will be created. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `accessPolicy` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` Required. The access policy to create. |
| `accessPolicyId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the access policy, which will become the final component of the access policy's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /\[a-z\]\[a-z0-9-.\]{2,62}/. This value must be unique among all access policies with the same parent. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    AccessPolicy accessPolicy = new AccessPolicy();
    string accessPolicyId = "";
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = await accessPoliciesClient.CreateAccessPolicyAsync(parent, accessPolicy, accessPolicyId);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceCreateAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAccessPolicyAsync(string, AccessPolicy, string, CancellationToken)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> CreateAccessPolicyAsync(string parent, AccessPolicy accessPolicy, string accessPolicyId, CancellationToken cancellationToken)

Creates an access policy, and returns a long running operation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource where this access policy will be created. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `accessPolicy` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` Required. The access policy to create. |
| `accessPolicyId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the access policy, which will become the final component of the access policy's resource name. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /\[a-z\]\[a-z0-9-.\]{2,62}/. This value must be unique among all access policies with the same parent. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    AccessPolicy accessPolicy = new AccessPolicy();
    string accessPolicyId = "";
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = await accessPoliciesClient.CreateAccessPolicyAsync(parent, accessPolicy, accessPolicyId);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceCreateAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### CreateAsync(CancellationToken)

    public static Task<AccessPoliciesClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [AccessPoliciesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClient) using the default credentials, endpoint and settings. To specify custom credentials or other settings, use [AccessPoliciesClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClient` | The task representing the created [AccessPoliciesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClient). |

### DeleteAccessPolicy(AccessPolicyName, CallSettings)

    public virtual Operation<Empty, OperationMetadata> DeleteAccessPolicy(AccessPolicyName name, CallSettings callSettings = null)

Deletes an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyName` Required. The name of the access policy to delete. Format: `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    AccessPolicyName name = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]");
    // Make the request
    Operation<Empty, OperationMetadata> response = accessPoliciesClient.DeleteAccessPolicy(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = accessPoliciesClient.PollOnceDeleteAccessPolicy(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteAccessPolicy(DeleteAccessPolicyRequest, CallSettings)

    public virtual Operation<Empty, OperationMetadata> DeleteAccessPolicy(DeleteAccessPolicyRequest request, CallSettings callSettings = null)

Deletes an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.DeleteAccessPolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    DeleteAccessPolicyRequest request = new DeleteAccessPolicyRequest
    {
        AccessPolicyName = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]"),
        Etag = "",
        ValidateOnly = false,
        Force = false,
    };
    // Make the request
    Operation<Empty, OperationMetadata> response = accessPoliciesClient.DeleteAccessPolicy(request);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = accessPoliciesClient.PollOnceDeleteAccessPolicy(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteAccessPolicy(string, CallSettings)

    public virtual Operation<Empty, OperationMetadata> DeleteAccessPolicy(string name, CallSettings callSettings = null)

Deletes an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the access policy to delete. Format: `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/accessPolicies/[ACCESS_POLICY]";
    // Make the request
    Operation<Empty, OperationMetadata> response = accessPoliciesClient.DeleteAccessPolicy(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = accessPoliciesClient.PollOnceDeleteAccessPolicy(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteAccessPolicyAsync(AccessPolicyName, CallSettings)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteAccessPolicyAsync(AccessPolicyName name, CallSettings callSettings = null)

Deletes an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyName` Required. The name of the access policy to delete. Format: `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    AccessPolicyName name = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]");
    // Make the request
    Operation<Empty, OperationMetadata> response = await accessPoliciesClient.DeleteAccessPolicyAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceDeleteAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteAccessPolicyAsync(AccessPolicyName, CancellationToken)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteAccessPolicyAsync(AccessPolicyName name, CancellationToken cancellationToken)

Deletes an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyName` Required. The name of the access policy to delete. Format: `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    AccessPolicyName name = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]");
    // Make the request
    Operation<Empty, OperationMetadata> response = await accessPoliciesClient.DeleteAccessPolicyAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceDeleteAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteAccessPolicyAsync(DeleteAccessPolicyRequest, CallSettings)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteAccessPolicyAsync(DeleteAccessPolicyRequest request, CallSettings callSettings = null)

Deletes an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.DeleteAccessPolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    DeleteAccessPolicyRequest request = new DeleteAccessPolicyRequest
    {
        AccessPolicyName = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]"),
        Etag = "",
        ValidateOnly = false,
        Force = false,
    };
    // Make the request
    Operation<Empty, OperationMetadata> response = await accessPoliciesClient.DeleteAccessPolicyAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceDeleteAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteAccessPolicyAsync(DeleteAccessPolicyRequest, CancellationToken)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteAccessPolicyAsync(DeleteAccessPolicyRequest request, CancellationToken cancellationToken)

Deletes an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.DeleteAccessPolicyRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    DeleteAccessPolicyRequest request = new DeleteAccessPolicyRequest
    {
        AccessPolicyName = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]"),
        Etag = "",
        ValidateOnly = false,
        Force = false,
    };
    // Make the request
    Operation<Empty, OperationMetadata> response = await accessPoliciesClient.DeleteAccessPolicyAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceDeleteAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteAccessPolicyAsync(string, CallSettings)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteAccessPolicyAsync(string name, CallSettings callSettings = null)

Deletes an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the access policy to delete. Format: `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/accessPolicies/[ACCESS_POLICY]";
    // Make the request
    Operation<Empty, OperationMetadata> response = await accessPoliciesClient.DeleteAccessPolicyAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceDeleteAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### DeleteAccessPolicyAsync(string, CancellationToken)

    public virtual Task<Operation<Empty, OperationMetadata>> DeleteAccessPolicyAsync(string name, CancellationToken cancellationToken)

Deletes an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the access policy to delete. Format: `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/accessPolicies/[ACCESS_POLICY]";
    // Make the request
    Operation<Empty, OperationMetadata> response = await accessPoliciesClient.DeleteAccessPolicyAsync(name);

    // Poll until the returned long-running operation is complete
    Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Empty result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Empty, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceDeleteAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Empty retrievedResult = retrievedResponse.Result;
    }

### GetAccessPolicy(AccessPolicyName, CallSettings)

    public virtual AccessPolicy GetAccessPolicy(AccessPolicyName name, CallSettings callSettings = null)

Gets an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyName` Required. The name of the access policy to retrieve. Format: `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | The RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    AccessPolicyName name = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]");
    // Make the request
    AccessPolicy response = accessPoliciesClient.GetAccessPolicy(name);

### GetAccessPolicy(GetAccessPolicyRequest, CallSettings)

    public virtual AccessPolicy GetAccessPolicy(GetAccessPolicyRequest request, CallSettings callSettings = null)

Gets an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.GetAccessPolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | The RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    GetAccessPolicyRequest request = new GetAccessPolicyRequest
    {
        AccessPolicyName = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]"),
    };
    // Make the request
    AccessPolicy response = accessPoliciesClient.GetAccessPolicy(request);

### GetAccessPolicy(string, CallSettings)

    public virtual AccessPolicy GetAccessPolicy(string name, CallSettings callSettings = null)

Gets an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the access policy to retrieve. Format: `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | The RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/accessPolicies/[ACCESS_POLICY]";
    // Make the request
    AccessPolicy response = accessPoliciesClient.GetAccessPolicy(name);

### GetAccessPolicyAsync(AccessPolicyName, CallSettings)

    public virtual Task<AccessPolicy> GetAccessPolicyAsync(AccessPolicyName name, CallSettings callSettings = null)

Gets an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyName` Required. The name of the access policy to retrieve. Format: `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    AccessPolicyName name = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]");
    // Make the request
    AccessPolicy response = await accessPoliciesClient.GetAccessPolicyAsync(name);

### GetAccessPolicyAsync(AccessPolicyName, CancellationToken)

    public virtual Task<AccessPolicy> GetAccessPolicyAsync(AccessPolicyName name, CancellationToken cancellationToken)

Gets an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyName` Required. The name of the access policy to retrieve. Format: `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    AccessPolicyName name = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]");
    // Make the request
    AccessPolicy response = await accessPoliciesClient.GetAccessPolicyAsync(name);

### GetAccessPolicyAsync(GetAccessPolicyRequest, CallSettings)

    public virtual Task<AccessPolicy> GetAccessPolicyAsync(GetAccessPolicyRequest request, CallSettings callSettings = null)

Gets an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.GetAccessPolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    GetAccessPolicyRequest request = new GetAccessPolicyRequest
    {
        AccessPolicyName = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]"),
    };
    // Make the request
    AccessPolicy response = await accessPoliciesClient.GetAccessPolicyAsync(request);

### GetAccessPolicyAsync(GetAccessPolicyRequest, CancellationToken)

    public virtual Task<AccessPolicy> GetAccessPolicyAsync(GetAccessPolicyRequest request, CancellationToken cancellationToken)

Gets an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.GetAccessPolicyRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    GetAccessPolicyRequest request = new GetAccessPolicyRequest
    {
        AccessPolicyName = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]"),
    };
    // Make the request
    AccessPolicy response = await accessPoliciesClient.GetAccessPolicyAsync(request);

### GetAccessPolicyAsync(string, CallSettings)

    public virtual Task<AccessPolicy> GetAccessPolicyAsync(string name, CallSettings callSettings = null)

Gets an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the access policy to retrieve. Format: `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/accessPolicies/[ACCESS_POLICY]";
    // Make the request
    AccessPolicy response = await accessPoliciesClient.GetAccessPolicyAsync(name);

### GetAccessPolicyAsync(string, CancellationToken)

    public virtual Task<AccessPolicy> GetAccessPolicyAsync(string name, CancellationToken cancellationToken)

Gets an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the access policy to retrieve. Format: `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/accessPolicies/[ACCESS_POLICY]";
    // Make the request
    AccessPolicy response = await accessPoliciesClient.GetAccessPolicyAsync(name);

### ListAccessPolicies(LocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListAccessPoliciesResponse, AccessPolicy> ListAccessPolicies(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists access policies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource, which owns the collection of access policy resources. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.ListAccessPoliciesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A pageable sequence of [AccessPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListAccessPoliciesResponse, AccessPolicy> response = accessPoliciesClient.ListAccessPolicies(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (AccessPolicy item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListAccessPoliciesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (AccessPolicy item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<AccessPolicy> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (AccessPolicy item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAccessPolicies(FolderLocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListAccessPoliciesResponse, AccessPolicy> ListAccessPolicies(FolderLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists access policies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.FolderLocationName` Required. The parent resource, which owns the collection of access policy resources. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.ListAccessPoliciesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A pageable sequence of [AccessPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    FolderLocationName parent = FolderLocationName.FromFolderLocation("[FOLDER]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListAccessPoliciesResponse, AccessPolicy> response = accessPoliciesClient.ListAccessPolicies(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (AccessPolicy item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListAccessPoliciesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (AccessPolicy item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<AccessPolicy> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (AccessPolicy item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAccessPolicies(ListAccessPoliciesRequest, CallSettings)

    public virtual PagedEnumerable<ListAccessPoliciesResponse, AccessPolicy> ListAccessPolicies(ListAccessPoliciesRequest request, CallSettings callSettings = null)

Lists access policies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.ListAccessPoliciesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.ListAccessPoliciesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A pageable sequence of [AccessPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    ListAccessPoliciesRequest request = new ListAccessPoliciesRequest
    {
        ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
    };
    // Make the request
    PagedEnumerable<ListAccessPoliciesResponse, AccessPolicy> response = accessPoliciesClient.ListAccessPolicies(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (AccessPolicy item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListAccessPoliciesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (AccessPolicy item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<AccessPolicy> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (AccessPolicy item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAccessPolicies(OrganizationLocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListAccessPoliciesResponse, AccessPolicy> ListAccessPolicies(OrganizationLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists access policies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OrganizationLocationName` Required. The parent resource, which owns the collection of access policy resources. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.ListAccessPoliciesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A pageable sequence of [AccessPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListAccessPoliciesResponse, AccessPolicy> response = accessPoliciesClient.ListAccessPolicies(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (AccessPolicy item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListAccessPoliciesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (AccessPolicy item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<AccessPolicy> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (AccessPolicy item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAccessPolicies(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListAccessPoliciesResponse, AccessPolicy> ListAccessPolicies(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists access policies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource, which owns the collection of access policy resources. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.ListAccessPoliciesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A pageable sequence of [AccessPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    // Make the request
    PagedEnumerable<ListAccessPoliciesResponse, AccessPolicy> response = accessPoliciesClient.ListAccessPolicies(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (AccessPolicy item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListAccessPoliciesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (AccessPolicy item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<AccessPolicy> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (AccessPolicy item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAccessPoliciesAsync(LocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListAccessPoliciesResponse, AccessPolicy> ListAccessPoliciesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists access policies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource, which owns the collection of access policy resources. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.ListAccessPoliciesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A pageable asynchronous sequence of [AccessPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListAccessPoliciesResponse, AccessPolicy> response = accessPoliciesClient.ListAccessPoliciesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (AccessPolicy item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListAccessPoliciesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (AccessPolicy item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<AccessPolicy> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (AccessPolicy item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAccessPoliciesAsync(FolderLocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListAccessPoliciesResponse, AccessPolicy> ListAccessPoliciesAsync(FolderLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists access policies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.FolderLocationName` Required. The parent resource, which owns the collection of access policy resources. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.ListAccessPoliciesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A pageable asynchronous sequence of [AccessPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    FolderLocationName parent = FolderLocationName.FromFolderLocation("[FOLDER]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListAccessPoliciesResponse, AccessPolicy> response = accessPoliciesClient.ListAccessPoliciesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (AccessPolicy item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListAccessPoliciesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (AccessPolicy item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<AccessPolicy> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (AccessPolicy item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAccessPoliciesAsync(ListAccessPoliciesRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListAccessPoliciesResponse, AccessPolicy> ListAccessPoliciesAsync(ListAccessPoliciesRequest request, CallSettings callSettings = null)

Lists access policies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.ListAccessPoliciesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.ListAccessPoliciesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A pageable asynchronous sequence of [AccessPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    ListAccessPoliciesRequest request = new ListAccessPoliciesRequest
    {
        ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
    };
    // Make the request
    PagedAsyncEnumerable<ListAccessPoliciesResponse, AccessPolicy> response = accessPoliciesClient.ListAccessPoliciesAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (AccessPolicy item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListAccessPoliciesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (AccessPolicy item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<AccessPolicy> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (AccessPolicy item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAccessPoliciesAsync(OrganizationLocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListAccessPoliciesResponse, AccessPolicy> ListAccessPoliciesAsync(OrganizationLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists access policies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OrganizationLocationName` Required. The parent resource, which owns the collection of access policy resources. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.ListAccessPoliciesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A pageable asynchronous sequence of [AccessPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListAccessPoliciesResponse, AccessPolicy> response = accessPoliciesClient.ListAccessPoliciesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (AccessPolicy item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListAccessPoliciesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (AccessPolicy item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<AccessPolicy> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (AccessPolicy item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListAccessPoliciesAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListAccessPoliciesResponse, AccessPolicy> ListAccessPoliciesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists access policies.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource, which owns the collection of access policy resources. Format: `projects/{project_id}/locations/{location}` `projects/{project_number}/locations/{location}` `folders/{folder_id}/locations/{location}` `organizations/{organization_id}/locations/{location}` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.ListAccessPoliciesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy` | A pageable asynchronous sequence of [AccessPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicy) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
    // Make the request
    PagedAsyncEnumerable<ListAccessPoliciesResponse, AccessPolicy> response = accessPoliciesClient.ListAccessPoliciesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (AccessPolicy item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListAccessPoliciesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (AccessPolicy item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<AccessPolicy> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (AccessPolicy item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### PollOnceCreateAccessPolicy(string, CallSettings)

    public virtual Operation<AccessPolicy, OperationMetadata> PollOnceCreateAccessPolicy(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `CreateAccessPolicy` .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | The result of polling the operation. |

### PollOnceCreateAccessPolicyAsync(string, CallSettings)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> PollOnceCreateAccessPolicyAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of `CreateAccessPolicy`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A task representing the result of polling the operation. |

### PollOnceDeleteAccessPolicy(string, CallSettings)

    public virtual Operation<Empty, OperationMetadata> PollOnceDeleteAccessPolicy(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `DeleteAccessPolicy` .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | The result of polling the operation. |

### PollOnceDeleteAccessPolicyAsync(string, CallSettings)

    public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteAccessPolicyAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of `DeleteAccessPolicy`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A task representing the result of polling the operation. |

### PollOnceUpdateAccessPolicy(string, CallSettings)

    public virtual Operation<AccessPolicy, OperationMetadata> PollOnceUpdateAccessPolicy(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `UpdateAccessPolicy` .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | The result of polling the operation. |

### PollOnceUpdateAccessPolicyAsync(string, CallSettings)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> PollOnceUpdateAccessPolicyAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of `UpdateAccessPolicy`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A task representing the result of polling the operation. |

### SearchAccessPolicyBindings(AccessPolicyName, string, int?, CallSettings)

    public virtual PagedEnumerable<SearchAccessPolicyBindingsResponse, PolicyBinding> SearchAccessPolicyBindings(AccessPolicyName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings permission on that policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyName` Required. The name of the access policy. Format: `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.SearchAccessPolicyBindingsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBinding` | A pageable sequence of [PolicyBinding](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBinding) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    AccessPolicyName name = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]");
    // Make the request
    PagedEnumerable<SearchAccessPolicyBindingsResponse, PolicyBinding> response = accessPoliciesClient.SearchAccessPolicyBindings(name);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (PolicyBinding item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (SearchAccessPolicyBindingsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (PolicyBinding item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<PolicyBinding> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (PolicyBinding item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### SearchAccessPolicyBindings(SearchAccessPolicyBindingsRequest, CallSettings)

    public virtual PagedEnumerable<SearchAccessPolicyBindingsResponse, PolicyBinding> SearchAccessPolicyBindings(SearchAccessPolicyBindingsRequest request, CallSettings callSettings = null)

Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings permission on that policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.SearchAccessPolicyBindingsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.SearchAccessPolicyBindingsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBinding` | A pageable sequence of [PolicyBinding](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBinding) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    SearchAccessPolicyBindingsRequest request = new SearchAccessPolicyBindingsRequest
    {
        AccessPolicyName = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]"),
    };
    // Make the request
    PagedEnumerable<SearchAccessPolicyBindingsResponse, PolicyBinding> response = accessPoliciesClient.SearchAccessPolicyBindings(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (PolicyBinding item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (SearchAccessPolicyBindingsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (PolicyBinding item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<PolicyBinding> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (PolicyBinding item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### SearchAccessPolicyBindings(string, string, int?, CallSettings)

    public virtual PagedEnumerable<SearchAccessPolicyBindingsResponse, PolicyBinding> SearchAccessPolicyBindings(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings permission on that policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the access policy. Format: `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.SearchAccessPolicyBindingsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBinding` | A pageable sequence of [PolicyBinding](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBinding) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/accessPolicies/[ACCESS_POLICY]";
    // Make the request
    PagedEnumerable<SearchAccessPolicyBindingsResponse, PolicyBinding> response = accessPoliciesClient.SearchAccessPolicyBindings(name);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (PolicyBinding item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (SearchAccessPolicyBindingsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (PolicyBinding item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<PolicyBinding> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (PolicyBinding item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### SearchAccessPolicyBindingsAsync(AccessPolicyName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<SearchAccessPolicyBindingsResponse, PolicyBinding> SearchAccessPolicyBindingsAsync(AccessPolicyName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings permission on that policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyName` Required. The name of the access policy. Format: `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.SearchAccessPolicyBindingsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBinding` | A pageable asynchronous sequence of [PolicyBinding](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBinding) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    AccessPolicyName name = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]");
    // Make the request
    PagedAsyncEnumerable<SearchAccessPolicyBindingsResponse, PolicyBinding> response = accessPoliciesClient.SearchAccessPolicyBindingsAsync(name);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (PolicyBinding item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (SearchAccessPolicyBindingsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (PolicyBinding item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<PolicyBinding> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (PolicyBinding item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### SearchAccessPolicyBindingsAsync(SearchAccessPolicyBindingsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<SearchAccessPolicyBindingsResponse, PolicyBinding> SearchAccessPolicyBindingsAsync(SearchAccessPolicyBindingsRequest request, CallSettings callSettings = null)

Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings permission on that policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.SearchAccessPolicyBindingsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.SearchAccessPolicyBindingsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBinding` | A pageable asynchronous sequence of [PolicyBinding](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBinding) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    SearchAccessPolicyBindingsRequest request = new SearchAccessPolicyBindingsRequest
    {
        AccessPolicyName = AccessPolicyName.FromOrganizationLocationAccessPolicy("[ORGANIZATION]", "[LOCATION]", "[ACCESS_POLICY]"),
    };
    // Make the request
    PagedAsyncEnumerable<SearchAccessPolicyBindingsResponse, PolicyBinding> response = accessPoliciesClient.SearchAccessPolicyBindingsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (PolicyBinding item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (SearchAccessPolicyBindingsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (PolicyBinding item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<PolicyBinding> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (PolicyBinding item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### SearchAccessPolicyBindingsAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<SearchAccessPolicyBindingsResponse, PolicyBinding> SearchAccessPolicyBindingsAsync(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings permission on that policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the access policy. Format: `organizations/{organization_id}/locations/{location}/accessPolicies/{access_policy_id}` `folders/{folder_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_id}/locations/{location}/accessPolicies/{access_policy_id}` `projects/{project_number}/locations/{location}/accessPolicies/{access_policy_id}` |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.SearchAccessPolicyBindingsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBinding` | A pageable asynchronous sequence of [PolicyBinding](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBinding) resources. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/accessPolicies/[ACCESS_POLICY]";
    // Make the request
    PagedAsyncEnumerable<SearchAccessPolicyBindingsResponse, PolicyBinding> response = accessPoliciesClient.SearchAccessPolicyBindingsAsync(name);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (PolicyBinding item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (SearchAccessPolicyBindingsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (PolicyBinding item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<PolicyBinding> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (PolicyBinding item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClient#Google_Cloud_Iam_V3_AccessPoliciesClient_Create) and [CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClient#Google_Cloud_Iam_V3_AccessPoliciesClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClient#Google_Cloud_Iam_V3_AccessPoliciesClient_Create) and [CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClient#Google_Cloud_Iam_V3_AccessPoliciesClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down by another call to this method.

### UpdateAccessPolicy(UpdateAccessPolicyRequest, CallSettings)

    public virtual Operation<AccessPolicy, OperationMetadata> UpdateAccessPolicy(UpdateAccessPolicyRequest request, CallSettings callSettings = null)

Updates an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.UpdateAccessPolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | The RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = AccessPoliciesClient.Create();
    // Initialize request argument(s)
    UpdateAccessPolicyRequest request = new UpdateAccessPolicyRequest
    {
        AccessPolicy = new AccessPolicy(),
        ValidateOnly = false,
    };
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = accessPoliciesClient.UpdateAccessPolicy(request);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = accessPoliciesClient.PollOnceUpdateAccessPolicy(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### UpdateAccessPolicyAsync(UpdateAccessPolicyRequest, CallSettings)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> UpdateAccessPolicyAsync(UpdateAccessPolicyRequest request, CallSettings callSettings = null)

Updates an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.UpdateAccessPolicyRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    UpdateAccessPolicyRequest request = new UpdateAccessPolicyRequest
    {
        AccessPolicy = new AccessPolicy(),
        ValidateOnly = false,
    };
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = await accessPoliciesClient.UpdateAccessPolicyAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceUpdateAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }

### UpdateAccessPolicyAsync(UpdateAccessPolicyRequest, CancellationToken)

    public virtual Task<Operation<AccessPolicy, OperationMetadata>> UpdateAccessPolicyAsync(UpdateAccessPolicyRequest request, CancellationToken cancellationToken)

Updates an access policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.UpdateAccessPolicyRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.OperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    AccessPoliciesClient accessPoliciesClient = await AccessPoliciesClient.CreateAsync();
    // Initialize request argument(s)
    UpdateAccessPolicyRequest request = new UpdateAccessPolicyRequest
    {
        AccessPolicy = new AccessPolicy(),
        ValidateOnly = false,
    };
    // Make the request
    Operation<AccessPolicy, OperationMetadata> response = await accessPoliciesClient.UpdateAccessPolicyAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<AccessPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AccessPolicy result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AccessPolicy, OperationMetadata> retrievedResponse = await accessPoliciesClient.PollOnceUpdateAccessPolicyAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AccessPolicy retrievedResult = retrievedResponse.Result;
    }