google-cloud-functions-v1 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,6 +23,7 @@ module Google
23
23
  module V1
24
24
  # Describes a Cloud Function that contains user computation executed in
25
25
  # response to an event. It encapsulate function and triggers configurations.
26
+ # Next tag: 36
26
27
  # @!attribute [rw] name
27
28
  # @return [::String]
28
29
  # A user-defined name of the function. Function names must be unique
@@ -97,6 +98,9 @@ module Google
97
98
  # @!attribute [rw] environment_variables
98
99
  # @return [::Google::Protobuf::Map{::String => ::String}]
99
100
  # Environment variables that shall be available during function execution.
101
+ # @!attribute [rw] build_environment_variables
102
+ # @return [::Google::Protobuf::Map{::String => ::String}]
103
+ # Build environment variables that shall be available during build time.
100
104
  # @!attribute [rw] network
101
105
  # @return [::String]
102
106
  # The VPC Network that this cloud function can connect to. It can be
@@ -117,6 +121,20 @@ module Google
117
121
  # @return [::Integer]
118
122
  # The limit on the maximum number of function instances that may coexist at a
119
123
  # given time.
124
+ #
125
+ # In some cases, such as rapid traffic surges, Cloud Functions may, for a
126
+ # short period of time, create more instances than the specified max
127
+ # instances limit. If your function cannot tolerate this temporary behavior,
128
+ # you may want to factor in a safety margin and set a lower max instances
129
+ # value than your function can tolerate.
130
+ #
131
+ # See the [Max
132
+ # Instances](https://cloud.google.com/functions/docs/max-instances) Guide for
133
+ # more details.
134
+ # @!attribute [rw] min_instances
135
+ # @return [::Integer]
136
+ # A lower bound for the number function instances that may coexist at a
137
+ # given time.
120
138
  # @!attribute [rw] vpc_connector
121
139
  # @return [::String]
122
140
  # The VPC Network Connector that this cloud function can connect to. It can
@@ -137,10 +155,83 @@ module Google
137
155
  # @return [::Google::Cloud::Functions::V1::CloudFunction::IngressSettings]
138
156
  # The ingress settings for the function, controlling what traffic can reach
139
157
  # it.
158
+ # @!attribute [rw] kms_key_name
159
+ # @return [::String]
160
+ # Resource name of a KMS crypto key (managed by the user) used to
161
+ # encrypt/decrypt function resources.
162
+ #
163
+ # It must match the pattern
164
+ # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
165
+ #
166
+ # If specified, you must also provide an artifact registry repository using
167
+ # the `docker_repository` field that was created with the same KMS crypto
168
+ # key.
169
+ #
170
+ # The following service accounts need to be granted Cloud KMS crypto key
171
+ # encrypter/decrypter roles on the key.
172
+ #
173
+ # 1. Google Cloud Functions service account
174
+ # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) -
175
+ # Required to protect the function's image.
176
+ # 2. Google Storage service account
177
+ # (service-\\{project_number}@gs-project-accounts.iam.gserviceaccount.com) -
178
+ # Required to protect the function's source code.
179
+ # If this service account does not exist, deploying a function without a
180
+ # KMS key or retrieving the service agent name provisions it. For more
181
+ # information, see
182
+ # https://cloud.google.com/storage/docs/projects#service-agents and
183
+ # https://cloud.google.com/storage/docs/getting-service-agent#gsutil.
184
+ #
185
+ # Google Cloud Functions delegates access to service agents to protect
186
+ # function resources in internal projects that are not accessible by the
187
+ # end user.
188
+ # @!attribute [rw] build_worker_pool
189
+ # @return [::String]
190
+ # Name of the Cloud Build Custom Worker Pool that should be used to build the
191
+ # function. The format of this field is
192
+ # `projects/{project}/locations/{region}/workerPools/{workerPool}` where
193
+ # `{project}` and `{region}` are the project id and region respectively where
194
+ # the worker pool is defined and `{workerPool}` is the short name of the
195
+ # worker pool.
196
+ #
197
+ # If the project id is not the same as the function, then the Cloud
198
+ # Functions Service Agent
199
+ # (`service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com`) must
200
+ # be granted the role Cloud Build Custom Workers Builder
201
+ # (`roles/cloudbuild.customworkers.builder`) in the project.
140
202
  # @!attribute [r] build_id
