google-apis-policysimulator_v1 0.41.0 → 0.43.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29f69af75faa497bda36fa0298987b11d7aa66880ec8a4349682453c8a094f69
4
- data.tar.gz: c1b8ab3ff0147dc447e6d492502053e75ac06f13ee15f7010a284c81e2457a8b
3
+ metadata.gz: 8bdfc2ec9a54ea09ef5c0eb3f801c240443ebdce2de11fd2b45c05941d0a1524
4
+ data.tar.gz: c1c23f13ea6b9ea86c6f216a569756a1b09e40ec010fb9054f1d6fafc13678a6
5
5
  SHA512:
6
- metadata.gz: 863be229cc4359506b0314cac0fb66dcc5b76e566acd7673ae981d2d06a9cc650a3f9ef8d3799640cb93dc9c7f0cc52cd76901773e57bea5575dcf3caf87fae9
7
- data.tar.gz: 0d5ffce97d5d0c5a4f2ad98207a9306546963b1bd31db19998c748c9c261d16f67bffaffacb340ae4f662e3bc9b484a3f1d581f4e716d086c36414ce3aaa843b
6
+ metadata.gz: 147cf30e25f080eeb493c6d94234014a92df4c370195d03f50c19fc5396666a8920f19e334e3a9200ffcef490566a3f9d4f97a2caff627671787ba4f1416994b
7
+ data.tar.gz: 2578d2892350e3ca4d864b0d28a85120ae100aa882c772aa9f83afd175a686bdc26aec0947d0278236bd6abb2b8f7e735e1a57628e0992d324237e79ed353978
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Release history for google-apis-policysimulator_v1
2
2
 
3
+ ### v0.43.0 (2025-06-15)
4
+
5
+ * Regenerated from discovery document revision 20250606
6
+
7
+ ### v0.42.0 (2025-06-08)
8
+
9
+ * Regenerated from discovery document revision 20250601
10
+ * Regenerated using generator version 0.18.0
11
+
3
12
  ### v0.41.0 (2025-05-04)
4
13
 
5
14
  * Regenerated using generator version 0.17.0
@@ -22,6 +22,351 @@ module Google
22
22
  module Apis
23
23
  module PolicysimulatorV1
24
24
 
