google-apis-policysimulator_v1alpha 0.20.0 → 0.22.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 PolicysimulatorV1alpha
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::PolicysimulatorV1alpha::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::PolicysimulatorV1alpha::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::PolicysimulatorV1alpha::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::PolicysimulatorV1alpha::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::PolicysimulatorV1alpha::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::PolicysimulatorV1alpha::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::PolicysimulatorV1alpha::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
- # A summary and comparison of the principal's access under the current (baseline)
527
- # policies and the proposed (simulated) policies for a single access tuple.
528
- class GoogleCloudPolicysimulatorV1alphaAccessStateDiff
529
- include Google::Apis::Core::Hashable
530
-
531
- # How the principal's access, specified in the AccessState field, changed
532
- # between the current (baseline) policies and proposed (simulated) policies.
533
- # Corresponds to the JSON property `accessChange`
534
- # @return [String]
535
- attr_accessor :access_change
536
-
537
- # Details about how a set of policies, listed in ExplainedPolicy, resulted in a
538
- # certain AccessState when replaying an access tuple.
539
- # Corresponds to the JSON property `baseline`
540
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaExplainedAccess]
541
- attr_accessor :baseline
542
-
543
- # Details about how a set of policies, listed in ExplainedPolicy, resulted in a
544
- # certain AccessState when replaying an access tuple.
545
- # Corresponds to the JSON property `simulated`
546
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaExplainedAccess]
547
- attr_accessor :simulated
548
-
549
- def initialize(**args)
550
- update!(**args)
551
- end
552
-
553
- # Update properties of this object
554
- def update!(**args)
555
- @access_change = args[:access_change] if args.key?(:access_change)
556
- @baseline = args[:baseline] if args.key?(:baseline)
557
- @simulated = args[:simulated] if args.key?(:simulated)
558
- end
559
- end
560
-
561
- # Information about the principal, resource, and permission to check.
562
- class GoogleCloudPolicysimulatorV1alphaAccessTuple
563
- include Google::Apis::Core::Hashable
564
-
565
- # Required. The full resource name that identifies the resource. For example, `//
566
- # compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-
567
- # instance`. For examples of full resource names for Google Cloud services, see
568
- # https://cloud.google.com/iam/help/troubleshooter/full-resource-names.
569
- # Corresponds to the JSON property `fullResourceName`
570
- # @return [String]
571
- attr_accessor :full_resource_name
572
-
573
- # Required. The IAM permission to check for the specified principal and resource.
574
- # For a complete list of IAM permissions, see https://cloud.google.com/iam/help/
575
- # permissions/reference. For a complete list of predefined IAM roles and the
576
- # permissions in each role, see https://cloud.google.com/iam/help/roles/
577
- # reference.
578
- # Corresponds to the JSON property `permission`
579
- # @return [String]
580
- attr_accessor :permission
581
-
582
- # Required. The principal whose access you want to check, in the form of the
583
- # email address that represents that principal. For example, `alice@example.com`
584
- # or `my-service-account@my-project.iam.gserviceaccount.com`. The principal must
585
- # be a Google Account or a service account. Other types of principals are not
586
- # supported.
587
- # Corresponds to the JSON property `principal`
588
- # @return [String]
589
- attr_accessor :principal
590
-
591
- def initialize(**args)
592
- update!(**args)
593
- end
594
-
595
- # Update properties of this object
596
- def update!(**args)
597
- @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
598
- @permission = args[:permission] if args.key?(:permission)
599
- @principal = args[:principal] if args.key?(:principal)
600
- end
601
- end
602
-
603
- # Details about how a binding in a policy affects a principal's ability to use a
604
- # permission.
605
- class GoogleCloudPolicysimulatorV1alphaBindingExplanation
606
- include Google::Apis::Core::Hashable
607
-
608
- # Required. Indicates whether _this binding_ provides the specified permission
609
- # to the specified principal for the specified resource. This field does _not_
610
- # indicate whether the principal actually has the permission for the resource.
611
- # There might be another binding that overrides this binding. To determine
612
- # whether the principal actually has the permission, use the `access` field in
613
- # the TroubleshootIamPolicyResponse.
614
- # Corresponds to the JSON property `access`
615
- # @return [String]
616
- attr_accessor :access
617
-
618
- # Represents a textual expression in the Common Expression Language (CEL) syntax.
619
- # CEL is a C-like expression language. The syntax and semantics of CEL are
620
- # documented at https://github.com/google/cel-spec. Example (Comparison): title:
621
- # "Summary size limit" description: "Determines if a summary is less than 100
622
- # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
623
- # Requestor is owner" description: "Determines if requestor is the document
624
- # owner" expression: "document.owner == request.auth.claims.email" Example (
625
- # Logic): title: "Public documents" description: "Determine whether the document
626
- # should be publicly visible" expression: "document.type != 'private' &&
627
- # document.type != 'internal'" Example (Data Manipulation): title: "Notification
628
- # string" description: "Create a notification string with a timestamp."
629
- # expression: "'New message received at ' + string(document.create_time)" The
630
- # exact variables and functions that may be referenced within an expression are
631
- # determined by the service that evaluates it. See the service documentation for
632
- # additional information.
633
- # Corresponds to the JSON property `condition`
634
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleTypeExpr]
635
- attr_accessor :condition
636
-
637
- # Indicates whether each principal in the binding includes the principal
638
- # specified in the request, either directly or indirectly. Each key identifies a
639
- # principal in the binding, and each value indicates whether the principal in
640
- # the binding includes the principal in the request. For example, suppose that a
641
- # binding includes the following principals: * `user:alice@example.com` * `group:
642
- # product-eng@example.com` The principal in the replayed access tuple is `user:
643
- # bob@example.com`. This user is a principal of the group `group:product-eng@
644
- # example.com`. For the first principal in the binding, the key is `user:alice@
645
- # example.com`, and the `membership` field in the value is set to `
646
- # MEMBERSHIP_NOT_INCLUDED`. For the second principal in the binding, the key is `
647
- # group:product-eng@example.com`, and the `membership` field in the value is set
648
- # to `MEMBERSHIP_INCLUDED`.
649
- # Corresponds to the JSON property `memberships`
650
- # @return [Hash<String,Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership>]
651
- attr_accessor :memberships
652
-
653
- # The relevance of this binding to the overall determination for the entire
654
- # policy.
655
- # Corresponds to the JSON property `relevance`
656
- # @return [String]
657
- attr_accessor :relevance
658
-
659
- # The role that this binding grants. For example, `roles/compute.serviceAgent`.
660
- # For a complete list of predefined IAM roles, as well as the permissions in
661
- # each role, see https://cloud.google.com/iam/help/roles/reference.
662
- # Corresponds to the JSON property `role`
663
- # @return [String]
664
- attr_accessor :role
665
-
666
- # Indicates whether the role granted by this binding contains the specified
667
- # permission.
668
- # Corresponds to the JSON property `rolePermission`
669
- # @return [String]
670
- attr_accessor :role_permission
671
-
672
- # The relevance of the permission's existence, or nonexistence, in the role to
673
- # the overall determination for the entire policy.
674
- # Corresponds to the JSON property `rolePermissionRelevance`
675
- # @return [String]
676
- attr_accessor :role_permission_relevance
677
-
678
- def initialize(**args)
679
- update!(**args)
680
- end
681
-
682
- # Update properties of this object
683
- def update!(**args)
684
- @access = args[:access] if args.key?(:access)
685
- @condition = args[:condition] if args.key?(:condition)
686
- @memberships = args[:memberships] if args.key?(:memberships)
687
- @relevance = args[:relevance] if args.key?(:relevance)
688
- @role = args[:role] if args.key?(:role)
689
- @role_permission = args[:role_permission] if args.key?(:role_permission)
690
- @role_permission_relevance = args[:role_permission_relevance] if args.key?(:role_permission_relevance)
691
- end
692
- end
693
-
694
- # Details about whether the binding includes the principal.
695
- class GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership
696
- include Google::Apis::Core::Hashable
697
-
698
- # Indicates whether the binding includes the principal.
699
- # Corresponds to the JSON property `membership`
700
- # @return [String]
701
- attr_accessor :membership
702
-
703
- # The relevance of the principal's status to the overall determination for the
704
- # binding.
705
- # Corresponds to the JSON property `relevance`
706
- # @return [String]
707
- attr_accessor :relevance
708
-
709
- def initialize(**args)
710
- update!(**args)
711
- end
712
-
713
- # Update properties of this object
714
- def update!(**args)
715
- @membership = args[:membership] if args.key?(:membership)
716
- @relevance = args[:relevance] if args.key?(:relevance)
717
- end
718
- end
719
-
720
- # CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
721
- # OrgPolicyViolationsPreview generations operation.
722
- class GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata
723
- include Google::Apis::Core::Hashable
724
-
725
- # Time when the request was received.
726
- # Corresponds to the JSON property `requestTime`
727
- # @return [String]
728
- attr_accessor :request_time
729
-
730
- # Total number of resources that need scanning. Should equal resource_scanned +
731
- # resources_pending
732
- # Corresponds to the JSON property `resourcesFound`
733
- # @return [Fixnum]
734
- attr_accessor :resources_found
735
-
736
- # Number of resources still to scan.
737
- # Corresponds to the JSON property `resourcesPending`
738
- # @return [Fixnum]
739
- attr_accessor :resources_pending
740
-
741
- # Number of resources already scanned.
742
- # Corresponds to the JSON property `resourcesScanned`
743
- # @return [Fixnum]
744
- attr_accessor :resources_scanned
745
-
746
- # Time when the request started processing, i.e., when the state was set to
747
- # RUNNING.
748
- # Corresponds to the JSON property `startTime`
749
- # @return [String]
750
- attr_accessor :start_time
751
-
752
- # Output only. The current state of the operation.
753
- # Corresponds to the JSON property `state`
754
- # @return [String]
755
- attr_accessor :state
756
-
757
- def initialize(**args)
758
- update!(**args)
759
- end
760
-
761
- # Update properties of this object
762
- def update!(**args)
763
- @request_time = args[:request_time] if args.key?(:request_time)
764
- @resources_found = args[:resources_found] if args.key?(:resources_found)
765
- @resources_pending = args[:resources_pending] if args.key?(:resources_pending)
766
- @resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
767
- @start_time = args[:start_time] if args.key?(:start_time)
768
- @state = args[:state] if args.key?(:state)
769
- end
770
- end
771
-
772
- # Details about how a set of policies, listed in ExplainedPolicy, resulted in a
773
- # certain AccessState when replaying an access tuple.
774
- class GoogleCloudPolicysimulatorV1alphaExplainedAccess
775
- include Google::Apis::Core::Hashable
776
-
777
- # Whether the principal in the access tuple has permission to access the
778
- # resource in the access tuple under the given policies.
779
- # Corresponds to the JSON property `accessState`
780
- # @return [String]
781
- attr_accessor :access_state
782
-
783
- # If the AccessState is `UNKNOWN`, this field contains a list of errors
784
- # explaining why the result is `UNKNOWN`. If the `AccessState` is `GRANTED` or `
785
- # NOT_GRANTED`, this field is omitted.
786
- # Corresponds to the JSON property `errors`
787
- # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleRpcStatus>]
788
- attr_accessor :errors
789
-
790
- # If the AccessState is `UNKNOWN`, this field contains the policies that led to
791
- # that result. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is
792
- # omitted.
793
- # Corresponds to the JSON property `policies`
794
- # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaExplainedPolicy>]
795
- attr_accessor :policies
796
-
797
- def initialize(**args)
798
- update!(**args)
799
- end
800
-
801
- # Update properties of this object
802
- def update!(**args)
803
- @access_state = args[:access_state] if args.key?(:access_state)
804
- @errors = args[:errors] if args.key?(:errors)
805
- @policies = args[:policies] if args.key?(:policies)
806
- end
807
- end
808
-
809
- # Details about how a specific IAM Policy contributed to the access check.
810
- class GoogleCloudPolicysimulatorV1alphaExplainedPolicy
811
- include Google::Apis::Core::Hashable
812
-
813
- # Indicates whether _this policy_ provides the specified permission to the
814
- # specified principal for the specified resource. This field does _not_ indicate
815
- # whether the principal actually has the permission for the resource. There
816
- # might be another policy that overrides this policy. To determine whether the
817
- # principal actually has the permission, use the `access` field in the
818
- # TroubleshootIamPolicyResponse.
819
- # Corresponds to the JSON property `access`
820
- # @return [String]
821
- attr_accessor :access
822
-
823
- # Details about how each binding in the policy affects the principal's ability,
824
- # or inability, to use the permission for the resource. If the user who created
825
- # the Replay does not have access to the policy, this field is omitted.
826
- # Corresponds to the JSON property `bindingExplanations`
827
- # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaBindingExplanation>]
828
- attr_accessor :binding_explanations
829
-
830
- # The full resource name that identifies the resource. For example, `//compute.
831
- # googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`.
832
- # If the user who created the Replay does not have access to the policy, this
833
- # field is omitted. For examples of full resource names for Google Cloud
834
- # services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-
835
- # names.
836
- # Corresponds to the JSON property `fullResourceName`
837
- # @return [String]
838
- attr_accessor :full_resource_name
839
-
840
- # An Identity and Access Management (IAM) policy, which specifies access
841
- # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
842
- # A `binding` binds one or more `members`, or principals, to a single `role`.
843
- # Principals can be user accounts, service accounts, Google groups, and domains (
844
- # such as G Suite). A `role` is a named list of permissions; each `role` can be
845
- # an IAM predefined role or a user-created custom role. For some types of Google
846
- # Cloud resources, a `binding` can also specify a `condition`, which is a
847
- # logical expression that allows access to a resource only if the expression
848
- # evaluates to `true`. A condition can add constraints based on attributes of
849
- # the request, the resource, or both. To learn which resources support
850
- # conditions in their IAM policies, see the [IAM documentation](https://cloud.
851
- # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
852
- # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
853
- # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
854
- # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
855
- # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
856
- # ], "condition": ` "title": "expirable access", "description": "Does not grant
857
- # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
858
- # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
859
- # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
860
- # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
861
- # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
862
- # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
863
- # title: expirable access description: Does not grant access after Sep 2020
864
- # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
865
- # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
866
- # [IAM documentation](https://cloud.google.com/iam/docs/).
867
- # Corresponds to the JSON property `policy`
868
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleIamV1Policy]
869
- attr_accessor :policy
870
-
871
- # The relevance of this policy to the overall determination in the
872
- # TroubleshootIamPolicyResponse. If the user who created the Replay does not
873
- # have access to the policy, this field is omitted.
874
- # Corresponds to the JSON property `relevance`
875
- # @return [String]
876
- attr_accessor :relevance
877
-
878
- def initialize(**args)
879
- update!(**args)
880
- end
881
-
882
- # Update properties of this object
883
- def update!(**args)
884
- @access = args[:access] if args.key?(:access)
885
- @binding_explanations = args[:binding_explanations] if args.key?(:binding_explanations)
886
- @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
887
- @policy = args[:policy] if args.key?(:policy)
888
- @relevance = args[:relevance] if args.key?(:relevance)
889
- end
890
- end
891
-
892
- # GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
893
- # OrgPolicyViolationsPreview generations operation.
894
- class GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata
895
- include Google::Apis::Core::Hashable
896
-
897
- # Time when the request was received.
898
- # Corresponds to the JSON property `requestTime`
899
- # @return [String]
900
- attr_accessor :request_time
901
-
902
- # Total number of resources that need scanning. Should equal resource_scanned +
903
- # resources_pending
904
- # Corresponds to the JSON property `resourcesFound`
905
- # @return [Fixnum]
906
- attr_accessor :resources_found
907
-
908
- # Number of resources still to scan.
909
- # Corresponds to the JSON property `resourcesPending`
910
- # @return [Fixnum]
911
- attr_accessor :resources_pending
912
-
913
- # Number of resources already scanned.
914
- # Corresponds to the JSON property `resourcesScanned`
915
- # @return [Fixnum]
916
- attr_accessor :resources_scanned
917
-
918
- # Time when the request started processing, i.e. when the state was set to
919
- # RUNNING.
920
- # Corresponds to the JSON property `startTime`
921
- # @return [String]
922
- attr_accessor :start_time
923
-
924
- # The current state of the operation.
925
- # Corresponds to the JSON property `state`
926
- # @return [String]
927
- attr_accessor :state
928
-
929
- def initialize(**args)
930
- update!(**args)
931
- end
932
-
933
- # Update properties of this object
934
- def update!(**args)
935
- @request_time = args[:request_time] if args.key?(:request_time)
936
- @resources_found = args[:resources_found] if args.key?(:resources_found)
937
- @resources_pending = args[:resources_pending] if args.key?(:resources_pending)
938
- @resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
939
- @start_time = args[:start_time] if args.key?(:start_time)
940
- @state = args[:state] if args.key?(:state)
941
- end
942
- end
943
-
944
- # ListOrgPolicyViolationsPreviewsResponse is the response message for
945
- # OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.
946
- class GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse
947
- include Google::Apis::Core::Hashable
948
-
949
- # A token that you can use to retrieve the next page of results. If this field
950
- # is omitted, there are no subsequent pages.
951
- # Corresponds to the JSON property `nextPageToken`
952
- # @return [String]
953
- attr_accessor :next_page_token
954
-
955
- # The list of OrgPolicyViolationsPreview
956
- # Corresponds to the JSON property `orgPolicyViolationsPreviews`
957
- # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview>]
958
- attr_accessor :org_policy_violations_previews
959
-
960
- def initialize(**args)
961
- update!(**args)
962
- end
963
-
964
- # Update properties of this object
965
- def update!(**args)
966
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
967
- @org_policy_violations_previews = args[:org_policy_violations_previews] if args.key?(:org_policy_violations_previews)
968
- end
969
- end
970
-
971
- # ListOrgPolicyViolationsResponse is the response message for
972
- # OrgPolicyViolationsPreviewService.ListOrgPolicyViolations
973
- class GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse
974
- include Google::Apis::Core::Hashable
975
-
976
- # A token that you can use to retrieve the next page of results. If this field
977
- # is omitted, there are no subsequent pages.
978
- # Corresponds to the JSON property `nextPageToken`
979
- # @return [String]
980
- attr_accessor :next_page_token
981
-
982
- # The list of OrgPolicyViolations
983
- # Corresponds to the JSON property `orgPolicyViolations`
984
- # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation>]
985
- attr_accessor :org_policy_violations
986
-
987
- def initialize(**args)
988
- update!(**args)
989
- end
990
-
991
- # Update properties of this object
992
- def update!(**args)
993
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
994
- @org_policy_violations = args[:org_policy_violations] if args.key?(:org_policy_violations)
995
- end
996
- end
997
-
998
- # Response message for Simulator.ListReplayResults.
999
- class GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse
1000
- include Google::Apis::Core::Hashable
1001
-
1002
- # A token that you can use to retrieve the next page of ReplayResult objects. If
1003
- # this field is omitted, there are no subsequent pages.
1004
- # Corresponds to the JSON property `nextPageToken`
1005
- # @return [String]
1006
- attr_accessor :next_page_token
1007
-
1008
- # The results of running a Replay.
1009
- # Corresponds to the JSON property `replayResults`
1010
- # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaReplayResult>]
1011
- attr_accessor :replay_results
1012
-
1013
- def initialize(**args)
1014
- update!(**args)
1015
- end
1016
-
1017
- # Update properties of this object
1018
- def update!(**args)
1019
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1020
- @replay_results = args[:replay_results] if args.key?(:replay_results)
1021
- end
1022
- end
1023
-
1024
- # Response message for Simulator.ListReplays.
1025
- class GoogleCloudPolicysimulatorV1alphaListReplaysResponse
1026
- include Google::Apis::Core::Hashable
1027
-
1028
- # A token that you can use to retrieve the next page of results. If this field
1029
- # is omitted, there are no subsequent pages.
1030
- # Corresponds to the JSON property `nextPageToken`
1031
- # @return [String]
1032
- attr_accessor :next_page_token
1033
-
1034
- # The list of Replay objects.
1035
- # Corresponds to the JSON property `replays`
1036
- # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaReplay>]
1037
- attr_accessor :replays
1038
-
1039
- def initialize(**args)
1040
- update!(**args)
1041
- end
1042
-
1043
- # Update properties of this object
1044
- def update!(**args)
1045
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1046
- @replays = args[:replays] if args.key?(:replays)
1047
- end
1048
- end
1049
-
1050
- # The proposed changes to OrgPolicy.
1051
- class GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay
1052
- include Google::Apis::Core::Hashable
1053
-
1054
- # Optional. The OrgPolicy CustomConstraint changes to preview violations for.
1055
- # Any existing CustomConstraints with the same name will be overridden in the
1056
- # simulation. That is, violations will be determined as if all custom
1057
- # constraints in the overlay were instantiated. Only a single custom_constraint
1058
- # is supported in the overlay at a time. For evaluating multiple constraints,
1059
- # multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each
1060
- # request evaluates a single constraint.
1061
- # Corresponds to the JSON property `customConstraints`
1062
- # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay>]
1063
- attr_accessor :custom_constraints
1064
-
1065
- # Optional. The OrgPolicy changes to preview violations for. Any existing
1066
- # OrgPolicies with the same name will be overridden in the simulation. That is,
1067
- # violations will be determined as if all policies in the overlay were created
1068
- # or updated.
1069
- # Corresponds to the JSON property `policies`
1070
- # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay>]
1071
- attr_accessor :policies
1072
-
1073
- def initialize(**args)
1074
- update!(**args)
1075
- end
1076
-
1077
- # Update properties of this object
1078
- def update!(**args)
1079
- @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
1080
- @policies = args[:policies] if args.key?(:policies)
1081
- end
1082
- end
1083
-
1084
- # A change to an OrgPolicy custom constraint.
1085
- class GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay
1086
- include Google::Apis::Core::Hashable
1087
-
1088
- # A custom constraint defined by customers which can *only* be applied to the
1089
- # given resource types and organization. By creating a custom constraint,
1090
- # customers can apply policies of this custom constraint. *Creating a custom
1091
- # constraint itself does NOT apply any policy enforcement*.
1092
- # Corresponds to the JSON property `customConstraint`
1093
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudOrgpolicyV2CustomConstraint]
1094
- attr_accessor :custom_constraint
1095
-
1096
- # Optional. Resource the constraint is attached to. Example: "organization/
1097
- # 987654"
1098
- # Corresponds to the JSON property `customConstraintParent`
1099
- # @return [String]
1100
- attr_accessor :custom_constraint_parent
1101
-
1102
- def initialize(**args)
1103
- update!(**args)
1104
- end
1105
-
1106
- # Update properties of this object
1107
- def update!(**args)
1108
- @custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
1109
- @custom_constraint_parent = args[:custom_constraint_parent] if args.key?(:custom_constraint_parent)
1110
- end
1111
- end
1112
-
1113
- # A change to an OrgPolicy.
1114
- class GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay
1115
- include Google::Apis::Core::Hashable
1116
-
1117
- # Defines an organization policy which is used to specify constraints for
1118
- # configurations of Google Cloud resources.
1119
- # Corresponds to the JSON property `policy`
1120
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudOrgpolicyV2Policy]
1121
- attr_accessor :policy
1122
-
1123
- # Optional. The parent of the policy we are attaching to. Example: "projects/
1124
- # 123456"
1125
- # Corresponds to the JSON property `policyParent`
1126
- # @return [String]
1127
- attr_accessor :policy_parent
1128
-
1129
- def initialize(**args)
1130
- update!(**args)
1131
- end
1132
-
1133
- # Update properties of this object
1134
- def update!(**args)
1135
- @policy = args[:policy] if args.key?(:policy)
1136
- @policy_parent = args[:policy_parent] if args.key?(:policy_parent)
1137
- end
1138
- end
1139
-
1140
- # OrgPolicyViolation is a resource representing a single resource violating a
1141
- # single OrgPolicy constraint.
1142
- class GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation
1143
- include Google::Apis::Core::Hashable
1144
-
1145
- # A custom constraint defined by customers which can *only* be applied to the
1146
- # given resource types and organization. By creating a custom constraint,
1147
- # customers can apply policies of this custom constraint. *Creating a custom
1148
- # constraint itself does NOT apply any policy enforcement*.
1149
- # Corresponds to the JSON property `customConstraint`
1150
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudOrgpolicyV2CustomConstraint]
1151
- attr_accessor :custom_constraint
1152
-
1153
- # The `Status` type defines a logical error model that is suitable for different
1154
- # programming environments, including REST APIs and RPC APIs. It is used by [
1155
- # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1156
- # data: error code, error message, and error details. You can find out more
1157
- # about this error model and how to work with it in the [API Design Guide](https:
1158
- # //cloud.google.com/apis/design/errors).
1159
- # Corresponds to the JSON property `error`
1160
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleRpcStatus]
1161
- attr_accessor :error
1162
-
1163
- # The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/
1164
- # locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`
1165
- # Corresponds to the JSON property `name`
1166
- # @return [String]
1167
- attr_accessor :name
1168
-
1169
- # ResourceContext provides the context we know about a resource. It is similar
1170
- # in concept to google.cloud.asset.v1.Resource, but focuses on the information
1171
- # specifically used by Simulator.
1172
- # Corresponds to the JSON property `resource`
1173
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaResourceContext]
1174
- attr_accessor :resource
1175
-
1176
- def initialize(**args)
1177
- update!(**args)
1178
- end
1179
-
1180
- # Update properties of this object
1181
- def update!(**args)
1182
- @custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
1183
- @error = args[:error] if args.key?(:error)
1184
- @name = args[:name] if args.key?(:name)
1185
- @resource = args[:resource] if args.key?(:resource)
1186
- end
1187
- end
1188
-
1189
- # OrgPolicyViolationsPreview is a resource providing a preview of the violations
1190
- # that will exist if an OrgPolicy change is made. The list of violations are
1191
- # modeled as child resources and retrieved via a ListOrgPolicyViolations API
1192
- # call. There are potentially more OrgPolicyViolations than could fit in an
1193
- # embedded field. Thus, the use of a child resource instead of a field.
1194
- class GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview
1195
- include Google::Apis::Core::Hashable
1196
-
1197
- # Output only. Time when this `OrgPolicyViolationsPreview` was created.
1198
- # Corresponds to the JSON property `createTime`
1199
- # @return [String]
1200
- attr_accessor :create_time
1201
-
1202
- # Output only. The names of the constraints against which all `
1203
- # OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `
1204
- # PolicyOverlay` then it contains the name of the configured custom constraint,
1205
- # applicable to the specified policies. Otherwise it contains the name of the
1206
- # constraint specified in `CustomConstraintOverlay`. Format: `organizations/`
1207
- # organization_id`/customConstraints/`custom_constraint_id`` Example: `
1208
- # organizations/123/customConstraints/custom.createOnlyE2TypeVms`
1209
- # Corresponds to the JSON property `customConstraints`
1210
- # @return [Array<String>]
1211
- attr_accessor :custom_constraints
1212
-
1213
- # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the
1214
- # following format: `organizations/`organization`/locations/`location`/
1215
- # orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`` Example: `
1216
- # organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/
1217
- # 506a5f7f`
1218
- # Corresponds to the JSON property `name`
1219
- # @return [String]
1220
- attr_accessor :name
1221
-
1222
- # The proposed changes to OrgPolicy.
1223
- # Corresponds to the JSON property `overlay`
1224
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay]
1225
- attr_accessor :overlay
1226
-
1227
- # A summary of the state of all resources scanned for compliance with the
1228
- # changed OrgPolicy.
1229
- # Corresponds to the JSON property `resourceCounts`
1230
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts]
1231
- attr_accessor :resource_counts
1232
-
1233
- # Output only. The state of the `OrgPolicyViolationsPreview`.
1234
- # Corresponds to the JSON property `state`
1235
- # @return [String]
1236
- attr_accessor :state
1237
-
1238
- # Output only. The number of OrgPolicyViolations in this `
1239
- # OrgPolicyViolationsPreview`. This count may differ from `resource_summary.
1240
- # noncompliant_count` because each OrgPolicyViolation is specific to a resource *
1241
- # *and** constraint. If there are multiple constraints being evaluated (i.e.
1242
- # multiple policies in the overlay), a single resource may violate multiple
1243
- # constraints.
1244
- # Corresponds to the JSON property `violationsCount`
1245
- # @return [Fixnum]
1246
- attr_accessor :violations_count
1247
-
1248
- def initialize(**args)
1249
- update!(**args)
1250
- end
1251
-
1252
- # Update properties of this object
1253
- def update!(**args)
1254
- @create_time = args[:create_time] if args.key?(:create_time)
1255
- @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
1256
- @name = args[:name] if args.key?(:name)
1257
- @overlay = args[:overlay] if args.key?(:overlay)
1258
- @resource_counts = args[:resource_counts] if args.key?(:resource_counts)
1259
- @state = args[:state] if args.key?(:state)
1260
- @violations_count = args[:violations_count] if args.key?(:violations_count)
1261
- end
1262
- end
1263
-
1264
- # A summary of the state of all resources scanned for compliance with the
1265
- # changed OrgPolicy.
1266
- class GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts
1267
- include Google::Apis::Core::Hashable
1268
-
1269
- # Output only. Number of scanned resources with zero violations.
1270
- # Corresponds to the JSON property `compliant`
1271
- # @return [Fixnum]
1272
- attr_accessor :compliant
1273
-
1274
- # Output only. Number of resources that returned an error when scanned.
1275
- # Corresponds to the JSON property `errors`
1276
- # @return [Fixnum]
1277
- attr_accessor :errors
1278
-
1279
- # Output only. Number of scanned resources with at least one violation.
1280
- # Corresponds to the JSON property `noncompliant`
1281
- # @return [Fixnum]
1282
- attr_accessor :noncompliant
1283
-
1284
- # Output only. Number of resources checked for compliance. Must equal:
1285
- # unenforced + noncompliant + compliant + error
1286
- # Corresponds to the JSON property `scanned`
1287
- # @return [Fixnum]
1288
- attr_accessor :scanned
1289
-
1290
- # Output only. Number of resources where the constraint was not enforced, i.e.
1291
- # the Policy set `enforced: false` for that resource.
1292
- # Corresponds to the JSON property `unenforced`
1293
- # @return [Fixnum]
1294
- attr_accessor :unenforced
1295
-
1296
- def initialize(**args)
1297
- update!(**args)
1298
- end
1299
-
1300
- # Update properties of this object
1301
- def update!(**args)
1302
- @compliant = args[:compliant] if args.key?(:compliant)
1303
- @errors = args[:errors] if args.key?(:errors)
1304
- @noncompliant = args[:noncompliant] if args.key?(:noncompliant)
1305
- @scanned = args[:scanned] if args.key?(:scanned)
1306
- @unenforced = args[:unenforced] if args.key?(:unenforced)
1307
- end
1308
- end
1309
-
1310
- # A resource describing a `Replay`, or simulation.
1311
- class GoogleCloudPolicysimulatorV1alphaReplay
1312
- include Google::Apis::Core::Hashable
1313
-
1314
- # The configuration used for a Replay.
1315
- # Corresponds to the JSON property `config`
1316
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaReplayConfig]
1317
- attr_accessor :config
1318
-
1319
- # Output only. The resource name of the `Replay`, which has the following format:
1320
- # ``projects|folders|organizations`/`resource-id`/locations/global/replays/`
1321
- # replay-id``, where ``resource-id`` is the ID of the project, folder, or
1322
- # organization that owns the Replay. Example: `projects/my-example-project/
1323
- # locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
1324
- # Corresponds to the JSON property `name`
1325
- # @return [String]
1326
- attr_accessor :name
1327
-
1328
- # Summary statistics about the replayed log entries.
1329
- # Corresponds to the JSON property `resultsSummary`
1330
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaReplayResultsSummary]
1331
- attr_accessor :results_summary
1332
-
1333
- # Output only. The current state of the `Replay`.
1334
- # Corresponds to the JSON property `state`
1335
- # @return [String]
1336
- attr_accessor :state
1337
-
1338
- def initialize(**args)
1339
- update!(**args)
1340
- end
1341
-
1342
- # Update properties of this object
1343
- def update!(**args)
1344
- @config = args[:config] if args.key?(:config)
1345
- @name = args[:name] if args.key?(:name)
1346
- @results_summary = args[:results_summary] if args.key?(:results_summary)
1347
- @state = args[:state] if args.key?(:state)
1348
- end
1349
- end
1350
-
1351
- # The configuration used for a Replay.
1352
- class GoogleCloudPolicysimulatorV1alphaReplayConfig
1353
- include Google::Apis::Core::Hashable
1354
-
1355
- # The logs to use as input for the Replay.
1356
- # Corresponds to the JSON property `logSource`
1357
- # @return [String]
1358
- attr_accessor :log_source
1359
-
1360
- # A mapping of the resources that you want to simulate policies for and the
1361
- # policies that you want to simulate. Keys are the full resource names for the
1362
- # resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-
1363
- # project`. For examples of full resource names for Google Cloud services, see
1364
- # https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values
1365
- # are Policy objects representing the policies that you want to simulate.
1366
- # Replays automatically take into account any IAM policies inherited through the
1367
- # resource hierarchy, and any policies set on descendant resources. You do not
1368
- # need to include these policies in the policy overlay.
1369
- # Corresponds to the JSON property `policyOverlay`
1370
- # @return [Hash<String,Google::Apis::PolicysimulatorV1alpha::GoogleIamV1Policy>]
1371
- attr_accessor :policy_overlay
1372
-
1373
- def initialize(**args)
1374
- update!(**args)
1375
- end
1376
-
1377
- # Update properties of this object
1378
- def update!(**args)
1379
- @log_source = args[:log_source] if args.key?(:log_source)
1380
- @policy_overlay = args[:policy_overlay] if args.key?(:policy_overlay)
1381
- end
1382
- end
1383
-
1384
- # The difference between the results of evaluating an access tuple under the
1385
- # current (baseline) policies and under the proposed (simulated) policies. This
1386
- # difference explains how a principal's access could change if the proposed
1387
- # policies were applied.
1388
- class GoogleCloudPolicysimulatorV1alphaReplayDiff
1389
- include Google::Apis::Core::Hashable
1390
-
1391
- # A summary and comparison of the principal's access under the current (baseline)
1392
- # policies and the proposed (simulated) policies for a single access tuple.
1393
- # Corresponds to the JSON property `accessDiff`
1394
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaAccessStateDiff]
1395
- attr_accessor :access_diff
1396
-
1397
- def initialize(**args)
1398
- update!(**args)
1399
- end
1400
-
1401
- # Update properties of this object
1402
- def update!(**args)
1403
- @access_diff = args[:access_diff] if args.key?(:access_diff)
1404
- end
1405
- end
1406
-
1407
- # The result of replaying a single access tuple against a simulated state.
1408
- class GoogleCloudPolicysimulatorV1alphaReplayResult
1409
- include Google::Apis::Core::Hashable
1410
-
1411
- # Information about the principal, resource, and permission to check.
1412
- # Corresponds to the JSON property `accessTuple`
1413
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaAccessTuple]
1414
- attr_accessor :access_tuple
1415
-
1416
- # The difference between the results of evaluating an access tuple under the
1417
- # current (baseline) policies and under the proposed (simulated) policies. This
1418
- # difference explains how a principal's access could change if the proposed
1419
- # policies were applied.
1420
- # Corresponds to the JSON property `diff`
1421
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaReplayDiff]
1422
- attr_accessor :diff
1423
-
1424
- # The `Status` type defines a logical error model that is suitable for different
1425
- # programming environments, including REST APIs and RPC APIs. It is used by [
1426
- # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1427
- # data: error code, error message, and error details. You can find out more
1428
- # about this error model and how to work with it in the [API Design Guide](https:
1429
- # //cloud.google.com/apis/design/errors).
1430
- # Corresponds to the JSON property `error`
1431
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleRpcStatus]
1432
- attr_accessor :error
1433
-
1434
- # Represents a whole or partial calendar date, such as a birthday. The time of
1435
- # day and time zone are either specified elsewhere or are insignificant. The
1436
- # date is relative to the Gregorian Calendar. This can represent one of the
1437
- # following: * A full date, with non-zero year, month, and day values. * A month
1438
- # and day, with a zero year (for example, an anniversary). * A year on its own,
1439
- # with a zero month and a zero day. * A year and month, with a zero day (for
1440
- # example, a credit card expiration date). Related types: * google.type.
1441
- # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1442
- # Corresponds to the JSON property `lastSeenDate`
1443
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleTypeDate]
1444
- attr_accessor :last_seen_date
1445
-
1446
- # The resource name of the `ReplayResult`, in the following format: ``projects|
1447
- # folders|organizations`/`resource-id`/locations/global/replays/`replay-id`/
1448
- # results/`replay-result-id``, where ``resource-id`` is the ID of the project,
1449
- # folder, or organization that owns the Replay. Example: `projects/my-example-
1450
- # project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/
1451
- # 1234`
1452
- # Corresponds to the JSON property `name`
1453
- # @return [String]
1454
- attr_accessor :name
1455
-
1456
- # The Replay that the access tuple was included in.
1457
- # Corresponds to the JSON property `parent`
1458
- # @return [String]
1459
- attr_accessor :parent
1460
-
1461
- def initialize(**args)
1462
- update!(**args)
1463
- end
1464
-
1465
- # Update properties of this object
1466
- def update!(**args)
1467
- @access_tuple = args[:access_tuple] if args.key?(:access_tuple)
1468
- @diff = args[:diff] if args.key?(:diff)
1469
- @error = args[:error] if args.key?(:error)
1470
- @last_seen_date = args[:last_seen_date] if args.key?(:last_seen_date)
1471
- @name = args[:name] if args.key?(:name)
1472
- @parent = args[:parent] if args.key?(:parent)
1473
- end
1474
- end
1475
-
1476
- # Summary statistics about the replayed log entries.
1477
- class GoogleCloudPolicysimulatorV1alphaReplayResultsSummary
1478
- include Google::Apis::Core::Hashable
1479
-
1480
- # The number of replayed log entries with a difference between baseline and
1481
- # simulated policies.
1482
- # Corresponds to the JSON property `differenceCount`
1483
- # @return [Fixnum]
1484
- attr_accessor :difference_count
1485
-
1486
- # The number of log entries that could not be replayed.
1487
- # Corresponds to the JSON property `errorCount`
1488
- # @return [Fixnum]
1489
- attr_accessor :error_count
1490
-
1491
- # The total number of log entries replayed.
1492
- # Corresponds to the JSON property `logCount`
1493
- # @return [Fixnum]
1494
- attr_accessor :log_count
1495
-
1496
- # Represents a whole or partial calendar date, such as a birthday. The time of
1497
- # day and time zone are either specified elsewhere or are insignificant. The
1498
- # date is relative to the Gregorian Calendar. This can represent one of the
1499
- # following: * A full date, with non-zero year, month, and day values. * A month
1500
- # and day, with a zero year (for example, an anniversary). * A year on its own,
1501
- # with a zero month and a zero day. * A year and month, with a zero day (for
1502
- # example, a credit card expiration date). Related types: * google.type.
1503
- # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1504
- # Corresponds to the JSON property `newestDate`
1505
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleTypeDate]
1506
- attr_accessor :newest_date
1507
-
1508
- # Represents a whole or partial calendar date, such as a birthday. The time of
1509
- # day and time zone are either specified elsewhere or are insignificant. The
1510
- # date is relative to the Gregorian Calendar. This can represent one of the
1511
- # following: * A full date, with non-zero year, month, and day values. * A month
1512
- # and day, with a zero year (for example, an anniversary). * A year on its own,
1513
- # with a zero month and a zero day. * A year and month, with a zero day (for
1514
- # example, a credit card expiration date). Related types: * google.type.
1515
- # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1516
- # Corresponds to the JSON property `oldestDate`
1517
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleTypeDate]
1518
- attr_accessor :oldest_date
1519
-
1520
- # The number of replayed log entries with no difference between baseline and
1521
- # simulated policies.
1522
- # Corresponds to the JSON property `unchangedCount`
1523
- # @return [Fixnum]
1524
- attr_accessor :unchanged_count
1525
-
1526
- def initialize(**args)
1527
- update!(**args)
1528
- end
1529
-
1530
- # Update properties of this object
1531
- def update!(**args)
1532
- @difference_count = args[:difference_count] if args.key?(:difference_count)
1533
- @error_count = args[:error_count] if args.key?(:error_count)
1534
- @log_count = args[:log_count] if args.key?(:log_count)
1535
- @newest_date = args[:newest_date] if args.key?(:newest_date)
1536
- @oldest_date = args[:oldest_date] if args.key?(:oldest_date)
1537
- @unchanged_count = args[:unchanged_count] if args.key?(:unchanged_count)
1538
- end
1539
- end
1540
-
1541
- # ResourceContext provides the context we know about a resource. It is similar
1542
- # in concept to google.cloud.asset.v1.Resource, but focuses on the information
1543
- # specifically used by Simulator.
1544
- class GoogleCloudPolicysimulatorV1alphaResourceContext
1545
- include Google::Apis::Core::Hashable
1546
-
1547
- # The ancestry path of the resource in Google Cloud [resource hierarchy](https://
1548
- # cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
1549
- # represented as a list of relative resource names. An ancestry path starts with
1550
- # the closest ancestor in the hierarchy and ends at root. If the resource is a
1551
- # project, folder, or organization, the ancestry path starts from the resource
1552
- # itself. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
1553
- # Corresponds to the JSON property `ancestors`
1554
- # @return [Array<String>]
1555
- attr_accessor :ancestors
1556
-
1557
- # The asset type of the resource as defined by CAIS. Example: `compute.
1558
- # googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/
1559
- # asset-inventory/docs/supported-asset-types) for more information.
1560
- # Corresponds to the JSON property `assetType`
1561
- # @return [String]
1562
- attr_accessor :asset_type
1563
-
1564
- # The full name of the resource. Example: `//compute.googleapis.com/projects/
1565
- # my_project_123/zones/zone1/instances/instance1` See [Resource names](https://
1566
- # cloud.google.com/apis/design/resource_names#full_resource_name) for more
1567
- # information.
1568
- # Corresponds to the JSON property `resource`
1569
- # @return [String]
1570
- attr_accessor :resource
1571
-
1572
- def initialize(**args)
1573
- update!(**args)
1574
- end
1575
-
1576
- # Update properties of this object
1577
- def update!(**args)
1578
- @ancestors = args[:ancestors] if args.key?(:ancestors)
1579
- @asset_type = args[:asset_type] if args.key?(:asset_type)
1580
- @resource = args[:resource] if args.key?(:resource)
1581
- end
1582
- end
1583
-
1584
- # CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
1585
- # OrgPolicyViolationsPreview generations operation.
1586
- class GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata
1587
- include Google::Apis::Core::Hashable
1588
-
1589
- # Time when the request was received.
1590
- # Corresponds to the JSON property `requestTime`
1591
- # @return [String]
1592
- attr_accessor :request_time
1593
-
1594
- # Total number of resources that need scanning. Should equal resource_scanned +
1595
- # resources_pending
1596
- # Corresponds to the JSON property `resourcesFound`
1597
- # @return [Fixnum]
1598
- attr_accessor :resources_found
1599
-
1600
- # Number of resources still to scan.
1601
- # Corresponds to the JSON property `resourcesPending`
1602
- # @return [Fixnum]
1603
- attr_accessor :resources_pending
1604
-
1605
- # Number of resources already scanned.
1606
- # Corresponds to the JSON property `resourcesScanned`
1607
- # @return [Fixnum]
1608
- attr_accessor :resources_scanned
1609
-
1610
- # Time when the request started processing, i.e., when the state was set to
1611
- # RUNNING.
1612
- # Corresponds to the JSON property `startTime`
1613
- # @return [String]
1614
- attr_accessor :start_time
1615
-
1616
- # Output only. The current state of the operation.
1617
- # Corresponds to the JSON property `state`
1618
- # @return [String]
1619
- attr_accessor :state
1620
-
1621
- def initialize(**args)
1622
- update!(**args)
1623
- end
1624
-
1625
- # Update properties of this object
1626
- def update!(**args)
1627
- @request_time = args[:request_time] if args.key?(:request_time)
1628
- @resources_found = args[:resources_found] if args.key?(:resources_found)
1629
- @resources_pending = args[:resources_pending] if args.key?(:resources_pending)
1630
- @resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
1631
- @start_time = args[:start_time] if args.key?(:start_time)
1632
- @state = args[:state] if args.key?(:state)
1633
- end
1634
- end
1635
-
1636
- # GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
1637
- # OrgPolicyViolationsPreview generations operation.
1638
- class GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata
1639
- include Google::Apis::Core::Hashable
1640
-
1641
- # Time when the request was received.
1642
- # Corresponds to the JSON property `requestTime`
1643
- # @return [String]
1644
- attr_accessor :request_time
1645
-
1646
- # Total number of resources that need scanning. Should equal resource_scanned +
1647
- # resources_pending
1648
- # Corresponds to the JSON property `resourcesFound`
1649
- # @return [Fixnum]
1650
- attr_accessor :resources_found
1651
-
1652
- # Number of resources still to scan.
1653
- # Corresponds to the JSON property `resourcesPending`
1654
- # @return [Fixnum]
1655
- attr_accessor :resources_pending
1656
-
1657
- # Number of resources already scanned.
1658
- # Corresponds to the JSON property `resourcesScanned`
1659
- # @return [Fixnum]
1660
- attr_accessor :resources_scanned
1661
-
1662
- # Time when the request started processing, i.e. when the state was set to
1663
- # RUNNING.
1664
- # Corresponds to the JSON property `startTime`
1665
- # @return [String]
1666
- attr_accessor :start_time
1667
-
1668
- # The current state of the operation.
1669
- # Corresponds to the JSON property `state`
1670
- # @return [String]
1671
- attr_accessor :state
1672
-
1673
- def initialize(**args)
1674
- update!(**args)
1675
- end
1676
-
1677
- # Update properties of this object
1678
- def update!(**args)
1679
- @request_time = args[:request_time] if args.key?(:request_time)
1680
- @resources_found = args[:resources_found] if args.key?(:resources_found)
1681
- @resources_pending = args[:resources_pending] if args.key?(:resources_pending)
1682
- @resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
1683
- @start_time = args[:start_time] if args.key?(:start_time)
1684
- @state = args[:state] if args.key?(:state)
1685
- end
1686
- end
1687
-
1688
- # The proposed changes to OrgPolicy.
1689
- class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay
1690
- include Google::Apis::Core::Hashable
1691
-
1692
- # Optional. The OrgPolicy CustomConstraint changes to preview violations for.
1693
- # Any existing CustomConstraints with the same name will be overridden in the
1694
- # simulation. That is, violations will be determined as if all custom
1695
- # constraints in the overlay were instantiated. Only a single custom_constraint
1696
- # is supported in the overlay at a time. For evaluating multiple constraints,
1697
- # multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each
1698
- # request evaluates a single constraint.
1699
- # Corresponds to the JSON property `customConstraints`
1700
- # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay>]
1701
- attr_accessor :custom_constraints
1702
-
1703
- # Optional. The OrgPolicy changes to preview violations for. Any existing
1704
- # OrgPolicies with the same name will be overridden in the simulation. That is,
1705
- # violations will be determined as if all policies in the overlay were created
1706
- # or updated.
1707
- # Corresponds to the JSON property `policies`
1708
- # @return [Array<Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay>]
1709
- attr_accessor :policies
1710
-
1711
- def initialize(**args)
1712
- update!(**args)
1713
- end
1714
-
1715
- # Update properties of this object
1716
- def update!(**args)
1717
- @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
1718
- @policies = args[:policies] if args.key?(:policies)
1719
- end
1720
- end
1721
-
1722
- # A change to an OrgPolicy custom constraint.
1723
- class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay
1724
- include Google::Apis::Core::Hashable
1725
-
1726
- # A custom constraint defined by customers which can *only* be applied to the
1727
- # given resource types and organization. By creating a custom constraint,
1728
- # customers can apply policies of this custom constraint. *Creating a custom
1729
- # constraint itself does NOT apply any policy enforcement*.
1730
- # Corresponds to the JSON property `customConstraint`
1731
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudOrgpolicyV2CustomConstraint]
1732
- attr_accessor :custom_constraint
1733
-
1734
- # Optional. Resource the constraint is attached to. Example: "organization/
1735
- # 987654"
1736
- # Corresponds to the JSON property `customConstraintParent`
1737
- # @return [String]
1738
- attr_accessor :custom_constraint_parent
1739
-
1740
- def initialize(**args)
1741
- update!(**args)
1742
- end
1743
-
1744
- # Update properties of this object
1745
- def update!(**args)
1746
- @custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
1747
- @custom_constraint_parent = args[:custom_constraint_parent] if args.key?(:custom_constraint_parent)
1748
- end
1749
- end
1750
-
1751
- # A change to an OrgPolicy.
1752
- class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay
1753
- include Google::Apis::Core::Hashable
1754
-
1755
- # Defines an organization policy which is used to specify constraints for
1756
- # configurations of Google Cloud resources.
1757
- # Corresponds to the JSON property `policy`
1758
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudOrgpolicyV2Policy]
1759
- attr_accessor :policy
1760
-
1761
- # Optional. The parent of the policy we are attaching to. Example: "projects/
1762
- # 123456"
1763
- # Corresponds to the JSON property `policyParent`
1764
- # @return [String]
1765
- attr_accessor :policy_parent
1766
-
1767
- def initialize(**args)
1768
- update!(**args)
1769
- end
1770
-
1771
- # Update properties of this object
1772
- def update!(**args)
1773
- @policy = args[:policy] if args.key?(:policy)
1774
- @policy_parent = args[:policy_parent] if args.key?(:policy_parent)
1775
- end
1776
- end
1777
-
1778
- # OrgPolicyViolationsPreview is a resource providing a preview of the violations
1779
- # that will exist if an OrgPolicy change is made. The list of violations are
1780
- # modeled as child resources and retrieved via a ListOrgPolicyViolations API
1781
- # call. There are potentially more OrgPolicyViolations than could fit in an
1782
- # embedded field. Thus, the use of a child resource instead of a field.
1783
- class GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
1784
- include Google::Apis::Core::Hashable
1785
-
1786
- # Output only. Time when this `OrgPolicyViolationsPreview` was created.
1787
- # Corresponds to the JSON property `createTime`
1788
- # @return [String]
1789
- attr_accessor :create_time
1790
-
1791
- # Output only. The names of the constraints against which all `
1792
- # OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `
1793
- # PolicyOverlay` then it contains the name of the configured custom constraint,
1794
- # applicable to the specified policies. Otherwise it contains the name of the
1795
- # constraint specified in `CustomConstraintOverlay`. Format: `organizations/`
1796
- # organization_id`/customConstraints/`custom_constraint_id`` Example: `
1797
- # organizations/123/customConstraints/custom.createOnlyE2TypeVms`
1798
- # Corresponds to the JSON property `customConstraints`
1799
- # @return [Array<String>]
1800
- attr_accessor :custom_constraints
1801
-
1802
- # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the
1803
- # following format: `organizations/`organization`/locations/`location`/
1804
- # orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`` Example: `
1805
- # organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/
1806
- # 506a5f7f`
1807
- # Corresponds to the JSON property `name`
1808
- # @return [String]
1809
- attr_accessor :name
1810
-
1811
- # The proposed changes to OrgPolicy.
1812
- # Corresponds to the JSON property `overlay`
1813
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay]
1814
- attr_accessor :overlay
1815
-
1816
- # A summary of the state of all resources scanned for compliance with the
1817
- # changed OrgPolicy.
1818
- # Corresponds to the JSON property `resourceCounts`
1819
- # @return [Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts]
1820
- attr_accessor :resource_counts
1821
-
1822
- # Output only. The state of the `OrgPolicyViolationsPreview`.
1823
- # Corresponds to the JSON property `state`
1824
- # @return [String]
1825
- attr_accessor :state
1826
-
1827
- # Output only. The number of OrgPolicyViolations in this `
1828
- # OrgPolicyViolationsPreview`. This count may differ from `resource_summary.
1829
- # noncompliant_count` because each OrgPolicyViolation is specific to a resource *
1830
- # *and** constraint. If there are multiple constraints being evaluated (i.e.
1831
- # multiple policies in the overlay), a single resource may violate multiple
1832
- # constraints.
1833
- # Corresponds to the JSON property `violationsCount`
1834
- # @return [Fixnum]
1835
- attr_accessor :violations_count
1836
-
1837
- def initialize(**args)
1838
- update!(**args)
1839
- end
1840
-
1841
- # Update properties of this object
1842
- def update!(**args)
1843
- @create_time = args[:create_time] if args.key?(:create_time)
1844
- @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
1845
- @name = args[:name] if args.key?(:name)
1846
- @overlay = args[:overlay] if args.key?(:overlay)
1847
- @resource_counts = args[:resource_counts] if args.key?(:resource_counts)
1848
- @state = args[:state] if args.key?(:state)
1849
- @violations_count = args[:violations_count] if args.key?(:violations_count)
1850
- end
1851
- end
1852
-
1853
- # A summary of the state of all resources scanned for compliance with the
1854
- # changed OrgPolicy.
1855
- class GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts
1856
- include Google::Apis::Core::Hashable
1857
-
1858
- # Output only. Number of scanned resources with zero violations.
1859
- # Corresponds to the JSON property `compliant`
1860
- # @return [Fixnum]
1861
- attr_accessor :compliant
1862
-
1863
- # Output only. Number of resources that returned an error when scanned.
1864
- # Corresponds to the JSON property `errors`
1865
- # @return [Fixnum]
1866
- attr_accessor :errors
1867
-
1868
- # Output only. Number of scanned resources with at least one violation.
1869
- # Corresponds to the JSON property `noncompliant`
1870
- # @return [Fixnum]
1871
- attr_accessor :noncompliant
1872
-
1873
- # Output only. Number of resources checked for compliance. Must equal:
1874
- # unenforced + noncompliant + compliant + error
1875
- # Corresponds to the JSON property `scanned`
1876
- # @return [Fixnum]
1877
- attr_accessor :scanned
1878
-
1879
- # Output only. Number of resources where the constraint was not enforced, i.e.
1880
- # the Policy set `enforced: false` for that resource.
1881
- # Corresponds to the JSON property `unenforced`
1882
- # @return [Fixnum]
1883
- attr_accessor :unenforced
1884
-
1885
- def initialize(**args)
1886
- update!(**args)
1887
- end
1888
-
1889
- # Update properties of this object
1890
- def update!(**args)
1891
- @compliant = args[:compliant] if args.key?(:compliant)
1892
- @errors = args[:errors] if args.key?(:errors)
1893
- @noncompliant = args[:noncompliant] if args.key?(:noncompliant)
1894
- @scanned = args[:scanned] if args.key?(:scanned)
1895
- @unenforced = args[:unenforced] if args.key?(:unenforced)
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