141
203
  # @return [::String]
142
204
  # Output only. The Cloud Build ID of the latest successful deployment of the
143
205
  # function.
206
+ # @!attribute [r] build_name
207
+ # @return [::String]
208
+ # Output only. The Cloud Build Name of the function deployment.
209
+ # `projects/<project-number>/locations/<region>/builds/<build-id>`.
210
+ # @!attribute [rw] secret_environment_variables
211
+ # @return [::Array<::Google::Cloud::Functions::V1::SecretEnvVar>]
212
+ # Secret environment variables configuration.
213
+ # @!attribute [rw] secret_volumes
214
+ # @return [::Array<::Google::Cloud::Functions::V1::SecretVolume>]
215
+ # Secret volumes configuration.
216
+ # @!attribute [rw] source_token
217
+ # @return [::String]
218
+ # Input only. An identifier for Firebase function sources. Disclaimer: This field is only
219
+ # supported for Firebase function deployments.
220
+ # @!attribute [rw] docker_repository
221
+ # @return [::String]
222
+ # User managed repository created in Artifact Registry optionally with a
223
+ # customer managed encryption key. If specified, deployments will use
224
+ # Artifact Registry. If unspecified and the deployment is eligible to use
225
+ # Artifact Registry, GCF will create and use a repository named
226
+ # 'gcf-artifacts' for every deployed region. This is the repository to which
227
+ # the function docker image will be pushed after it is built by Cloud Build.
228
+ #
229
+ # It must match the pattern
230
+ # `projects/{project}/locations/{location}/repositories/{repository}`.
231
+ #
232
+ # Cross-project repositories are not supported.
233
+ # Cross-location repositories are not supported.
234
+ # Repository format must be 'DOCKER'.
144
235
  class CloudFunction
145
236
  include ::Google::Protobuf::MessageExts
146
237
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -163,6 +254,15 @@ module Google
163
254
  extend ::Google::Protobuf::MessageExts::ClassMethods
164
255
  end
165
256
 
257
+ # @!attribute [rw] key
258
+ # @return [::String]
259
+ # @!attribute [rw] value
260
+ # @return [::String]
261
+ class BuildEnvironmentVariablesEntry
262
+ include ::Google::Protobuf::MessageExts
263
+ extend ::Google::Protobuf::MessageExts::ClassMethods
264
+ end
265
+
166
266
  # Available egress settings.
167
267
  #
168
268
  # This controls what traffic is diverted through the VPC Access Connector
@@ -332,6 +432,82 @@ module Google
332
432
  end
333
433
  end
334
434
 
