1.0.0-beta03 (latest) 1.0.0-beta02

    public static class ServiceCollectionExtensions

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

Static class to provide extension methods to configure API clients.

## Inheritance

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

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

## Namespace

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

## Assembly

Google.Cloud.Iam.V3.dll

## Methods

### AddAccessPoliciesClient(IServiceCollection, Action\<AccessPoliciesClientBuilder\>)

    public static IServiceCollection AddAccessPoliciesClient(this IServiceCollection services, Action<AccessPoliciesClientBuilder> action = null)

Adds a singleton [AccessPoliciesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddAccessPoliciesClient(IServiceCollection, Action\<IServiceProvider, AccessPoliciesClientBuilder\>)

    public static IServiceCollection AddAccessPoliciesClient(this IServiceCollection services, Action<IServiceProvider, AccessPoliciesClientBuilder> action)

Adds a singleton [AccessPoliciesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.AccessPoliciesClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddPolicyBindingsClient(IServiceCollection, Action\<PolicyBindingsClientBuilder\>)

    public static IServiceCollection AddPolicyBindingsClient(this IServiceCollection services, Action<PolicyBindingsClientBuilder> action = null)

Adds a singleton [PolicyBindingsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBindingsClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBindingsClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddPolicyBindingsClient(IServiceCollection, Action\<IServiceProvider, PolicyBindingsClientBuilder\>)

    public static IServiceCollection AddPolicyBindingsClient(this IServiceCollection services, Action<IServiceProvider, PolicyBindingsClientBuilder> action)

Adds a singleton [PolicyBindingsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBindingsClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PolicyBindingsClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddPrincipalAccessBoundaryPoliciesClient(IServiceCollection, Action\<PrincipalAccessBoundaryPoliciesClientBuilder\>)

    public static IServiceCollection AddPrincipalAccessBoundaryPoliciesClient(this IServiceCollection services, Action<PrincipalAccessBoundaryPoliciesClientBuilder> action = null)

Adds a singleton [PrincipalAccessBoundaryPoliciesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PrincipalAccessBoundaryPoliciesClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PrincipalAccessBoundaryPoliciesClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |

### AddPrincipalAccessBoundaryPoliciesClient(IServiceCollection, Action\<IServiceProvider, PrincipalAccessBoundaryPoliciesClientBuilder\>)

    public static IServiceCollection AddPrincipalAccessBoundaryPoliciesClient(this IServiceCollection services, Action<IServiceProvider, PrincipalAccessBoundaryPoliciesClientBuilder> action)

Adds a singleton [PrincipalAccessBoundaryPoliciesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PrincipalAccessBoundaryPoliciesClient) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `https://learn.microsoft.com/dotnet/api/system.action-2System.IServiceProviderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V3/latest/Google.Cloud.Iam.V3.PrincipalAccessBoundaryPoliciesClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection` |   |