25
+ # Similar to PolicySpec but with an extra 'launch' field for launch reference.
26
+ # The PolicySpec here is specific for dry-run.
27
+ class GoogleCloudOrgpolicyV2AlternatePolicySpec
28
+ include Google::Apis::Core::Hashable
29
+
30
+ # Reference to the launch that will be used while audit logging and to control
31
+ # the launch. Should be set only in the alternate policy.
32
+ # Corresponds to the JSON property `launch`
33
+ # @return [String]
34
+ attr_accessor :launch
35
+
36
+ # Defines a Google Cloud policy specification which is used to specify
37
+ # constraints for configurations of Google Cloud resources.
38
+ # Corresponds to the JSON property `spec`
39
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec]
40
+ attr_accessor :spec
41
+
42
+ def initialize(**args)
43
+ update!(**args)
44
+ end
45
+
46
+ # Update properties of this object
47
+ def update!(**args)
48
+ @launch = args[:launch] if args.key?(:launch)
49
+ @spec = args[:spec] if args.key?(:spec)
50
+ end
51
+ end
52
+
53
+ # A custom constraint defined by customers which can *only* be applied to the
54
+ # given resource types and organization. By creating a custom constraint,
55
+ # customers can apply policies of this custom constraint. *Creating a custom
56
+ # constraint itself does NOT apply any policy enforcement*.
57
+ class GoogleCloudOrgpolicyV2CustomConstraint
58
+ include Google::Apis::Core::Hashable
59
+
60
+ # Allow or deny type.
61
+ # Corresponds to the JSON property `actionType`
62
+ # @return [String]
63
+ attr_accessor :action_type
64
+
65
+ # A Common Expression Language (CEL) condition which is used in the evaluation
66
+ # of the constraint. For example: `resource.instanceName.matches("[production|
67
+ # test]_.*_(\d)+")` or, `resource.management.auto_upgrade == true` The max
68
+ # length of the condition is 1000 characters.
69
+ # Corresponds to the JSON property `condition`
70
+ # @return [String]
71
+ attr_accessor :condition
72
+
73
+ # Detailed information about this custom policy constraint. The max length of
74
+ # the description is 2000 characters.
75
+ # Corresponds to the JSON property `description`
76
+ # @return [String]
77
+ attr_accessor :description
78
+
79
+ # One line display name for the UI. The max length of the display_name is 200
80
+ # characters.
81
+ # Corresponds to the JSON property `displayName`
82
+ # @return [String]
83
+ attr_accessor :display_name
84
+
85
+ # All the operations being applied for this constraint.
86
+ # Corresponds to the JSON property `methodTypes`
87
+ # @return [Array<String>]
88
+ attr_accessor :method_types
89
+
90
+ # Immutable. Name of the constraint. This is unique within the organization.
91
+ # Format of the name should be * `organizations/`organization_id`/
92
+ # customConstraints/`custom_constraint_id`` Example: `organizations/123/
93
+ # customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters
94
+ # and the minimum length is 1. Note that the prefix `organizations/`
95
+ # organization_id`/customConstraints/` is not counted.
96
+ # Corresponds to the JSON property `name`
97
+ # @return [String]
98
+ attr_accessor :name
99
+
100
+ # Immutable. The resource instance type on which this policy applies. Format
101
+ # will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
102
+ # Corresponds to the JSON property `resourceTypes`
103
+ # @return [Array<String>]
104
+ attr_accessor :resource_types
105
+
106
+ # Output only. The last time this custom constraint was updated. This represents
107
+ # the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint`
108
+ # methods were called.
109
+ # Corresponds to the JSON property `updateTime`
110
+ # @return [String]
111
+ attr_accessor :update_time
112
+
113
+ def initialize(**args)
114
+ update!(**args)
115
+ end
116
+
117
+ # Update properties of this object
118
+ def update!(**args)
119
+ @action_type = args[:action_type] if args.key?(:action_type)
120
+ @condition = args[:condition] if args.key?(:condition)
121
+ @description = args[:description] if args.key?(:description)
122
+ @display_name = args[:display_name] if args.key?(:display_name)
123
+ @method_types = args[:method_types] if args.key?(:method_types)
124
+ @name = args[:name] if args.key?(:name)
125
+ @resource_types = args[:resource_types] if args.key?(:resource_types)
126
+ @update_time = args[:update_time] if args.key?(:update_time)
127
+ end
128
+ end
129
+
130
+ # Defines an organization policy which is used to specify constraints for
131
+ # configurations of Google Cloud resources.
132
+ class GoogleCloudOrgpolicyV2Policy
133
+ include Google::Apis::Core::Hashable
134
+
135
+ # Similar to PolicySpec but with an extra 'launch' field for launch reference.
136
+ # The PolicySpec here is specific for dry-run.
137
+ # Corresponds to the JSON property `alternate`
138
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2AlternatePolicySpec]
139
+ attr_accessor :alternate
140
+
141
+ # Defines a Google Cloud policy specification which is used to specify
142
+ # constraints for configurations of Google Cloud resources.
143
+ # Corresponds to the JSON property `dryRunSpec`
144
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec]
145
+ attr_accessor :dry_run_spec
146
+
147
+ # Optional. An opaque tag indicating the current state of the policy, used for
148
+ # concurrency control. This 'etag' is computed by the server based on the value
149
+ # of other fields, and may be sent on update and delete requests to ensure the
150
+ # client has an up-to-date value before proceeding.
151
+ # Corresponds to the JSON property `etag`
152
+ # @return [String]
153
+ attr_accessor :etag
154
+
155
+ # Immutable. The resource name of the policy. Must be one of the following forms,
156
+ # where `constraint_name` is the name of the constraint which this policy
157
+ # configures: * `projects/`project_number`/policies/`constraint_name`` * `
158
+ # folders/`folder_id`/policies/`constraint_name`` * `organizations/`
159
+ # organization_id`/policies/`constraint_name`` For example, `projects/123/
160
+ # policies/compute.disableSerialPortAccess`. Note: `projects/`project_id`/
161
+ # policies/`constraint_name`` is also an acceptable name for API requests, but
162
+ # responses will return the name using the equivalent project number.
163
+ # Corresponds to the JSON property `name`
164
+ # @return [String]
165
+ attr_accessor :name
166
+
167
+ # Defines a Google Cloud policy specification which is used to specify
168
+ # constraints for configurations of Google Cloud resources.
169
+ # Corresponds to the JSON property `spec`
170
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec]
171
+ attr_accessor :spec
172
+
173
+ def initialize(**args)
174
+ update!(**args)
175
+ end
176
+
177
+ # Update properties of this object
178
+ def update!(**args)
179
+ @alternate = args[:alternate] if args.key?(:alternate)
180
+ @dry_run_spec = args[:dry_run_spec] if args.key?(:dry_run_spec)
181
+ @etag = args[:etag] if args.key?(:etag)
182
+ @name = args[:name] if args.key?(:name)
183
+ @spec = args[:spec] if args.key?(:spec)
184
+ end
185
+ end
186
+
187
+ # Defines a Google Cloud policy specification which is used to specify
188
+ # constraints for configurations of Google Cloud resources.
189
+ class GoogleCloudOrgpolicyV2PolicySpec
190
+ include Google::Apis::Core::Hashable
191
+
192
+ # An opaque tag indicating the current version of the policySpec, used for
193
+ # concurrency control. This field is ignored if used in a `CreatePolicy` request.
194
+ # When the policy is returned from either a `GetPolicy` or a `ListPolicies`
195
+ # request, this `etag` indicates the version of the current policySpec to use
196
+ # when executing a read-modify-write loop. When the policy is returned from a `
197
+ # GetEffectivePolicy` request, the `etag` will be unset.
198
+ # Corresponds to the JSON property `etag`
199
+ # @return [String]
200
+ attr_accessor :etag
201
+
202
+ # Determines the inheritance behavior for this policy. If `inherit_from_parent`
203
+ # is true, policy rules set higher up in the hierarchy (up to the closest root)
204
+ # are inherited and present in the effective policy. If it is false, then no
205
+ # rules are inherited, and this policy becomes the new root for evaluation. This
206
+ # field can be set only for policies which configure list constraints.
207
+ # Corresponds to the JSON property `inheritFromParent`
208
+ # @return [Boolean]
209
+ attr_accessor :inherit_from_parent
210
+ alias_method :inherit_from_parent?, :inherit_from_parent
211
+
212
+ # Ignores policies set above this resource and restores the `constraint_default`
213
+ # enforcement behavior of the specific constraint at this resource. This field
214
+ # can be set in policies for either list or boolean constraints. If set, `rules`
215
+ # must be empty and `inherit_from_parent` must be set to false.
216
+ # Corresponds to the JSON property `reset`
217
+ # @return [Boolean]
218
+ attr_accessor :reset
219
+ alias_method :reset?, :reset
220
+
221
+ # In policies for boolean constraints, the following requirements apply: - There
222
+ # must be one and only one policy rule where condition is unset. - Boolean
223
+ # policy rules with conditions must set `enforced` to the opposite of the policy
224
+ # rule without a condition. - During policy evaluation, policy rules with
225
+ # conditions that are true for a target resource take precedence.
226
+ # Corresponds to the JSON property `rules`
227
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpecPolicyRule>]
228
+ attr_accessor :rules
229
+
230
+ # Output only. The time stamp this was previously updated. This represents the
231
+ # last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
232
+ # Corresponds to the JSON property `updateTime`
233
+ # @return [String]
234
+ attr_accessor :update_time
235
+
236
+ def initialize(**args)
237
+ update!(**args)
238
+ end
239
+
240
+ # Update properties of this object
241
+ def update!(**args)
242
+ @etag = args[:etag] if args.key?(:etag)
243
+ @inherit_from_parent = args[:inherit_from_parent] if args.key?(:inherit_from_parent)
244
+ @reset = args[:reset] if args.key?(:reset)
245
+ @rules = args[:rules] if args.key?(:rules)
246
+ @update_time = args[:update_time] if args.key?(:update_time)
247
+ end
248
+ end
249
+
250
+ # A rule used to express this policy.
251
+ class GoogleCloudOrgpolicyV2PolicySpecPolicyRule
252
+ include Google::Apis::Core::Hashable
253
+
254
+ # Setting this to true means that all values are allowed. This field can be set
255
+ # only in policies for list constraints.
256
+ # Corresponds to the JSON property `allowAll`
257
+ # @return [Boolean]
258
+ attr_accessor :allow_all
259
+ alias_method :allow_all?, :allow_all
260
+
261
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
262
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
263
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
264
+ # "Summary size limit" description: "Determines if a summary is less than 100
265
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
266
+ # Requestor is owner" description: "Determines if requestor is the document
267
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
268
+ # Logic): title: "Public documents" description: "Determine whether the document
269
+ # should be publicly visible" expression: "document.type != 'private' &&
270
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
271
+ # string" description: "Create a notification string with a timestamp."
272
+ # expression: "'New message received at ' + string(document.create_time)" The
273
+ # exact variables and functions that may be referenced within an expression are
274
+ # determined by the service that evaluates it. See the service documentation for
275
+ # additional information.
276
+ # Corresponds to the JSON property `condition`
277
+ # @return [Google::Apis::PolicysimulatorV1::GoogleTypeExpr]
278
+ attr_accessor :condition
279
+
280
+ # Setting this to true means that all values are denied. This field can be set
281
+ # only in policies for list constraints.
282
+ # Corresponds to the JSON property `denyAll`
283
+ # @return [Boolean]
284
+ attr_accessor :deny_all
285
+ alias_method :deny_all?, :deny_all
286
+
287
+ # If `true`, then the policy is enforced. If `false`, then any configuration is
288
+ # acceptable. This field can be set in policies for boolean constraints, custom
289
+ # constraints and managed constraints.
290
+ # Corresponds to the JSON property `enforce`
291
+ # @return [Boolean]
292
+ attr_accessor :enforce
293
+ alias_method :enforce?, :enforce
294
+
295
+ # Optional. Required for managed constraints if parameters are defined. Passes
296
+ # parameter values when policy enforcement is enabled. Ensure that parameter
297
+ # value types match those defined in the constraint definition. For example: ` "
298
+ # allowedLocations" : ["us-east1", "us-west1"], "allowAll" : true `
299
+ # Corresponds to the JSON property `parameters`
300
+ # @return [Hash<String,Object>]
301
+ attr_accessor :parameters
302
+
303
+ # A message that holds specific allowed and denied values. This message can
304
+ # define specific values and subtrees of the Resource Manager resource hierarchy
305
+ # (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is
306
+ # achieved by using the `under:` and optional `is:` prefixes. The `under:`
307
+ # prefix is used to denote resource subtree values. The `is:` prefix is used to
308
+ # denote specific values, and is required only if the value contains a ":".
309
+ # Values prefixed with "is:" are treated the same as values with no prefix.
310
+ # Ancestry subtrees must be in one of the following formats: - `projects/` (for
311
+ # example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`)
312
+ # - `organizations/` (for example, `organizations/1234`) The `supports_under`
313
+ # field of the associated `Constraint` defines whether ancestry prefixes can be
314
+ # used.
315
+ # Corresponds to the JSON property `values`
316
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues]
317
+ attr_accessor :values
318
+
319
+ def initialize(**args)
320
+ update!(**args)
321
+ end
322
+
323
+ # Update properties of this object
324
+ def update!(**args)
325
+ @allow_all = args[:allow_all] if args.key?(:allow_all)
326
+ @condition = args[:condition] if args.key?(:condition)
327
+ @deny_all = args[:deny_all] if args.key?(:deny_all)
328
+ @enforce = args[:enforce] if args.key?(:enforce)
329
+ @parameters = args[:parameters] if args.key?(:parameters)
330
+ @values = args[:values] if args.key?(:values)
331
+ end
332
+ end
333
+
334
+ # A message that holds specific allowed and denied values. This message can
335
+ # define specific values and subtrees of the Resource Manager resource hierarchy
336
+ # (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is
337
+ # achieved by using the `under:` and optional `is:` prefixes. The `under:`
338
+ # prefix is used to denote resource subtree values. The `is:` prefix is used to
339
+ # denote specific values, and is required only if the value contains a ":".
340
+ # Values prefixed with "is:" are treated the same as values with no prefix.
341
+ # Ancestry subtrees must be in one of the following formats: - `projects/` (for
342
+ # example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`)
343
+ # - `organizations/` (for example, `organizations/1234`) The `supports_under`
344
+ # field of the associated `Constraint` defines whether ancestry prefixes can be
345
+ # used.
346
+ class GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues
347
+ include Google::Apis::Core::Hashable
348
+
349
+ # List of values allowed at this resource.
350
+ # Corresponds to the JSON property `allowedValues`
351
+ # @return [Array<String>]
352
+ attr_accessor :allowed_values
353
+
354
+ # List of values denied at this resource.
355
+ # Corresponds to the JSON property `deniedValues`
356
+ # @return [Array<String>]
357
+ attr_accessor :denied_values
358
+
359
+ def initialize(**args)
360
+ update!(**args)
361
+ end
362
+
363
+ # Update properties of this object
364
+ def update!(**args)
365
+ @allowed_values = args[:allowed_values] if args.key?(:allowed_values)
366
+ @denied_values = args[:denied_values] if args.key?(:denied_values)
367
+ end
368
+ end
369
+
25
370
  # A summary and comparison of the principal's access under the current (baseline)