435
+ # Configuration for a secret environment variable. It has the information
436
+ # necessary to fetch the secret value from secret manager and expose it as an
437
+ # environment variable. Secret value is not a part of the configuration. Secret
438
+ # values are only fetched when a new clone starts.
439
+ # @!attribute [rw] key
440
+ # @return [::String]
441
+ # Name of the environment variable.
442
+ # @!attribute [rw] project_id
443
+ # @return [::String]
444
+ # Project identifier (preferrably project number but can also be the project
445
+ # ID) of the project that contains the secret. If not set, it will be
446
+ # populated with the function's project assuming that the secret exists in
447
+ # the same project as of the function.
448
+ # @!attribute [rw] secret
449
+ # @return [::String]
450
+ # Name of the secret in secret manager (not the full resource name).
451
+ # @!attribute [rw] version
452
+ # @return [::String]
453
+ # Version of the secret (version number or the string 'latest'). It is
454
+ # recommended to use a numeric version for secret environment variables as
455
+ # any updates to the secret value is not reflected until new clones start.
456
+ class SecretEnvVar
457
+ include ::Google::Protobuf::MessageExts
458
+ extend ::Google::Protobuf::MessageExts::ClassMethods
459
+ end
460
+
461
+ # Configuration for a secret volume. It has the information necessary to fetch
462
+ # the secret value from secret manager and make it available as files mounted
463
+ # at the requested paths within the application container. Secret value is not
464
+ # a part of the configuration. Every filesystem read operation performs a
465
+ # lookup in secret manager to retrieve the secret value.
466
+ # @!attribute [rw] mount_path
467
+ # @return [::String]
468
+ # The path within the container to mount the secret volume. For example,
469
+ # setting the mount_path as `/etc/secrets` would mount the secret value files
470
+ # under the `/etc/secrets` directory. This directory will also be completely
471
+ # shadowed and unavailable to mount any other secrets.
472
+ #
473
+ # Recommended mount paths: /etc/secrets
474
+ # Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log
475
+ # @!attribute [rw] project_id
476
+ # @return [::String]
477
+ # Project identifier (preferrably project number but can also be the project
478
+ # ID) of the project that contains the secret. If not set, it will be
479
+ # populated with the function's project assuming that the secret exists in
480
+ # the same project as of the function.
481
+ # @!attribute [rw] secret
482
+ # @return [::String]
483
+ # Name of the secret in secret manager (not the full resource name).
484
+ # @!attribute [rw] versions
485
+ # @return [::Array<::Google::Cloud::Functions::V1::SecretVolume::SecretVersion>]
486
+ # List of secret versions to mount for this secret. If empty, the `latest`
487
+ # version of the secret will be made available in a file named after the
488
+ # secret under the mount point.
489
+ class SecretVolume
490
+ include ::Google::Protobuf::MessageExts
491
+ extend ::Google::Protobuf::MessageExts::ClassMethods
492
+
493
+ # Configuration for a single version.
494
+ # @!attribute [rw] version
495
+ # @return [::String]
496
+ # Version of the secret (version number or the string 'latest'). It is
497
+ # preferrable to use `latest` version with secret volumes as secret value
498
+ # changes are reflected immediately.
499
+ # @!attribute [rw] path
500
+ # @return [::String]
501
+ # Relative path of the file under the mount path where the secret value for
502
+ # this version will be fetched and made available. For example, setting the
503
+ # mount_path as '/etc/secrets' and path as `/secret_foo` would mount the
504
+ # secret value file at `/etc/secrets/secret_foo`.
505
+ class SecretVersion
506
+ include ::Google::Protobuf::MessageExts
507
+ extend ::Google::Protobuf::MessageExts::ClassMethods
508
+ end
509
+ end
510
+
335
511
  # Request for the `CreateFunction` method.
336
512
  # @!attribute [rw] location
337
513
  # @return [::String]
@@ -43,6 +43,15 @@ module Google
43
43
  # @return [::String]
44
44
  # The Cloud Build ID of the function created or updated by an API call.
45
45
  # This field is only populated for Create and Update operations.
46
+ # @!attribute [rw] source_token
47
+ # @return [::String]
48
+ # An identifier for Firebase function sources. Disclaimer: This field is only
49
+ # supported for Firebase function deployments.
50
+ # @!attribute [rw] build_name
51
+ # @return [::String]
52
+ # The Cloud Build Name of the function deployment.
53
+ # This field is only populated for Create and Update operations.
54
+ # `projects/<project-number>/locations/<region>/builds/<build-id>`.
46
55
  class OperationMetadataV1
47
56
  include ::Google::Protobuf::MessageExts
48
57
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -31,6 +31,13 @@ module Google
31
31
  # the policy is limited to a few 10s of KB. An empty policy is a
32
32
  # valid policy but certain Cloud Platform services (such as Projects)
33
33
  # might reject them.
34
+ # @!attribute [rw] update_mask
35
+ # @return [::Google::Protobuf::FieldMask]
36
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
37
+ # the fields in the mask will be modified. If no mask is provided, the
38
+ # following default mask is used:
39
+ #
40
+ # `paths: "bindings, etag"`
34
41
  class SetIamPolicyRequest
35
42
  include ::Google::Protobuf::MessageExts
36
43
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -44,7 +51,7 @@ module Google
44
51
  # @!attribute [rw] options
