# Cloud Resource Manager v3 API - Class OrganizationsClient (2.6.0)

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

- [2.6.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.OrganizationsClient)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/2.5.0/Google.Cloud.ResourceManager.V3.OrganizationsClient)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/2.4.0/Google.Cloud.ResourceManager.V3.OrganizationsClient)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/2.3.0/Google.Cloud.ResourceManager.V3.OrganizationsClient)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/2.2.0/Google.Cloud.ResourceManager.V3.OrganizationsClient)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/2.1.0/Google.Cloud.ResourceManager.V3.OrganizationsClient)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/2.0.0/Google.Cloud.ResourceManager.V3.OrganizationsClient)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/1.2.0/Google.Cloud.ResourceManager.V3.OrganizationsClient)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/1.1.0/Google.Cloud.ResourceManager.V3.OrganizationsClient)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/1.0.0/Google.Cloud.ResourceManager.V3.OrganizationsClient)

    public abstract class OrganizationsClient

Reference documentation and code samples for the Cloud Resource Manager v3 API class OrganizationsClient.

Organizations client wrapper, for convenient use.

## Inheritance

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

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

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

## Namespace

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

## Assembly

Google.Cloud.ResourceManager.V3.dll

## Remarks

Allows users to manage their organization resources.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the Organizations service, which is a host of "cloudresourcemanager.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 Organizations 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 Organizations scopes are:

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

<br />

### GrpcClient

    public virtual Organizations.OrganizationsClient GrpcClient { get; }

The underlying gRPC Organizations client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organizationshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organizations.OrganizationsClient` |   |

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

## Methods

### Create()

    public static OrganizationsClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

| **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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.OrganizationsClient` | The task representing the created [OrganizationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.OrganizationsClient). |

### GetIamPolicy(IResourceName, CallSettings)

    public virtual Policy GetIamPolicy(IResourceName resource, CallSettings callSettings = null)

Gets the access control policy for an organization resource. The policy may
be empty if no such policy or resource exists. The `resource` field should
be the organization's resource name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.getIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html` REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
| `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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    // Make the request
    Policy response = organizationsClient.GetIamPolicy(resource);

### GetIamPolicy(GetIamPolicyRequest, CallSettings)

    public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)

Gets the access control policy for an organization resource. The policy may
be empty if no such policy or resource exists. The `resource` field should
be the organization's resource name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.getIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.GetIamPolicyRequest.html` 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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    GetIamPolicyRequest request = new GetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Options = new GetPolicyOptions(),
    };
    // Make the request
    Policy response = organizationsClient.GetIamPolicy(request);

### GetIamPolicy(string, CallSettings)

    public virtual Policy GetIamPolicy(string resource, CallSettings callSettings = null)

Gets the access control policy for an organization resource. The policy may
be empty if no such policy or resource exists. The `resource` field should
be the organization's resource name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.getIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
| `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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    // Make the request
    Policy response = organizationsClient.GetIamPolicy(resource);

### GetIamPolicyAsync(IResourceName, CallSettings)

    public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CallSettings callSettings = null)

Gets the access control policy for an organization resource. The policy may
be empty if no such policy or resource exists. The `resource` field should
be the organization's resource name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.getIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html` REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
| `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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    // Make the request
    Policy response = await organizationsClient.GetIamPolicyAsync(resource);

### GetIamPolicyAsync(IResourceName, CancellationToken)

    public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CancellationToken cancellationToken)

Gets the access control policy for an organization resource. The policy may
be empty if no such policy or resource exists. The `resource` field should
be the organization's resource name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.getIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html` REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
| `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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    // Make the request
    Policy response = await organizationsClient.GetIamPolicyAsync(resource);

### GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)

    public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)

Gets the access control policy for an organization resource. The policy may
be empty if no such policy or resource exists. The `resource` field should
be the organization's resource name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.getIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.GetIamPolicyRequest.html` 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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    GetIamPolicyRequest request = new GetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Options = new GetPolicyOptions(),
    };
    // Make the request
    Policy response = await organizationsClient.GetIamPolicyAsync(request);

### GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)

    public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)

Gets the access control policy for an organization resource. The policy may
be empty if no such policy or resource exists. The `resource` field should
be the organization's resource name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.getIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.GetIamPolicyRequest.html` 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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    GetIamPolicyRequest request = new GetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Options = new GetPolicyOptions(),
    };
    // Make the request
    Policy response = await organizationsClient.GetIamPolicyAsync(request);

