# Google Cloud Identity and Access Management (IAM) v1 API - Namespace Google.Cloud.Iam.V1 (3.5.0)

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

- [3.5.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1)
- [3.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/3.4.0/Google.Cloud.Iam.V1)
- [3.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/3.3.0/Google.Cloud.Iam.V1)
- [3.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/3.2.0/Google.Cloud.Iam.V1)
- [3.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/3.1.0/Google.Cloud.Iam.V1)
- [3.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/3.0.0/Google.Cloud.Iam.V1)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/2.4.0/Google.Cloud.Iam.V1)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/2.3.0/Google.Cloud.Iam.V1)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/2.2.0/Google.Cloud.Iam.V1)

## Classes

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

Specifies the audit configuration for a service.
The configuration determines which permission types are logged, and what
identities, if any, are exempted from logging.
An AuditConfig must have one or more AuditLogConfigs.

If there are AuditConfigs for both `allServices` and a specific service,
the union of the two AuditConfigs is used for that service: the log_types
specified in each AuditConfig are enabled, and the exempted_members in each
AuditLogConfig are exempted.

Example Policy with multiple AuditConfigs:

    {
      "audit_configs": [
        {
          "service": "allServices",
          "audit_log_configs": [
            {
              "log_type": "DATA_READ",
              "exempted_members": [
                "user:jose@example.com"
              ]
            },
            {
              "log_type": "DATA_WRITE"
            },
            {
              "log_type": "ADMIN_READ"
            }
          ]
        },
        {
          "service": "sampleservice.googleapis.com",
          "audit_log_configs": [
            {
              "log_type": "DATA_READ"
            },
            {
              "log_type": "DATA_WRITE",
              "exempted_members": [
                "user:aliya@example.com"
              ]
            }
          ]
        }
      ]
    }

For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
logging. It also exempts `jose@example.com` from DATA_READ logging, and
`aliya@example.com` from DATA_WRITE logging.

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

One delta entry for AuditConfig. Each individual change (only one
exempted_member in each entry) to a AuditConfig will be a separate entry.

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

Container for nested types declared in the AuditConfigDelta message type.

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

Provides the configuration for logging a type of permissions.
Example:

    {
      "audit_log_configs": [
        {
          "log_type": "DATA_READ",
          "exempted_members": [
            "user:jose@example.com"
          ]
        },
        {
          "log_type": "DATA_WRITE"
        }
      ]
    }

This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
jose@example.com from DATA_READ logging.

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

Container for nested types declared in the AuditLogConfig message type.

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

Associates `members`, or principals, with a `role`.

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

One delta entry for Binding. Each individual change (only one member in each
entry) to a binding will be a separate entry.

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

Container for nested types declared in the BindingDelta message type.

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

Request message for `GetIamPolicy` method.

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

Encapsulates settings provided to GetIamPolicy.

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

API Overview

Manages Identity and Access Management (IAM) policies.

Any implementation of an API that offers access control features
implements the google.iam.v1.IAMPolicy interface.

## Data model

Access control is applied when a principal (user or service account), takes
some action on a resource exposed by a service. Resources, identified by
URI-like names, are the unit of access control specification. Service
implementations can choose the granularity of access control and the
supported permissions for their resources.
For example one database service may allow access control to be
specified only at the Table level, whereas another might allow access control
to also be specified at the Column level.

## Policy Structure

See google.iam.v1.Policy

This is intentionally not a CRUD style API because access control policies
are created and deleted implicitly with the resources to which they are
attached.

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

Base class for server-side implementations of IAMPolicy

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

Client for IAMPolicy

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

IAMPolicy client wrapper, for convenient use.

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

Builder class for [IAMPolicyClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicyClient) to provide simple configuration of credentials, endpoint etc.

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

IAMPolicy client wrapper implementation, for convenient use.

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

Settings for [IAMPolicyClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicyClient) instances.

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

An Identity and Access Management (IAM) policy, which specifies access
controls for Google Cloud resources.

A `Policy` is a collection of `bindings`. A `binding` binds one or more
`members`, or principals, to a single `role`. Principals can be user
accounts, service accounts, Google groups, and domains (such as G Suite). A
`role` is a named list of permissions; each `role` can be an IAM predefined
role or a user-created custom role.

For some types of Google Cloud resources, a `binding` can also specify a
`condition`, which is a logical expression that allows access to a resource
only if the expression evaluates to `true`. A condition can add constraints
based on attributes of the request, the resource, or both. To learn which
resources support conditions in their IAM policies, see the
[IAM
documentation](https://cloud.google.com/iam/help/conditions/resource-policies).

**JSON example:**

        {
          "bindings": [
            {
              "role": "roles/resourcemanager.organizationAdmin",
              "members": [
                "user:mike@example.com",
                "group:admins@example.com",
                "domain:google.com",
                "serviceAccount:my-project-id@appspot.gserviceaccount.com"
              ]
            },
            {
              "role": "roles/resourcemanager.organizationViewer",
              "members": [
                "user:eve@example.com"
              ],
              "condition": {
                "title": "expirable access",
                "description": "Does not grant access after Sep 2020",
                "expression": "request.time <
                timestamp('2020-10-01T00:00:00.000Z')",
              }
            }
          ],
          "etag": "BwWWja0YfJA=",
          "version": 3
        }

**YAML example:**

        bindings:
        - members:
          - user:mike@example.com
          - group:admins@example.com
          - domain:google.com
          - serviceAccount:my-project-id@appspot.gserviceaccount.com
          role: roles/resourcemanager.organizationAdmin
        - members:
          - user:eve@example.com
          role: roles/resourcemanager.organizationViewer
          condition:
            title: expirable access
            description: Does not grant access after Sep 2020
            expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
        etag: BwWWja0YfJA=
        version: 3

For a description of IAM and its features, see the
[IAM documentation](https://cloud.google.com/iam/docs/).

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

The difference delta between two policies.

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

Output-only policy member strings of a Google Cloud resource's built-in
identity.

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

Request message for `SetIamPolicy` method.

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

Request message for `TestIamPermissions` method.

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

Response message for `TestIamPermissions` method.

## Enums

### [AuditConfigDelta.Types.Action](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.AuditConfigDelta.Types.Action)

The type of action performed on an audit configuration in a policy.

### [AuditLogConfig.Types.LogType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.AuditLogConfig.Types.LogType)

The list of valid permission types for which logging can be configured.
Admin writes are always logged, and are not configurable.

### [BindingDelta.Types.Action](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.BindingDelta.Types.Action)

The type of action performed on a Binding in a policy.