google-apis-policysimulator_v1beta 0.16.0 → 0.17.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.
@@ -22,6 +22,351 @@ module Google
22
22
  module Apis
23
23
  module PolicysimulatorV1beta
24
24
 
25
+ # Similar to PolicySpec but with an extra 'launch' field for launch reference.
26
+ # The PolicySpec here is specific for dry-run.
27
+ class GoogleCloudOrgpolicyV2AlternatePolicySpec
28
+ include Google::Apis::Core::Hashable
29
+
30
+ # Reference to the launch that will be used while audit logging and to control
31
+ # the launch. Should be set only in the alternate policy.
32
+ # Corresponds to the JSON property `launch`
33
+ # @return [String]
34
+ attr_accessor :launch
35
+
36
+ # Defines a Google Cloud policy specification which is used to specify
37
+ # constraints for configurations of Google Cloud resources.
38
+ # Corresponds to the JSON property `spec`
39
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2PolicySpec]
40
+ attr_accessor :spec
41
+
42
+ def initialize(**args)
43
+ update!(**args)
44
+ end
45
+
46
+ # Update properties of this object
47
+ def update!(**args)
48
+ @launch = args[:launch] if args.key?(:launch)
49
+ @spec = args[:spec] if args.key?(:spec)
50
+ end
51
+ end
52
+
53
+ # A custom constraint defined by customers which can *only* be applied to the
54
+ # given resource types and organization. By creating a custom constraint,
55
+ # customers can apply policies of this custom constraint. *Creating a custom
56
+ # constraint itself does NOT apply any policy enforcement*.
57
+ class GoogleCloudOrgpolicyV2CustomConstraint
58
+ include Google::Apis::Core::Hashable
59
+
60
+ # Allow or deny type.
61
+ # Corresponds to the JSON property `actionType`
62
+ # @return [String]
63
+ attr_accessor :action_type
64
+
65
+ # A Common Expression Language (CEL) condition which is used in the evaluation
66
+ # of the constraint. For example: `resource.instanceName.matches("[production|
67
+ # test]_.*_(\d)+")` or, `resource.management.auto_upgrade == true` The max
68
+ # length of the condition is 1000 characters.
69
+ # Corresponds to the JSON property `condition`
70
+ # @return [String]
71
+ attr_accessor :condition
72
+
73
+ # Detailed information about this custom policy constraint. The max length of
74
+ # the description is 2000 characters.
75
+ # Corresponds to the JSON property `description`
76
+ # @return [String]
77
+ attr_accessor :description
78
+
79
+ # One line display name for the UI. The max length of the display_name is 200
80
+ # characters.
81
+ # Corresponds to the JSON property `displayName`
82
+ # @return [String]
83
+ attr_accessor :display_name
84
+
85
+ # All the operations being applied for this constraint.
86
+ # Corresponds to the JSON property `methodTypes`
87
+ # @return [Array<String>]
88
+ attr_accessor :method_types
89
+
90
+ # Immutable. Name of the constraint. This is unique within the organization.
91
+ # Format of the name should be * `organizations/`organization_id`/
92
+ # customConstraints/`custom_constraint_id`` Example: `organizations/123/
93
+ # customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters
94
+ # and the minimum length is 1. Note that the prefix `organizations/`
95
+ # organization_id`/customConstraints/` is not counted.
96
+ # Corresponds to the JSON property `name`
97
+ # @return [String]
98
+ attr_accessor :name
99
+
100
+ # Immutable. The resource instance type on which this policy applies. Format
101
+ # will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
102
+ # Corresponds to the JSON property `resourceTypes`
103
+ # @return [Array<String>]
104
+ attr_accessor :resource_types
105
+
106
+ # Output only. The last time this custom constraint was updated. This represents
107
+ # the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint`
108
+ # methods were called.
109
+ # Corresponds to the JSON property `updateTime`
110
+ # @return [String]
111
+ attr_accessor :update_time
112
+
113
+ def initialize(**args)
114
+ update!(**args)
115
+ end
116
+
117
+ # Update properties of this object
118
+ def update!(**args)
119
+ @action_type = args[:action_type] if args.key?(:action_type)
120
+ @condition = args[:condition] if args.key?(:condition)
121
+ @description = args[:description] if args.key?(:description)
122
+ @display_name = args[:display_name] if args.key?(:display_name)
123
+ @method_types = args[:method_types] if args.key?(:method_types)
124
+ @name = args[:name] if args.key?(:name)
125
+ @resource_types = args[:resource_types] if args.key?(:resource_types)
126
+ @update_time = args[:update_time] if args.key?(:update_time)
127
+ end
128
+ end
129
+
130
+ # Defines an organization policy which is used to specify constraints for
131
+ # configurations of Google Cloud resources.
132
+ class GoogleCloudOrgpolicyV2Policy
133
+ include Google::Apis::Core::Hashable
134
+
135
+ # Similar to PolicySpec but with an extra 'launch' field for launch reference.
136
+ # The PolicySpec here is specific for dry-run.
137
+ # Corresponds to the JSON property `alternate`
138
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2AlternatePolicySpec]
139
+ attr_accessor :alternate
140
+
141
+ # Defines a Google Cloud policy specification which is used to specify
142
+ # constraints for configurations of Google Cloud resources.
143
+ # Corresponds to the JSON property `dryRunSpec`
144
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2PolicySpec]
145
+ attr_accessor :dry_run_spec
146
+
147
+ # Optional. An opaque tag indicating the current state of the policy, used for
148
+ # concurrency control. This 'etag' is computed by the server based on the value
149
+ # of other fields, and may be sent on update and delete requests to ensure the
150
+ # client has an up-to-date value before proceeding.
151
+ # Corresponds to the JSON property `etag`
152
+ # @return [String]
153
+ attr_accessor :etag
154
+
155
+ # Immutable. The resource name of the policy. Must be one of the following forms,
156
+ # where `constraint_name` is the name of the constraint which this policy
157
+ # configures: * `projects/`project_number`/policies/`constraint_name`` * `
158
+ # folders/`folder_id`/policies/`constraint_name`` * `organizations/`
159
+ # organization_id`/policies/`constraint_name`` For example, `projects/123/
160
+ # policies/compute.disableSerialPortAccess`. Note: `projects/`project_id`/
161
+ # policies/`constraint_name`` is also an acceptable name for API requests, but
162
+ # responses will return the name using the equivalent project number.
163
+ # Corresponds to the JSON property `name`
164
+ # @return [String]
165
+ attr_accessor :name
166
+
167
+ # Defines a Google Cloud policy specification which is used to specify
168
+ # constraints for configurations of Google Cloud resources.
169
+ # Corresponds to the JSON property `spec`
170
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2PolicySpec]
171
+ attr_accessor :spec
172
+
173
+ def initialize(**args)
174
+ update!(**args)
175
+ end
176
+
177
+ # Update properties of this object
178
+ def update!(**args)
179
+ @alternate = args[:alternate] if args.key?(:alternate)
180
+ @dry_run_spec = args[:dry_run_spec] if args.key?(:dry_run_spec)
181
+ @etag = args[:etag] if args.key?(:etag)
182
+ @name = args[:name] if args.key?(:name)
183
+ @spec = args[:spec] if args.key?(:spec)
184
+ end
185
+ end
186
+
187
+ # Defines a Google Cloud policy specification which is used to specify
188
+ # constraints for configurations of Google Cloud resources.
189
+ class GoogleCloudOrgpolicyV2PolicySpec
190
+ include Google::Apis::Core::Hashable
191
+
192
+ # An opaque tag indicating the current version of the policySpec, used for
193
+ # concurrency control. This field is ignored if used in a `CreatePolicy` request.
194
+ # When the policy is returned from either a `GetPolicy` or a `ListPolicies`
195
+ # request, this `etag` indicates the version of the current policySpec to use
196
+ # when executing a read-modify-write loop. When the policy is returned from a `
197
+ # GetEffectivePolicy` request, the `etag` will be unset.
198
+ # Corresponds to the JSON property `etag`
199
+ # @return [String]
200
+ attr_accessor :etag
201
+
202
+ # Determines the inheritance behavior for this policy. If `inherit_from_parent`
203
+ # is true, policy rules set higher up in the hierarchy (up to the closest root)
204
+ # are inherited and present in the effective policy. If it is false, then no
205
+ # rules are inherited, and this policy becomes the new root for evaluation. This
206
+ # field can be set only for policies which configure list constraints.
207
+ # Corresponds to the JSON property `inheritFromParent`
208
+ # @return [Boolean]
209
+ attr_accessor :inherit_from_parent
210
+ alias_method :inherit_from_parent?, :inherit_from_parent
211
+
212
+ # Ignores policies set above this resource and restores the `constraint_default`
213
+ # enforcement behavior of the specific constraint at this resource. This field
214
+ # can be set in policies for either list or boolean constraints. If set, `rules`
215
+ # must be empty and `inherit_from_parent` must be set to false.
216
+ # Corresponds to the JSON property `reset`
217
+ # @return [Boolean]
218
+ attr_accessor :reset
219
+ alias_method :reset?, :reset
220
+
221
+ # In policies for boolean constraints, the following requirements apply: - There
222
+ # must be one and only one policy rule where condition is unset. - Boolean
223
+ # policy rules with conditions must set `enforced` to the opposite of the policy
224
+ # rule without a condition. - During policy evaluation, policy rules with
225
+ # conditions that are true for a target resource take precedence.
226
+ # Corresponds to the JSON property `rules`
227
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2PolicySpecPolicyRule>]
228
+ attr_accessor :rules
229
+
230
+ # Output only. The time stamp this was previously updated. This represents the
231
+ # last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
232
+ # Corresponds to the JSON property `updateTime`
233
+ # @return [String]
234
+ attr_accessor :update_time
235
+
236
+ def initialize(**args)
237
+ update!(**args)
238
+ end
239
+
240
+ # Update properties of this object
241
+ def update!(**args)
242
+ @etag = args[:etag] if args.key?(:etag)
243
+ @inherit_from_parent = args[:inherit_from_parent] if args.key?(:inherit_from_parent)
244
+ @reset = args[:reset] if args.key?(:reset)
245
+ @rules = args[:rules] if args.key?(:rules)
246
+ @update_time = args[:update_time] if args.key?(:update_time)
247
+ end
248
+ end
249
+
250
+ # A rule used to express this policy.
251
+ class GoogleCloudOrgpolicyV2PolicySpecPolicyRule
252
+ include Google::Apis::Core::Hashable
253
+
254
+ # Setting this to true means that all values are allowed. This field can be set
255
+ # only in policies for list constraints.
256
+ # Corresponds to the JSON property `allowAll`
257
+ # @return [Boolean]
258
+ attr_accessor :allow_all
259
+ alias_method :allow_all?, :allow_all
260
+
261
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
262
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
263
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
264
+ # "Summary size limit" description: "Determines if a summary is less than 100
265
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
266
+ # Requestor is owner" description: "Determines if requestor is the document
267
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
268
+ # Logic): title: "Public documents" description: "Determine whether the document
269
+ # should be publicly visible" expression: "document.type != 'private' &&
270
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
271
+ # string" description: "Create a notification string with a timestamp."
272
+ # expression: "'New message received at ' + string(document.create_time)" The
273
+ # exact variables and functions that may be referenced within an expression are
274
+ # determined by the service that evaluates it. See the service documentation for
275
+ # additional information.
276
+ # Corresponds to the JSON property `condition`
277
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleTypeExpr]
278
+ attr_accessor :condition
279
+
280
+ # Setting this to true means that all values are denied. This field can be set
281
+ # only in policies for list constraints.
282
+ # Corresponds to the JSON property `denyAll`
283
+ # @return [Boolean]
284
+ attr_accessor :deny_all
285
+ alias_method :deny_all?, :deny_all
286
+
287
+ # If `true`, then the policy is enforced. If `false`, then any configuration is
288
+ # acceptable. This field can be set in policies for boolean constraints, custom
289
+ # constraints and managed constraints.
290
+ # Corresponds to the JSON property `enforce`
291
+ # @return [Boolean]
292
+ attr_accessor :enforce
293
+ alias_method :enforce?, :enforce
294
+
295
+ # Optional. Required for managed constraints if parameters are defined. Passes
296
+ # parameter values when policy enforcement is enabled. Ensure that parameter
297
+ # value types match those defined in the constraint definition. For example: ` "
298
+ # allowedLocations" : ["us-east1", "us-west1"], "allowAll" : true `
299
+ # Corresponds to the JSON property `parameters`
300
+ # @return [Hash<String,Object>]
301
+ attr_accessor :parameters
302
+
303
+ # A message that holds specific allowed and denied values. This message can
304
+ # define specific values and subtrees of the Resource Manager resource hierarchy
305
+ # (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is
306
+ # achieved by using the `under:` and optional `is:` prefixes. The `under:`
307
+ # prefix is used to denote resource subtree values. The `is:` prefix is used to
308
+ # denote specific values, and is required only if the value contains a ":".
309
+ # Values prefixed with "is:" are treated the same as values with no prefix.
310
+ # Ancestry subtrees must be in one of the following formats: - `projects/` (for
311
+ # example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`)
312
+ # - `organizations/` (for example, `organizations/1234`) The `supports_under`
313
+ # field of the associated `Constraint` defines whether ancestry prefixes can be
314
+ # used.
315
+ # Corresponds to the JSON property `values`
316
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues]
317
+ attr_accessor :values
318
+
319
+ def initialize(**args)
320
+ update!(**args)
321
+ end
322
+
323
+ # Update properties of this object
324
+ def update!(**args)
325
+ @allow_all = args[:allow_all] if args.key?(:allow_all)
326
+ @condition = args[:condition] if args.key?(:condition)
327
+ @deny_all = args[:deny_all] if args.key?(:deny_all)
328
+ @enforce = args[:enforce] if args.key?(:enforce)
329
+ @parameters = args[:parameters] if args.key?(:parameters)
330
+ @values = args[:values] if args.key?(:values)
331
+ end
332
+ end
333
+
334
+ # A message that holds specific allowed and denied values. This message can
335
+ # define specific values and subtrees of the Resource Manager resource hierarchy
336
+ # (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is
337
+ # achieved by using the `under:` and optional `is:` prefixes. The `under:`
338
+ # prefix is used to denote resource subtree values. The `is:` prefix is used to
339
+ # denote specific values, and is required only if the value contains a ":".
340
+ # Values prefixed with "is:" are treated the same as values with no prefix.
341
+ # Ancestry subtrees must be in one of the following formats: - `projects/` (for
342
+ # example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`)
343
+ # - `organizations/` (for example, `organizations/1234`) The `supports_under`
344
+ # field of the associated `Constraint` defines whether ancestry prefixes can be
345
+ # used.
346
+ class GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues
347
+ include Google::Apis::Core::Hashable
348
+
349
+ # List of values allowed at this resource.
350
+ # Corresponds to the JSON property `allowedValues`
351
+ # @return [Array<String>]
352
+ attr_accessor :allowed_values
353
+
354
+ # List of values denied at this resource.
355
+ # Corresponds to the JSON property `deniedValues`
356
+ # @return [Array<String>]
357
+ attr_accessor :denied_values
358
+
359
+ def initialize(**args)
360
+ update!(**args)
361
+ end
362
+
363
+ # Update properties of this object
364
+ def update!(**args)
365
+ @allowed_values = args[:allowed_values] if args.key?(:allowed_values)
366
+ @denied_values = args[:denied_values] if args.key?(:denied_values)
367
+ end
368
+ end
369
+
25
370
  # A resource describing a `Replay`, or simulation.