26
371
  # policies and the proposed (simulated) policies for a single access tuple.
27
372
  class GoogleCloudPolicysimulatorV1AccessStateDiff
@@ -336,6 +681,60 @@ module Google
336
681
  end
337
682
  end
338
683
 
684
+ # ListOrgPolicyViolationsPreviewsResponse is the response message for
685
+ # OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.
686
+ class GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse
687
+ include Google::Apis::Core::Hashable
688
+
689
+ # A token that you can use to retrieve the next page of results. If this field
690
+ # is omitted, there are no subsequent pages.
691
+ # Corresponds to the JSON property `nextPageToken`
692
+ # @return [String]
693
+ attr_accessor :next_page_token
694
+
695
+ # The list of OrgPolicyViolationsPreview
696
+ # Corresponds to the JSON property `orgPolicyViolationsPreviews`
697
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview>]
698
+ attr_accessor :org_policy_violations_previews
699
+
700
+ def initialize(**args)
701
+ update!(**args)
702
+ end
703
+
704
+ # Update properties of this object
705
+ def update!(**args)
706
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
707
+ @org_policy_violations_previews = args[:org_policy_violations_previews] if args.key?(:org_policy_violations_previews)
708
+ end
709
+ end
710
+
711
+ # ListOrgPolicyViolationsResponse is the response message for
712
+ # OrgPolicyViolationsPreviewService.ListOrgPolicyViolations
713
+ class GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse
714
+ include Google::Apis::Core::Hashable
715
+
716
+ # A token that you can use to retrieve the next page of results. If this field
717
+ # is omitted, there are no subsequent pages.
718
+ # Corresponds to the JSON property `nextPageToken`
719
+ # @return [String]
720
+ attr_accessor :next_page_token
721
+
722
+ # The list of OrgPolicyViolations
723
+ # Corresponds to the JSON property `orgPolicyViolations`
724
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolation>]
725
+ attr_accessor :org_policy_violations
726
+
727
+ def initialize(**args)
728
+ update!(**args)
729
+ end
730
+
731
+ # Update properties of this object
732
+ def update!(**args)
733
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
734
+ @org_policy_violations = args[:org_policy_violations] if args.key?(:org_policy_violations)
735
+ end
736
+ end
737
+
339
738
  # Response message for Simulator.ListReplayResults.