### GetIamPolicyAsync(string, CallSettings)

    public virtual Task<Policy> GetIamPolicyAsync(string resource, CallSettings callSettings = null)

Gets the access control policy for an organization resource. The policy may
be empty if no such policy or resource exists. The `resource` field should
be the organization's resource name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.getIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
| `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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    // Make the request
    Policy response = await organizationsClient.GetIamPolicyAsync(resource);

### GetIamPolicyAsync(string, CancellationToken)

    public virtual Task<Policy> GetIamPolicyAsync(string resource, CancellationToken cancellationToken)

Gets the access control policy for an organization resource. The policy may
be empty if no such policy or resource exists. The `resource` field should
be the organization's resource name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.getIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
| `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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    // Make the request
    Policy response = await organizationsClient.GetIamPolicyAsync(resource);

### GetOrganization(OrganizationName, CallSettings)

    public virtual Organization GetOrganization(OrganizationName name, CallSettings callSettings = null)

Fetches an organization resource identified by the specified resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName.html` Required. The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as "organizations/\[organizationId\]". For example, "organizations/1234". |
| `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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | The RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
    // Make the request
    Organization response = organizationsClient.GetOrganization(name);

### GetOrganization(GetOrganizationRequest, CallSettings)

    public virtual Organization GetOrganization(GetOrganizationRequest request, CallSettings callSettings = null)

Fetches an organization resource identified by the specified resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.GetOrganizationRequest` 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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | The RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    GetOrganizationRequest request = new GetOrganizationRequest
    {
        OrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
    };
    // Make the request
    Organization response = organizationsClient.GetOrganization(request);

### GetOrganization(string, CallSettings)

    public virtual Organization GetOrganization(string name, CallSettings callSettings = null)

Fetches an organization resource identified by the specified resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as "organizations/\[organizationId\]". For example, "organizations/1234". |
| `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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | The RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]";
    // Make the request
    Organization response = organizationsClient.GetOrganization(name);

### GetOrganizationAsync(OrganizationName, CallSettings)

    public virtual Task<Organization> GetOrganizationAsync(OrganizationName name, CallSettings callSettings = null)

Fetches an organization resource identified by the specified resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName.html` Required. The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as "organizations/\[organizationId\]". For example, "organizations/1234". |
| `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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
    // Make the request
    Organization response = await organizationsClient.GetOrganizationAsync(name);

### GetOrganizationAsync(OrganizationName, CancellationToken)

    public virtual Task<Organization> GetOrganizationAsync(OrganizationName name, CancellationToken cancellationToken)

Fetches an organization resource identified by the specified resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.OrganizationName.html` Required. The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as "organizations/\[organizationId\]". For example, "organizations/1234". |
| `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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
    // Make the request
    Organization response = await organizationsClient.GetOrganizationAsync(name);

### GetOrganizationAsync(GetOrganizationRequest, CallSettings)

    public virtual Task<Organization> GetOrganizationAsync(GetOrganizationRequest request, CallSettings callSettings = null)

Fetches an organization resource identified by the specified resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.GetOrganizationRequest` 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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    GetOrganizationRequest request = new GetOrganizationRequest
    {
        OrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
    };
    // Make the request
    Organization response = await organizationsClient.GetOrganizationAsync(request);

### GetOrganizationAsync(GetOrganizationRequest, CancellationToken)

    public virtual Task<Organization> GetOrganizationAsync(GetOrganizationRequest request, CancellationToken cancellationToken)

Fetches an organization resource identified by the specified resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.GetOrganizationRequest` 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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    GetOrganizationRequest request = new GetOrganizationRequest
    {
        OrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
    };
    // Make the request
    Organization response = await organizationsClient.GetOrganizationAsync(request);

### GetOrganizationAsync(string, CallSettings)

    public virtual Task<Organization> GetOrganizationAsync(string name, CallSettings callSettings = null)

Fetches an organization resource identified by the specified resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as "organizations/\[organizationId\]". For example, "organizations/1234". |
| `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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]";
    // Make the request
    Organization response = await organizationsClient.GetOrganizationAsync(name);

### GetOrganizationAsync(string, CancellationToken)

    public virtual Task<Organization> GetOrganizationAsync(string name, CancellationToken cancellationToken)

Fetches an organization resource identified by the specified resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as "organizations/\[organizationId\]". For example, "organizations/1234". |
| `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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    string name = "organizations/[ORGANIZATION]";
    // Make the request
    Organization response = await organizationsClient.GetOrganizationAsync(name);