45
52
  # @return [::Google::Iam::V1::GetPolicyOptions]
46
53
  # OPTIONAL: A `GetPolicyOptions` object for specifying options to
47
- # `GetIamPolicy`. This field is only used by Cloud IAM.
54
+ # `GetIamPolicy`.
48
55
  class GetIamPolicyRequest
49
56
  include ::Google::Protobuf::MessageExts
50
57
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -23,14 +23,24 @@ module Google
23
23
  # Encapsulates settings provided to GetIamPolicy.
24
24
  # @!attribute [rw] requested_policy_version
25
25
  # @return [::Integer]
26
- # Optional. The policy format version to be returned.
26
+ # Optional. The maximum policy version that will be used to format the
27
+ # policy.
27
28
  #
28
29
  # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
29
30
  # rejected.
30
31
  #
31
- # Requests for policies with any conditional bindings must specify version 3.
32
- # Policies without any conditional bindings may specify any valid value or
33
- # leave the field unset.
32
+ # Requests for policies with any conditional role bindings must specify
33
+ # version 3. Policies with no conditional role bindings may specify any valid
34
+ # value or leave the field unset.
35
+ #
36
+ # The policy in the response might use the policy version that you specified,
37
+ # or it might use a lower policy version. For example, if you specify version
38
+ # 3, but the policy has no conditional role bindings, the response uses
39
+ # version 1.
40
+ #
41
+ # To learn which resources support conditions in their IAM policies, see the
42
+ # [IAM
43
+ # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
34
44
  class GetPolicyOptions
35
45
  include ::Google::Protobuf::MessageExts
36
46
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -20,19 +20,24 @@
20
20
  module Google
21
21
  module Iam
22
22
  module V1
23
- # Defines an Identity and Access Management (IAM) policy. It is used to
24
- # specify access control policies for Cloud Platform resources.
23
+ # An Identity and Access Management (IAM) policy, which specifies access
24
+ # controls for Google Cloud resources.
25
25
  #
26
26
  #
27
27
  # A `Policy` is a collection of `bindings`. A `binding` binds one or more
28
- # `members` to a single `role`. Members can be user accounts, service accounts,
29
- # Google groups, and domains (such as G Suite). A `role` is a named list of
30
- # permissions (defined by IAM or configured by users). A `binding` can
31
- # optionally specify a `condition`, which is a logic expression that further
32
- # constrains the role binding based on attributes about the request and/or
33
- # target resource.
28
+ # `members`, or principals, to a single `role`. Principals can be user
29
+ # accounts, service accounts, Google groups, and domains (such as G Suite). A
30
+ # `role` is a named list of permissions; each `role` can be an IAM predefined
31
+ # role or a user-created custom role.
34
32
  #
35
- # **JSON Example**
33
+ # For some types of Google Cloud resources, a `binding` can also specify a
34
+ # `condition`, which is a logical expression that allows access to a resource
35
+ # only if the expression evaluates to `true`. A condition can add constraints
36
+ # based on attributes of the request, the resource, or both. To learn which
37
+ # resources support conditions in their IAM policies, see the
38
+ # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
39
+ #
40
+ # **JSON example:**
36
41
  #
37
42
  # {
38
43
  # "bindings": [
@@ -47,18 +52,21 @@ module Google
47
52
  # },
48
53
  # {
49
54
  # "role": "roles/resourcemanager.organizationViewer",
50
- # "members": ["user:eve@example.com"],
55
+ # "members": [
56
+ # "user:eve@example.com"
57
+ # ],
51
58
  # "condition": {
52
59
  # "title": "expirable access",
53
60
  # "description": "Does not grant access after Sep 2020",
54
- # "expression": "request.time <
55
- # timestamp('2020-10-01T00:00:00.000Z')",
61
+ # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')",
56
62
  # }
57
63
  # }
58
- # ]
64
+ # ],
65
+ # "etag": "BwWWja0YfJA=",
66
+ # "version": 3
59
67
  # }
60
68
  #
61
- # **YAML Example**
69
+ # **YAML example:**
62
70
  #
63
71
  # bindings:
64
72
  # - members:
@@ -74,30 +82,52 @@ module Google
74
82
  # title: expirable access
75
83
  # description: Does not grant access after Sep 2020
76
84
  # expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
85
+ # etag: BwWWja0YfJA=
86
+ # version: 3
77
87
  #
78
88
  # For a description of IAM and its features, see the
79
- # [IAM developer's guide](https://cloud.google.com/iam/docs).
89
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
80
90
  # @!attribute [rw] version
81
91
  # @return [::Integer]
82
92
  # Specifies the format of the policy.
83
93
  #
84
- # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
85
- # rejected.
94
+ # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
95
+ # are rejected.
96
+ #
97
+ # Any operation that affects conditional role bindings must specify version
98
+ # `3`. This requirement applies to the following operations:
86
99
  #
87
- # Operations affecting conditional bindings must specify version 3. This can
88
- # be either setting a conditional policy, modifying a conditional binding,
89
- # or removing a binding (conditional or unconditional) from the stored
90
- # conditional policy.
91
- # Operations on non-conditional policies may specify any valid value or
92
- # leave the field unset.
100
+ # * Getting a policy that includes a conditional role binding
101
+ # * Adding a conditional role binding to a policy
102
+ # * Changing a conditional role binding in a policy
103
+ # * Removing any role binding, with or without a condition, from a policy
104
+ # that includes conditions
93
105
  #
94
- # If no etag is provided in the call to `setIamPolicy`, version compliance
95
- # checks against the stored policy is skipped.
106
+ # **Important:** If you use IAM Conditions, you must include the `etag` field
107
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
108
+ # you to overwrite a version `3` policy with a version `1` policy, and all of
109
+ # the conditions in the version `3` policy are lost.
110
+ #
111
+ # If a policy does not include any conditions, operations on that policy may
112
+ # specify any valid version or leave the field unset.
113
+ #
114
+ # To learn which resources support conditions in their IAM policies, see the
115
+ # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
96
116
  # @!attribute [rw] bindings
97
117
  # @return [::Array<::Google::Iam::V1::Binding>]
98
- # Associates a list of `members` to a `role`. Optionally may specify a
99
- # `condition` that determines when binding is in effect.
100
- # `bindings` with no members will result in an error.
118
+ # Associates a list of `members`, or principals, with a `role`. Optionally,
119
+ # may specify a `condition` that determines how and when the `bindings` are
120
+ # applied. Each of the `bindings` must contain at least one principal.
121
+ #
122
+ # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
123
+ # of these principals can be Google groups. Each occurrence of a principal
124
+ # counts towards these limits. For example, if the `bindings` grant 50
125
+ # different roles to `user:alice@example.com`, and not to any other
126
+ # principal, then you can add another 1,450 principals to the `bindings` in
127
+ # the `Policy`.
128
+ # @!attribute [rw] audit_configs
129
+ # @return [::Array<::Google::Iam::V1::AuditConfig>]
130
+ # Specifies cloud audit logging configuration for this policy.
101
131
  # @!attribute [rw] etag
102
132
  # @return [::String]
103
133
  # `etag` is used for optimistic concurrency control as a way to help
@@ -108,23 +138,23 @@ module Google
108
138
  # systems are expected to put that etag in the request to `setIamPolicy` to
109
139
  # ensure that their change will be applied to the same version of the policy.
110
140
  #
111
- # If no `etag` is provided in the call to `setIamPolicy`, then the existing
112
- # policy is overwritten. Due to blind-set semantics of an etag-less policy,
113
- # 'setIamPolicy' will not fail even if the incoming policy version does not
114
- # meet the requirements for modifying the stored policy.
141
+ # **Important:** If you use IAM Conditions, you must include the `etag` field
142
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
143
+ # you to overwrite a version `3` policy with a version `1` policy, and all of
144
+ # the conditions in the version `3` policy are lost.
115
145
  class Policy
116
146
  include ::Google::Protobuf::MessageExts
117
147
  extend ::Google::Protobuf::MessageExts::ClassMethods
118
148
  end
119
149
 