340
739
  class GoogleCloudPolicysimulatorV1ListReplayResultsResponse
341
740
  include Google::Apis::Core::Hashable
@@ -362,6 +761,266 @@ module Google
362
761
  end
363
762
  end
364
763
 
764
+ # The proposed changes to OrgPolicy.
765
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlay
766
+ include Google::Apis::Core::Hashable
767
+
768
+ # Optional. The OrgPolicy CustomConstraint changes to preview violations for.
769
+ # Any existing CustomConstraints with the same name will be overridden in the
770
+ # simulation. That is, violations will be determined as if all custom
771
+ # constraints in the overlay were instantiated. Only a single custom_constraint
772
+ # is supported in the overlay at a time. For evaluating multiple constraints,
773
+ # multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each
774
+ # request evaluates a single constraint.
775
+ # Corresponds to the JSON property `customConstraints`
776
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay>]
777
+ attr_accessor :custom_constraints
778
+
779
+ # Optional. The OrgPolicy changes to preview violations for. Any existing
780
+ # OrgPolicies with the same name will be overridden in the simulation. That is,
781
+ # violations will be determined as if all policies in the overlay were created
782
+ # or updated.
783
+ # Corresponds to the JSON property `policies`
784
+ # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay>]
785
+ attr_accessor :policies
786
+
787
+ def initialize(**args)
788
+ update!(**args)
789
+ end
790
+
791
+ # Update properties of this object
792
+ def update!(**args)
793
+ @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
794
+ @policies = args[:policies] if args.key?(:policies)
795
+ end
796
+ end
797
+
798
+ # A change to an OrgPolicy custom constraint.
799
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay
800
+ include Google::Apis::Core::Hashable
801
+
802
+ # A custom constraint defined by customers which can *only* be applied to the
803
+ # given resource types and organization. By creating a custom constraint,
804
+ # customers can apply policies of this custom constraint. *Creating a custom
805
+ # constraint itself does NOT apply any policy enforcement*.
806
+ # Corresponds to the JSON property `customConstraint`
807
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint]
808
+ attr_accessor :custom_constraint
809
+
810
+ # Optional. Resource the constraint is attached to. Example: "organization/
811
+ # 987654"
812
+ # Corresponds to the JSON property `customConstraintParent`
813
+ # @return [String]
814
+ attr_accessor :custom_constraint_parent
815
+
816
+ def initialize(**args)
817
+ update!(**args)
818
+ end
819
+
820
+ # Update properties of this object
821
+ def update!(**args)
822
+ @custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
823
+ @custom_constraint_parent = args[:custom_constraint_parent] if args.key?(:custom_constraint_parent)
824
+ end
825
+ end
826
+
827
+ # A change to an OrgPolicy.
828
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay
829
+ include Google::Apis::Core::Hashable
830
+
831
+ # Defines an organization policy which is used to specify constraints for
832
+ # configurations of Google Cloud resources.
833
+ # Corresponds to the JSON property `policy`
834
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2Policy]
835
+ attr_accessor :policy
836
+
837
+ # Optional. The parent of the policy we are attaching to. Example: "projects/
838
+ # 123456"
839
+ # Corresponds to the JSON property `policyParent`
840
+ # @return [String]
841
+ attr_accessor :policy_parent
842
+
843
+ def initialize(**args)
844
+ update!(**args)
845
+ end
846
+
847
+ # Update properties of this object
848
+ def update!(**args)
849
+ @policy = args[:policy] if args.key?(:policy)
850
+ @policy_parent = args[:policy_parent] if args.key?(:policy_parent)
851
+ end
852
+ end
853
+
854
+ # OrgPolicyViolation is a resource representing a single resource violating a
855
+ # single OrgPolicy constraint.
856
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolation
857
+ include Google::Apis::Core::Hashable
858
+
859
+ # A custom constraint defined by customers which can *only* be applied to the
860
+ # given resource types and organization. By creating a custom constraint,
861
+ # customers can apply policies of this custom constraint. *Creating a custom
862
+ # constraint itself does NOT apply any policy enforcement*.
863
+ # Corresponds to the JSON property `customConstraint`
864
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint]
865
+ attr_accessor :custom_constraint
866
+
867
+ # The `Status` type defines a logical error model that is suitable for different
868
+ # programming environments, including REST APIs and RPC APIs. It is used by [
869
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
870
+ # data: error code, error message, and error details. You can find out more
871
+ # about this error model and how to work with it in the [API Design Guide](https:
872
+ # //cloud.google.com/apis/design/errors).
873
+ # Corresponds to the JSON property `error`
874
+ # @return [Google::Apis::PolicysimulatorV1::GoogleRpcStatus]
875
+ attr_accessor :error
876
+
877
+ # The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/
878
+ # locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`
879
+ # Corresponds to the JSON property `name`
880
+ # @return [String]
881
+ attr_accessor :name
882
+
883
+ # ResourceContext provides the context we know about a resource. It is similar
884
+ # in concept to google.cloud.asset.v1.Resource, but focuses on the information
885
+ # specifically used by Simulator.
886
+ # Corresponds to the JSON property `resource`
887
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ResourceContext]
888
+ attr_accessor :resource
889
+
890
+ def initialize(**args)
891
+ update!(**args)
892
+ end
893
+
894
+ # Update properties of this object
895
+ def update!(**args)
896
+ @custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
897
+ @error = args[:error] if args.key?(:error)
898
+ @name = args[:name] if args.key?(:name)
899
+ @resource = args[:resource] if args.key?(:resource)
900
+ end
901
+ end
902
+
903
+ # OrgPolicyViolationsPreview is a resource providing a preview of the violations
904
+ # that will exist if an OrgPolicy change is made. The list of violations are
905
+ # modeled as child resources and retrieved via a ListOrgPolicyViolations API
906
+ # call. There are potentially more OrgPolicyViolations than could fit in an
907
+ # embedded field. Thus, the use of a child resource instead of a field.
908
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview
909
+ include Google::Apis::Core::Hashable
910
+
911
+ # Output only. Time when this `OrgPolicyViolationsPreview` was created.
912
+ # Corresponds to the JSON property `createTime`
913
+ # @return [String]
914
+ attr_accessor :create_time
915
+
916
+ # Output only. The names of the constraints against which all `
917
+ # OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `
918
+ # PolicyOverlay` then it contains the name of the configured custom constraint,
919
+ # applicable to the specified policies. Otherwise it contains the name of the
920
+ # constraint specified in `CustomConstraintOverlay`. Format: `organizations/`
921
+ # organization_id`/customConstraints/`custom_constraint_id`` Example: `
922
+ # organizations/123/customConstraints/custom.createOnlyE2TypeVms`
923
+ # Corresponds to the JSON property `customConstraints`
924
+ # @return [Array<String>]
925
+ attr_accessor :custom_constraints
926
+
927
+ # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the
928
+ # following format: `organizations/`organization`/locations/`location`/
929
+ # orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`` Example: `
930
+ # organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/
931
+ # 506a5f7f`
932
+ # Corresponds to the JSON property `name`
933
+ # @return [String]
934
+ attr_accessor :name
935
+
936
+ # The proposed changes to OrgPolicy.
937
+ # Corresponds to the JSON property `overlay`
938
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlay]
939
+ attr_accessor :overlay
940
+
941
+ # A summary of the state of all resources scanned for compliance with the
942
+ # changed OrgPolicy.
943
+ # Corresponds to the JSON property `resourceCounts`
944
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts]
945
+ attr_accessor :resource_counts
946
+
947
+ # Output only. The state of the `OrgPolicyViolationsPreview`.
948
+ # Corresponds to the JSON property `state`
949
+ # @return [String]
950
+ attr_accessor :state
951
+
952
+ # Output only. The number of OrgPolicyViolations in this `
953
+ # OrgPolicyViolationsPreview`. This count may differ from `resource_summary.
954
+ # noncompliant_count` because each OrgPolicyViolation is specific to a resource *
955
+ # *and** constraint. If there are multiple constraints being evaluated (i.e.
956
+ # multiple policies in the overlay), a single resource may violate multiple
957
+ # constraints.
958
+ # Corresponds to the JSON property `violationsCount`
959
+ # @return [Fixnum]
960
+ attr_accessor :violations_count
961
+
962
+ def initialize(**args)
963
+ update!(**args)
964
+ end
965
+
966
+ # Update properties of this object
967
+ def update!(**args)
968
+ @create_time = args[:create_time] if args.key?(:create_time)
969
+ @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
970
+ @name = args[:name] if args.key?(:name)
971
+ @overlay = args[:overlay] if args.key?(:overlay)
972
+ @resource_counts = args[:resource_counts] if args.key?(:resource_counts)
973
+ @state = args[:state] if args.key?(:state)
974
+ @violations_count = args[:violations_count] if args.key?(:violations_count)
975
+ end
976
+ end
977
+
978
+ # A summary of the state of all resources scanned for compliance with the
979
+ # changed OrgPolicy.
980
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts
981
+ include Google::Apis::Core::Hashable
982
+
983
+ # Output only. Number of scanned resources with zero violations.
984
+ # Corresponds to the JSON property `compliant`
985
+ # @return [Fixnum]
986
+ attr_accessor :compliant
987
+
988
+ # Output only. Number of resources that returned an error when scanned.
989
+ # Corresponds to the JSON property `errors`
990
+ # @return [Fixnum]
991
+ attr_accessor :errors
992
+
993
+ # Output only. Number of scanned resources with at least one violation.
994
+ # Corresponds to the JSON property `noncompliant`
995
+ # @return [Fixnum]
996
+ attr_accessor :noncompliant
997
+
998
+ # Output only. Number of resources checked for compliance. Must equal:
999
+ # unenforced + noncompliant + compliant + error
1000
+ # Corresponds to the JSON property `scanned`
1001
+ # @return [Fixnum]
1002
+ attr_accessor :scanned
1003
+
1004
+ # Output only. Number of resources where the constraint was not enforced, i.e.
1005
+ # the Policy set `enforced: false` for that resource.
1006
+ # Corresponds to the JSON property `unenforced`
1007
+ # @return [Fixnum]
1008
+ attr_accessor :unenforced
1009
+
1010
+ def initialize(**args)
1011
+ update!(**args)
1012
+ end
1013
+
1014
+ # Update properties of this object
1015
+ def update!(**args)
1016
+ @compliant = args[:compliant] if args.key?(:compliant)
1017
+ @errors = args[:errors] if args.key?(:errors)
1018
+ @noncompliant = args[:noncompliant] if args.key?(:noncompliant)
1019
+ @scanned = args[:scanned] if args.key?(:scanned)
1020
+ @unenforced = args[:unenforced] if args.key?(:unenforced)
1021
+ end
1022
+ end
1023
+
365
1024
  # A resource describing a `Replay`, or simulation.