26
371
  class GoogleCloudPolicysimulatorV1Replay
27
372
  include Google::Apis::Core::Hashable
@@ -180,6 +525,1064 @@ module Google
180
525
  end
181
526
  end
182
527
 
528
+ # A summary and comparison of the principal's access under the current (baseline)
529
+ # policies and the proposed (simulated) policies for a single access tuple.
530
+ class GoogleCloudPolicysimulatorV1betaAccessStateDiff
531
+ include Google::Apis::Core::Hashable
532
+
533
+ # How the principal's access, specified in the AccessState field, changed
534
+ # between the current (baseline) policies and proposed (simulated) policies.
535
+ # Corresponds to the JSON property `accessChange`
536
+ # @return [String]
537
+ attr_accessor :access_change
538
+
539
+ # Details about how a set of policies, listed in ExplainedPolicy, resulted in a
540
+ # certain AccessState when replaying an access tuple.
541
+ # Corresponds to the JSON property `baseline`
542
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaExplainedAccess]
543
+ attr_accessor :baseline
544
+
545
+ # Details about how a set of policies, listed in ExplainedPolicy, resulted in a
546
+ # certain AccessState when replaying an access tuple.
547
+ # Corresponds to the JSON property `simulated`
548
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaExplainedAccess]
549
+ attr_accessor :simulated
550
+
551
+ def initialize(**args)
552
+ update!(**args)
553
+ end
554
+
555
+ # Update properties of this object
556
+ def update!(**args)
557
+ @access_change = args[:access_change] if args.key?(:access_change)
558
+ @baseline = args[:baseline] if args.key?(:baseline)
559
+ @simulated = args[:simulated] if args.key?(:simulated)
560
+ end
561
+ end
562
+
563
+ # Information about the principal, resource, and permission to check.
564
+ class GoogleCloudPolicysimulatorV1betaAccessTuple
565
+ include Google::Apis::Core::Hashable
566
+
567
+ # Required. The full resource name that identifies the resource. For example, `//
568
+ # compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-
569
+ # instance`. For examples of full resource names for Google Cloud services, see
570
+ # https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
571
+ # Corresponds to the JSON property `fullResourceName`
572
+ # @return [String]
573
+ attr_accessor :full_resource_name
574
+
575
+ # Required. The IAM permission to check for the specified principal and resource.
576
+ # For a complete list of IAM permissions, see https://cloud.google.com/iam/help/
577
+ # permissions/reference. For a complete list of predefined IAM roles and the
578
+ # permissions in each role, see https://cloud.google.com/iam/help/roles/
579
+ # reference.
580
+ # Corresponds to the JSON property `permission`
581
+ # @return [String]
582
+ attr_accessor :permission
583
+
584
+ # Required. The principal whose access you want to check, in the form of the
585
+ # email address that represents that principal. For example, `alice@example.com`
586
+ # or `my-service-account@my-project.iam.gserviceaccount.com`. The principal must
587
+ # be a Google Account or a service account. Other types of principals are not
588
+ # supported.
589
+ # Corresponds to the JSON property `principal`
590
+ # @return [String]
591
+ attr_accessor :principal
592
+
593
+ def initialize(**args)
594
+ update!(**args)
595
+ end
596
+
597
+ # Update properties of this object
598
+ def update!(**args)
599
+ @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
600
+ @permission = args[:permission] if args.key?(:permission)
601
+ @principal = args[:principal] if args.key?(:principal)
602
+ end
603
+ end
604
+
605
+ # Details about how a binding in a policy affects a principal's ability to use a
606
+ # permission.
607
+ class GoogleCloudPolicysimulatorV1betaBindingExplanation
608
+ include Google::Apis::Core::Hashable
609
+
610
+ # Required. Indicates whether _this binding_ provides the specified permission
611
+ # to the specified principal for the specified resource. This field does _not_
612
+ # indicate whether the principal actually has the permission for the resource.
613
+ # There might be another binding that overrides this binding. To determine
614
+ # whether the principal actually has the permission, use the `access` field in
615
+ # the TroubleshootIamPolicyResponse.
616
+ # Corresponds to the JSON property `access`
617
+ # @return [String]
618
+ attr_accessor :access
619
+
620
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
621
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
622
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
623
+ # "Summary size limit" description: "Determines if a summary is less than 100
624
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
625
+ # Requestor is owner" description: "Determines if requestor is the document
626
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
627
+ # Logic): title: "Public documents" description: "Determine whether the document
628
+ # should be publicly visible" expression: "document.type != 'private' &&
629
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
630
+ # string" description: "Create a notification string with a timestamp."
631
+ # expression: "'New message received at ' + string(document.create_time)" The
632
+ # exact variables and functions that may be referenced within an expression are
633
+ # determined by the service that evaluates it. See the service documentation for
634
+ # additional information.
635
+ # Corresponds to the JSON property `condition`
636
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleTypeExpr]
637
+ attr_accessor :condition
638
+
639
+ # Indicates whether each principal in the binding includes the principal
640
+ # specified in the request, either directly or indirectly. Each key identifies a
641
+ # principal in the binding, and each value indicates whether the principal in
642
+ # the binding includes the principal in the request. For example, suppose that a
643
+ # binding includes the following principals: * `user:alice@example.com` * `group:
644
+ # product-eng@example.com` The principal in the replayed access tuple is `user:
645
+ # bob@example.com`. This user is a principal of the group `group:product-eng@
646
+ # example.com`. For the first principal in the binding, the key is `user:alice@
647
+ # example.com`, and the `membership` field in the value is set to `
648
+ # MEMBERSHIP_NOT_INCLUDED`. For the second principal in the binding, the key is `
649
+ # group:product-eng@example.com`, and the `membership` field in the value is set
650
+ # to `MEMBERSHIP_INCLUDED`.
651
+ # Corresponds to the JSON property `memberships`
652
+ # @return [Hash<String,Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership>]
653
+ attr_accessor :memberships
654
+
655
+ # The relevance of this binding to the overall determination for the entire
656
+ # policy.
657
+ # Corresponds to the JSON property `relevance`
658
+ # @return [String]
659
+ attr_accessor :relevance
660
+
661
+ # The role that this binding grants. For example, `roles/compute.serviceAgent`.
662
+ # For a complete list of predefined IAM roles, as well as the permissions in
663
+ # each role, see https://cloud.google.com/iam/help/roles/reference.
664
+ # Corresponds to the JSON property `role`
665
+ # @return [String]
666
+ attr_accessor :role
667
+
668
+ # Indicates whether the role granted by this binding contains the specified
669
+ # permission.
670
+ # Corresponds to the JSON property `rolePermission`
671
+ # @return [String]
672
+ attr_accessor :role_permission
673
+
674
+ # The relevance of the permission's existence, or nonexistence, in the role to
675
+ # the overall determination for the entire policy.
676
+ # Corresponds to the JSON property `rolePermissionRelevance`
677
+ # @return [String]
678
+ attr_accessor :role_permission_relevance
679
+
680
+ def initialize(**args)
681
+ update!(**args)
682
+ end
683
+
684
+ # Update properties of this object
685
+ def update!(**args)
686
+ @access = args[:access] if args.key?(:access)
687
+ @condition = args[:condition] if args.key?(:condition)
688
+ @memberships = args[:memberships] if args.key?(:memberships)
689
+ @relevance = args[:relevance] if args.key?(:relevance)
690
+ @role = args[:role] if args.key?(:role)
691
+ @role_permission = args[:role_permission] if args.key?(:role_permission)
692
+ @role_permission_relevance = args[:role_permission_relevance] if args.key?(:role_permission_relevance)
693
+ end
694
+ end
695
+
696
+ # Details about whether the binding includes the principal.
697
+ class GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership
698
+ include Google::Apis::Core::Hashable
699
+
700
+ # Indicates whether the binding includes the principal.
701
+ # Corresponds to the JSON property `membership`
702
+ # @return [String]
703
+ attr_accessor :membership
704
+
705
+ # The relevance of the principal's status to the overall determination for the
706
+ # binding.
707
+ # Corresponds to the JSON property `relevance`
708
+ # @return [String]
709
+ attr_accessor :relevance
710
+
711
+ def initialize(**args)
712
+ update!(**args)
713
+ end
714
+
715
+ # Update properties of this object
716
+ def update!(**args)
717
+ @membership = args[:membership] if args.key?(:membership)
718
+ @relevance = args[:relevance] if args.key?(:relevance)
719
+ end
720
+ end
721
+
722
+ # CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
723
+ # OrgPolicyViolationsPreview generations operation.
724
+ class GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata
725
+ include Google::Apis::Core::Hashable
726
+
727
+ # Time when the request was received.
728
+ # Corresponds to the JSON property `requestTime`
729
+ # @return [String]
730
+ attr_accessor :request_time
731
+
732
+ # Total number of resources that need scanning. Should equal resource_scanned +
733
+ # resources_pending
734
+ # Corresponds to the JSON property `resourcesFound`
735
+ # @return [Fixnum]
736
+ attr_accessor :resources_found
737
+
738
+ # Number of resources still to scan.
739
+ # Corresponds to the JSON property `resourcesPending`
740
+ # @return [Fixnum]
741
+ attr_accessor :resources_pending
742
+
743
+ # Number of resources already scanned.
744
+ # Corresponds to the JSON property `resourcesScanned`
745
+ # @return [Fixnum]
746
+ attr_accessor :resources_scanned
747
+
748
+ # Time when the request started processing, i.e., when the state was set to
749
+ # RUNNING.
750
+ # Corresponds to the JSON property `startTime`
751
+ # @return [String]
752
+ attr_accessor :start_time
753
+
754
+ # Output only. The current state of the operation.
755
+ # Corresponds to the JSON property `state`
756
+ # @return [String]
757
+ attr_accessor :state
758
+
759
+ def initialize(**args)
760
+ update!(**args)
761
+ end
762
+
763
+ # Update properties of this object
764
+ def update!(**args)
765
+ @request_time = args[:request_time] if args.key?(:request_time)
766
+ @resources_found = args[:resources_found] if args.key?(:resources_found)
767
+ @resources_pending = args[:resources_pending] if args.key?(:resources_pending)
768
+ @resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
769
+ @start_time = args[:start_time] if args.key?(:start_time)
770
+ @state = args[:state] if args.key?(:state)
771
+ end
772
+ end
773
+
774
+ # Details about how a set of policies, listed in ExplainedPolicy, resulted in a
775
+ # certain AccessState when replaying an access tuple.
776
+ class GoogleCloudPolicysimulatorV1betaExplainedAccess
777
+ include Google::Apis::Core::Hashable
778
+
779
+ # Whether the principal in the access tuple has permission to access the
780
+ # resource in the access tuple under the given policies.
781
+ # Corresponds to the JSON property `accessState`
782
+ # @return [String]
783
+ attr_accessor :access_state
784
+
785
+ # If the AccessState is `UNKNOWN`, this field contains a list of errors
786
+ # explaining why the result is `UNKNOWN`. If the `AccessState` is `GRANTED` or `
787
+ # NOT_GRANTED`, this field is omitted.
788
+ # Corresponds to the JSON property `errors`
789
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleRpcStatus>]
790
+ attr_accessor :errors
791
+
792
+ # If the AccessState is `UNKNOWN`, this field contains the policies that led to
793
+ # that result. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is
794
+ # omitted.
795
+ # Corresponds to the JSON property `policies`
796
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaExplainedPolicy>]
797
+ attr_accessor :policies
798
+
799
+ def initialize(**args)
800
+ update!(**args)
801
+ end
802
+
803
+ # Update properties of this object
804
+ def update!(**args)
805
+ @access_state = args[:access_state] if args.key?(:access_state)
806
+ @errors = args[:errors] if args.key?(:errors)
807
+ @policies = args[:policies] if args.key?(:policies)
808
+ end
809
+ end
810
+
811
+ # Details about how a specific IAM Policy contributed to the access check.
812
+ class GoogleCloudPolicysimulatorV1betaExplainedPolicy
813
+ include Google::Apis::Core::Hashable
814
+
815
+ # Indicates whether _this policy_ provides the specified permission to the
816
+ # specified principal for the specified resource. This field does _not_ indicate
817
+ # whether the principal actually has the permission for the resource. There
818
+ # might be another policy that overrides this policy. To determine whether the
819
+ # principal actually has the permission, use the `access` field in the
820
+ # TroubleshootIamPolicyResponse.
821
+ # Corresponds to the JSON property `access`
822
+ # @return [String]
823
+ attr_accessor :access
824
+
825
+ # Details about how each binding in the policy affects the principal's ability,
826
+ # or inability, to use the permission for the resource. If the user who created
827
+ # the Replay does not have access to the policy, this field is omitted.
828
+ # Corresponds to the JSON property `bindingExplanations`
829
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaBindingExplanation>]
830
+ attr_accessor :binding_explanations
831
+
832
+ # The full resource name that identifies the resource. For example, `//compute.
833
+ # googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
834
+ # If the user who created the Replay does not have access to the policy, this
835
+ # field is omitted. For examples of full resource names for Google Cloud
836
+ # services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-
837
+ # names.
838
+ # Corresponds to the JSON property `fullResourceName`
839
+ # @return [String]
840
+ attr_accessor :full_resource_name
841
+
842
+ # An Identity and Access Management (IAM) policy, which specifies access
843
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
844
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
845
+ # Principals can be user accounts, service accounts, Google groups, and domains (
846
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
847
+ # an IAM predefined role or a user-created custom role. For some types of Google
848
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
849
+ # logical expression that allows access to a resource only if the expression
850
+ # evaluates to `true`. A condition can add constraints based on attributes of
851
+ # the request, the resource, or both. To learn which resources support
852
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
853
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
854
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
855
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
856
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
857
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
858
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
859
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
860
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
861
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
862
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
863
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
864
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
865
+ # title: expirable access description: Does not grant access after Sep 2020
866
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
867
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
868
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
869
+ # Corresponds to the JSON property `policy`
870
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleIamV1Policy]
871
+ attr_accessor :policy
872
+
873
+ # The relevance of this policy to the overall determination in the
874
+ # TroubleshootIamPolicyResponse. If the user who created the Replay does not
875
+ # have access to the policy, this field is omitted.
876
+ # Corresponds to the JSON property `relevance`
877
+ # @return [String]
878
+ attr_accessor :relevance
879
+
880
+ def initialize(**args)
881
+ update!(**args)
882
+ end
883
+
884
+ # Update properties of this object
885
+ def update!(**args)
886
+ @access = args[:access] if args.key?(:access)
887
+ @binding_explanations = args[:binding_explanations] if args.key?(:binding_explanations)
888
+ @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
889
+ @policy = args[:policy] if args.key?(:policy)
890
+ @relevance = args[:relevance] if args.key?(:relevance)
891
+ end
892
+ end
893
+
894
+ # GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
895
+ # OrgPolicyViolationsPreview generations operation.
896
+ class GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata
897
+ include Google::Apis::Core::Hashable
898
+
899
+ # Time when the request was received.
900
+ # Corresponds to the JSON property `requestTime`
901
+ # @return [String]
902
+ attr_accessor :request_time
903
+
904
+ # Total number of resources that need scanning. Should equal resource_scanned +
905
+ # resources_pending
906
+ # Corresponds to the JSON property `resourcesFound`
907
+ # @return [Fixnum]
908
+ attr_accessor :resources_found
909
+
910
+ # Number of resources still to scan.
911
+ # Corresponds to the JSON property `resourcesPending`
912
+ # @return [Fixnum]
913
+ attr_accessor :resources_pending
914
+
915
+ # Number of resources already scanned.
916
+ # Corresponds to the JSON property `resourcesScanned`
917
+ # @return [Fixnum]
918
+ attr_accessor :resources_scanned
919
+
920
+ # Time when the request started processing, i.e. when the state was set to
921
+ # RUNNING.
922
+ # Corresponds to the JSON property `startTime`
923
+ # @return [String]
924
+ attr_accessor :start_time
925
+
926
+ # The current state of the operation.
927
+ # Corresponds to the JSON property `state`
928
+ # @return [String]
929
+ attr_accessor :state
930
+
931
+ def initialize(**args)
932
+ update!(**args)
933
+ end
934
+
935
+ # Update properties of this object
936
+ def update!(**args)
937
+ @request_time = args[:request_time] if args.key?(:request_time)
938
+ @resources_found = args[:resources_found] if args.key?(:resources_found)
939
+ @resources_pending = args[:resources_pending] if args.key?(:resources_pending)
940
+ @resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
941
+ @start_time = args[:start_time] if args.key?(:start_time)
942
+ @state = args[:state] if args.key?(:state)
943
+ end
944
+ end
945
+
946
+ # ListOrgPolicyViolationsPreviewsResponse is the response message for
947
+ # OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.
948
+ class GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse
949
+ include Google::Apis::Core::Hashable
950
+
951
+ # A token that you can use to retrieve the next page of results. If this field
952
+ # is omitted, there are no subsequent pages.
953
+ # Corresponds to the JSON property `nextPageToken`
954
+ # @return [String]
955
+ attr_accessor :next_page_token
956
+
957
+ # The list of OrgPolicyViolationsPreview
958
+ # Corresponds to the JSON property `orgPolicyViolationsPreviews`
959
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview>]
960
+ attr_accessor :org_policy_violations_previews
961
+
962
+ def initialize(**args)
963
+ update!(**args)
964
+ end
965
+
966
+ # Update properties of this object
967
+ def update!(**args)
968
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
969
+ @org_policy_violations_previews = args[:org_policy_violations_previews] if args.key?(:org_policy_violations_previews)
970
+ end
971
+ end
972
+
973
+ # ListOrgPolicyViolationsResponse is the response message for
974
+ # OrgPolicyViolationsPreviewService.ListOrgPolicyViolations
975
+ class GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse
976
+ include Google::Apis::Core::Hashable
977
+
978
+ # A token that you can use to retrieve the next page of results. If this field
979
+ # is omitted, there are no subsequent pages.
980
+ # Corresponds to the JSON property `nextPageToken`
981
+ # @return [String]
982
+ attr_accessor :next_page_token
983
+
984
+ # The list of OrgPolicyViolations
985
+ # Corresponds to the JSON property `orgPolicyViolations`
986
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolation>]
987
+ attr_accessor :org_policy_violations
988
+
989
+ def initialize(**args)
990
+ update!(**args)
991
+ end
992
+
993
+ # Update properties of this object
994
+ def update!(**args)
995
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
996
+ @org_policy_violations = args[:org_policy_violations] if args.key?(:org_policy_violations)
997
+ end
998
+ end
999
+
1000
+ # Response message for Simulator.ListReplayResults.
1001
+ class GoogleCloudPolicysimulatorV1betaListReplayResultsResponse
1002
+ include Google::Apis::Core::Hashable
1003
+
1004
+ # A token that you can use to retrieve the next page of ReplayResult objects. If
1005
+ # this field is omitted, there are no subsequent pages.
1006
+ # Corresponds to the JSON property `nextPageToken`
1007
+ # @return [String]
1008
+ attr_accessor :next_page_token
1009
+
1010
+ # The results of running a Replay.
1011
+ # Corresponds to the JSON property `replayResults`
1012
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaReplayResult>]
1013
+ attr_accessor :replay_results
1014
+
1015
+ def initialize(**args)
1016
+ update!(**args)
1017
+ end
1018
+
1019
+ # Update properties of this object
1020
+ def update!(**args)
1021
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1022
+ @replay_results = args[:replay_results] if args.key?(:replay_results)
1023
+ end
1024
+ end
1025
+
1026
+ # Response message for Simulator.ListReplays.
1027
+ class GoogleCloudPolicysimulatorV1betaListReplaysResponse
1028
+ include Google::Apis::Core::Hashable
1029
+
1030
+ # A token that you can use to retrieve the next page of results. If this field
1031
+ # is omitted, there are no subsequent pages.
1032
+ # Corresponds to the JSON property `nextPageToken`
1033
+ # @return [String]
1034
+ attr_accessor :next_page_token
1035
+
1036
+ # The list of Replay objects.
1037
+ # Corresponds to the JSON property `replays`
1038
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaReplay>]
1039
+ attr_accessor :replays
1040
+
1041
+ def initialize(**args)
1042
+ update!(**args)
1043
+ end
1044
+
1045
+ # Update properties of this object
1046
+ def update!(**args)
1047
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1048
+ @replays = args[:replays] if args.key?(:replays)
1049
+ end
1050
+ end
1051
+
1052
+ # The proposed changes to OrgPolicy.
1053
+ class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay
1054
+ include Google::Apis::Core::Hashable
1055
+
1056
+ # Optional. The OrgPolicy CustomConstraint changes to preview violations for.
1057
+ # Any existing CustomConstraints with the same name will be overridden in the
1058
+ # simulation. That is, violations will be determined as if all custom
1059
+ # constraints in the overlay were instantiated. Only a single custom_constraint
1060
+ # is supported in the overlay at a time. For evaluating multiple constraints,
1061
+ # multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each
1062
+ # request evaluates a single constraint.
1063
+ # Corresponds to the JSON property `customConstraints`
1064
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay>]
1065
+ attr_accessor :custom_constraints
1066
+
1067
+ # Optional. The OrgPolicy changes to preview violations for. Any existing
1068
+ # OrgPolicies with the same name will be overridden in the simulation. That is,
1069
+ # violations will be determined as if all policies in the overlay were created
1070
+ # or updated.
1071
+ # Corresponds to the JSON property `policies`
1072
+ # @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay>]
1073
+ attr_accessor :policies
1074
+
1075
+ def initialize(**args)
1076
+ update!(**args)
1077
+ end
1078
+
1079
+ # Update properties of this object
1080
+ def update!(**args)
1081
+ @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
1082
+ @policies = args[:policies] if args.key?(:policies)
1083
+ end
1084
+ end
1085
+
1086
+ # A change to an OrgPolicy custom constraint.
1087
+ class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay
1088
+ include Google::Apis::Core::Hashable
1089
+
1090
+ # A custom constraint defined by customers which can *only* be applied to the
1091
+ # given resource types and organization. By creating a custom constraint,
1092
+ # customers can apply policies of this custom constraint. *Creating a custom
1093
+ # constraint itself does NOT apply any policy enforcement*.
1094
+ # Corresponds to the JSON property `customConstraint`
1095
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2CustomConstraint]
1096
+ attr_accessor :custom_constraint
1097
+
1098
+ # Optional. Resource the constraint is attached to. Example: "organization/
1099
+ # 987654"
1100
+ # Corresponds to the JSON property `customConstraintParent`
1101
+ # @return [String]
1102
+ attr_accessor :custom_constraint_parent
1103
+
1104
+ def initialize(**args)
1105
+ update!(**args)
1106
+ end
1107
+
1108
+ # Update properties of this object
1109
+ def update!(**args)
1110
+ @custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
1111
+ @custom_constraint_parent = args[:custom_constraint_parent] if args.key?(:custom_constraint_parent)
1112
+ end
1113
+ end
1114
+
1115
+ # A change to an OrgPolicy.
1116
+ class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay
1117
+ include Google::Apis::Core::Hashable
1118
+
1119
+ # Defines an organization policy which is used to specify constraints for
1120
+ # configurations of Google Cloud resources.
1121
+ # Corresponds to the JSON property `policy`
1122
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2Policy]
1123
+ attr_accessor :policy
1124
+
1125
+ # Optional. The parent of the policy we are attaching to. Example: "projects/
1126
+ # 123456"
1127
+ # Corresponds to the JSON property `policyParent`
1128
+ # @return [String]
1129
+ attr_accessor :policy_parent
1130
+
1131
+ def initialize(**args)
1132
+ update!(**args)
1133
+ end
1134
+
1135
+ # Update properties of this object
1136
+ def update!(**args)
1137
+ @policy = args[:policy] if args.key?(:policy)
1138
+ @policy_parent = args[:policy_parent] if args.key?(:policy_parent)
1139
+ end
1140
+ end
1141
+
1142
+ # OrgPolicyViolation is a resource representing a single resource violating a
1143
+ # single OrgPolicy constraint.
1144
+ class GoogleCloudPolicysimulatorV1betaOrgPolicyViolation
1145
+ include Google::Apis::Core::Hashable
1146
+
1147
+ # A custom constraint defined by customers which can *only* be applied to the
1148
+ # given resource types and organization. By creating a custom constraint,
1149
+ # customers can apply policies of this custom constraint. *Creating a custom
1150
+ # constraint itself does NOT apply any policy enforcement*.
1151
+ # Corresponds to the JSON property `customConstraint`
1152
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2CustomConstraint]
1153
+ attr_accessor :custom_constraint
1154
+
1155
+ # The `Status` type defines a logical error model that is suitable for different
1156
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1157
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1158
+ # data: error code, error message, and error details. You can find out more
1159
+ # about this error model and how to work with it in the [API Design Guide](https:
1160
+ # //cloud.google.com/apis/design/errors).
1161
+ # Corresponds to the JSON property `error`
1162
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleRpcStatus]
1163
+ attr_accessor :error
1164
+
1165
+ # The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/
1166
+ # locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`
1167
+ # Corresponds to the JSON property `name`
1168
+ # @return [String]
1169
+ attr_accessor :name
1170
+
1171
+ # ResourceContext provides the context we know about a resource. It is similar
1172
+ # in concept to google.cloud.asset.v1.Resource, but focuses on the information
1173
+ # specifically used by Simulator.
1174
+ # Corresponds to the JSON property `resource`
1175
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaResourceContext]
1176
+ attr_accessor :resource
1177
+
1178
+ def initialize(**args)
1179
+ update!(**args)
1180
+ end
1181
+
1182
+ # Update properties of this object
1183
+ def update!(**args)
1184
+ @custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
1185
+ @error = args[:error] if args.key?(:error)
1186
+ @name = args[:name] if args.key?(:name)
1187
+ @resource = args[:resource] if args.key?(:resource)
1188
+ end
1189
+ end
1190
+
1191
+ # OrgPolicyViolationsPreview is a resource providing a preview of the violations
1192
+ # that will exist if an OrgPolicy change is made. The list of violations are
1193
+ # modeled as child resources and retrieved via a ListOrgPolicyViolations API
1194
+ # call. There are potentially more OrgPolicyViolations than could fit in an
1195
+ # embedded field. Thus, the use of a child resource instead of a field.
1196
+ class GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
1197
+ include Google::Apis::Core::Hashable
1198
+
1199
+ # Output only. Time when this `OrgPolicyViolationsPreview` was created.
1200
+ # Corresponds to the JSON property `createTime`
1201
+ # @return [String]
1202
+ attr_accessor :create_time
1203
+
1204
+ # Output only. The names of the constraints against which all `
1205
+ # OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `
1206
+ # PolicyOverlay` then it contains the name of the configured custom constraint,
1207
+ # applicable to the specified policies. Otherwise it contains the name of the
1208
+ # constraint specified in `CustomConstraintOverlay`. Format: `organizations/`
1209
+ # organization_id`/customConstraints/`custom_constraint_id`` Example: `
1210
+ # organizations/123/customConstraints/custom.createOnlyE2TypeVms`
1211
+ # Corresponds to the JSON property `customConstraints`
1212
+ # @return [Array<String>]
1213
+ attr_accessor :custom_constraints
1214
+
1215
+ # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the
1216
+ # following format: `organizations/`organization`/locations/`location`/
1217
+ # orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`` Example: `
1218
+ # organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/
1219
+ # 506a5f7f`
1220
+ # Corresponds to the JSON property `name`
1221
+ # @return [String]
1222
+ attr_accessor :name
1223
+
1224
+ # The proposed changes to OrgPolicy.
1225
+ # Corresponds to the JSON property `overlay`
1226
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay]
1227
+ attr_accessor :overlay
1228
+
1229
+ # A summary of the state of all resources scanned for compliance with the
1230
+ # changed OrgPolicy.
1231
+ # Corresponds to the JSON property `resourceCounts`
1232
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts]
1233
+ attr_accessor :resource_counts
1234
+
1235
+ # Output only. The state of the `OrgPolicyViolationsPreview`.
1236
+ # Corresponds to the JSON property `state`
1237
+ # @return [String]
1238
+ attr_accessor :state
1239
+
1240
+ # Output only. The number of OrgPolicyViolations in this `
1241
+ # OrgPolicyViolationsPreview`. This count may differ from `resource_summary.
1242
+ # noncompliant_count` because each OrgPolicyViolation is specific to a resource *
1243
+ # *and** constraint. If there are multiple constraints being evaluated (i.e.
1244
+ # multiple policies in the overlay), a single resource may violate multiple
1245
+ # constraints.
1246
+ # Corresponds to the JSON property `violationsCount`
1247
+ # @return [Fixnum]
1248
+ attr_accessor :violations_count
1249
+
1250
+ def initialize(**args)
1251
+ update!(**args)
1252
+ end
1253
+
1254
+ # Update properties of this object
1255
+ def update!(**args)
1256
+ @create_time = args[:create_time] if args.key?(:create_time)
1257
+ @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
1258
+ @name = args[:name] if args.key?(:name)
1259
+ @overlay = args[:overlay] if args.key?(:overlay)
1260
+ @resource_counts = args[:resource_counts] if args.key?(:resource_counts)
1261
+ @state = args[:state] if args.key?(:state)
1262
+ @violations_count = args[:violations_count] if args.key?(:violations_count)
1263
+ end
1264
+ end
1265
+
1266
+ # A summary of the state of all resources scanned for compliance with the
1267
+ # changed OrgPolicy.
1268
+ class GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts
1269
+ include Google::Apis::Core::Hashable
1270
+
1271
+ # Output only. Number of scanned resources with zero violations.
1272
+ # Corresponds to the JSON property `compliant`
1273
+ # @return [Fixnum]
1274
+ attr_accessor :compliant
1275
+
1276
+ # Output only. Number of resources that returned an error when scanned.
1277
+ # Corresponds to the JSON property `errors`
1278
+ # @return [Fixnum]
1279
+ attr_accessor :errors
1280
+
1281
+ # Output only. Number of scanned resources with at least one violation.
1282
+ # Corresponds to the JSON property `noncompliant`
1283
+ # @return [Fixnum]
1284
+ attr_accessor :noncompliant
1285
+
1286
+ # Output only. Number of resources checked for compliance. Must equal:
1287
+ # unenforced + noncompliant + compliant + error
1288
+ # Corresponds to the JSON property `scanned`
1289
+ # @return [Fixnum]
1290
+ attr_accessor :scanned
1291
+
1292
+ # Output only. Number of resources where the constraint was not enforced, i.e.
1293
+ # the Policy set `enforced: false` for that resource.
1294
+ # Corresponds to the JSON property `unenforced`
1295
+ # @return [Fixnum]
1296
+ attr_accessor :unenforced
1297
+
1298
+ def initialize(**args)
1299
+ update!(**args)
1300
+ end
1301
+
1302
+ # Update properties of this object
1303
+ def update!(**args)
1304
+ @compliant = args[:compliant] if args.key?(:compliant)
1305
+ @errors = args[:errors] if args.key?(:errors)
1306
+ @noncompliant = args[:noncompliant] if args.key?(:noncompliant)
1307
+ @scanned = args[:scanned] if args.key?(:scanned)
1308
+ @unenforced = args[:unenforced] if args.key?(:unenforced)
1309
+ end
1310
+ end
1311
+
1312
+ # A resource describing a `Replay`, or simulation.
1313
+ class GoogleCloudPolicysimulatorV1betaReplay
1314
+ include Google::Apis::Core::Hashable
1315
+
1316
+ # The configuration used for a Replay.
1317
+ # Corresponds to the JSON property `config`
1318
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaReplayConfig]
1319
+ attr_accessor :config
1320
+
1321
+ # Output only. The resource name of the `Replay`, which has the following format:
1322
+ # ``projects|folders|organizations`/`resource-id`/locations/global/replays/`
1323
+ # replay-id``, where ``resource-id`` is the ID of the project, folder, or
1324
+ # organization that owns the Replay. Example: `projects/my-example-project/
1325
+ # locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
1326
+ # Corresponds to the JSON property `name`
1327
+ # @return [String]
1328
+ attr_accessor :name
1329
+
1330
+ # Summary statistics about the replayed log entries.
1331
+ # Corresponds to the JSON property `resultsSummary`
1332
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaReplayResultsSummary]
1333
+ attr_accessor :results_summary
1334
+
1335
+ # Output only. The current state of the `Replay`.
1336
+ # Corresponds to the JSON property `state`
1337
+ # @return [String]
1338
+ attr_accessor :state
1339
+
1340
+ def initialize(**args)
1341
+ update!(**args)
1342
+ end
1343
+
1344
+ # Update properties of this object
1345
+ def update!(**args)
1346
+ @config = args[:config] if args.key?(:config)
1347
+ @name = args[:name] if args.key?(:name)
1348
+ @results_summary = args[:results_summary] if args.key?(:results_summary)
1349
+ @state = args[:state] if args.key?(:state)
1350
+ end
1351
+ end
1352
+
1353
+ # The configuration used for a Replay.
1354
+ class GoogleCloudPolicysimulatorV1betaReplayConfig
1355
+ include Google::Apis::Core::Hashable
1356
+
1357
+ # The logs to use as input for the Replay.
1358
+ # Corresponds to the JSON property `logSource`
1359
+ # @return [String]
1360
+ attr_accessor :log_source
1361
+
1362
+ # A mapping of the resources that you want to simulate policies for and the
1363
+ # policies that you want to simulate. Keys are the full resource names for the
1364
+ # resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-
1365
+ # project`. For examples of full resource names for Google Cloud services, see
1366
+ # https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values
1367
+ # are Policy objects representing the policies that you want to simulate.
1368
+ # Replays automatically take into account any IAM policies inherited through the
1369
+ # resource hierarchy, and any policies set on descendant resources. You do not
1370
+ # need to include these policies in the policy overlay.
1371
+ # Corresponds to the JSON property `policyOverlay`
1372
+ # @return [Hash<String,Google::Apis::PolicysimulatorV1beta::GoogleIamV1Policy>]
1373
+ attr_accessor :policy_overlay
1374
+
1375
+ def initialize(**args)
1376
+ update!(**args)
1377
+ end
1378
+
1379
+ # Update properties of this object
1380
+ def update!(**args)
1381
+ @log_source = args[:log_source] if args.key?(:log_source)
1382
+ @policy_overlay = args[:policy_overlay] if args.key?(:policy_overlay)
1383
+ end
1384
+ end
1385
+
1386
+ # The difference between the results of evaluating an access tuple under the
1387
+ # current (baseline) policies and under the proposed (simulated) policies. This
1388
+ # difference explains how a principal's access could change if the proposed
1389
+ # policies were applied.
1390
+ class GoogleCloudPolicysimulatorV1betaReplayDiff
1391
+ include Google::Apis::Core::Hashable
1392
+
1393
+ # A summary and comparison of the principal's access under the current (baseline)
1394
+ # policies and the proposed (simulated) policies for a single access tuple.
1395
+ # Corresponds to the JSON property `accessDiff`
1396
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaAccessStateDiff]
1397
+ attr_accessor :access_diff
1398
+
1399
+ def initialize(**args)
1400
+ update!(**args)
1401
+ end
1402
+
1403
+ # Update properties of this object
1404
+ def update!(**args)
1405
+ @access_diff = args[:access_diff] if args.key?(:access_diff)
1406
+ end
1407
+ end
1408
+
1409
+ # The result of replaying a single access tuple against a simulated state.
1410
+ class GoogleCloudPolicysimulatorV1betaReplayResult
1411
+ include Google::Apis::Core::Hashable
1412
+
1413
+ # Information about the principal, resource, and permission to check.
1414
+ # Corresponds to the JSON property `accessTuple`
1415
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaAccessTuple]
1416
+ attr_accessor :access_tuple
1417
+
1418
+ # The difference between the results of evaluating an access tuple under the
1419
+ # current (baseline) policies and under the proposed (simulated) policies. This
1420
+ # difference explains how a principal's access could change if the proposed
1421
+ # policies were applied.
1422
+ # Corresponds to the JSON property `diff`
1423
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaReplayDiff]
1424
+ attr_accessor :diff
1425
+
1426
+ # The `Status` type defines a logical error model that is suitable for different
1427
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1428
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1429
+ # data: error code, error message, and error details. You can find out more
1430
+ # about this error model and how to work with it in the [API Design Guide](https:
1431
+ # //cloud.google.com/apis/design/errors).
1432
+ # Corresponds to the JSON property `error`
1433
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleRpcStatus]
1434
+ attr_accessor :error
1435
+
1436
+ # Represents a whole or partial calendar date, such as a birthday. The time of
1437
+ # day and time zone are either specified elsewhere or are insignificant. The
1438
+ # date is relative to the Gregorian Calendar. This can represent one of the
1439
+ # following: * A full date, with non-zero year, month, and day values. * A month
1440
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
1441
+ # with a zero month and a zero day. * A year and month, with a zero day (for
1442
+ # example, a credit card expiration date). Related types: * google.type.
1443
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1444
+ # Corresponds to the JSON property `lastSeenDate`
1445
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleTypeDate]
1446
+ attr_accessor :last_seen_date
1447
+
1448
+ # The resource name of the `ReplayResult`, in the following format: ``projects|
1449
+ # folders|organizations`/`resource-id`/locations/global/replays/`replay-id`/
1450
+ # results/`replay-result-id``, where ``resource-id`` is the ID of the project,
1451
+ # folder, or organization that owns the Replay. Example: `projects/my-example-
1452
+ # project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/
1453
+ # 1234`
1454
+ # Corresponds to the JSON property `name`
1455
+ # @return [String]
1456
+ attr_accessor :name
1457
+
1458
+ # The Replay that the access tuple was included in.
1459
+ # Corresponds to the JSON property `parent`
1460
+ # @return [String]
1461
+ attr_accessor :parent
1462
+
1463
+ def initialize(**args)
1464
+ update!(**args)
1465
+ end
1466
+
1467
+ # Update properties of this object
1468
+ def update!(**args)
1469
+ @access_tuple = args[:access_tuple] if args.key?(:access_tuple)
1470
+ @diff = args[:diff] if args.key?(:diff)
1471
+ @error = args[:error] if args.key?(:error)
1472
+ @last_seen_date = args[:last_seen_date] if args.key?(:last_seen_date)
1473
+ @name = args[:name] if args.key?(:name)
1474
+ @parent = args[:parent] if args.key?(:parent)
1475
+ end
1476
+ end
1477
+
1478
+ # Summary statistics about the replayed log entries.
1479
+ class GoogleCloudPolicysimulatorV1betaReplayResultsSummary
1480
+ include Google::Apis::Core::Hashable
1481
+
1482
+ # The number of replayed log entries with a difference between baseline and
1483
+ # simulated policies.
1484
+ # Corresponds to the JSON property `differenceCount`
1485
+ # @return [Fixnum]
1486
+ attr_accessor :difference_count
1487
+
1488
+ # The number of log entries that could not be replayed.
1489
+ # Corresponds to the JSON property `errorCount`
1490
+ # @return [Fixnum]
1491
+ attr_accessor :error_count
1492
+
1493
+ # The total number of log entries replayed.
1494
+ # Corresponds to the JSON property `logCount`
1495
+ # @return [Fixnum]
1496
+ attr_accessor :log_count
1497
+
1498
+ # Represents a whole or partial calendar date, such as a birthday. The time of
1499
+ # day and time zone are either specified elsewhere or are insignificant. The
1500
+ # date is relative to the Gregorian Calendar. This can represent one of the
1501
+ # following: * A full date, with non-zero year, month, and day values. * A month
1502
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
1503
+ # with a zero month and a zero day. * A year and month, with a zero day (for
1504
+ # example, a credit card expiration date). Related types: * google.type.
1505
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1506
+ # Corresponds to the JSON property `newestDate`
1507
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleTypeDate]
1508
+ attr_accessor :newest_date
1509
+
1510
+ # Represents a whole or partial calendar date, such as a birthday. The time of
1511
+ # day and time zone are either specified elsewhere or are insignificant. The
1512
+ # date is relative to the Gregorian Calendar. This can represent one of the
1513
+ # following: * A full date, with non-zero year, month, and day values. * A month
1514
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
1515
+ # with a zero month and a zero day. * A year and month, with a zero day (for
1516
+ # example, a credit card expiration date). Related types: * google.type.
1517
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1518
+ # Corresponds to the JSON property `oldestDate`
1519
+ # @return [Google::Apis::PolicysimulatorV1beta::GoogleTypeDate]
1520
+ attr_accessor :oldest_date
1521
+
1522
+ # The number of replayed log entries with no difference between baseline and
1523
+ # simulated policies.
1524
+ # Corresponds to the JSON property `unchangedCount`
1525
+ # @return [Fixnum]
1526
+ attr_accessor :unchanged_count
1527
+
1528
+ def initialize(**args)
1529
+ update!(**args)
1530
+ end
1531
+
1532
+ # Update properties of this object
1533
+ def update!(**args)
1534
+ @difference_count = args[:difference_count] if args.key?(:difference_count)
1535
+ @error_count = args[:error_count] if args.key?(:error_count)
1536
+ @log_count = args[:log_count] if args.key?(:log_count)
1537
+ @newest_date = args[:newest_date] if args.key?(:newest_date)
1538
+ @oldest_date = args[:oldest_date] if args.key?(:oldest_date)
1539
+ @unchanged_count = args[:unchanged_count] if args.key?(:unchanged_count)
1540
+ end
1541
+ end
1542
+
1543
+ # ResourceContext provides the context we know about a resource. It is similar
1544
+ # in concept to google.cloud.asset.v1.Resource, but focuses on the information
1545
+ # specifically used by Simulator.
1546
+ class GoogleCloudPolicysimulatorV1betaResourceContext
1547
+ include Google::Apis::Core::Hashable
1548
+
1549
+ # The ancestry path of the resource in Google Cloud [resource hierarchy](https://
1550
+ # cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
1551
+ # represented as a list of relative resource names. An ancestry path starts with
1552
+ # the closest ancestor in the hierarchy and ends at root. If the resource is a
1553
+ # project, folder, or organization, the ancestry path starts from the resource
1554
+ # itself. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
1555
+ # Corresponds to the JSON property `ancestors`
1556
+ # @return [Array<String>]
1557
+ attr_accessor :ancestors
1558
+
1559
+ # The asset type of the resource as defined by CAIS. Example: `compute.
1560
+ # googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/
1561
+ # asset-inventory/docs/supported-asset-types) for more information.
1562
+ # Corresponds to the JSON property `assetType`
1563
+ # @return [String]
1564
+ attr_accessor :asset_type
1565
+
1566
+ # The full name of the resource. Example: `//compute.googleapis.com/projects/
1567
+ # my_project_123/zones/zone1/instances/instance1` See [Resource names](https://
1568
+ # cloud.google.com/apis/design/resource_names#full_resource_name) for more
1569
+ # information.
1570
+ # Corresponds to the JSON property `resource`
1571
+ # @return [String]
1572
+ attr_accessor :resource
1573
+
1574
+ def initialize(**args)
1575
+ update!(**args)
1576
+ end
1577
+
1578
+ # Update properties of this object
1579
+ def update!(**args)
1580
+ @ancestors = args[:ancestors] if args.key?(:ancestors)
1581
+ @asset_type = args[:asset_type] if args.key?(:asset_type)
1582
+ @resource = args[:resource] if args.key?(:resource)
1583
+ end
1584
+ end
1585
+
183
1586
  # Specifies the audit configuration for a service. The configuration determines
184
1587
  # which permission types are logged, and what identities, if any, are exempted
185
1588
  # from logging. An AuditConfig must have one or more AuditLogConfigs. If there