Packages

The Elixir googleapis package, containing generated code for Google APIs.

Current section

Files

Jump to
googleapis lib generated google iam v1 policy.pb.ex
Raw

lib/generated/google/iam/v1/policy.pb.ex

defmodule Google.Iam.V1.AuditLogConfig.LogType do
@moduledoc """
The list of valid permission types for which logging can be configured.
Admin writes are always logged, and are not configurable.
"""
use Protobuf,
enum: true,
full_name: "google.iam.v1.AuditLogConfig.LogType",
protoc_gen_elixir_version: "0.16.0",
syntax: :proto3
field :LOG_TYPE_UNSPECIFIED, 0
field :ADMIN_READ, 1
field :DATA_WRITE, 2
field :DATA_READ, 3
end
defmodule Google.Iam.V1.BindingDelta.Action do
@moduledoc """
The type of action performed on a Binding in a policy.
"""
use Protobuf,
enum: true,
full_name: "google.iam.v1.BindingDelta.Action",
protoc_gen_elixir_version: "0.16.0",
syntax: :proto3
field :ACTION_UNSPECIFIED, 0
field :ADD, 1
field :REMOVE, 2
end
defmodule Google.Iam.V1.AuditConfigDelta.Action do
@moduledoc """
The type of action performed on an audit configuration in a policy.
"""
use Protobuf,
enum: true,
full_name: "google.iam.v1.AuditConfigDelta.Action",
protoc_gen_elixir_version: "0.16.0",
syntax: :proto3
field :ACTION_UNSPECIFIED, 0
field :ADD, 1
field :REMOVE, 2
end
defmodule Google.Iam.V1.Policy do
@moduledoc """
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/).
"""
use Protobuf,
full_name: "google.iam.v1.Policy",
protoc_gen_elixir_version: "0.16.0",
syntax: :proto3
field :version, 1, type: :int32
field :bindings, 4, repeated: true, type: Google.Iam.V1.Binding
field :audit_configs, 6,
repeated: true,
type: Google.Iam.V1.AuditConfig,
json_name: "auditConfigs"
field :etag, 3, type: :bytes
end
defmodule Google.Iam.V1.Binding do
@moduledoc """
Associates `members`, or principals, with a `role`.
"""
use Protobuf,
full_name: "google.iam.v1.Binding",
protoc_gen_elixir_version: "0.16.0",
syntax: :proto3
field :role, 1, type: :string
field :members, 2, repeated: true, type: :string
field :condition, 3, type: Google.Type.Expr
end
defmodule Google.Iam.V1.AuditConfig do
@moduledoc """
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.
"""
use Protobuf,
full_name: "google.iam.v1.AuditConfig",
protoc_gen_elixir_version: "0.16.0",
syntax: :proto3
field :service, 1, type: :string
field :audit_log_configs, 3,
repeated: true,
type: Google.Iam.V1.AuditLogConfig,
json_name: "auditLogConfigs"
end
defmodule Google.Iam.V1.AuditLogConfig do
@moduledoc """
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.
"""
use Protobuf,
full_name: "google.iam.v1.AuditLogConfig",
protoc_gen_elixir_version: "0.16.0",
syntax: :proto3
field :log_type, 1, type: Google.Iam.V1.AuditLogConfig.LogType, json_name: "logType", enum: true
field :exempted_members, 2, repeated: true, type: :string, json_name: "exemptedMembers"
end
defmodule Google.Iam.V1.PolicyDelta do
@moduledoc """
The difference delta between two policies.
"""
use Protobuf,
full_name: "google.iam.v1.PolicyDelta",
protoc_gen_elixir_version: "0.16.0",
syntax: :proto3
field :binding_deltas, 1,
repeated: true,
type: Google.Iam.V1.BindingDelta,
json_name: "bindingDeltas"
field :audit_config_deltas, 2,
repeated: true,
type: Google.Iam.V1.AuditConfigDelta,
json_name: "auditConfigDeltas"
end
defmodule Google.Iam.V1.BindingDelta do
@moduledoc """
One delta entry for Binding. Each individual change (only one member in each
entry) to a binding will be a separate entry.
"""
use Protobuf,
full_name: "google.iam.v1.BindingDelta",
protoc_gen_elixir_version: "0.16.0",
syntax: :proto3
field :action, 1, type: Google.Iam.V1.BindingDelta.Action, enum: true
field :role, 2, type: :string
field :member, 3, type: :string
field :condition, 4, type: Google.Type.Expr
end
defmodule Google.Iam.V1.AuditConfigDelta do
@moduledoc """
One delta entry for AuditConfig. Each individual change (only one
exempted_member in each entry) to a AuditConfig will be a separate entry.
"""
use Protobuf,
full_name: "google.iam.v1.AuditConfigDelta",
protoc_gen_elixir_version: "0.16.0",
syntax: :proto3
field :action, 1, type: Google.Iam.V1.AuditConfigDelta.Action, enum: true
field :service, 2, type: :string
field :exempted_member, 3, type: :string, json_name: "exemptedMember"
field :log_type, 4, type: :string, json_name: "logType"
end