### SearchOrganizations(SearchOrganizationsRequest, CallSettings)

    public virtual PagedEnumerable<SearchOrganizationsResponse, Organization> SearchOrganizations(SearchOrganizationsRequest request, CallSettings callSettings = null)

Searches organization resources that are visible to the user and satisfy
the specified filter. This method returns organizations in an unspecified
order. New organizations do not necessarily appear at the end of the
results, and may take a small amount of time to appear.

Search will only return organizations on which the user has the permission
`resourcemanager.organizations.get`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.SearchOrganizationsRequest` 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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.SearchOrganizationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | A pageable sequence of [Organization](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization) resources. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    SearchOrganizationsRequest request = new SearchOrganizationsRequest { Query = "", };
    // Make the request
    PagedEnumerable<SearchOrganizationsResponse, Organization> response = organizationsClient.SearchOrganizations(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Organization 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 (SearchOrganizationsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Organization 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<Organization> 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 (Organization 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;

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

    public virtual PagedEnumerable<SearchOrganizationsResponse, Organization> SearchOrganizations(string query, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Searches organization resources that are visible to the user and satisfy
the specified filter. This method returns organizations in an unspecified
order. New organizations do not necessarily appear at the end of the
results, and may take a small amount of time to appear.

Search will only return organizations on which the user has the permission
`resourcemanager.organizations.get`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `query` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. An optional query string used to filter the Organizations to return in the response. Query rules are case-insensitive. | Field            | Description                                | |---|---| | directoryCustomerId, owner.directoryCustomerId | Filters by directory customer id. | | domain           | Filters by domain.                         | Organizations may be queried by `directoryCustomerId` or by `domain`, where the domain is a G Suite domain, for example: - Query `directorycustomerid:123456789` returns Organization resources with `owner.directory_customer_id` equal to `123456789`. - Query `domain:google.com` returns Organization resources corresponding to the domain `google.com`. |
| `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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.SearchOrganizationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | A pageable sequence of [Organization](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization) resources. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    string query = "";
    // Make the request
    PagedEnumerable<SearchOrganizationsResponse, Organization> response = organizationsClient.SearchOrganizations(query);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Organization 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 (SearchOrganizationsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Organization 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<Organization> 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 (Organization 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;

### SearchOrganizationsAsync(SearchOrganizationsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<SearchOrganizationsResponse, Organization> SearchOrganizationsAsync(SearchOrganizationsRequest request, CallSettings callSettings = null)

Searches organization resources that are visible to the user and satisfy
the specified filter. This method returns organizations in an unspecified
order. New organizations do not necessarily appear at the end of the
results, and may take a small amount of time to appear.

Search will only return organizations on which the user has the permission
`resourcemanager.organizations.get`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.SearchOrganizationsRequest` 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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.SearchOrganizationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | A pageable asynchronous sequence of [Organization](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization) resources. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    SearchOrganizationsRequest request = new SearchOrganizationsRequest { Query = "", };
    // Make the request
    PagedAsyncEnumerable<SearchOrganizationsResponse, Organization> response = organizationsClient.SearchOrganizationsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Organization item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((SearchOrganizationsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Organization 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<Organization> 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 (Organization 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;

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

    public virtual PagedAsyncEnumerable<SearchOrganizationsResponse, Organization> SearchOrganizationsAsync(string query, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Searches organization resources that are visible to the user and satisfy
the specified filter. This method returns organizations in an unspecified
order. New organizations do not necessarily appear at the end of the
results, and may take a small amount of time to appear.

Search will only return organizations on which the user has the permission
`resourcemanager.organizations.get`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `query` | `https://learn.microsoft.com/dotnet/api/system.string` Optional. An optional query string used to filter the Organizations to return in the response. Query rules are case-insensitive. | Field            | Description                                | |---|---| | directoryCustomerId, owner.directoryCustomerId | Filters by directory customer id. | | domain           | Filters by domain.                         | Organizations may be queried by `directoryCustomerId` or by `domain`, where the domain is a G Suite domain, for example: - Query `directorycustomerid:123456789` returns Organization resources with `owner.directory_customer_id` equal to `123456789`. - Query `domain:google.com` returns Organization resources corresponding to the domain `google.com`. |
| `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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.SearchOrganizationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization` | A pageable asynchronous sequence of [Organization](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.Organization) resources. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    string query = "";
    // Make the request
    PagedAsyncEnumerable<SearchOrganizationsResponse, Organization> response = organizationsClient.SearchOrganizationsAsync(query);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Organization item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((SearchOrganizationsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Organization 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<Organization> 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 (Organization 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;

### SetIamPolicy(IResourceName, CallSettings)

    public virtual Policy SetIamPolicy(IResourceName resource, CallSettings callSettings = null)

Sets the access control policy on an organization resource. Replaces any
existing policy. The `resource` field should be the organization's resource
name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.setIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html` REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
| `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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    // Make the request
    Policy response = organizationsClient.SetIamPolicy(resource);

### SetIamPolicy(SetIamPolicyRequest, CallSettings)

    public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)

Sets the access control policy on an organization resource. Replaces any
existing policy. The `resource` field should be the organization's resource
name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.setIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.SetIamPolicyRequest.html` 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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    SetIamPolicyRequest request = new SetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Policy = new Policy(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Policy response = organizationsClient.SetIamPolicy(request);

### SetIamPolicy(string, CallSettings)

    public virtual Policy SetIamPolicy(string resource, CallSettings callSettings = null)

Sets the access control policy on an organization resource. Replaces any
existing policy. The `resource` field should be the organization's resource
name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.setIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
| `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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    // Make the request
    Policy response = organizationsClient.SetIamPolicy(resource);

### SetIamPolicyAsync(IResourceName, CallSettings)

    public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, CallSettings callSettings = null)

Sets the access control policy on an organization resource. Replaces any
existing policy. The `resource` field should be the organization's resource
name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.setIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html` REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
| `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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    // Make the request
    Policy response = await organizationsClient.SetIamPolicyAsync(resource);

### SetIamPolicyAsync(IResourceName, CancellationToken)

    public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, CancellationToken cancellationToken)

Sets the access control policy on an organization resource. Replaces any
existing policy. The `resource` field should be the organization's resource
name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.setIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html` REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
| `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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    // Make the request
    Policy response = await organizationsClient.SetIamPolicyAsync(resource);

### SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)

    public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)

Sets the access control policy on an organization resource. Replaces any
existing policy. The `resource` field should be the organization's resource
name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.setIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.SetIamPolicyRequest.html` 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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    SetIamPolicyRequest request = new SetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Policy = new Policy(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Policy response = await organizationsClient.SetIamPolicyAsync(request);

### SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)

    public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CancellationToken cancellationToken)

Sets the access control policy on an organization resource. Replaces any
existing policy. The `resource` field should be the organization's resource
name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.setIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.SetIamPolicyRequest.html` 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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    SetIamPolicyRequest request = new SetIamPolicyRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Policy = new Policy(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    Policy response = await organizationsClient.SetIamPolicyAsync(request);

### SetIamPolicyAsync(string, CallSettings)

    public virtual Task<Policy> SetIamPolicyAsync(string resource, CallSettings callSettings = null)

Sets the access control policy on an organization resource. Replaces any
existing policy. The `resource` field should be the organization's resource
name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.setIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
| `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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    // Make the request
    Policy response = await organizationsClient.SetIamPolicyAsync(resource);

### SetIamPolicyAsync(string, CancellationToken)

    public virtual Task<Policy> SetIamPolicyAsync(string resource, CancellationToken cancellationToken)

Sets the access control policy on an organization resource. Replaces any
existing policy. The `resource` field should be the organization's resource
name, for example: "organizations/123".

Authorization requires the IAM permission
`resourcemanager.organizations.setIamPolicy` on the specified organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
| `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.V1/latest/Google.Cloud.Iam.V1.Policy.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    // Make the request
    Policy response = await organizationsClient.SetIamPolicyAsync(resource);

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.OrganizationsClient#Google_Cloud_ResourceManager_V3_OrganizationsClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.OrganizationsClient#Google_Cloud_ResourceManager_V3_OrganizationsClient_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.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.OrganizationsClient#Google_Cloud_ResourceManager_V3_OrganizationsClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ResourceManager.V3/latest/Google.Cloud.ResourceManager.V3.OrganizationsClient#Google_Cloud_ResourceManager_V3_OrganizationsClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### TestIamPermissions(IResourceName, IEnumerable\<string\>, CallSettings)

    public virtual TestIamPermissionsResponse TestIamPermissions(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns the permissions that a caller has on the specified organization.
The `resource` field should be the organization's resource name,
for example: "organizations/123".

There are no permissions required for making this API call.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `permissions` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| `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.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | The RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    IEnumerable<string> permissions = new string[] { "", };
    // Make the request
    TestIamPermissionsResponse response = organizationsClient.TestIamPermissions(resource, permissions);

### TestIamPermissions(TestIamPermissionsRequest, CallSettings)

    public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns the permissions that a caller has on the specified organization.
The `resource` field should be the organization's resource name,
for example: "organizations/123".

There are no permissions required for making this API call.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsRequest.html` 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.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | The RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    TestIamPermissionsRequest request = new TestIamPermissionsRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Permissions = { "", },
    };
    // Make the request
    TestIamPermissionsResponse response = organizationsClient.TestIamPermissions(request);

### TestIamPermissions(string, IEnumerable\<string\>, CallSettings)

    public virtual TestIamPermissionsResponse TestIamPermissions(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns the permissions that a caller has on the specified organization.
The `resource` field should be the organization's resource name,
for example: "organizations/123".

There are no permissions required for making this API call.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `permissions` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| `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.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | The RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = OrganizationsClient.Create();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    IEnumerable<string> permissions = new string[] { "", };
    // Make the request
    TestIamPermissionsResponse response = organizationsClient.TestIamPermissions(resource, permissions);

### TestIamPermissionsAsync(IResourceName, IEnumerable\<string\>, CallSettings)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns the permissions that a caller has on the specified organization.
The `resource` field should be the organization's resource name,
for example: "organizations/123".

There are no permissions required for making this API call.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `permissions` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| `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.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    IEnumerable<string> permissions = new string[] { "", };
    // Make the request
    TestIamPermissionsResponse response = await organizationsClient.TestIamPermissionsAsync(resource, permissions);

### TestIamPermissionsAsync(IResourceName, IEnumerable\<string\>, CancellationToken)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CancellationToken cancellationToken)

Returns the permissions that a caller has on the specified organization.
The `resource` field should be the organization's resource name,
for example: "organizations/123".

There are no permissions required for making this API call.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `permissions` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| `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.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
    IEnumerable<string> permissions = new string[] { "", };
    // Make the request
    TestIamPermissionsResponse response = await organizationsClient.TestIamPermissionsAsync(resource, permissions);

### TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns the permissions that a caller has on the specified organization.
The `resource` field should be the organization's resource name,
for example: "organizations/123".

There are no permissions required for making this API call.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsRequest.html` 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.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    TestIamPermissionsRequest request = new TestIamPermissionsRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Permissions = { "", },
    };
    // Make the request
    TestIamPermissionsResponse response = await organizationsClient.TestIamPermissionsAsync(request);

### TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)

Returns the permissions that a caller has on the specified organization.
The `resource` field should be the organization's resource name,
for example: "organizations/123".

There are no permissions required for making this API call.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsRequest.html` 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.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    TestIamPermissionsRequest request = new TestIamPermissionsRequest
    {
        ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
        Permissions = { "", },
    };
    // Make the request
    TestIamPermissionsResponse response = await organizationsClient.TestIamPermissionsAsync(request);

### TestIamPermissionsAsync(string, IEnumerable\<string\>, CallSettings)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns the permissions that a caller has on the specified organization.
The `resource` field should be the organization's resource name,
for example: "organizations/123".

There are no permissions required for making this API call.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `permissions` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| `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.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    IEnumerable<string> permissions = new string[] { "", };
    // Make the request
    TestIamPermissionsResponse response = await organizationsClient.TestIamPermissionsAsync(resource, permissions);

### TestIamPermissionsAsync(string, IEnumerable\<string\>, CancellationToken)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CancellationToken cancellationToken)

Returns the permissions that a caller has on the specified organization.
The `resource` field should be the organization's resource name,
for example: "organizations/123".

There are no permissions required for making this API call.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
| `permissions` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.* ') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| `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.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | A Task containing the RPC response. |

**Example**

    // Create client
    OrganizationsClient organizationsClient = await OrganizationsClient.CreateAsync();
    // Initialize request argument(s)
    string resource = "a/wildcard/resource";
    IEnumerable<string> permissions = new string[] { "", };
    // Make the request
    TestIamPermissionsResponse response = await organizationsClient.TestIamPermissionsAsync(resource, permissions);