google-apis-policytroubleshooter_v3 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1585 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module PolicytroubleshooterV3
24
+
25
+ # Information about the principal, resource, and permission to check.
26
+ class GoogleCloudPolicytroubleshooterIamV3AccessTuple
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Additional context for troubleshooting conditional role bindings and deny
30
+ # rules.
31
+ # Corresponds to the JSON property `conditionContext`
32
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3ConditionContext]
33
+ attr_accessor :condition_context
34
+
35
+ # Required. The full resource name that identifies the resource. For example, `//
36
+ # compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-
37
+ # instance`. For examples of full resource names for Google Cloud services, see
38
+ # https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
39
+ # Corresponds to the JSON property `fullResourceName`
40
+ # @return [String]
41
+ attr_accessor :full_resource_name
42
+
43
+ # Required. The IAM permission to check for, either in the `v1` permission
44
+ # format or the `v2` permission format. For a complete list of IAM permissions
45
+ # in the `v1` format, see https://cloud.google.com/iam/help/permissions/
46
+ # reference. For a list of IAM permissions in the `v2` format, see https://cloud.
47
+ # google.com/iam/help/deny/supported-permissions. For a complete list of
48
+ # predefined IAM roles and the permissions in each role, see https://cloud.
49
+ # google.com/iam/help/roles/reference.
50
+ # Corresponds to the JSON property `permission`
51
+ # @return [String]
52
+ attr_accessor :permission
53
+
54
+ # Output only. The permission that Policy Troubleshooter checked for, in the `v2`
55
+ # format.
56
+ # Corresponds to the JSON property `permissionFqdn`
57
+ # @return [String]
58
+ attr_accessor :permission_fqdn
59
+
60
+ # Required. The email address of the principal whose access you want to check.
61
+ # For example, `alice@example.com` or `my-service-account@my-project.iam.
62
+ # gserviceaccount.com`. The principal must be a Google Account or a service
63
+ # account. Other types of principals are not supported.
64
+ # Corresponds to the JSON property `principal`
65
+ # @return [String]
66
+ attr_accessor :principal
67
+
68
+ def initialize(**args)
69
+ update!(**args)
70
+ end
71
+
72
+ # Update properties of this object
73
+ def update!(**args)
74
+ @condition_context = args[:condition_context] if args.key?(:condition_context)
75
+ @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
76
+ @permission = args[:permission] if args.key?(:permission)
77
+ @permission_fqdn = args[:permission_fqdn] if args.key?(:permission_fqdn)
78
+ @principal = args[:principal] if args.key?(:principal)
79
+ end
80
+ end
81
+
82
+ # Details about how a role binding in an allow policy affects a principal's
83
+ # ability to use a permission.
84
+ class GoogleCloudPolicytroubleshooterIamV3AllowBindingExplanation
85
+ include Google::Apis::Core::Hashable
86
+
87
+ # Required. Indicates whether _this role binding_ gives the specified permission
88
+ # to the specified principal on the specified resource. This field does _not_
89
+ # indicate whether the principal actually has the permission on the resource.
90
+ # There might be another role binding that overrides this role binding. To
91
+ # determine whether the principal actually has the permission, use the `
92
+ # overall_access_state` field in the TroubleshootIamPolicyResponse.
93
+ # Corresponds to the JSON property `allowAccessState`
94
+ # @return [String]
95
+ attr_accessor :allow_access_state
96
+
97
+ # Details about whether the role binding includes the principal.
98
+ # Corresponds to the JSON property `combinedMembership`
99
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3AllowBindingExplanationAnnotatedAllowMembership]
100
+ attr_accessor :combined_membership
101
+
102
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
103
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
104
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
105
+ # "Summary size limit" description: "Determines if a summary is less than 100
106
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
107
+ # Requestor is owner" description: "Determines if requestor is the document
108
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
109
+ # Logic): title: "Public documents" description: "Determine whether the document
110
+ # should be publicly visible" expression: "document.type != 'private' &&
111
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
112
+ # string" description: "Create a notification string with a timestamp."
113
+ # expression: "'New message received at ' + string(document.create_time)" The
114
+ # exact variables and functions that may be referenced within an expression are
115
+ # determined by the service that evaluates it. See the service documentation for
116
+ # additional information.
117
+ # Corresponds to the JSON property `condition`
118
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleTypeExpr]
119
+ attr_accessor :condition
120
+
121
+ # Explanation for how a condition affects a principal's access
122
+ # Corresponds to the JSON property `conditionExplanation`
123
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3ConditionExplanation]
124
+ attr_accessor :condition_explanation
125
+
126
+ # Indicates whether each role binding includes the principal specified in the
127
+ # request, either directly or indirectly. Each key identifies a principal in the
128
+ # role binding, and each value indicates whether the principal in the role
129
+ # binding includes the principal in the request. For example, suppose that a
130
+ # role binding includes the following principals: * `user:alice@example.com` * `
131
+ # group:product-eng@example.com` You want to troubleshoot access for `user:bob@
132
+ # example.com`. This user is a member of the group `group:product-eng@example.
133
+ # com`. For the first principal in the role binding, the key is `user:alice@
134
+ # example.com`, and the `membership` field in the value is set to `NOT_INCLUDED`.
135
+ # For the second principal in the role binding, the key is `group:product-eng@
136
+ # example.com`, and the `membership` field in the value is set to `INCLUDED`.
137
+ # Corresponds to the JSON property `memberships`
138
+ # @return [Hash<String,Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3AllowBindingExplanationAnnotatedAllowMembership>]
139
+ attr_accessor :memberships
140
+
141
+ # The relevance of this role binding to the overall determination for the entire
142
+ # policy.
143
+ # Corresponds to the JSON property `relevance`
144
+ # @return [String]
145
+ attr_accessor :relevance
146
+
147
+ # The role that this role binding grants. For example, `roles/compute.admin`.
148
+ # For a complete list of predefined IAM roles, as well as the permissions in
149
+ # each role, see https://cloud.google.com/iam/help/roles/reference.
150
+ # Corresponds to the JSON property `role`
151
+ # @return [String]
152
+ attr_accessor :role
153
+
154
+ # Indicates whether the role granted by this role binding contains the specified
155
+ # permission.
156
+ # Corresponds to the JSON property `rolePermission`
157
+ # @return [String]
158
+ attr_accessor :role_permission
159
+
160
+ # The relevance of the permission's existence, or nonexistence, in the role to
161
+ # the overall determination for the entire policy.
162
+ # Corresponds to the JSON property `rolePermissionRelevance`
163
+ # @return [String]
164
+ attr_accessor :role_permission_relevance
165
+
166
+ def initialize(**args)
167
+ update!(**args)
168
+ end
169
+
170
+ # Update properties of this object
171
+ def update!(**args)
172
+ @allow_access_state = args[:allow_access_state] if args.key?(:allow_access_state)
173
+ @combined_membership = args[:combined_membership] if args.key?(:combined_membership)
174
+ @condition = args[:condition] if args.key?(:condition)
175
+ @condition_explanation = args[:condition_explanation] if args.key?(:condition_explanation)
176
+ @memberships = args[:memberships] if args.key?(:memberships)
177
+ @relevance = args[:relevance] if args.key?(:relevance)
178
+ @role = args[:role] if args.key?(:role)
179
+ @role_permission = args[:role_permission] if args.key?(:role_permission)
180
+ @role_permission_relevance = args[:role_permission_relevance] if args.key?(:role_permission_relevance)
181
+ end
182
+ end
183
+
184
+ # Details about whether the role binding includes the principal.
185
+ class GoogleCloudPolicytroubleshooterIamV3AllowBindingExplanationAnnotatedAllowMembership
186
+ include Google::Apis::Core::Hashable
187
+
188
+ # Indicates whether the role binding includes the principal.
189
+ # Corresponds to the JSON property `membership`
190
+ # @return [String]
191
+ attr_accessor :membership
192
+
193
+ # The relevance of the principal's status to the overall determination for the
194
+ # role binding.
195
+ # Corresponds to the JSON property `relevance`
196
+ # @return [String]
197
+ attr_accessor :relevance
198
+
199
+ def initialize(**args)
200
+ update!(**args)
201
+ end
202
+
203
+ # Update properties of this object
204
+ def update!(**args)
205
+ @membership = args[:membership] if args.key?(:membership)
206
+ @relevance = args[:relevance] if args.key?(:relevance)
207
+ end
208
+ end
209
+
210
+ # Details about how the relevant IAM allow policies affect the final access
211
+ # state.
212
+ class GoogleCloudPolicytroubleshooterIamV3AllowPolicyExplanation
213
+ include Google::Apis::Core::Hashable
214
+
215
+ # Indicates whether the principal has the specified permission for the specified
216
+ # resource, based on evaluating all applicable IAM allow policies.
217
+ # Corresponds to the JSON property `allowAccessState`
218
+ # @return [String]
219
+ attr_accessor :allow_access_state
220
+
221
+ # List of IAM allow policies that were evaluated to check the principal's
222
+ # permissions, with annotations to indicate how each policy contributed to the
223
+ # final result. The list of policies includes the policy for the resource itself,
224
+ # as well as allow policies that are inherited from higher levels of the
225
+ # resource hierarchy, including the organization, the folder, and the project.
226
+ # To learn more about the resource hierarchy, see https://cloud.google.com/iam/
227
+ # help/resource-hierarchy.
228
+ # Corresponds to the JSON property `explainedPolicies`
229
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3ExplainedAllowPolicy>]
230
+ attr_accessor :explained_policies
231
+
232
+ # The relevance of the allow policy type to the overall access state.
233
+ # Corresponds to the JSON property `relevance`
234
+ # @return [String]
235
+ attr_accessor :relevance
236
+
237
+ def initialize(**args)
238
+ update!(**args)
239
+ end
240
+
241
+ # Update properties of this object
242
+ def update!(**args)
243
+ @allow_access_state = args[:allow_access_state] if args.key?(:allow_access_state)
244
+ @explained_policies = args[:explained_policies] if args.key?(:explained_policies)
245
+ @relevance = args[:relevance] if args.key?(:relevance)
246
+ end
247
+ end
248
+
249
+ # Additional context for troubleshooting conditional role bindings and deny
250
+ # rules.
251
+ class GoogleCloudPolicytroubleshooterIamV3ConditionContext
252
+ include Google::Apis::Core::Hashable
253
+
254
+ # This message defines attributes for a node that handles a network request. The
255
+ # node can be either a service or an application that sends, forwards, or
256
+ # receives the request. Service peers should fill in `principal` and `labels` as
257
+ # appropriate.
258
+ # Corresponds to the JSON property `destination`
259
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3ConditionContextPeer]
260
+ attr_accessor :destination
261
+
262
+ # Output only. The effective tags on the resource. The effective tags are
263
+ # fetched during troubleshooting.
264
+ # Corresponds to the JSON property `effectiveTags`
265
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3ConditionContextEffectiveTag>]
266
+ attr_accessor :effective_tags
267
+
268
+ # This message defines attributes for an HTTP request. If the actual request is
269
+ # not an HTTP request, the runtime system should try to map the actual request
270
+ # to an equivalent HTTP request.
271
+ # Corresponds to the JSON property `request`
272
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3ConditionContextRequest]
273
+ attr_accessor :request
274
+
275
+ # Core attributes for a resource. A resource is an addressable (named) entity
276
+ # provided by the destination service. For example, a Compute Engine instance.
277
+ # Corresponds to the JSON property `resource`
278
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3ConditionContextResource]
279
+ attr_accessor :resource
280
+
281
+ def initialize(**args)
282
+ update!(**args)
283
+ end
284
+
285
+ # Update properties of this object
286
+ def update!(**args)
287
+ @destination = args[:destination] if args.key?(:destination)
288
+ @effective_tags = args[:effective_tags] if args.key?(:effective_tags)
289
+ @request = args[:request] if args.key?(:request)
290
+ @resource = args[:resource] if args.key?(:resource)
291
+ end
292
+ end
293
+
294
+ # A tag that applies to a resource during policy evaluation. Tags can be either
295
+ # directly bound to a resource or inherited from its ancestor. `EffectiveTag`
296
+ # contains the `name` and `namespaced_name` of the tag value and tag key, with
297
+ # additional fields of `inherited` to indicate the inheritance status of the
298
+ # effective tag.
299
+ class GoogleCloudPolicytroubleshooterIamV3ConditionContextEffectiveTag
300
+ include Google::Apis::Core::Hashable
301
+
302
+ # Output only. Indicates the inheritance status of a tag value attached to the
303
+ # given resource. If the tag value is inherited from one of the resource's
304
+ # ancestors, inherited will be true. If false, then the tag value is directly
305
+ # attached to the resource, inherited will be false.
306
+ # Corresponds to the JSON property `inherited`
307
+ # @return [Boolean]
308
+ attr_accessor :inherited
309
+ alias_method :inherited?, :inherited
310
+
311
+ # Output only. The namespaced name of the TagKey. Can be in the form ``
312
+ # organization_id`/`tag_key_short_name`` or ``project_id`/`tag_key_short_name``
313
+ # or ``project_number`/`tag_key_short_name``.
314
+ # Corresponds to the JSON property `namespacedTagKey`
315
+ # @return [String]
316
+ attr_accessor :namespaced_tag_key
317
+
318
+ # Output only. The namespaced name of the TagValue. Can be in the form ``
319
+ # organization_id`/`tag_key_short_name`/`tag_value_short_name`` or ``project_id`/
320
+ # `tag_key_short_name`/`tag_value_short_name`` or ``project_number`/`
321
+ # tag_key_short_name`/`tag_value_short_name``.
322
+ # Corresponds to the JSON property `namespacedTagValue`
323
+ # @return [String]
324
+ attr_accessor :namespaced_tag_value
325
+
326
+ # Output only. The name of the TagKey, in the format `tagKeys/`id``, such as `
327
+ # tagKeys/123`.
328
+ # Corresponds to the JSON property `tagKey`
329
+ # @return [String]
330
+ attr_accessor :tag_key
331
+
332
+ # The parent name of the tag key. Must be in the format `organizations/`
333
+ # organization_id`` or `projects/`project_number``
334
+ # Corresponds to the JSON property `tagKeyParentName`
335
+ # @return [String]
336
+ attr_accessor :tag_key_parent_name
337
+
338
+ # Output only. Resource name for TagValue in the format `tagValues/456`.
339
+ # Corresponds to the JSON property `tagValue`
340
+ # @return [String]
341
+ attr_accessor :tag_value
342
+
343
+ def initialize(**args)
344
+ update!(**args)
345
+ end
346
+
347
+ # Update properties of this object
348
+ def update!(**args)
349
+ @inherited = args[:inherited] if args.key?(:inherited)
350
+ @namespaced_tag_key = args[:namespaced_tag_key] if args.key?(:namespaced_tag_key)
351
+ @namespaced_tag_value = args[:namespaced_tag_value] if args.key?(:namespaced_tag_value)
352
+ @tag_key = args[:tag_key] if args.key?(:tag_key)
353
+ @tag_key_parent_name = args[:tag_key_parent_name] if args.key?(:tag_key_parent_name)
354
+ @tag_value = args[:tag_value] if args.key?(:tag_value)
355
+ end
356
+ end
357
+
358
+ # This message defines attributes for a node that handles a network request. The
359
+ # node can be either a service or an application that sends, forwards, or
360
+ # receives the request. Service peers should fill in `principal` and `labels` as
361
+ # appropriate.
362
+ class GoogleCloudPolicytroubleshooterIamV3ConditionContextPeer
363
+ include Google::Apis::Core::Hashable
364
+
365
+ # The IPv4 or IPv6 address of the peer.
366
+ # Corresponds to the JSON property `ip`
367
+ # @return [String]
368
+ attr_accessor :ip
369
+
370
+ # The network port of the peer.
371
+ # Corresponds to the JSON property `port`
372
+ # @return [Fixnum]
373
+ attr_accessor :port
374
+
375
+ def initialize(**args)
376
+ update!(**args)
377
+ end
378
+
379
+ # Update properties of this object
380
+ def update!(**args)
381
+ @ip = args[:ip] if args.key?(:ip)
382
+ @port = args[:port] if args.key?(:port)
383
+ end
384
+ end
385
+
386
+ # This message defines attributes for an HTTP request. If the actual request is
387
+ # not an HTTP request, the runtime system should try to map the actual request
388
+ # to an equivalent HTTP request.
389
+ class GoogleCloudPolicytroubleshooterIamV3ConditionContextRequest
390
+ include Google::Apis::Core::Hashable
391
+
392
+ # Optional. The timestamp when the destination service receives the first byte
393
+ # of the request.
394
+ # Corresponds to the JSON property `receiveTime`
395
+ # @return [String]
396
+ attr_accessor :receive_time
397
+
398
+ def initialize(**args)
399
+ update!(**args)
400
+ end
401
+
402
+ # Update properties of this object
403
+ def update!(**args)
404
+ @receive_time = args[:receive_time] if args.key?(:receive_time)
405
+ end
406
+ end
407
+
408
+ # Core attributes for a resource. A resource is an addressable (named) entity
409
+ # provided by the destination service. For example, a Compute Engine instance.
410
+ class GoogleCloudPolicytroubleshooterIamV3ConditionContextResource
411
+ include Google::Apis::Core::Hashable
412
+
413
+ # The stable identifier (name) of a resource on the `service`. A resource can be
414
+ # logically identified as `//`resource.service`/`resource.name``. Unlike the
415
+ # resource URI, the resource name doesn't contain any protocol and version
416
+ # information. For a list of full resource name formats, see https://cloud.
417
+ # google.com/iam/help/troubleshooter/full-resource-names
418
+ # Corresponds to the JSON property `name`
419
+ # @return [String]
420
+ attr_accessor :name
421
+
422
+ # The name of the service that this resource belongs to, such as `compute.
423
+ # googleapis.com`. The service name might not match the DNS hostname that
424
+ # actually serves the request. For a full list of resource service values, see
425
+ # https://cloud.google.com/iam/help/conditions/resource-services
426
+ # Corresponds to the JSON property `service`
427
+ # @return [String]
428
+ attr_accessor :service
429
+
430
+ # The type of the resource, in the format ``service`/`kind``. For a full list of
431
+ # resource type values, see https://cloud.google.com/iam/help/conditions/
432
+ # resource-types
433
+ # Corresponds to the JSON property `type`
434
+ # @return [String]
435
+ attr_accessor :type
436
+
437
+ def initialize(**args)
438
+ update!(**args)
439
+ end
440
+
441
+ # Update properties of this object
442
+ def update!(**args)
443
+ @name = args[:name] if args.key?(:name)
444
+ @service = args[:service] if args.key?(:service)
445
+ @type = args[:type] if args.key?(:type)
446
+ end
447
+ end
448
+
449
+ # Explanation for how a condition affects a principal's access
450
+ class GoogleCloudPolicytroubleshooterIamV3ConditionExplanation
451
+ include Google::Apis::Core::Hashable
452
+
453
+ # Any errors that prevented complete evaluation of the condition expression.
454
+ # Corresponds to the JSON property `errors`
455
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleRpcStatus>]
456
+ attr_accessor :errors
457
+
458
+ # The value of each statement of the condition expression. The value can be `
459
+ # true`, `false`, or `null`. The value is `null` if the statement can't be
460
+ # evaluated.
461
+ # Corresponds to the JSON property `evaluationStates`
462
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3ConditionExplanationEvaluationState>]
463
+ attr_accessor :evaluation_states
464
+
465
+ # Value of the condition.
466
+ # Corresponds to the JSON property `value`
467
+ # @return [Object]
468
+ attr_accessor :value
469
+
470
+ def initialize(**args)
471
+ update!(**args)
472
+ end
473
+
474
+ # Update properties of this object
475
+ def update!(**args)
476
+ @errors = args[:errors] if args.key?(:errors)
477
+ @evaluation_states = args[:evaluation_states] if args.key?(:evaluation_states)
478
+ @value = args[:value] if args.key?(:value)
479
+ end
480
+ end
481
+
482
+ # Evaluated state of a condition expression.
483
+ class GoogleCloudPolicytroubleshooterIamV3ConditionExplanationEvaluationState
484
+ include Google::Apis::Core::Hashable
485
+
486
+ # End position of an expression in the condition, by character, end included,
487
+ # for example: the end position of the first part of `a==b || c==d` would be 4.
488
+ # Corresponds to the JSON property `end`
489
+ # @return [Fixnum]
490
+ attr_accessor :end
491
+
492
+ # Any errors that prevented complete evaluation of the condition expression.
493
+ # Corresponds to the JSON property `errors`
494
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleRpcStatus>]
495
+ attr_accessor :errors
496
+
497
+ # Start position of an expression in the condition, by character.
498
+ # Corresponds to the JSON property `start`
499
+ # @return [Fixnum]
500
+ attr_accessor :start
501
+
502
+ # Value of this expression.
503
+ # Corresponds to the JSON property `value`
504
+ # @return [Object]
505
+ attr_accessor :value
506
+
507
+ def initialize(**args)
508
+ update!(**args)
509
+ end
510
+
511
+ # Update properties of this object
512
+ def update!(**args)
513
+ @end = args[:end] if args.key?(:end)
514
+ @errors = args[:errors] if args.key?(:errors)
515
+ @start = args[:start] if args.key?(:start)
516
+ @value = args[:value] if args.key?(:value)
517
+ end
518
+ end
519
+
520
+ # Details about how the relevant IAM deny policies affect the final access state.
521
+ class GoogleCloudPolicytroubleshooterIamV3DenyPolicyExplanation
522
+ include Google::Apis::Core::Hashable
523
+
524
+ # Indicates whether the principal is denied the specified permission for the
525
+ # specified resource, based on evaluating all applicable IAM deny policies.
526
+ # Corresponds to the JSON property `denyAccessState`
527
+ # @return [String]
528
+ attr_accessor :deny_access_state
529
+
530
+ # List of resources with IAM deny policies that were evaluated to check the
531
+ # principal's denied permissions, with annotations to indicate how each policy
532
+ # contributed to the final result. The list of resources includes the policy for
533
+ # the resource itself, as well as policies that are inherited from higher levels
534
+ # of the resource hierarchy, including the organization, the folder, and the
535
+ # project. The order of the resources starts from the resource and climbs up the
536
+ # resource hierarchy. To learn more about the resource hierarchy, see https://
537
+ # cloud.google.com/iam/help/resource-hierarchy.
538
+ # Corresponds to the JSON property `explainedResources`
539
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3ExplainedDenyResource>]
540
+ attr_accessor :explained_resources
541
+
542
+ # Indicates whether the permission to troubleshoot is supported in deny policies.
543
+ # Corresponds to the JSON property `permissionDeniable`
544
+ # @return [Boolean]
545
+ attr_accessor :permission_deniable
546
+ alias_method :permission_deniable?, :permission_deniable
547
+
548
+ # The relevance of the deny policy result to the overall access state.
549
+ # Corresponds to the JSON property `relevance`
550
+ # @return [String]
551
+ attr_accessor :relevance
552
+
553
+ def initialize(**args)
554
+ update!(**args)
555
+ end
556
+
557
+ # Update properties of this object
558
+ def update!(**args)
559
+ @deny_access_state = args[:deny_access_state] if args.key?(:deny_access_state)
560
+ @explained_resources = args[:explained_resources] if args.key?(:explained_resources)
561
+ @permission_deniable = args[:permission_deniable] if args.key?(:permission_deniable)
562
+ @relevance = args[:relevance] if args.key?(:relevance)
563
+ end
564
+ end
565
+
566
+ # Details about how a deny rule in a deny policy affects a principal's ability
567
+ # to use a permission.
568
+ class GoogleCloudPolicytroubleshooterIamV3DenyRuleExplanation
569
+ include Google::Apis::Core::Hashable
570
+
571
+ # Details about whether the permission in the request is denied by the deny rule.
572
+ # Corresponds to the JSON property `combinedDeniedPermission`
573
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3DenyRuleExplanationAnnotatedPermissionMatching]
574
+ attr_accessor :combined_denied_permission
575
+
576
+ # Details about whether the principal in the request is listed as a denied
577
+ # principal in the deny rule, either directly or through membership in a
578
+ # principal set.
579
+ # Corresponds to the JSON property `combinedDeniedPrincipal`
580
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3DenyRuleExplanationAnnotatedDenyPrincipalMatching]
581
+ attr_accessor :combined_denied_principal
582
+
583
+ # Details about whether the permission in the request is denied by the deny rule.
584
+ # Corresponds to the JSON property `combinedExceptionPermission`
585
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3DenyRuleExplanationAnnotatedPermissionMatching]
586
+ attr_accessor :combined_exception_permission
587
+
588
+ # Details about whether the principal in the request is listed as a denied
589
+ # principal in the deny rule, either directly or through membership in a
590
+ # principal set.
591
+ # Corresponds to the JSON property `combinedExceptionPrincipal`
592
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3DenyRuleExplanationAnnotatedDenyPrincipalMatching]
593
+ attr_accessor :combined_exception_principal
594
+
595
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
596
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
597
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
598
+ # "Summary size limit" description: "Determines if a summary is less than 100
599
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
600
+ # Requestor is owner" description: "Determines if requestor is the document
601
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
602
+ # Logic): title: "Public documents" description: "Determine whether the document
603
+ # should be publicly visible" expression: "document.type != 'private' &&
604
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
605
+ # string" description: "Create a notification string with a timestamp."
606
+ # expression: "'New message received at ' + string(document.create_time)" The
607
+ # exact variables and functions that may be referenced within an expression are
608
+ # determined by the service that evaluates it. See the service documentation for
609
+ # additional information.
610
+ # Corresponds to the JSON property `condition`
611
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleTypeExpr]
612
+ attr_accessor :condition
613
+
614
+ # Explanation for how a condition affects a principal's access
615
+ # Corresponds to the JSON property `conditionExplanation`
616
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3ConditionExplanation]
617
+ attr_accessor :condition_explanation
618
+
619
+ # Lists all denied permissions in the deny rule and indicates whether each
620
+ # permission matches the permission in the request. Each key identifies a denied
621
+ # permission in the rule, and each value indicates whether the denied permission
622
+ # matches the permission in the request.
623
+ # Corresponds to the JSON property `deniedPermissions`
624
+ # @return [Hash<String,Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3DenyRuleExplanationAnnotatedPermissionMatching>]
625
+ attr_accessor :denied_permissions
626
+
627
+ # Lists all denied principals in the deny rule and indicates whether each
628
+ # principal matches the principal in the request, either directly or through
629
+ # membership in a principal set. Each key identifies a denied principal in the
630
+ # rule, and each value indicates whether the denied principal matches the
631
+ # principal in the request.
632
+ # Corresponds to the JSON property `deniedPrincipals`
633
+ # @return [Hash<String,Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3DenyRuleExplanationAnnotatedDenyPrincipalMatching>]
634
+ attr_accessor :denied_principals
635
+
636
+ # Required. Indicates whether _this rule_ denies the specified permission to the
637
+ # specified principal for the specified resource. This field does _not_ indicate
638
+ # whether the principal is actually denied on the permission for the resource.
639
+ # There might be another rule that overrides this rule. To determine whether the
640
+ # principal actually has the permission, use the `overall_access_state` field in
641
+ # the TroubleshootIamPolicyResponse.
642
+ # Corresponds to the JSON property `denyAccessState`
643
+ # @return [String]
644
+ attr_accessor :deny_access_state
645
+
646
+ # Lists all exception permissions in the deny rule and indicates whether each
647
+ # permission matches the permission in the request. Each key identifies a
648
+ # exception permission in the rule, and each value indicates whether the
649
+ # exception permission matches the permission in the request.
650
+ # Corresponds to the JSON property `exceptionPermissions`
651
+ # @return [Hash<String,Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3DenyRuleExplanationAnnotatedPermissionMatching>]
652
+ attr_accessor :exception_permissions
653
+
654
+ # Lists all exception principals in the deny rule and indicates whether each
655
+ # principal matches the principal in the request, either directly or through
656
+ # membership in a principal set. Each key identifies a exception principal in
657
+ # the rule, and each value indicates whether the exception principal matches the
658
+ # principal in the request.
659
+ # Corresponds to the JSON property `exceptionPrincipals`
660
+ # @return [Hash<String,Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3DenyRuleExplanationAnnotatedDenyPrincipalMatching>]
661
+ attr_accessor :exception_principals
662
+
663
+ # The relevance of this role binding to the overall determination for the entire
664
+ # policy.
665
+ # Corresponds to the JSON property `relevance`
666
+ # @return [String]
667
+ attr_accessor :relevance
668
+
669
+ def initialize(**args)
670
+ update!(**args)
671
+ end
672
+
673
+ # Update properties of this object
674
+ def update!(**args)
675
+ @combined_denied_permission = args[:combined_denied_permission] if args.key?(:combined_denied_permission)
676
+ @combined_denied_principal = args[:combined_denied_principal] if args.key?(:combined_denied_principal)
677
+ @combined_exception_permission = args[:combined_exception_permission] if args.key?(:combined_exception_permission)
678
+ @combined_exception_principal = args[:combined_exception_principal] if args.key?(:combined_exception_principal)
679
+ @condition = args[:condition] if args.key?(:condition)
680
+ @condition_explanation = args[:condition_explanation] if args.key?(:condition_explanation)
681
+ @denied_permissions = args[:denied_permissions] if args.key?(:denied_permissions)
682
+ @denied_principals = args[:denied_principals] if args.key?(:denied_principals)
683
+ @deny_access_state = args[:deny_access_state] if args.key?(:deny_access_state)
684
+ @exception_permissions = args[:exception_permissions] if args.key?(:exception_permissions)
685
+ @exception_principals = args[:exception_principals] if args.key?(:exception_principals)
686
+ @relevance = args[:relevance] if args.key?(:relevance)
687
+ end
688
+ end
689
+
690
+ # Details about whether the principal in the request is listed as a denied
691
+ # principal in the deny rule, either directly or through membership in a
692
+ # principal set.
693
+ class GoogleCloudPolicytroubleshooterIamV3DenyRuleExplanationAnnotatedDenyPrincipalMatching
694
+ include Google::Apis::Core::Hashable
695
+
696
+ # Indicates whether the principal is listed as a denied principal in the deny
697
+ # rule, either directly or through membership in a principal set.
698
+ # Corresponds to the JSON property `membership`
699
+ # @return [String]
700
+ attr_accessor :membership
701
+
702
+ # The relevance of the principal's status to the overall determination for the
703
+ # role binding.
704
+ # Corresponds to the JSON property `relevance`
705
+ # @return [String]
706
+ attr_accessor :relevance
707
+
708
+ def initialize(**args)
709
+ update!(**args)
710
+ end
711
+
712
+ # Update properties of this object
713
+ def update!(**args)
714
+ @membership = args[:membership] if args.key?(:membership)
715
+ @relevance = args[:relevance] if args.key?(:relevance)
716
+ end
717
+ end
718
+
719
+ # Details about whether the permission in the request is denied by the deny rule.
720
+ class GoogleCloudPolicytroubleshooterIamV3DenyRuleExplanationAnnotatedPermissionMatching
721
+ include Google::Apis::Core::Hashable
722
+
723
+ # Indicates whether the permission in the request is denied by the deny rule.
724
+ # Corresponds to the JSON property `permissionMatchingState`
725
+ # @return [String]
726
+ attr_accessor :permission_matching_state
727
+
728
+ # The relevance of the permission status to the overall determination for the
729
+ # rule.
730
+ # Corresponds to the JSON property `relevance`
731
+ # @return [String]
732
+ attr_accessor :relevance
733
+
734
+ def initialize(**args)
735
+ update!(**args)
736
+ end
737
+
738
+ # Update properties of this object
739
+ def update!(**args)
740
+ @permission_matching_state = args[:permission_matching_state] if args.key?(:permission_matching_state)
741
+ @relevance = args[:relevance] if args.key?(:relevance)
742
+ end
743
+ end
744
+
745
+ # Details about how a specific IAM allow policy contributed to the final access
746
+ # state.
747
+ class GoogleCloudPolicytroubleshooterIamV3ExplainedAllowPolicy
748
+ include Google::Apis::Core::Hashable
749
+
750
+ # Required. Indicates whether _this policy_ provides the specified permission to
751
+ # the specified principal for the specified resource. This field does _not_
752
+ # indicate whether the principal actually has the permission for the resource.
753
+ # There might be another policy that overrides this policy. To determine whether
754
+ # the principal actually has the permission, use the `overall_access_state`
755
+ # field in the TroubleshootIamPolicyResponse.
756
+ # Corresponds to the JSON property `allowAccessState`
757
+ # @return [String]
758
+ attr_accessor :allow_access_state
759
+
760
+ # Details about how each role binding in the policy affects the principal's
761
+ # ability, or inability, to use the permission for the resource. The order of
762
+ # the role bindings matches the role binding order in the policy. If the sender
763
+ # of the request does not have access to the policy, this field is omitted.
764
+ # Corresponds to the JSON property `bindingExplanations`
765
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3AllowBindingExplanation>]
766
+ attr_accessor :binding_explanations
767
+
768
+ # The full resource name that identifies the resource. For example, `//compute.
769
+ # googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
770
+ # If the sender of the request does not have access to the policy, this field is
771
+ # omitted. For examples of full resource names for Google Cloud services, see
772
+ # https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
773
+ # Corresponds to the JSON property `fullResourceName`
774
+ # @return [String]
775
+ attr_accessor :full_resource_name
776
+
777
+ # An Identity and Access Management (IAM) policy, which specifies access
778
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
779
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
780
+ # Principals can be user accounts, service accounts, Google groups, and domains (
781
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
782
+ # an IAM predefined role or a user-created custom role. For some types of Google
783
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
784
+ # logical expression that allows access to a resource only if the expression
785
+ # evaluates to `true`. A condition can add constraints based on attributes of
786
+ # the request, the resource, or both. To learn which resources support
787
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
788
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
789
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
790
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
791
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
792
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
793
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
794
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
795
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
796
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
797
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
798
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
799
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
800
+ # title: expirable access description: Does not grant access after Sep 2020
801
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
802
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
803
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
804
+ # Corresponds to the JSON property `policy`
805
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleIamV1Policy]
806
+ attr_accessor :policy
807
+
808
+ # The relevance of this policy to the overall access state in the
809
+ # TroubleshootIamPolicyResponse. If the sender of the request does not have
810
+ # access to the policy, this field is omitted.
811
+ # Corresponds to the JSON property `relevance`
812
+ # @return [String]
813
+ attr_accessor :relevance
814
+
815
+ def initialize(**args)
816
+ update!(**args)
817
+ end
818
+
819
+ # Update properties of this object
820
+ def update!(**args)
821
+ @allow_access_state = args[:allow_access_state] if args.key?(:allow_access_state)
822
+ @binding_explanations = args[:binding_explanations] if args.key?(:binding_explanations)
823
+ @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
824
+ @policy = args[:policy] if args.key?(:policy)
825
+ @relevance = args[:relevance] if args.key?(:relevance)
826
+ end
827
+ end
828
+
829
+ # Details about how a specific IAM deny policy Policy contributed to the access
830
+ # check.
831
+ class GoogleCloudPolicytroubleshooterIamV3ExplainedDenyPolicy
832
+ include Google::Apis::Core::Hashable
833
+
834
+ # Required. Indicates whether _this policy_ denies the specified permission to
835
+ # the specified principal for the specified resource. This field does _not_
836
+ # indicate whether the principal actually has the permission for the resource.
837
+ # There might be another policy that overrides this policy. To determine whether
838
+ # the principal actually has the permission, use the `overall_access_state`
839
+ # field in the TroubleshootIamPolicyResponse.
840
+ # Corresponds to the JSON property `denyAccessState`
841
+ # @return [String]
842
+ attr_accessor :deny_access_state
843
+
844
+ # Data for an IAM policy.
845
+ # Corresponds to the JSON property `policy`
846
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleIamV2Policy]
847
+ attr_accessor :policy
848
+
849
+ # The relevance of this policy to the overall access state in the
850
+ # TroubleshootIamPolicyResponse. If the sender of the request does not have
851
+ # access to the policy, this field is omitted.
852
+ # Corresponds to the JSON property `relevance`
853
+ # @return [String]
854
+ attr_accessor :relevance
855
+
856
+ # Details about how each rule in the policy affects the principal's inability to
857
+ # use the permission for the resource. The order of the deny rule matches the
858
+ # order of the rules in the deny policy. If the sender of the request does not
859
+ # have access to the policy, this field is omitted.
860
+ # Corresponds to the JSON property `ruleExplanations`
861
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3DenyRuleExplanation>]
862
+ attr_accessor :rule_explanations
863
+
864
+ def initialize(**args)
865
+ update!(**args)
866
+ end
867
+
868
+ # Update properties of this object
869
+ def update!(**args)
870
+ @deny_access_state = args[:deny_access_state] if args.key?(:deny_access_state)
871
+ @policy = args[:policy] if args.key?(:policy)
872
+ @relevance = args[:relevance] if args.key?(:relevance)
873
+ @rule_explanations = args[:rule_explanations] if args.key?(:rule_explanations)
874
+ end
875
+ end
876
+
877
+ # Details about how a specific resource contributed to the deny policy
878
+ # evaluation.
879
+ class GoogleCloudPolicytroubleshooterIamV3ExplainedDenyResource
880
+ include Google::Apis::Core::Hashable
881
+
882
+ # Required. Indicates whether any policies attached to _this resource_ deny the
883
+ # specific permission to the specified principal for the specified resource.
884
+ # This field does _not_ indicate whether the principal actually has the
885
+ # permission for the resource. There might be another policy that overrides this
886
+ # policy. To determine whether the principal actually has the permission, use
887
+ # the `overall_access_state` field in the TroubleshootIamPolicyResponse.
888
+ # Corresponds to the JSON property `denyAccessState`
889
+ # @return [String]
890
+ attr_accessor :deny_access_state
891
+
892
+ # List of IAM deny policies that were evaluated to check the principal's denied
893
+ # permissions, with annotations to indicate how each policy contributed to the
894
+ # final result.
895
+ # Corresponds to the JSON property `explainedPolicies`
896
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3ExplainedDenyPolicy>]
897
+ attr_accessor :explained_policies
898
+
899
+ # The full resource name that identifies the resource. For example, `//compute.
900
+ # googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
901
+ # If the sender of the request does not have access to the policy, this field is
902
+ # omitted. For examples of full resource names for Google Cloud services, see
903
+ # https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
904
+ # Corresponds to the JSON property `fullResourceName`
905
+ # @return [String]
906
+ attr_accessor :full_resource_name
907
+
908
+ # The relevance of this policy to the overall access state in the
909
+ # TroubleshootIamPolicyResponse. If the sender of the request does not have
910
+ # access to the policy, this field is omitted.
911
+ # Corresponds to the JSON property `relevance`
912
+ # @return [String]
913
+ attr_accessor :relevance
914
+
915
+ def initialize(**args)
916
+ update!(**args)
917
+ end
918
+
919
+ # Update properties of this object
920
+ def update!(**args)
921
+ @deny_access_state = args[:deny_access_state] if args.key?(:deny_access_state)
922
+ @explained_policies = args[:explained_policies] if args.key?(:explained_policies)
923
+ @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
924
+ @relevance = args[:relevance] if args.key?(:relevance)
925
+ end
926
+ end
927
+
928
+ # Request for TroubleshootIamPolicy.
929
+ class GoogleCloudPolicytroubleshooterIamV3TroubleshootIamPolicyRequest
930
+ include Google::Apis::Core::Hashable
931
+
932
+ # Information about the principal, resource, and permission to check.
933
+ # Corresponds to the JSON property `accessTuple`
934
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3AccessTuple]
935
+ attr_accessor :access_tuple
936
+
937
+ def initialize(**args)
938
+ update!(**args)
939
+ end
940
+
941
+ # Update properties of this object
942
+ def update!(**args)
943
+ @access_tuple = args[:access_tuple] if args.key?(:access_tuple)
944
+ end
945
+ end
946
+
947
+ # Response for TroubleshootIamPolicy.
948
+ class GoogleCloudPolicytroubleshooterIamV3TroubleshootIamPolicyResponse
949
+ include Google::Apis::Core::Hashable
950
+
951
+ # Information about the principal, resource, and permission to check.
952
+ # Corresponds to the JSON property `accessTuple`
953
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3AccessTuple]
954
+ attr_accessor :access_tuple
955
+
956
+ # Details about how the relevant IAM allow policies affect the final access
957
+ # state.
958
+ # Corresponds to the JSON property `allowPolicyExplanation`
959
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3AllowPolicyExplanation]
960
+ attr_accessor :allow_policy_explanation
961
+
962
+ # Details about how the relevant IAM deny policies affect the final access state.
963
+ # Corresponds to the JSON property `denyPolicyExplanation`
964
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleCloudPolicytroubleshooterIamV3DenyPolicyExplanation]
965
+ attr_accessor :deny_policy_explanation
966
+
967
+ # Indicates whether the principal has the specified permission for the specified
968
+ # resource, based on evaluating all types of the applicable IAM policies.
969
+ # Corresponds to the JSON property `overallAccessState`
970
+ # @return [String]
971
+ attr_accessor :overall_access_state
972
+
973
+ def initialize(**args)
974
+ update!(**args)
975
+ end
976
+
977
+ # Update properties of this object
978
+ def update!(**args)
979
+ @access_tuple = args[:access_tuple] if args.key?(:access_tuple)
980
+ @allow_policy_explanation = args[:allow_policy_explanation] if args.key?(:allow_policy_explanation)
981
+ @deny_policy_explanation = args[:deny_policy_explanation] if args.key?(:deny_policy_explanation)
982
+ @overall_access_state = args[:overall_access_state] if args.key?(:overall_access_state)
983
+ end
984
+ end
985
+
986
+ # Specifies the audit configuration for a service. The configuration determines
987
+ # which permission types are logged, and what identities, if any, are exempted
988
+ # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
989
+ # are AuditConfigs for both `allServices` and a specific service, the union of
990
+ # the two AuditConfigs is used for that service: the log_types specified in each
991
+ # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
992
+ # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
993
+ # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
994
+ # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
995
+ # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
996
+ # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
997
+ # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
998
+ # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
999
+ # exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com`
1000
+ # from DATA_WRITE logging.
1001
+ class GoogleIamV1AuditConfig
1002
+ include Google::Apis::Core::Hashable
1003
+
1004
+ # The configuration for logging of each type of permission.
1005
+ # Corresponds to the JSON property `auditLogConfigs`
1006
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleIamV1AuditLogConfig>]
1007
+ attr_accessor :audit_log_configs
1008
+
1009
+ # Specifies a service that will be enabled for audit logging. For example, `
1010
+ # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
1011
+ # value that covers all services.
1012
+ # Corresponds to the JSON property `service`
1013
+ # @return [String]
1014
+ attr_accessor :service
1015
+
1016
+ def initialize(**args)
1017
+ update!(**args)
1018
+ end
1019
+
1020
+ # Update properties of this object
1021
+ def update!(**args)
1022
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
1023
+ @service = args[:service] if args.key?(:service)
1024
+ end
1025
+ end
1026
+
1027
+ # Provides the configuration for logging a type of permissions. Example: ` "
1028
+ # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
1029
+ # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
1030
+ # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
1031
+ # DATA_READ logging.
1032
+ class GoogleIamV1AuditLogConfig
1033
+ include Google::Apis::Core::Hashable
1034
+
1035
+ # Specifies the identities that do not cause logging for this type of permission.
1036
+ # Follows the same format of Binding.members.
1037
+ # Corresponds to the JSON property `exemptedMembers`
1038
+ # @return [Array<String>]
1039
+ attr_accessor :exempted_members
1040
+
1041
+ # The log type that this config enables.
1042
+ # Corresponds to the JSON property `logType`
1043
+ # @return [String]
1044
+ attr_accessor :log_type
1045
+
1046
+ def initialize(**args)
1047
+ update!(**args)
1048
+ end
1049
+
1050
+ # Update properties of this object
1051
+ def update!(**args)
1052
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
1053
+ @log_type = args[:log_type] if args.key?(:log_type)
1054
+ end
1055
+ end
1056
+
1057
+ # Associates `members`, or principals, with a `role`.
1058
+ class GoogleIamV1Binding
1059
+ include Google::Apis::Core::Hashable
1060
+
1061
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
1062
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
1063
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
1064
+ # "Summary size limit" description: "Determines if a summary is less than 100
1065
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
1066
+ # Requestor is owner" description: "Determines if requestor is the document
1067
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
1068
+ # Logic): title: "Public documents" description: "Determine whether the document
1069
+ # should be publicly visible" expression: "document.type != 'private' &&
1070
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
1071
+ # string" description: "Create a notification string with a timestamp."
1072
+ # expression: "'New message received at ' + string(document.create_time)" The
1073
+ # exact variables and functions that may be referenced within an expression are
1074
+ # determined by the service that evaluates it. See the service documentation for
1075
+ # additional information.
1076
+ # Corresponds to the JSON property `condition`
1077
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleTypeExpr]
1078
+ attr_accessor :condition
1079
+
1080
+ # Specifies the principals requesting access for a Google Cloud resource. `
1081
+ # members` can have the following values: * `allUsers`: A special identifier
1082
+ # that represents anyone who is on the internet; with or without a Google
1083
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
1084
+ # anyone who is authenticated with a Google account or a service account. Does
1085
+ # not include identities that come from external identity providers (IdPs)
1086
+ # through identity federation. * `user:`emailid``: An email address that
1087
+ # represents a specific Google account. For example, `alice@example.com` . * `
1088
+ # serviceAccount:`emailid``: An email address that represents a Google service
1089
+ # account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
1090
+ # serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
1091
+ # identifier for a [Kubernetes service account](https://cloud.google.com/
1092
+ # kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
1093
+ # project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
1094
+ # email address that represents a Google group. For example, `admins@example.com`
1095
+ # . * `domain:`domain``: The G Suite domain (primary) that represents all the
1096
+ # users of that domain. For example, `google.com` or `example.com`. * `principal:
1097
+ # //iam.googleapis.com/locations/global/workforcePools/`pool_id`/subject/`
1098
+ # subject_attribute_value``: A single identity in a workforce identity pool. * `
1099
+ # principalSet://iam.googleapis.com/locations/global/workforcePools/`pool_id`/
1100
+ # group/`group_id``: All workforce identities in a group. * `principalSet://iam.
1101
+ # googleapis.com/locations/global/workforcePools/`pool_id`/attribute.`
1102
+ # attribute_name`/`attribute_value``: All workforce identities with a specific
1103
+ # attribute value. * `principalSet://iam.googleapis.com/locations/global/
1104
+ # workforcePools/`pool_id`/*`: All identities in a workforce identity pool. * `
1105
+ # principal://iam.googleapis.com/projects/`project_number`/locations/global/
1106
+ # workloadIdentityPools/`pool_id`/subject/`subject_attribute_value``: A single
1107
+ # identity in a workload identity pool. * `principalSet://iam.googleapis.com/
1108
+ # projects/`project_number`/locations/global/workloadIdentityPools/`pool_id`/
1109
+ # group/`group_id``: A workload identity pool group. * `principalSet://iam.
1110
+ # googleapis.com/projects/`project_number`/locations/global/
1111
+ # workloadIdentityPools/`pool_id`/attribute.`attribute_name`/`attribute_value``:
1112
+ # All identities in a workload identity pool with a certain attribute. * `
1113
+ # principalSet://iam.googleapis.com/projects/`project_number`/locations/global/
1114
+ # workloadIdentityPools/`pool_id`/*`: All identities in a workload identity pool.
1115
+ # * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
1116
+ # identifier) representing a user that has been recently deleted. For example, `
1117
+ # alice@example.com?uid=123456789012345678901`. If the user is recovered, this
1118
+ # value reverts to `user:`emailid`` and the recovered user retains the role in
1119
+ # the binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email
1120
+ # address (plus unique identifier) representing a service account that has been
1121
+ # recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
1122
+ # 123456789012345678901`. If the service account is undeleted, this value
1123
+ # reverts to `serviceAccount:`emailid`` and the undeleted service account
1124
+ # retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
1125
+ # An email address (plus unique identifier) representing a Google group that has
1126
+ # been recently deleted. For example, `admins@example.com?uid=
1127
+ # 123456789012345678901`. If the group is recovered, this value reverts to `
1128
+ # group:`emailid`` and the recovered group retains the role in the binding. * `
1129
+ # deleted:principal://iam.googleapis.com/locations/global/workforcePools/`
1130
+ # pool_id`/subject/`subject_attribute_value``: Deleted single identity in a
1131
+ # workforce identity pool. For example, `deleted:principal://iam.googleapis.com/
1132
+ # locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
1133
+ # Corresponds to the JSON property `members`
1134
+ # @return [Array<String>]
1135
+ attr_accessor :members
1136
+
1137
+ # Role that is assigned to the list of `members`, or principals. For example, `
1138
+ # roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM
1139
+ # roles and permissions, see the [IAM documentation](https://cloud.google.com/
1140
+ # iam/docs/roles-overview). For a list of the available pre-defined roles, see [
1141
+ # here](https://cloud.google.com/iam/docs/understanding-roles).
1142
+ # Corresponds to the JSON property `role`
1143
+ # @return [String]
1144
+ attr_accessor :role
1145
+
1146
+ def initialize(**args)
1147
+ update!(**args)
1148
+ end
1149
+
1150
+ # Update properties of this object
1151
+ def update!(**args)
1152
+ @condition = args[:condition] if args.key?(:condition)
1153
+ @members = args[:members] if args.key?(:members)
1154
+ @role = args[:role] if args.key?(:role)
1155
+ end
1156
+ end
1157
+
1158
+ # An Identity and Access Management (IAM) policy, which specifies access
1159
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
1160
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
1161
+ # Principals can be user accounts, service accounts, Google groups, and domains (
1162
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
1163
+ # an IAM predefined role or a user-created custom role. For some types of Google
1164
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
1165
+ # logical expression that allows access to a resource only if the expression
1166
+ # evaluates to `true`. A condition can add constraints based on attributes of
1167
+ # the request, the resource, or both. To learn which resources support
1168
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
1169
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
1170
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
1171
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
1172
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
1173
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
1174
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
1175
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
1176
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
1177
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
1178
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
1179
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
1180
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
1181
+ # title: expirable access description: Does not grant access after Sep 2020
1182
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
1183
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
1184
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
1185
+ class GoogleIamV1Policy
1186
+ include Google::Apis::Core::Hashable
1187
+
1188
+ # Specifies cloud audit logging configuration for this policy.
1189
+ # Corresponds to the JSON property `auditConfigs`
1190
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleIamV1AuditConfig>]
1191
+ attr_accessor :audit_configs
1192
+
1193
+ # Associates a list of `members`, or principals, with a `role`. Optionally, may
1194
+ # specify a `condition` that determines how and when the `bindings` are applied.
1195
+ # Each of the `bindings` must contain at least one principal. The `bindings` in
1196
+ # a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
1197
+ # can be Google groups. Each occurrence of a principal counts towards these
1198
+ # limits. For example, if the `bindings` grant 50 different roles to `user:alice@
1199
+ # example.com`, and not to any other principal, then you can add another 1,450
1200
+ # principals to the `bindings` in the `Policy`.
1201
+ # Corresponds to the JSON property `bindings`
1202
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleIamV1Binding>]
1203
+ attr_accessor :bindings
1204
+
1205
+ # `etag` is used for optimistic concurrency control as a way to help prevent
1206
+ # simultaneous updates of a policy from overwriting each other. It is strongly
1207
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
1208
+ # to perform policy updates in order to avoid race conditions: An `etag` is
1209
+ # returned in the response to `getIamPolicy`, and systems are expected to put
1210
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
1211
+ # applied to the same version of the policy. **Important:** If you use IAM
1212
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
1213
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
1214
+ # with a version `1` policy, and all of the conditions in the version `3` policy
1215
+ # are lost.
1216
+ # Corresponds to the JSON property `etag`
1217
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1218
+ # @return [String]
1219
+ attr_accessor :etag
1220
+
1221
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
1222
+ # Requests that specify an invalid value are rejected. Any operation that
1223
+ # affects conditional role bindings must specify version `3`. This requirement
1224
+ # applies to the following operations: * Getting a policy that includes a
1225
+ # conditional role binding * Adding a conditional role binding to a policy *
1226
+ # Changing a conditional role binding in a policy * Removing any role binding,
1227
+ # with or without a condition, from a policy that includes conditions **
1228
+ # Important:** If you use IAM Conditions, you must include the `etag` field
1229
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
1230
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
1231
+ # conditions in the version `3` policy are lost. If a policy does not include
1232
+ # any conditions, operations on that policy may specify any valid version or
1233
+ # leave the field unset. To learn which resources support conditions in their
1234
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
1235
+ # conditions/resource-policies).
1236
+ # Corresponds to the JSON property `version`
1237
+ # @return [Fixnum]
1238
+ attr_accessor :version
1239
+
1240
+ def initialize(**args)
1241
+ update!(**args)
1242
+ end
1243
+
1244
+ # Update properties of this object
1245
+ def update!(**args)
1246
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
1247
+ @bindings = args[:bindings] if args.key?(:bindings)
1248
+ @etag = args[:etag] if args.key?(:etag)
1249
+ @version = args[:version] if args.key?(:version)
1250
+ end
1251
+ end
1252
+
1253
+ # A deny rule in an IAM deny policy.
1254
+ class GoogleIamV2DenyRule
1255
+ include Google::Apis::Core::Hashable
1256
+
1257
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
1258
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
1259
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
1260
+ # "Summary size limit" description: "Determines if a summary is less than 100
1261
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
1262
+ # Requestor is owner" description: "Determines if requestor is the document
1263
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
1264
+ # Logic): title: "Public documents" description: "Determine whether the document
1265
+ # should be publicly visible" expression: "document.type != 'private' &&
1266
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
1267
+ # string" description: "Create a notification string with a timestamp."
1268
+ # expression: "'New message received at ' + string(document.create_time)" The
1269
+ # exact variables and functions that may be referenced within an expression are
1270
+ # determined by the service that evaluates it. See the service documentation for
1271
+ # additional information.
1272
+ # Corresponds to the JSON property `denialCondition`
1273
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleTypeExpr]
1274
+ attr_accessor :denial_condition
1275
+
1276
+ # The permissions that are explicitly denied by this rule. Each permission uses
1277
+ # the format ``service_fqdn`/`resource`.`verb``, where ``service_fqdn`` is the
1278
+ # fully qualified domain name for the service. For example, `iam.googleapis.com/
1279
+ # roles.list`.
1280
+ # Corresponds to the JSON property `deniedPermissions`
1281
+ # @return [Array<String>]
1282
+ attr_accessor :denied_permissions
1283
+
1284
+ # The identities that are prevented from using one or more permissions on
1285
+ # Google Cloud resources. This field can contain the following values: * `
1286
+ # principal://goog/subject/`email_id``: A specific Google Account. Includes
1287
+ # Gmail, Cloud Identity, and Google Workspace user accounts. For example, `
1288
+ # principal://goog/subject/alice@example.com`. * `principal://iam.googleapis.com/
1289
+ # projects/-/serviceAccounts/`service_account_id``: A Google Cloud service
1290
+ # account. For example, `principal://iam.googleapis.com/projects/-/
1291
+ # serviceAccounts/my-service-account@iam.gserviceaccount.com`. * `principalSet://
1292
+ # goog/group/`group_id``: A Google group. For example, `principalSet://goog/
1293
+ # group/admins@example.com`. * `principalSet://goog/public:all`: A special
1294
+ # identifier that represents any principal that is on the internet, even if they
1295
+ # do not have a Google Account or are not logged in. * `principalSet://goog/
1296
+ # cloudIdentityCustomerId/`customer_id``: All of the principals associated with
1297
+ # the specified Google Workspace or Cloud Identity customer ID. For example, `
1298
+ # principalSet://goog/cloudIdentityCustomerId/C01Abc35`. * `principal://iam.
1299
+ # googleapis.com/locations/global/workforcePools/`pool_id`/subject/`
1300
+ # subject_attribute_value``: A single identity in a workforce identity pool. * `
1301
+ # principalSet://iam.googleapis.com/locations/global/workforcePools/`pool_id`/
1302
+ # group/`group_id``: All workforce identities in a group. * `principalSet://iam.
1303
+ # googleapis.com/locations/global/workforcePools/`pool_id`/attribute.`
1304
+ # attribute_name`/`attribute_value``: All workforce identities with a specific
1305
+ # attribute value. * `principalSet://iam.googleapis.com/locations/global/
1306
+ # workforcePools/`pool_id`/*`: All identities in a workforce identity pool. * `
1307
+ # principal://iam.googleapis.com/projects/`project_number`/locations/global/
1308
+ # workloadIdentityPools/`pool_id`/subject/`subject_attribute_value``: A single
1309
+ # identity in a workload identity pool. * `principalSet://iam.googleapis.com/
1310
+ # projects/`project_number`/locations/global/workloadIdentityPools/`pool_id`/
1311
+ # group/`group_id``: A workload identity pool group. * `principalSet://iam.
1312
+ # googleapis.com/projects/`project_number`/locations/global/
1313
+ # workloadIdentityPools/`pool_id`/attribute.`attribute_name`/`attribute_value``:
1314
+ # All identities in a workload identity pool with a certain attribute. * `
1315
+ # principalSet://iam.googleapis.com/projects/`project_number`/locations/global/
1316
+ # workloadIdentityPools/`pool_id`/*`: All identities in a workload identity pool.
1317
+ # * `principalSet://cloudresourcemanager.googleapis.com/[projects|folders|
1318
+ # organizations]/`project_number|folder_number|org_number`/type/ServiceAccount`:
1319
+ # All service accounts grouped under a resource (project, folder, or
1320
+ # organization). * `principalSet://cloudresourcemanager.googleapis.com/[projects|
1321
+ # folders|organizations]/`project_number|folder_number|org_number`/type/
1322
+ # ServiceAgent`: All service agents grouped under a resource (project, folder,
1323
+ # or organization). * `deleted:principal://goog/subject/`email_id`?uid=`uid``: A
1324
+ # specific Google Account that was deleted recently. For example, `deleted:
1325
+ # principal://goog/subject/alice@example.com?uid=1234567890`. If the Google
1326
+ # Account is recovered, this identifier reverts to the standard identifier for a
1327
+ # Google Account. * `deleted:principalSet://goog/group/`group_id`?uid=`uid``: A
1328
+ # Google group that was deleted recently. For example, `deleted:principalSet://
1329
+ # goog/group/admins@example.com?uid=1234567890`. If the Google group is restored,
1330
+ # this identifier reverts to the standard identifier for a Google group. * `
1331
+ # deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/`
1332
+ # service_account_id`?uid=`uid``: A Google Cloud service account that was
1333
+ # deleted recently. For example, `deleted:principal://iam.googleapis.com/
1334
+ # projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=
1335
+ # 1234567890`. If the service account is undeleted, this identifier reverts to
1336
+ # the standard identifier for a service account. * `deleted:principal://iam.
1337
+ # googleapis.com/locations/global/workforcePools/`pool_id`/subject/`
1338
+ # subject_attribute_value``: Deleted single identity in a workforce identity
1339
+ # pool. For example, `deleted:principal://iam.googleapis.com/locations/global/
1340
+ # workforcePools/my-pool-id/subject/my-subject-attribute-value`.
1341
+ # Corresponds to the JSON property `deniedPrincipals`
1342
+ # @return [Array<String>]
1343
+ attr_accessor :denied_principals
1344
+
1345
+ # Specifies the permissions that this rule excludes from the set of denied
1346
+ # permissions given by `denied_permissions`. If a permission appears in `
1347
+ # denied_permissions` _and_ in `exception_permissions` then it will _not_ be
1348
+ # denied. The excluded permissions can be specified using the same syntax as `
1349
+ # denied_permissions`.
1350
+ # Corresponds to the JSON property `exceptionPermissions`
1351
+ # @return [Array<String>]
1352
+ attr_accessor :exception_permissions
1353
+
1354
+ # The identities that are excluded from the deny rule, even if they are listed
1355
+ # in the `denied_principals`. For example, you could add a Google group to the `
1356
+ # denied_principals`, then exclude specific users who belong to that group. This
1357
+ # field can contain the same values as the `denied_principals` field, excluding `
1358
+ # principalSet://goog/public:all`, which represents all users on the internet.
1359
+ # Corresponds to the JSON property `exceptionPrincipals`
1360
+ # @return [Array<String>]
1361
+ attr_accessor :exception_principals
1362
+
1363
+ def initialize(**args)
1364
+ update!(**args)
1365
+ end
1366
+
1367
+ # Update properties of this object
1368
+ def update!(**args)
1369
+ @denial_condition = args[:denial_condition] if args.key?(:denial_condition)
1370
+ @denied_permissions = args[:denied_permissions] if args.key?(:denied_permissions)
1371
+ @denied_principals = args[:denied_principals] if args.key?(:denied_principals)
1372
+ @exception_permissions = args[:exception_permissions] if args.key?(:exception_permissions)
1373
+ @exception_principals = args[:exception_principals] if args.key?(:exception_principals)
1374
+ end
1375
+ end
1376
+
1377
+ # Data for an IAM policy.
1378
+ class GoogleIamV2Policy
1379
+ include Google::Apis::Core::Hashable
1380
+
1381
+ # A key-value map to store arbitrary metadata for the `Policy`. Keys can be up
1382
+ # to 63 characters. Values can be up to 255 characters.
1383
+ # Corresponds to the JSON property `annotations`
1384
+ # @return [Hash<String,String>]
1385
+ attr_accessor :annotations
1386
+
1387
+ # Output only. The time when the `Policy` was created.
1388
+ # Corresponds to the JSON property `createTime`
1389
+ # @return [String]
1390
+ attr_accessor :create_time
1391
+
1392
+ # Output only. The time when the `Policy` was deleted. Empty if the policy is
1393
+ # not deleted.
1394
+ # Corresponds to the JSON property `deleteTime`
1395
+ # @return [String]
1396
+ attr_accessor :delete_time
1397
+
1398
+ # A user-specified description of the `Policy`. This value can be up to 63
1399
+ # characters.
1400
+ # Corresponds to the JSON property `displayName`
1401
+ # @return [String]
1402
+ attr_accessor :display_name
1403
+
1404
+ # An opaque tag that identifies the current version of the `Policy`. IAM uses
1405
+ # this value to help manage concurrent updates, so they do not cause one update
1406
+ # to be overwritten by another. If this field is present in a
1407
+ # CreatePolicyRequest, the value is ignored.
1408
+ # Corresponds to the JSON property `etag`
1409
+ # @return [String]
1410
+ attr_accessor :etag
1411
+
1412
+ # Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
1413
+ # Corresponds to the JSON property `kind`
1414
+ # @return [String]
1415
+ attr_accessor :kind
1416
+
1417
+ # Immutable. The resource name of the `Policy`, which must be unique. Format: `
1418
+ # policies/`attachment_point`/denypolicies/`policy_id`` The attachment point is
1419
+ # identified by its URL-encoded full resource name, which means that the forward-
1420
+ # slash character, `/`, must be written as `%2F`. For example, `policies/
1421
+ # cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-
1422
+ # deny-policy`. For organizations and folders, use the numeric ID in the full
1423
+ # resource name. For projects, requests can use the alphanumeric or the numeric
1424
+ # ID. Responses always contain the numeric ID.
1425
+ # Corresponds to the JSON property `name`
1426
+ # @return [String]
1427
+ attr_accessor :name
1428
+
1429
+ # A list of rules that specify the behavior of the `Policy`. All of the rules
1430
+ # should be of the `kind` specified in the `Policy`.
1431
+ # Corresponds to the JSON property `rules`
1432
+ # @return [Array<Google::Apis::PolicytroubleshooterV3::GoogleIamV2PolicyRule>]
1433
+ attr_accessor :rules
1434
+
1435
+ # Immutable. The globally unique ID of the `Policy`. Assigned automatically when
1436
+ # the `Policy` is created.
1437
+ # Corresponds to the JSON property `uid`
1438
+ # @return [String]
1439
+ attr_accessor :uid
1440
+
1441
+ # Output only. The time when the `Policy` was last updated.
1442
+ # Corresponds to the JSON property `updateTime`
1443
+ # @return [String]
1444
+ attr_accessor :update_time
1445
+
1446
+ def initialize(**args)
1447
+ update!(**args)
1448
+ end
1449
+
1450
+ # Update properties of this object
1451
+ def update!(**args)
1452
+ @annotations = args[:annotations] if args.key?(:annotations)
1453
+ @create_time = args[:create_time] if args.key?(:create_time)
1454
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
1455
+ @display_name = args[:display_name] if args.key?(:display_name)
1456
+ @etag = args[:etag] if args.key?(:etag)
1457
+ @kind = args[:kind] if args.key?(:kind)
1458
+ @name = args[:name] if args.key?(:name)
1459
+ @rules = args[:rules] if args.key?(:rules)
1460
+ @uid = args[:uid] if args.key?(:uid)
1461
+ @update_time = args[:update_time] if args.key?(:update_time)
1462
+ end
1463
+ end
1464
+
1465
+ # A single rule in a `Policy`.
1466
+ class GoogleIamV2PolicyRule
1467
+ include Google::Apis::Core::Hashable
1468
+
1469
+ # A deny rule in an IAM deny policy.
1470
+ # Corresponds to the JSON property `denyRule`
1471
+ # @return [Google::Apis::PolicytroubleshooterV3::GoogleIamV2DenyRule]
1472
+ attr_accessor :deny_rule
1473
+
1474
+ # A user-specified description of the rule. This value can be up to 256
1475
+ # characters.
1476
+ # Corresponds to the JSON property `description`
1477
+ # @return [String]
1478
+ attr_accessor :description
1479
+
1480
+ def initialize(**args)
1481
+ update!(**args)
1482
+ end
1483
+
1484
+ # Update properties of this object
1485
+ def update!(**args)
1486
+ @deny_rule = args[:deny_rule] if args.key?(:deny_rule)
1487
+ @description = args[:description] if args.key?(:description)
1488
+ end
1489
+ end
1490
+
1491
+ # The `Status` type defines a logical error model that is suitable for different
1492
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1493
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1494
+ # data: error code, error message, and error details. You can find out more
1495
+ # about this error model and how to work with it in the [API Design Guide](https:
1496
+ # //cloud.google.com/apis/design/errors).
1497
+ class GoogleRpcStatus
1498
+ include Google::Apis::Core::Hashable
1499
+
1500
+ # The status code, which should be an enum value of google.rpc.Code.
1501
+ # Corresponds to the JSON property `code`
1502
+ # @return [Fixnum]
1503
+ attr_accessor :code
1504
+
1505
+ # A list of messages that carry the error details. There is a common set of
1506
+ # message types for APIs to use.
1507
+ # Corresponds to the JSON property `details`
1508
+ # @return [Array<Hash<String,Object>>]
1509
+ attr_accessor :details
1510
+
1511
+ # A developer-facing error message, which should be in English. Any user-facing
1512
+ # error message should be localized and sent in the google.rpc.Status.details
1513
+ # field, or localized by the client.
1514
+ # Corresponds to the JSON property `message`
1515
+ # @return [String]
1516
+ attr_accessor :message
1517
+
1518
+ def initialize(**args)
1519
+ update!(**args)
1520
+ end
1521
+
1522
+ # Update properties of this object
1523
+ def update!(**args)
1524
+ @code = args[:code] if args.key?(:code)
1525
+ @details = args[:details] if args.key?(:details)
1526
+ @message = args[:message] if args.key?(:message)
1527
+ end
1528
+ end
1529
+
1530
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
1531
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
1532
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
1533
+ # "Summary size limit" description: "Determines if a summary is less than 100
1534
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
1535
+ # Requestor is owner" description: "Determines if requestor is the document
1536
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
1537
+ # Logic): title: "Public documents" description: "Determine whether the document
1538
+ # should be publicly visible" expression: "document.type != 'private' &&
1539
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
1540
+ # string" description: "Create a notification string with a timestamp."
1541
+ # expression: "'New message received at ' + string(document.create_time)" The
1542
+ # exact variables and functions that may be referenced within an expression are
1543
+ # determined by the service that evaluates it. See the service documentation for
1544
+ # additional information.
1545
+ class GoogleTypeExpr
1546
+ include Google::Apis::Core::Hashable
1547
+
1548
+ # Optional. Description of the expression. This is a longer text which describes
1549
+ # the expression, e.g. when hovered over it in a UI.
1550
+ # Corresponds to the JSON property `description`
1551
+ # @return [String]
1552
+ attr_accessor :description
1553
+
1554
+ # Textual representation of an expression in Common Expression Language syntax.
1555
+ # Corresponds to the JSON property `expression`
1556
+ # @return [String]
1557
+ attr_accessor :expression
1558
+
1559
+ # Optional. String indicating the location of the expression for error reporting,
1560
+ # e.g. a file name and a position in the file.
1561
+ # Corresponds to the JSON property `location`
1562
+ # @return [String]
1563
+ attr_accessor :location
1564
+
1565
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
1566
+ # This can be used e.g. in UIs which allow to enter the expression.
1567
+ # Corresponds to the JSON property `title`
1568
+ # @return [String]
1569
+ attr_accessor :title
1570
+
1571
+ def initialize(**args)
1572
+ update!(**args)
1573
+ end
1574
+
1575
+ # Update properties of this object
1576
+ def update!(**args)
1577
+ @description = args[:description] if args.key?(:description)
1578
+ @expression = args[:expression] if args.key?(:expression)
1579
+ @location = args[:location] if args.key?(:location)
1580
+ @title = args[:title] if args.key?(:title)
1581
+ end
1582
+ end
1583
+ end
1584
+ end
1585
+ end