120
- # Associates `members` with a `role`.
150
+ # Associates `members`, or principals, with a `role`.
121
151
  # @!attribute [rw] role
122
152
  # @return [::String]
123
- # Role that is assigned to `members`.
153
+ # Role that is assigned to the list of `members`, or principals.
124
154
  # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
125
155
  # @!attribute [rw] members
126
156
  # @return [::Array<::String>]
127
- # Specifies the identities requesting access for a Cloud Platform resource.
157
+ # Specifies the principals requesting access for a Cloud Platform resource.
128
158
  # `members` can have the following values:
129
159
  #
130
160
  # * `allUsers`: A special identifier that represents anyone who is
@@ -143,20 +173,160 @@ module Google
143
173
  # * `group:{emailid}`: An email address that represents a Google group.
144
174
  # For example, `admins@example.com`.
145
175
  #
176
+ # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
177
+ # identifier) representing a user that has been recently deleted. For
178
+ # example, `alice@example.com?uid=123456789012345678901`. If the user is
179
+ # recovered, this value reverts to `user:{emailid}` and the recovered user
180
+ # retains the role in the binding.
181
+ #
182
+ # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
183
+ # unique identifier) representing a service account that has been recently
184
+ # deleted. For example,
185
+ # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
186
+ # If the service account is undeleted, this value reverts to
187
+ # `serviceAccount:{emailid}` and the undeleted service account retains the
188
+ # role in the binding.
189
+ #
190
+ # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
191
+ # identifier) representing a Google group that has been recently
192
+ # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
193
+ # the group is recovered, this value reverts to `group:{emailid}` and the
194
+ # recovered group retains the role in the binding.
195
+ #
146
196
  #
147
197
  # * `domain:{domain}`: The G Suite domain (primary) that represents all the
148
198
  # users of that domain. For example, `google.com` or `example.com`.
149
199
  # @!attribute [rw] condition
150
200
  # @return [::Google::Type::Expr]
151
201
  # The condition that is associated with this binding.
152
- # NOTE: An unsatisfied condition will not allow user access via current
153
- # binding. Different bindings, including their conditions, are examined
154
- # independently.
202
+ #
203
+ # If the condition evaluates to `true`, then this binding applies to the
204
+ # current request.
205
+ #
206
+ # If the condition evaluates to `false`, then this binding does not apply to
207
+ # the current request. However, a different role binding might grant the same
208
+ # role to one or more of the principals in this binding.
209
+ #
210
+ # To learn which resources support conditions in their IAM policies, see the
211
+ # [IAM
212
+ # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
155
213
  class Binding
156
214
  include ::Google::Protobuf::MessageExts
157
215
  extend ::Google::Protobuf::MessageExts::ClassMethods
158
216
  end
159
217
 