366
1025
  class GoogleCloudPolicysimulatorV1Replay
367
1026
  include Google::Apis::Core::Hashable
@@ -612,6 +1271,49 @@ module Google
612
1271
  end
613
1272
  end
614
1273
 
1274
+ # ResourceContext provides the context we know about a resource. It is similar
1275
+ # in concept to google.cloud.asset.v1.Resource, but focuses on the information
1276
+ # specifically used by Simulator.
1277
+ class GoogleCloudPolicysimulatorV1ResourceContext
1278
+ include Google::Apis::Core::Hashable
1279
+
1280
+ # The ancestry path of the resource in Google Cloud [resource hierarchy](https://
1281
+ # cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
1282
+ # represented as a list of relative resource names. An ancestry path starts with
1283
+ # the closest ancestor in the hierarchy and ends at root. If the resource is a
1284
+ # project, folder, or organization, the ancestry path starts from the resource
1285
+ # itself. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
1286
+ # Corresponds to the JSON property `ancestors`
1287
+ # @return [Array<String>]
1288
+ attr_accessor :ancestors
1289
+
1290
+ # The asset type of the resource as defined by CAIS. Example: `compute.
1291
+ # googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/
1292
+ # asset-inventory/docs/supported-asset-types) for more information.
1293
+ # Corresponds to the JSON property `assetType`
1294
+ # @return [String]
1295
+ attr_accessor :asset_type
1296
+
1297
+ # The full name of the resource. Example: `//compute.googleapis.com/projects/
1298
+ # my_project_123/zones/zone1/instances/instance1` See [Resource names](https://
1299
+ # cloud.google.com/apis/design/resource_names#full_resource_name) for more
1300
+ # information.
1301
+ # Corresponds to the JSON property `resource`
1302
+ # @return [String]
1303
+ attr_accessor :resource
1304
+
1305
+ def initialize(**args)
1306
+ update!(**args)
1307
+ end
1308
+
1309
+ # Update properties of this object
1310
+ def update!(**args)
1311
+ @ancestors = args[:ancestors] if args.key?(:ancestors)
1312
+ @asset_type = args[:asset_type] if args.key?(:asset_type)
1313
+ @resource = args[:resource] if args.key?(:resource)
1314
+ end
1315
+ end
1316
+
615
1317
  # Specifies the audit configuration for a service. The configuration determines
