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