218
+ # Specifies the audit configuration for a service.
219
+ # The configuration determines which permission types are logged, and what
220
+ # identities, if any, are exempted from logging.
221
+ # An AuditConfig must have one or more AuditLogConfigs.
222
+ #
223
+ # If there are AuditConfigs for both `allServices` and a specific service,
224
+ # the union of the two AuditConfigs is used for that service: the log_types
225
+ # specified in each AuditConfig are enabled, and the exempted_members in each
226
+ # AuditLogConfig are exempted.
227
+ #
228
+ # Example Policy with multiple AuditConfigs:
229
+ #
230
+ # {
231
+ # "audit_configs": [
232
+ # {
233
+ # "service": "allServices",
234
+ # "audit_log_configs": [
235
+ # {
236
+ # "log_type": "DATA_READ",
237
+ # "exempted_members": [
238
+ # "user:jose@example.com"
239
+ # ]
240
+ # },
241
+ # {
242
+ # "log_type": "DATA_WRITE"
243
+ # },
244
+ # {
245
+ # "log_type": "ADMIN_READ"
246
+ # }
247
+ # ]
248
+ # },
249
+ # {
250
+ # "service": "sampleservice.googleapis.com",
251
+ # "audit_log_configs": [
252
+ # {
253
+ # "log_type": "DATA_READ"
254
+ # },
255
+ # {
256
+ # "log_type": "DATA_WRITE",
257
+ # "exempted_members": [
258
+ # "user:aliya@example.com"
259
+ # ]
260
+ # }
261
+ # ]
262
+ # }
263
+ # ]
264
+ # }
265
+ #
266
+ # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
267
+ # logging. It also exempts jose@example.com from DATA_READ logging, and
268
+ # aliya@example.com from DATA_WRITE logging.
269
+ # @!attribute [rw] service
270
+ # @return [::String]
271
+ # Specifies a service that will be enabled for audit logging.
272
+ # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
273
+ # `allServices` is a special value that covers all services.
274
+ # @!attribute [rw] audit_log_configs
275
+ # @return [::Array<::Google::Iam::V1::AuditLogConfig>]
276
+ # The configuration for logging of each type of permission.
277
+ class AuditConfig
278
+ include ::Google::Protobuf::MessageExts
279
+ extend ::Google::Protobuf::MessageExts::ClassMethods
280
+ end
281
+
282
+ # Provides the configuration for logging a type of permissions.
283
+ # Example:
284
+ #
285
+ # {
286
+ # "audit_log_configs": [
287
+ # {
288
+ # "log_type": "DATA_READ",
289
+ # "exempted_members": [
290
+ # "user:jose@example.com"
291
+ # ]
292
+ # },
293
+ # {
294
+ # "log_type": "DATA_WRITE"
295
+ # }
296
+ # ]
297
+ # }
298
+ #
299
+ # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
300
+ # jose@example.com from DATA_READ logging.
301
+ # @!attribute [rw] log_type
302
+ # @return [::Google::Iam::V1::AuditLogConfig::LogType]
303
+ # The log type that this config enables.
304
+ # @!attribute [rw] exempted_members
305
+ # @return [::Array<::String>]
306
+ # Specifies the identities that do not cause logging for this type of
307
+ # permission.
308
+ # Follows the same format of {::Google::Iam::V1::Binding#members Binding.members}.
309
+ class AuditLogConfig
310
+ include ::Google::Protobuf::MessageExts
311
+ extend ::Google::Protobuf::MessageExts::ClassMethods
312
+
313
+ # The list of valid permission types for which logging can be configured.
314
+ # Admin writes are always logged, and are not configurable.
315
+ module LogType
316
+ # Default case. Should never be this.
317
+ LOG_TYPE_UNSPECIFIED = 0
318
+
319
+ # Admin reads. Example: CloudIAM getIamPolicy
320
+ ADMIN_READ = 1
321
+
322
+ # Data writes. Example: CloudSQL Users create
323
+ DATA_WRITE = 2
324
+
325
+ # Data reads. Example: CloudSQL Users list
326
+ DATA_READ = 3
327
+ end
328
+ end
329
+
160
330
  # The difference delta between two policies.
161
331
  # @!attribute [rw] binding_deltas
162
332
  # @return [::Array<::Google::Iam::V1::BindingDelta>]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-functions-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-22 00:00:00.000000000 Z
11
+ date: 2022-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -48,22 +48,16 @@ dependencies:
48
48
  name: grpc-google-iam-v1
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: 0.6.10
54
- - - "<"
51
+ - - "~>"
55
52
  - !ruby/object:Gem::Version
56
- version: 2.a
53
+ version: '1.1'
57
54
  type: :runtime
58
55
  prerelease: false
59
56
  version_requirements: !ruby/object:Gem::Requirement
60
57
  requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: 0.6.10
64
- - - "<"
58
+ - - "~>"
65
59
  - !ruby/object:Gem::Version
66
- version: 2.a
60
+ version: '1.1'
67
61
  - !ruby/object:Gem::Dependency
68
62
  name: google-style
69
63
  requirement: !ruby/object:Gem::Requirement
@@ -235,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
229
  - !ruby/object:Gem::Version
236
230
  version: '0'
237
231
  requirements: []
238
- rubygems_version: 3.2.17
232
+ rubygems_version: 3.3.5
239
233
  signing_key:
240
234
  specification_version: 4
241
235
  summary: API Client library for the Cloud Functions V1 API