616
1318
  # which permission types are logged, and what identities, if any, are exempted
617
1319
  # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module PolicysimulatorV1
18
18
  # Version of the google-apis-policysimulator_v1 gem
19
- GEM_VERSION = "0.41.0"
19
+ GEM_VERSION = "0.43.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.17.0"
22
+ GENERATOR_VERSION = "0.18.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20250323"
25
+ REVISION = "20250606"
26
26
  end
27
27
  end
28
28
  end
@@ -22,6 +22,42 @@ module Google
22
22
  module Apis
23
23
  module PolicysimulatorV1
24
24
 
25
+ class GoogleCloudOrgpolicyV2AlternatePolicySpec
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class GoogleCloudOrgpolicyV2CustomConstraint
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class GoogleCloudOrgpolicyV2Policy
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class GoogleCloudOrgpolicyV2PolicySpec
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class GoogleCloudOrgpolicyV2PolicySpecPolicyRule
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
25
61
  class GoogleCloudPolicysimulatorV1AccessStateDiff
26
62
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
63
 
@@ -58,12 +94,60 @@ module Google
58
94
  include Google::Apis::Core::JsonObjectSupport
59
95
  end
60
96
 
97
+ class GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
61
109
  class GoogleCloudPolicysimulatorV1ListReplayResultsResponse
62
110
  class Representation < Google::Apis::Core::JsonRepresentation; end
63
111
 
64
112
  include Google::Apis::Core::JsonObjectSupport
65
113
  end
66
114
 
115
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlay
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolation
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
67
151
  class GoogleCloudPolicysimulatorV1Replay
68
152
  class Representation < Google::Apis::Core::JsonRepresentation; end
69
153
 
@@ -100,6 +184,12 @@ module Google
100
184
  include Google::Apis::Core::JsonObjectSupport
101
185
  end
102
186
 
187
+ class GoogleCloudPolicysimulatorV1ResourceContext
188
+ class Representation < Google::Apis::Core::JsonRepresentation; end
189
+
190
+ include Google::Apis::Core::JsonObjectSupport
191
+ end
192
+
103
193
  class GoogleIamV1AuditConfig
104
194
  class Representation < Google::Apis::Core::JsonRepresentation; end
105
195
 
@@ -154,6 +244,77 @@ module Google
154
244
  include Google::Apis::Core::JsonObjectSupport
155
245
  end
156
246
 
247
+ class GoogleCloudOrgpolicyV2AlternatePolicySpec
248
+ # @private
249
+ class Representation < Google::Apis::Core::JsonRepresentation
250
+ property :launch, as: 'launch'
251
+ property :spec, as: 'spec', class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec::Representation
252
+
253
+ end
254
+ end
255
+
256
+ class GoogleCloudOrgpolicyV2CustomConstraint
257
+ # @private
258
+ class Representation < Google::Apis::Core::JsonRepresentation
259
+ property :action_type, as: 'actionType'
260
+ property :condition, as: 'condition'
261
+ property :description, as: 'description'
262
+ property :display_name, as: 'displayName'
263
+ collection :method_types, as: 'methodTypes'
264
+ property :name, as: 'name'
265
+ collection :resource_types, as: 'resourceTypes'
266
+ property :update_time, as: 'updateTime'
267
+ end
268
+ end
269
+
270
+ class GoogleCloudOrgpolicyV2Policy
271
+ # @private
272
+ class Representation < Google::Apis::Core::JsonRepresentation
273
+ property :alternate, as: 'alternate', class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2AlternatePolicySpec, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2AlternatePolicySpec::Representation
274
+
275
+ property :dry_run_spec, as: 'dryRunSpec', class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec::Representation
276
+
277
+ property :etag, as: 'etag'
278
+ property :name, as: 'name'
279
+ property :spec, as: 'spec', class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec::Representation
280
+
281
+ end
282
+ end
283
+
284
+ class GoogleCloudOrgpolicyV2PolicySpec
285
+ # @private
286
+ class Representation < Google::Apis::Core::JsonRepresentation
287
+ property :etag, as: 'etag'
288
+ property :inherit_from_parent, as: 'inheritFromParent'
289
+ property :reset, as: 'reset'
290
+ collection :rules, as: 'rules', class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpecPolicyRule, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpecPolicyRule::Representation
291
+
292
+ property :update_time, as: 'updateTime'
293
+ end
294
+ end
295
+
296
+ class GoogleCloudOrgpolicyV2PolicySpecPolicyRule
297
+ # @private
298
+ class Representation < Google::Apis::Core::JsonRepresentation
299
+ property :allow_all, as: 'allowAll'
300
+ property :condition, as: 'condition', class: Google::Apis::PolicysimulatorV1::GoogleTypeExpr, decorator: Google::Apis::PolicysimulatorV1::GoogleTypeExpr::Representation
301
+
302
+ property :deny_all, as: 'denyAll'
303
+ property :enforce, as: 'enforce'
304
+ hash :parameters, as: 'parameters'
305
+ property :values, as: 'values', class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues::Representation
306
+
307
+ end
308
+ end
309
+
310
+ class GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues
311
+ # @private
312
+ class Representation < Google::Apis::Core::JsonRepresentation
313
+ collection :allowed_values, as: 'allowedValues'
314
+ collection :denied_values, as: 'deniedValues'
315
+ end
316
+ end
317
+
157
318
  class GoogleCloudPolicysimulatorV1AccessStateDiff
158
319
  # @private
159
320
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -221,6 +382,24 @@ module Google
221
382
  end
222
383
  end
223
384
 
385
+ class GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse
386
+ # @private
387
+ class Representation < Google::Apis::Core::JsonRepresentation
388
+ property :next_page_token, as: 'nextPageToken'
389
+ collection :org_policy_violations_previews, as: 'orgPolicyViolationsPreviews', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview::Representation
390
+
391
+ end
392
+ end
393
+
394
+ class GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse
395
+ # @private
396
+ class Representation < Google::Apis::Core::JsonRepresentation
397
+ property :next_page_token, as: 'nextPageToken'
398
+ collection :org_policy_violations, as: 'orgPolicyViolations', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolation, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolation::Representation
399
+
400
+ end
401
+ end
402
+
224
403
  class GoogleCloudPolicysimulatorV1ListReplayResultsResponse
225
404
  # @private
226
405
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -230,6 +409,73 @@ module Google
230
409
  end
231
410
  end
232
411
 
412
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlay
413
+ # @private
414
+ class Representation < Google::Apis::Core::JsonRepresentation
415
+ collection :custom_constraints, as: 'customConstraints', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay::Representation
416
+
417
+ collection :policies, as: 'policies', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay::Representation
418
+
419
+ end
420
+ end
421
+
422
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay
423
+ # @private
424
+ class Representation < Google::Apis::Core::JsonRepresentation
425
+ property :custom_constraint, as: 'customConstraint', class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint::Representation
426
+
427
+ property :custom_constraint_parent, as: 'customConstraintParent'
428
+ end
429
+ end
430
+
431
+ class GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay
432
+ # @private
433
+ class Representation < Google::Apis::Core::JsonRepresentation
434
+ property :policy, as: 'policy', class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2Policy, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2Policy::Representation
435
+
436
+ property :policy_parent, as: 'policyParent'
437
+ end
438
+ end
439
+
440
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolation
441
+ # @private
442
+ class Representation < Google::Apis::Core::JsonRepresentation
443
+ property :custom_constraint, as: 'customConstraint', class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint::Representation
444
+
445
+ property :error, as: 'error', class: Google::Apis::PolicysimulatorV1::GoogleRpcStatus, decorator: Google::Apis::PolicysimulatorV1::GoogleRpcStatus::Representation
446
+
447
+ property :name, as: 'name'
448
+ property :resource, as: 'resource', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ResourceContext, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ResourceContext::Representation
449
+
450
+ end
451
+ end
452
+
453
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview
454
+ # @private
455
+ class Representation < Google::Apis::Core::JsonRepresentation
456
+ property :create_time, as: 'createTime'
457
+ collection :custom_constraints, as: 'customConstraints'
458
+ property :name, as: 'name'
459
+ property :overlay, as: 'overlay', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlay, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyOverlay::Representation
460
+
461
+ property :resource_counts, as: 'resourceCounts', class: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts, decorator: Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts::Representation
462
+
463
+ property :state, as: 'state'
464
+ property :violations_count, as: 'violationsCount'
465
+ end
466
+ end
467
+
468
+ class GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts
469
+ # @private
470
+ class Representation < Google::Apis::Core::JsonRepresentation
471
+ property :compliant, as: 'compliant'
472
+ property :errors, as: 'errors'
473
+ property :noncompliant, as: 'noncompliant'
474
+ property :scanned, as: 'scanned'
475
+ property :unenforced, as: 'unenforced'
476
+ end
477
+ end
478
+
233
479
  class GoogleCloudPolicysimulatorV1Replay
234
480
  # @private
235
481
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -296,6 +542,15 @@ module Google
296
542
  end
297
543
  end
298
544
 
545
+ class GoogleCloudPolicysimulatorV1ResourceContext
546
+ # @private
547
+ class Representation < Google::Apis::Core::JsonRepresentation
548
+ collection :ancestors, as: 'ancestors'
549
+ property :asset_type, as: 'assetType'
550
+ property :resource, as: 'resource'
551
+ end
552
+ end
553
+
299
554
  class GoogleIamV1AuditConfig
300
555
  # @private
301
556
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -342,6 +342,121 @@ module Google
342
342
  execute_or_queue_command(command, &block)
343
343
  end
344
344
 
345
+ # CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the
346
+ # proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay.
347
+ # The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The
348
+ # resources to scan are inferred from these specified changes.
349
+ # @param [String] parent
350
+ # Required. The organization under which this OrgPolicyViolationsPreview will be
351
+ # created. Example: `organizations/my-example-org/locations/global`
352
+ # @param [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview] google_cloud_policysimulator_v1_org_policy_violations_preview_object
353
+ # @param [String] org_policy_violations_preview_id
354
+ # Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If
355
+ # not provided, a random ID will be generated.
356
+ # @param [String] fields
357
+ # Selector specifying which fields to include in a partial response.
358
+ # @param [String] quota_user
359
+ # Available to use for quota purposes for server-side applications. Can be any
360
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
361
+ # @param [Google::Apis::RequestOptions] options
362
+ # Request-specific options
363
+ #
364
+ # @yield [result, err] Result & error if block supplied
365
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation] parsed result object
366
+ # @yieldparam err [StandardError] error object if request failed
367
+ #
368
+ # @return [Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation]
369
+ #
370
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
371
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
372
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
373
+ def create_organization_location_org_policy_violations_preview(parent, google_cloud_policysimulator_v1_org_policy_violations_preview_object = nil, org_policy_violations_preview_id: nil, fields: nil, quota_user: nil, options: nil, &block)
374
+ command = make_simple_command(:post, 'v1/{+parent}/orgPolicyViolationsPreviews', options)
375
+ command.request_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview::Representation
376
+ command.request_object = google_cloud_policysimulator_v1_org_policy_violations_preview_object
377
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation::Representation
378
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation
379
+ command.params['parent'] = parent unless parent.nil?
380
+ command.query['orgPolicyViolationsPreviewId'] = org_policy_violations_preview_id unless org_policy_violations_preview_id.nil?
381
+ command.query['fields'] = fields unless fields.nil?
382
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
383
+ execute_or_queue_command(command, &block)
384
+ end
385
+
386
+ # GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview.
387
+ # Each OrgPolicyViolationsPreview is available for at least 7 days.
388
+ # @param [String] name
389
+ # Required. The name of the OrgPolicyViolationsPreview to get.
390
+ # @param [String] fields
391
+ # Selector specifying which fields to include in a partial response.
392
+ # @param [String] quota_user
393
+ # Available to use for quota purposes for server-side applications. Can be any
394
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
395
+ # @param [Google::Apis::RequestOptions] options
396
+ # Request-specific options
397
+ #
398
+ # @yield [result, err] Result & error if block supplied
399
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview] parsed result object
400
+ # @yieldparam err [StandardError] error object if request failed
401
+ #
402
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview]
403
+ #
404
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
405
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
406
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
407
+ def get_organization_location_org_policy_violations_preview(name, fields: nil, quota_user: nil, options: nil, &block)
408
+ command = make_simple_command(:get, 'v1/{+name}', options)
409
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview::Representation
410
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview
411
+ command.params['name'] = name unless name.nil?
412
+ command.query['fields'] = fields unless fields.nil?
413
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
414
+ execute_or_queue_command(command, &block)
415
+ end
416
+
417
+ # ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an
418
+ # organization. Each OrgPolicyViolationsPreview is available for at least 7 days.
419
+ # @param [String] parent
420
+ # Required. The parent the violations are scoped to. Format: `organizations/`
421
+ # organization`/locations/`location`` Example: `organizations/my-example-org/
422
+ # locations/global`
423
+ # @param [Fixnum] page_size
424
+ # Optional. The maximum number of items to return. The service may return fewer
425
+ # than this value. If unspecified, at most 5 items will be returned. The maximum
426
+ # value is 10; values above 10 will be coerced to 10.
427
+ # @param [String] page_token
428
+ # Optional. A page token, received from a previous call. Provide this to
429
+ # retrieve the subsequent page. When paginating, all other parameters must match
430
+ # the call that provided the page token.
431
+ # @param [String] fields
432
+ # Selector specifying which fields to include in a partial response.
433
+ # @param [String] quota_user
434
+ # Available to use for quota purposes for server-side applications. Can be any
435
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
436
+ # @param [Google::Apis::RequestOptions] options
437
+ # Request-specific options
438
+ #
439
+ # @yield [result, err] Result & error if block supplied
440
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse] parsed result object
441
+ # @yieldparam err [StandardError] error object if request failed
442
+ #
443
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse]
444
+ #
445
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
446
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
447
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
448
+ def list_organization_location_org_policy_violations_previews(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
449
+ command = make_simple_command(:get, 'v1/{+parent}/orgPolicyViolationsPreviews', options)
450
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse::Representation
451
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse
452
+ command.params['parent'] = parent unless parent.nil?
453
+ command.query['pageSize'] = page_size unless page_size.nil?
454
+ command.query['pageToken'] = page_token unless page_token.nil?
455
+ command.query['fields'] = fields unless fields.nil?
456
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
457
+ execute_or_queue_command(command, &block)
458
+ end
459
+
345
460
  # Gets the latest state of a long-running operation. Clients can use this method
346
461
  # to poll the operation result at intervals as recommended by the API service.
347
462
  # @param [String] name
@@ -373,6 +488,49 @@ module Google
373
488
  execute_or_queue_command(command, &block)
374
489
  end
375
490
 
491
+ # ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an
492
+ # OrgPolicyViolationsPreview.
493
+ # @param [String] parent
494
+ # Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from.
495
+ # Format: organizations/`organization`/locations/`location`/
496
+ # orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`
497
+ # @param [Fixnum] page_size
498
+ # Optional. The maximum number of items to return. The service may return fewer
499
+ # than this value. If unspecified, at most 1000 items will be returned. The
500
+ # maximum value is 1000; values above 1000 will be coerced to 1000.
501
+ # @param [String] page_token
502
+ # Optional. A page token, received from a previous call. Provide this to
503
+ # retrieve the subsequent page. When paginating, all other parameters must match
504
+ # the call that provided the page token.
505
+ # @param [String] fields
506
+ # Selector specifying which fields to include in a partial response.
507
+ # @param [String] quota_user
508
+ # Available to use for quota purposes for server-side applications. Can be any
509
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
510
+ # @param [Google::Apis::RequestOptions] options
511
+ # Request-specific options
512
+ #
513
+ # @yield [result, err] Result & error if block supplied
514
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse] parsed result object
515
+ # @yieldparam err [StandardError] error object if request failed
516
+ #
517
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse]
518
+ #
519
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
520
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
521
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
522
+ def list_organization_location_org_policy_violations_preview_org_policy_violations(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
523
+ command = make_simple_command(:get, 'v1/{+parent}/orgPolicyViolations', options)
524
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse::Representation
525
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse
526
+ command.params['parent'] = parent unless parent.nil?
527
+ command.query['pageSize'] = page_size unless page_size.nil?
528
+ command.query['pageToken'] = page_token unless page_token.nil?
529
+ command.query['fields'] = fields unless fields.nil?
530
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
531
+ execute_or_queue_command(command, &block)
532
+ end
533
+
376
534
  # Creates and starts a Replay using the given ReplayConfig.
377
535
  # @param [String] parent
378
536
  # Required. The parent resource where this Replay will be created. This resource
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-policysimulator_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.41.0
4
+ version: 0.43.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -57,7 +57,7 @@ licenses:
57
57
  metadata:
58
58
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
59
59
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-policysimulator_v1/CHANGELOG.md
60
- documentation_uri: https://googleapis.dev/ruby/google-apis-policysimulator_v1/v0.41.0
60
+ documentation_uri: https://googleapis.dev/ruby/google-apis-policysimulator_v1/v0.43.0
61
61
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-policysimulator_v1
62
62
  rdoc_options: []
63
63
  require_paths:
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 3.6.8
76
+ rubygems_version: 3.6.9
77
77
  specification_version: 4
78
78
  summary: Simple REST client for Policy Simulator API V1
79
79
  test_files: []