google-apis-policysimulator_v1beta 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/google/apis/policysimulator_v1beta/classes.rb +947 -0
- data/lib/google/apis/policysimulator_v1beta/gem_version.rb +2 -2
- data/lib/google/apis/policysimulator_v1beta/representations.rb +369 -0
- data/lib/google/apis/policysimulator_v1beta/service.rb +154 -0
- metadata +3 -3
@@ -22,6 +22,329 @@ module Google
|
|
22
22
|
module Apis
|
23
23
|
module PolicysimulatorV1beta
|
24
24
|
|
25
|
+
# Similar to PolicySpec but with an extra 'launch' field for launch reference.
|
26
|
+
# The PolicySpec here is specific for dry-run/darklaunch.
|
27
|
+
class GoogleCloudOrgpolicyV2AlternatePolicySpec
|
28
|
+
include Google::Apis::Core::Hashable
|
29
|
+
|
30
|
+
# Reference to the launch that will be used while audit logging and to control
|
31
|
+
# the launch. Should be set only in the alternate policy.
|
32
|
+
# Corresponds to the JSON property `launch`
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :launch
|
35
|
+
|
36
|
+
# Defines a Google Cloud policy specification which is used to specify
|
37
|
+
# constraints for configurations of Google Cloud resources.
|
38
|
+
# Corresponds to the JSON property `spec`
|
39
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2PolicySpec]
|
40
|
+
attr_accessor :spec
|
41
|
+
|
42
|
+
def initialize(**args)
|
43
|
+
update!(**args)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Update properties of this object
|
47
|
+
def update!(**args)
|
48
|
+
@launch = args[:launch] if args.key?(:launch)
|
49
|
+
@spec = args[:spec] if args.key?(:spec)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# A custom constraint defined by customers which can *only* be applied to the
|
54
|
+
# given resource types and organization. By creating a custom constraint,
|
55
|
+
# customers can apply policies of this custom constraint. *Creating a custom
|
56
|
+
# constraint itself does NOT apply any policy enforcement*.
|
57
|
+
class GoogleCloudOrgpolicyV2CustomConstraint
|
58
|
+
include Google::Apis::Core::Hashable
|
59
|
+
|
60
|
+
# Allow or deny type.
|
61
|
+
# Corresponds to the JSON property `actionType`
|
62
|
+
# @return [String]
|
63
|
+
attr_accessor :action_type
|
64
|
+
|
65
|
+
# Org policy condition/expression. For example: `resource.instanceName.matches("[
|
66
|
+
# production|test]_.*_(\d)+")'` or, `resource.management.auto_upgrade == true`
|
67
|
+
# The max length of the condition is 1000 characters.
|
68
|
+
# Corresponds to the JSON property `condition`
|
69
|
+
# @return [String]
|
70
|
+
attr_accessor :condition
|
71
|
+
|
72
|
+
# Detailed information about this custom policy constraint. The max length of
|
73
|
+
# the description is 2000 characters.
|
74
|
+
# Corresponds to the JSON property `description`
|
75
|
+
# @return [String]
|
76
|
+
attr_accessor :description
|
77
|
+
|
78
|
+
# One line display name for the UI. The max length of the display_name is 200
|
79
|
+
# characters.
|
80
|
+
# Corresponds to the JSON property `displayName`
|
81
|
+
# @return [String]
|
82
|
+
attr_accessor :display_name
|
83
|
+
|
84
|
+
# All the operations being applied for this constraint.
|
85
|
+
# Corresponds to the JSON property `methodTypes`
|
86
|
+
# @return [Array<String>]
|
87
|
+
attr_accessor :method_types
|
88
|
+
|
89
|
+
# Immutable. Name of the constraint. This is unique within the organization.
|
90
|
+
# Format of the name should be * `organizations/`organization_id`/
|
91
|
+
# customConstraints/`custom_constraint_id`` Example: `organizations/123/
|
92
|
+
# customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters
|
93
|
+
# and the minimum length is 1. Note that the prefix `organizations/`
|
94
|
+
# organization_id`/customConstraints/` is not counted.
|
95
|
+
# Corresponds to the JSON property `name`
|
96
|
+
# @return [String]
|
97
|
+
attr_accessor :name
|
98
|
+
|
99
|
+
# Immutable. The resource instance type on which this policy applies. Format
|
100
|
+
# will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
|
101
|
+
# Corresponds to the JSON property `resourceTypes`
|
102
|
+
# @return [Array<String>]
|
103
|
+
attr_accessor :resource_types
|
104
|
+
|
105
|
+
# Output only. The last time this custom constraint was updated. This represents
|
106
|
+
# the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint`
|
107
|
+
# RPC was called
|
108
|
+
# Corresponds to the JSON property `updateTime`
|
109
|
+
# @return [String]
|
110
|
+
attr_accessor :update_time
|
111
|
+
|
112
|
+
def initialize(**args)
|
113
|
+
update!(**args)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Update properties of this object
|
117
|
+
def update!(**args)
|
118
|
+
@action_type = args[:action_type] if args.key?(:action_type)
|
119
|
+
@condition = args[:condition] if args.key?(:condition)
|
120
|
+
@description = args[:description] if args.key?(:description)
|
121
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
122
|
+
@method_types = args[:method_types] if args.key?(:method_types)
|
123
|
+
@name = args[:name] if args.key?(:name)
|
124
|
+
@resource_types = args[:resource_types] if args.key?(:resource_types)
|
125
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# Defines an organization policy which is used to specify constraints for
|
130
|
+
# configurations of Google Cloud resources.
|
131
|
+
class GoogleCloudOrgpolicyV2Policy
|
132
|
+
include Google::Apis::Core::Hashable
|
133
|
+
|
134
|
+
# Similar to PolicySpec but with an extra 'launch' field for launch reference.
|
135
|
+
# The PolicySpec here is specific for dry-run/darklaunch.
|
136
|
+
# Corresponds to the JSON property `alternate`
|
137
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2AlternatePolicySpec]
|
138
|
+
attr_accessor :alternate
|
139
|
+
|
140
|
+
# Defines a Google Cloud policy specification which is used to specify
|
141
|
+
# constraints for configurations of Google Cloud resources.
|
142
|
+
# Corresponds to the JSON property `dryRunSpec`
|
143
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2PolicySpec]
|
144
|
+
attr_accessor :dry_run_spec
|
145
|
+
|
146
|
+
# Immutable. The resource name of the policy. Must be one of the following forms,
|
147
|
+
# where constraint_name is the name of the constraint which this policy
|
148
|
+
# configures: * `projects/`project_number`/policies/`constraint_name`` * `
|
149
|
+
# folders/`folder_id`/policies/`constraint_name`` * `organizations/`
|
150
|
+
# organization_id`/policies/`constraint_name`` For example, "projects/123/
|
151
|
+
# policies/compute.disableSerialPortAccess". Note: `projects/`project_id`/
|
152
|
+
# policies/`constraint_name`` is also an acceptable name for API requests, but
|
153
|
+
# responses will return the name using the equivalent project number.
|
154
|
+
# Corresponds to the JSON property `name`
|
155
|
+
# @return [String]
|
156
|
+
attr_accessor :name
|
157
|
+
|
158
|
+
# Defines a Google Cloud policy specification which is used to specify
|
159
|
+
# constraints for configurations of Google Cloud resources.
|
160
|
+
# Corresponds to the JSON property `spec`
|
161
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2PolicySpec]
|
162
|
+
attr_accessor :spec
|
163
|
+
|
164
|
+
def initialize(**args)
|
165
|
+
update!(**args)
|
166
|
+
end
|
167
|
+
|
168
|
+
# Update properties of this object
|
169
|
+
def update!(**args)
|
170
|
+
@alternate = args[:alternate] if args.key?(:alternate)
|
171
|
+
@dry_run_spec = args[:dry_run_spec] if args.key?(:dry_run_spec)
|
172
|
+
@name = args[:name] if args.key?(:name)
|
173
|
+
@spec = args[:spec] if args.key?(:spec)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
# Defines a Google Cloud policy specification which is used to specify
|
178
|
+
# constraints for configurations of Google Cloud resources.
|
179
|
+
class GoogleCloudOrgpolicyV2PolicySpec
|
180
|
+
include Google::Apis::Core::Hashable
|
181
|
+
|
182
|
+
# An opaque tag indicating the current version of the policy, used for
|
183
|
+
# concurrency control. This field is ignored if used in a `CreatePolicy` request.
|
184
|
+
# When the policy` is returned from either a `GetPolicy` or a `ListPolicies`
|
185
|
+
# request, this `etag` indicates the version of the current policy to use when
|
186
|
+
# executing a read-modify-write loop. When the policy is returned from a `
|
187
|
+
# GetEffectivePolicy` request, the `etag` will be unset.
|
188
|
+
# Corresponds to the JSON property `etag`
|
189
|
+
# @return [String]
|
190
|
+
attr_accessor :etag
|
191
|
+
|
192
|
+
# Determines the inheritance behavior for this policy. If `inherit_from_parent`
|
193
|
+
# is true, policy rules set higher up in the hierarchy (up to the closest root)
|
194
|
+
# are inherited and present in the effective policy. If it is false, then no
|
195
|
+
# rules are inherited, and this policy becomes the new root for evaluation. This
|
196
|
+
# field can be set only for policies which configure list constraints.
|
197
|
+
# Corresponds to the JSON property `inheritFromParent`
|
198
|
+
# @return [Boolean]
|
199
|
+
attr_accessor :inherit_from_parent
|
200
|
+
alias_method :inherit_from_parent?, :inherit_from_parent
|
201
|
+
|
202
|
+
# Ignores policies set above this resource and restores the `constraint_default`
|
203
|
+
# enforcement behavior of the specific constraint at this resource. This field
|
204
|
+
# can be set in policies for either list or boolean constraints. If set, `rules`
|
205
|
+
# must be empty and `inherit_from_parent` must be set to false.
|
206
|
+
# Corresponds to the JSON property `reset`
|
207
|
+
# @return [Boolean]
|
208
|
+
attr_accessor :reset
|
209
|
+
alias_method :reset?, :reset
|
210
|
+
|
211
|
+
# In policies for boolean constraints, the following requirements apply: - There
|
212
|
+
# must be one and only one policy rule where condition is unset. - Boolean
|
213
|
+
# policy rules with conditions must set `enforced` to the opposite of the policy
|
214
|
+
# rule without a condition. - During policy evaluation, policy rules with
|
215
|
+
# conditions that are true for a target resource take precedence.
|
216
|
+
# Corresponds to the JSON property `rules`
|
217
|
+
# @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2PolicySpecPolicyRule>]
|
218
|
+
attr_accessor :rules
|
219
|
+
|
220
|
+
# Output only. The time stamp this was previously updated. This represents the
|
221
|
+
# last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
|
222
|
+
# Corresponds to the JSON property `updateTime`
|
223
|
+
# @return [String]
|
224
|
+
attr_accessor :update_time
|
225
|
+
|
226
|
+
def initialize(**args)
|
227
|
+
update!(**args)
|
228
|
+
end
|
229
|
+
|
230
|
+
# Update properties of this object
|
231
|
+
def update!(**args)
|
232
|
+
@etag = args[:etag] if args.key?(:etag)
|
233
|
+
@inherit_from_parent = args[:inherit_from_parent] if args.key?(:inherit_from_parent)
|
234
|
+
@reset = args[:reset] if args.key?(:reset)
|
235
|
+
@rules = args[:rules] if args.key?(:rules)
|
236
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
# A rule used to express this policy.
|
241
|
+
class GoogleCloudOrgpolicyV2PolicySpecPolicyRule
|
242
|
+
include Google::Apis::Core::Hashable
|
243
|
+
|
244
|
+
# Setting this to true means that all values are allowed. This field can be set
|
245
|
+
# only in policies for list constraints.
|
246
|
+
# Corresponds to the JSON property `allowAll`
|
247
|
+
# @return [Boolean]
|
248
|
+
attr_accessor :allow_all
|
249
|
+
alias_method :allow_all?, :allow_all
|
250
|
+
|
251
|
+
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
252
|
+
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
253
|
+
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
254
|
+
# "Summary size limit" description: "Determines if a summary is less than 100
|
255
|
+
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
256
|
+
# Requestor is owner" description: "Determines if requestor is the document
|
257
|
+
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
258
|
+
# Logic): title: "Public documents" description: "Determine whether the document
|
259
|
+
# should be publicly visible" expression: "document.type != 'private' &&
|
260
|
+
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
261
|
+
# string" description: "Create a notification string with a timestamp."
|
262
|
+
# expression: "'New message received at ' + string(document.create_time)" The
|
263
|
+
# exact variables and functions that may be referenced within an expression are
|
264
|
+
# determined by the service that evaluates it. See the service documentation for
|
265
|
+
# additional information.
|
266
|
+
# Corresponds to the JSON property `condition`
|
267
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleTypeExpr]
|
268
|
+
attr_accessor :condition
|
269
|
+
|
270
|
+
# Setting this to true means that all values are denied. This field can be set
|
271
|
+
# only in policies for list constraints.
|
272
|
+
# Corresponds to the JSON property `denyAll`
|
273
|
+
# @return [Boolean]
|
274
|
+
attr_accessor :deny_all
|
275
|
+
alias_method :deny_all?, :deny_all
|
276
|
+
|
277
|
+
# If `true`, then the policy is enforced. If `false`, then any configuration is
|
278
|
+
# acceptable. This field can be set only in policies for boolean constraints.
|
279
|
+
# Corresponds to the JSON property `enforce`
|
280
|
+
# @return [Boolean]
|
281
|
+
attr_accessor :enforce
|
282
|
+
alias_method :enforce?, :enforce
|
283
|
+
|
284
|
+
# A message that holds specific allowed and denied values. This message can
|
285
|
+
# define specific values and subtrees of the Resource Manager resource hierarchy
|
286
|
+
# (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is
|
287
|
+
# achieved by using the `under:` and optional `is:` prefixes. The `under:`
|
288
|
+
# prefix is used to denote resource subtree values. The `is:` prefix is used to
|
289
|
+
# denote specific values, and is required only if the value contains a ":".
|
290
|
+
# Values prefixed with "is:" are treated the same as values with no prefix.
|
291
|
+
# Ancestry subtrees must be in one of the following formats: - "projects/", e.g.
|
292
|
+
# "projects/tokyo-rain-123" - "folders/", e.g. "folders/1234" - "organizations/",
|
293
|
+
# e.g. "organizations/1234" The `supports_under` field of the associated `
|
294
|
+
# Constraint` defines whether ancestry prefixes can be used.
|
295
|
+
# Corresponds to the JSON property `values`
|
296
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues]
|
297
|
+
attr_accessor :values
|
298
|
+
|
299
|
+
def initialize(**args)
|
300
|
+
update!(**args)
|
301
|
+
end
|
302
|
+
|
303
|
+
# Update properties of this object
|
304
|
+
def update!(**args)
|
305
|
+
@allow_all = args[:allow_all] if args.key?(:allow_all)
|
306
|
+
@condition = args[:condition] if args.key?(:condition)
|
307
|
+
@deny_all = args[:deny_all] if args.key?(:deny_all)
|
308
|
+
@enforce = args[:enforce] if args.key?(:enforce)
|
309
|
+
@values = args[:values] if args.key?(:values)
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
313
|
+
# A message that holds specific allowed and denied values. This message can
|
314
|
+
# define specific values and subtrees of the Resource Manager resource hierarchy
|
315
|
+
# (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is
|
316
|
+
# achieved by using the `under:` and optional `is:` prefixes. The `under:`
|
317
|
+
# prefix is used to denote resource subtree values. The `is:` prefix is used to
|
318
|
+
# denote specific values, and is required only if the value contains a ":".
|
319
|
+
# Values prefixed with "is:" are treated the same as values with no prefix.
|
320
|
+
# Ancestry subtrees must be in one of the following formats: - "projects/", e.g.
|
321
|
+
# "projects/tokyo-rain-123" - "folders/", e.g. "folders/1234" - "organizations/",
|
322
|
+
# e.g. "organizations/1234" The `supports_under` field of the associated `
|
323
|
+
# Constraint` defines whether ancestry prefixes can be used.
|
324
|
+
class GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues
|
325
|
+
include Google::Apis::Core::Hashable
|
326
|
+
|
327
|
+
# List of values allowed at this resource.
|
328
|
+
# Corresponds to the JSON property `allowedValues`
|
329
|
+
# @return [Array<String>]
|
330
|
+
attr_accessor :allowed_values
|
331
|
+
|
332
|
+
# List of values denied at this resource.
|
333
|
+
# Corresponds to the JSON property `deniedValues`
|
334
|
+
# @return [Array<String>]
|
335
|
+
attr_accessor :denied_values
|
336
|
+
|
337
|
+
def initialize(**args)
|
338
|
+
update!(**args)
|
339
|
+
end
|
340
|
+
|
341
|
+
# Update properties of this object
|
342
|
+
def update!(**args)
|
343
|
+
@allowed_values = args[:allowed_values] if args.key?(:allowed_values)
|
344
|
+
@denied_values = args[:denied_values] if args.key?(:denied_values)
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
25
348
|
# A resource describing a `Replay`, or simulation.
|
26
349
|
class GoogleCloudPolicysimulatorV1Replay
|
27
350
|
include Google::Apis::Core::Hashable
|
@@ -180,6 +503,630 @@ module Google
|
|
180
503
|
end
|
181
504
|
end
|
182
505
|
|
506
|
+
# GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
|
507
|
+
# OrgPolicyViolationsPreview generations operation.
|
508
|
+
class GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata
|
509
|
+
include Google::Apis::Core::Hashable
|
510
|
+
|
511
|
+
# Time when the request was received.
|
512
|
+
# Corresponds to the JSON property `requestTime`
|
513
|
+
# @return [String]
|
514
|
+
attr_accessor :request_time
|
515
|
+
|
516
|
+
# Total number of resources that need scanning. Should equal resource_scanned +
|
517
|
+
# resources_pending
|
518
|
+
# Corresponds to the JSON property `resourcesFound`
|
519
|
+
# @return [Fixnum]
|
520
|
+
attr_accessor :resources_found
|
521
|
+
|
522
|
+
# Number of resources still to scan.
|
523
|
+
# Corresponds to the JSON property `resourcesPending`
|
524
|
+
# @return [Fixnum]
|
525
|
+
attr_accessor :resources_pending
|
526
|
+
|
527
|
+
# Number of resources already scanned.
|
528
|
+
# Corresponds to the JSON property `resourcesScanned`
|
529
|
+
# @return [Fixnum]
|
530
|
+
attr_accessor :resources_scanned
|
531
|
+
|
532
|
+
# Time when the request started processing, i.e. when the state was set to
|
533
|
+
# RUNNING.
|
534
|
+
# Corresponds to the JSON property `startTime`
|
535
|
+
# @return [String]
|
536
|
+
attr_accessor :start_time
|
537
|
+
|
538
|
+
# The current state of the operation.
|
539
|
+
# Corresponds to the JSON property `state`
|
540
|
+
# @return [String]
|
541
|
+
attr_accessor :state
|
542
|
+
|
543
|
+
def initialize(**args)
|
544
|
+
update!(**args)
|
545
|
+
end
|
546
|
+
|
547
|
+
# Update properties of this object
|
548
|
+
def update!(**args)
|
549
|
+
@request_time = args[:request_time] if args.key?(:request_time)
|
550
|
+
@resources_found = args[:resources_found] if args.key?(:resources_found)
|
551
|
+
@resources_pending = args[:resources_pending] if args.key?(:resources_pending)
|
552
|
+
@resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
|
553
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
554
|
+
@state = args[:state] if args.key?(:state)
|
555
|
+
end
|
556
|
+
end
|
557
|
+
|
558
|
+
# The proposed changes to OrgPolicy.
|
559
|
+
class GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay
|
560
|
+
include Google::Apis::Core::Hashable
|
561
|
+
|
562
|
+
# The OrgPolicy CustomConstraint changes to preview violations for. Any existing
|
563
|
+
# CustomConstraints with the same name will be overridden in the simulation.
|
564
|
+
# That is, violations will be determined as if all custom constraints in the
|
565
|
+
# overlay were instantiated.
|
566
|
+
# Corresponds to the JSON property `customConstraints`
|
567
|
+
# @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay>]
|
568
|
+
attr_accessor :custom_constraints
|
569
|
+
|
570
|
+
# The OrgPolicy changes to preview violations for. Any existing OrgPolicies with
|
571
|
+
# the same name will be overridden in the simulation. That is, violations will
|
572
|
+
# be determined as if all policies in the overlay were created or updated.
|
573
|
+
# Corresponds to the JSON property `policies`
|
574
|
+
# @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay>]
|
575
|
+
attr_accessor :policies
|
576
|
+
|
577
|
+
def initialize(**args)
|
578
|
+
update!(**args)
|
579
|
+
end
|
580
|
+
|
581
|
+
# Update properties of this object
|
582
|
+
def update!(**args)
|
583
|
+
@custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
|
584
|
+
@policies = args[:policies] if args.key?(:policies)
|
585
|
+
end
|
586
|
+
end
|
587
|
+
|
588
|
+
# A change to an OrgPolicy custom constraint.
|
589
|
+
class GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay
|
590
|
+
include Google::Apis::Core::Hashable
|
591
|
+
|
592
|
+
# A custom constraint defined by customers which can *only* be applied to the
|
593
|
+
# given resource types and organization. By creating a custom constraint,
|
594
|
+
# customers can apply policies of this custom constraint. *Creating a custom
|
595
|
+
# constraint itself does NOT apply any policy enforcement*.
|
596
|
+
# Corresponds to the JSON property `customConstraint`
|
597
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2CustomConstraint]
|
598
|
+
attr_accessor :custom_constraint
|
599
|
+
|
600
|
+
# Resource the constraint is attached to. Example: "organization/987654"
|
601
|
+
# Corresponds to the JSON property `customConstraintParent`
|
602
|
+
# @return [String]
|
603
|
+
attr_accessor :custom_constraint_parent
|
604
|
+
|
605
|
+
def initialize(**args)
|
606
|
+
update!(**args)
|
607
|
+
end
|
608
|
+
|
609
|
+
# Update properties of this object
|
610
|
+
def update!(**args)
|
611
|
+
@custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
|
612
|
+
@custom_constraint_parent = args[:custom_constraint_parent] if args.key?(:custom_constraint_parent)
|
613
|
+
end
|
614
|
+
end
|
615
|
+
|
616
|
+
# A change to an OrgPolicy.
|
617
|
+
class GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay
|
618
|
+
include Google::Apis::Core::Hashable
|
619
|
+
|
620
|
+
# Defines an organization policy which is used to specify constraints for
|
621
|
+
# configurations of Google Cloud resources.
|
622
|
+
# Corresponds to the JSON property `policy`
|
623
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2Policy]
|
624
|
+
attr_accessor :policy
|
625
|
+
|
626
|
+
# The parent of the policy we are attaching to. Example: "projects/123456"
|
627
|
+
# Corresponds to the JSON property `policyParent`
|
628
|
+
# @return [String]
|
629
|
+
attr_accessor :policy_parent
|
630
|
+
|
631
|
+
def initialize(**args)
|
632
|
+
update!(**args)
|
633
|
+
end
|
634
|
+
|
635
|
+
# Update properties of this object
|
636
|
+
def update!(**args)
|
637
|
+
@policy = args[:policy] if args.key?(:policy)
|
638
|
+
@policy_parent = args[:policy_parent] if args.key?(:policy_parent)
|
639
|
+
end
|
640
|
+
end
|
641
|
+
|
642
|
+
# OrgPolicyViolationsPreview is a resource providing a preview of the violations
|
643
|
+
# that will exist if an OrgPolicy change is made. The list of violations are
|
644
|
+
# modeled as child resources and retrieved via a ListOrgPolicyViolations API
|
645
|
+
# call. There are potentially more OrgPolicyViolations than could fit in an
|
646
|
+
# embedded field. Thus, the use of a child resource instead of a field.
|
647
|
+
class GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview
|
648
|
+
include Google::Apis::Core::Hashable
|
649
|
+
|
650
|
+
# Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the
|
651
|
+
# following format: `organizations/`organization`/locations/`location`/
|
652
|
+
# orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`` Example: `
|
653
|
+
# organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/
|
654
|
+
# 506a5f7f`
|
655
|
+
# Corresponds to the JSON property `name`
|
656
|
+
# @return [String]
|
657
|
+
attr_accessor :name
|
658
|
+
|
659
|
+
# The proposed changes to OrgPolicy.
|
660
|
+
# Corresponds to the JSON property `overlay`
|
661
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay]
|
662
|
+
attr_accessor :overlay
|
663
|
+
|
664
|
+
# A summary of the state of all resources scanned for compliance with the
|
665
|
+
# changed OrgPolicy.
|
666
|
+
# Corresponds to the JSON property `resourceCounts`
|
667
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts]
|
668
|
+
attr_accessor :resource_counts
|
669
|
+
|
670
|
+
# Output only. The state of the `OrgPolicyViolationsPreview`.
|
671
|
+
# Corresponds to the JSON property `state`
|
672
|
+
# @return [String]
|
673
|
+
attr_accessor :state
|
674
|
+
|
675
|
+
# Output only. The number of OrgPolicyViolations in this `
|
676
|
+
# OrgPolicyViolationsPreview`. This count may differ from `resource_summary.
|
677
|
+
# noncompliant_count` because each OrgPolicyViolation is specific to a resource *
|
678
|
+
# *and** constraint. If there are multiple constraints being evaluated (i.e.
|
679
|
+
# multiple policies in the overlay), a single resource may violate multiple
|
680
|
+
# constraints.
|
681
|
+
# Corresponds to the JSON property `violationsCount`
|
682
|
+
# @return [Fixnum]
|
683
|
+
attr_accessor :violations_count
|
684
|
+
|
685
|
+
def initialize(**args)
|
686
|
+
update!(**args)
|
687
|
+
end
|
688
|
+
|
689
|
+
# Update properties of this object
|
690
|
+
def update!(**args)
|
691
|
+
@name = args[:name] if args.key?(:name)
|
692
|
+
@overlay = args[:overlay] if args.key?(:overlay)
|
693
|
+
@resource_counts = args[:resource_counts] if args.key?(:resource_counts)
|
694
|
+
@state = args[:state] if args.key?(:state)
|
695
|
+
@violations_count = args[:violations_count] if args.key?(:violations_count)
|
696
|
+
end
|
697
|
+
end
|
698
|
+
|
699
|
+
# A summary of the state of all resources scanned for compliance with the
|
700
|
+
# changed OrgPolicy.
|
701
|
+
class GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts
|
702
|
+
include Google::Apis::Core::Hashable
|
703
|
+
|
704
|
+
# Number of scanned resources with zero violations.
|
705
|
+
# Corresponds to the JSON property `compliant`
|
706
|
+
# @return [Fixnum]
|
707
|
+
attr_accessor :compliant
|
708
|
+
|
709
|
+
# Number of resources that returned an error when scanned.
|
710
|
+
# Corresponds to the JSON property `errors`
|
711
|
+
# @return [Fixnum]
|
712
|
+
attr_accessor :errors
|
713
|
+
|
714
|
+
# Number of scanned resources with at least one violation.
|
715
|
+
# Corresponds to the JSON property `noncompliant`
|
716
|
+
# @return [Fixnum]
|
717
|
+
attr_accessor :noncompliant
|
718
|
+
|
719
|
+
# Number of resources checked for compliance. Must equal: unenforced +
|
720
|
+
# noncompliant + compliant + error
|
721
|
+
# Corresponds to the JSON property `scanned`
|
722
|
+
# @return [Fixnum]
|
723
|
+
attr_accessor :scanned
|
724
|
+
|
725
|
+
# Number of resources where the constraint was not enforced, i.e. the Policy set
|
726
|
+
# `enforced: false` for that resource.
|
727
|
+
# Corresponds to the JSON property `unenforced`
|
728
|
+
# @return [Fixnum]
|
729
|
+
attr_accessor :unenforced
|
730
|
+
|
731
|
+
def initialize(**args)
|
732
|
+
update!(**args)
|
733
|
+
end
|
734
|
+
|
735
|
+
# Update properties of this object
|
736
|
+
def update!(**args)
|
737
|
+
@compliant = args[:compliant] if args.key?(:compliant)
|
738
|
+
@errors = args[:errors] if args.key?(:errors)
|
739
|
+
@noncompliant = args[:noncompliant] if args.key?(:noncompliant)
|
740
|
+
@scanned = args[:scanned] if args.key?(:scanned)
|
741
|
+
@unenforced = args[:unenforced] if args.key?(:unenforced)
|
742
|
+
end
|
743
|
+
end
|
744
|
+
|
745
|
+
# GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
|
746
|
+
# OrgPolicyViolationsPreview generations operation.
|
747
|
+
class GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata
|
748
|
+
include Google::Apis::Core::Hashable
|
749
|
+
|
750
|
+
# Time when the request was received.
|
751
|
+
# Corresponds to the JSON property `requestTime`
|
752
|
+
# @return [String]
|
753
|
+
attr_accessor :request_time
|
754
|
+
|
755
|
+
# Total number of resources that need scanning. Should equal resource_scanned +
|
756
|
+
# resources_pending
|
757
|
+
# Corresponds to the JSON property `resourcesFound`
|
758
|
+
# @return [Fixnum]
|
759
|
+
attr_accessor :resources_found
|
760
|
+
|
761
|
+
# Number of resources still to scan.
|
762
|
+
# Corresponds to the JSON property `resourcesPending`
|
763
|
+
# @return [Fixnum]
|
764
|
+
attr_accessor :resources_pending
|
765
|
+
|
766
|
+
# Number of resources already scanned.
|
767
|
+
# Corresponds to the JSON property `resourcesScanned`
|
768
|
+
# @return [Fixnum]
|
769
|
+
attr_accessor :resources_scanned
|
770
|
+
|
771
|
+
# Time when the request started processing, i.e. when the state was set to
|
772
|
+
# RUNNING.
|
773
|
+
# Corresponds to the JSON property `startTime`
|
774
|
+
# @return [String]
|
775
|
+
attr_accessor :start_time
|
776
|
+
|
777
|
+
# The current state of the operation.
|
778
|
+
# Corresponds to the JSON property `state`
|
779
|
+
# @return [String]
|
780
|
+
attr_accessor :state
|
781
|
+
|
782
|
+
def initialize(**args)
|
783
|
+
update!(**args)
|
784
|
+
end
|
785
|
+
|
786
|
+
# Update properties of this object
|
787
|
+
def update!(**args)
|
788
|
+
@request_time = args[:request_time] if args.key?(:request_time)
|
789
|
+
@resources_found = args[:resources_found] if args.key?(:resources_found)
|
790
|
+
@resources_pending = args[:resources_pending] if args.key?(:resources_pending)
|
791
|
+
@resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
|
792
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
793
|
+
@state = args[:state] if args.key?(:state)
|
794
|
+
end
|
795
|
+
end
|
796
|
+
|
797
|
+
# ListOrgPolicyViolationsPreviewsResponse is the response message for
|
798
|
+
# OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.
|
799
|
+
class GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse
|
800
|
+
include Google::Apis::Core::Hashable
|
801
|
+
|
802
|
+
# A token that you can use to retrieve the next page of results. If this field
|
803
|
+
# is omitted, there are no subsequent pages.
|
804
|
+
# Corresponds to the JSON property `nextPageToken`
|
805
|
+
# @return [String]
|
806
|
+
attr_accessor :next_page_token
|
807
|
+
|
808
|
+
# The list of OrgPolicyViolationsPreview
|
809
|
+
# Corresponds to the JSON property `orgPolicyViolationsPreviews`
|
810
|
+
# @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview>]
|
811
|
+
attr_accessor :org_policy_violations_previews
|
812
|
+
|
813
|
+
def initialize(**args)
|
814
|
+
update!(**args)
|
815
|
+
end
|
816
|
+
|
817
|
+
# Update properties of this object
|
818
|
+
def update!(**args)
|
819
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
820
|
+
@org_policy_violations_previews = args[:org_policy_violations_previews] if args.key?(:org_policy_violations_previews)
|
821
|
+
end
|
822
|
+
end
|
823
|
+
|
824
|
+
# ListOrgPolicyViolationsResponse is the response message for
|
825
|
+
# OrgPolicyViolationsPreviewService.ListOrgPolicyViolations
|
826
|
+
class GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse
|
827
|
+
include Google::Apis::Core::Hashable
|
828
|
+
|
829
|
+
# A token that you can use to retrieve the next page of results. If this field
|
830
|
+
# is omitted, there are no subsequent pages.
|
831
|
+
# Corresponds to the JSON property `nextPageToken`
|
832
|
+
# @return [String]
|
833
|
+
attr_accessor :next_page_token
|
834
|
+
|
835
|
+
# The list of OrgPolicyViolations
|
836
|
+
# Corresponds to the JSON property `orgPolicyViolations`
|
837
|
+
# @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolation>]
|
838
|
+
attr_accessor :org_policy_violations
|
839
|
+
|
840
|
+
def initialize(**args)
|
841
|
+
update!(**args)
|
842
|
+
end
|
843
|
+
|
844
|
+
# Update properties of this object
|
845
|
+
def update!(**args)
|
846
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
847
|
+
@org_policy_violations = args[:org_policy_violations] if args.key?(:org_policy_violations)
|
848
|
+
end
|
849
|
+
end
|
850
|
+
|
851
|
+
# The proposed changes to OrgPolicy.
|
852
|
+
class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay
|
853
|
+
include Google::Apis::Core::Hashable
|
854
|
+
|
855
|
+
# The OrgPolicy CustomConstraint changes to preview violations for. Any existing
|
856
|
+
# CustomConstraints with the same name will be overridden in the simulation.
|
857
|
+
# That is, violations will be determined as if all custom constraints in the
|
858
|
+
# overlay were instantiated.
|
859
|
+
# Corresponds to the JSON property `customConstraints`
|
860
|
+
# @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay>]
|
861
|
+
attr_accessor :custom_constraints
|
862
|
+
|
863
|
+
# The OrgPolicy changes to preview violations for. Any existing OrgPolicies with
|
864
|
+
# the same name will be overridden in the simulation. That is, violations will
|
865
|
+
# be determined as if all policies in the overlay were created or updated.
|
866
|
+
# Corresponds to the JSON property `policies`
|
867
|
+
# @return [Array<Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay>]
|
868
|
+
attr_accessor :policies
|
869
|
+
|
870
|
+
def initialize(**args)
|
871
|
+
update!(**args)
|
872
|
+
end
|
873
|
+
|
874
|
+
# Update properties of this object
|
875
|
+
def update!(**args)
|
876
|
+
@custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
|
877
|
+
@policies = args[:policies] if args.key?(:policies)
|
878
|
+
end
|
879
|
+
end
|
880
|
+
|
881
|
+
# A change to an OrgPolicy custom constraint.
|
882
|
+
class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay
|
883
|
+
include Google::Apis::Core::Hashable
|
884
|
+
|
885
|
+
# A custom constraint defined by customers which can *only* be applied to the
|
886
|
+
# given resource types and organization. By creating a custom constraint,
|
887
|
+
# customers can apply policies of this custom constraint. *Creating a custom
|
888
|
+
# constraint itself does NOT apply any policy enforcement*.
|
889
|
+
# Corresponds to the JSON property `customConstraint`
|
890
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2CustomConstraint]
|
891
|
+
attr_accessor :custom_constraint
|
892
|
+
|
893
|
+
# Resource the constraint is attached to. Example: "organization/987654"
|
894
|
+
# Corresponds to the JSON property `customConstraintParent`
|
895
|
+
# @return [String]
|
896
|
+
attr_accessor :custom_constraint_parent
|
897
|
+
|
898
|
+
def initialize(**args)
|
899
|
+
update!(**args)
|
900
|
+
end
|
901
|
+
|
902
|
+
# Update properties of this object
|
903
|
+
def update!(**args)
|
904
|
+
@custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
|
905
|
+
@custom_constraint_parent = args[:custom_constraint_parent] if args.key?(:custom_constraint_parent)
|
906
|
+
end
|
907
|
+
end
|
908
|
+
|
909
|
+
# A change to an OrgPolicy.
|
910
|
+
class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay
|
911
|
+
include Google::Apis::Core::Hashable
|
912
|
+
|
913
|
+
# Defines an organization policy which is used to specify constraints for
|
914
|
+
# configurations of Google Cloud resources.
|
915
|
+
# Corresponds to the JSON property `policy`
|
916
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2Policy]
|
917
|
+
attr_accessor :policy
|
918
|
+
|
919
|
+
# The parent of the policy we are attaching to. Example: "projects/123456"
|
920
|
+
# Corresponds to the JSON property `policyParent`
|
921
|
+
# @return [String]
|
922
|
+
attr_accessor :policy_parent
|
923
|
+
|
924
|
+
def initialize(**args)
|
925
|
+
update!(**args)
|
926
|
+
end
|
927
|
+
|
928
|
+
# Update properties of this object
|
929
|
+
def update!(**args)
|
930
|
+
@policy = args[:policy] if args.key?(:policy)
|
931
|
+
@policy_parent = args[:policy_parent] if args.key?(:policy_parent)
|
932
|
+
end
|
933
|
+
end
|
934
|
+
|
935
|
+
# OrgPolicyViolation is a resource representing a single resource violating a
|
936
|
+
# single OrgPolicy constraint.
|
937
|
+
class GoogleCloudPolicysimulatorV1betaOrgPolicyViolation
|
938
|
+
include Google::Apis::Core::Hashable
|
939
|
+
|
940
|
+
# A custom constraint defined by customers which can *only* be applied to the
|
941
|
+
# given resource types and organization. By creating a custom constraint,
|
942
|
+
# customers can apply policies of this custom constraint. *Creating a custom
|
943
|
+
# constraint itself does NOT apply any policy enforcement*.
|
944
|
+
# Corresponds to the JSON property `customConstraint`
|
945
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2CustomConstraint]
|
946
|
+
attr_accessor :custom_constraint
|
947
|
+
|
948
|
+
# The `Status` type defines a logical error model that is suitable for different
|
949
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
950
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
951
|
+
# data: error code, error message, and error details. You can find out more
|
952
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
953
|
+
# //cloud.google.com/apis/design/errors).
|
954
|
+
# Corresponds to the JSON property `error`
|
955
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleRpcStatus]
|
956
|
+
attr_accessor :error
|
957
|
+
|
958
|
+
# The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/
|
959
|
+
# locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`
|
960
|
+
# Corresponds to the JSON property `name`
|
961
|
+
# @return [String]
|
962
|
+
attr_accessor :name
|
963
|
+
|
964
|
+
# ResourceContext provides the context we know about a resource. It is similar
|
965
|
+
# in concept to google.cloud.asset.v1.Resource, but focuses on the information
|
966
|
+
# specifically used by Simulator.
|
967
|
+
# Corresponds to the JSON property `resource`
|
968
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaResourceContext]
|
969
|
+
attr_accessor :resource
|
970
|
+
|
971
|
+
def initialize(**args)
|
972
|
+
update!(**args)
|
973
|
+
end
|
974
|
+
|
975
|
+
# Update properties of this object
|
976
|
+
def update!(**args)
|
977
|
+
@custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
|
978
|
+
@error = args[:error] if args.key?(:error)
|
979
|
+
@name = args[:name] if args.key?(:name)
|
980
|
+
@resource = args[:resource] if args.key?(:resource)
|
981
|
+
end
|
982
|
+
end
|
983
|
+
|
984
|
+
# OrgPolicyViolationsPreview is a resource providing a preview of the violations
|
985
|
+
# that will exist if an OrgPolicy change is made. The list of violations are
|
986
|
+
# modeled as child resources and retrieved via a ListOrgPolicyViolations API
|
987
|
+
# call. There are potentially more OrgPolicyViolations than could fit in an
|
988
|
+
# embedded field. Thus, the use of a child resource instead of a field.
|
989
|
+
class GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
|
990
|
+
include Google::Apis::Core::Hashable
|
991
|
+
|
992
|
+
# Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the
|
993
|
+
# following format: `organizations/`organization`/locations/`location`/
|
994
|
+
# orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`` Example: `
|
995
|
+
# organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/
|
996
|
+
# 506a5f7f`
|
997
|
+
# Corresponds to the JSON property `name`
|
998
|
+
# @return [String]
|
999
|
+
attr_accessor :name
|
1000
|
+
|
1001
|
+
# The proposed changes to OrgPolicy.
|
1002
|
+
# Corresponds to the JSON property `overlay`
|
1003
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay]
|
1004
|
+
attr_accessor :overlay
|
1005
|
+
|
1006
|
+
# A summary of the state of all resources scanned for compliance with the
|
1007
|
+
# changed OrgPolicy.
|
1008
|
+
# Corresponds to the JSON property `resourceCounts`
|
1009
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts]
|
1010
|
+
attr_accessor :resource_counts
|
1011
|
+
|
1012
|
+
# Output only. The state of the `OrgPolicyViolationsPreview`.
|
1013
|
+
# Corresponds to the JSON property `state`
|
1014
|
+
# @return [String]
|
1015
|
+
attr_accessor :state
|
1016
|
+
|
1017
|
+
# Output only. The number of OrgPolicyViolations in this `
|
1018
|
+
# OrgPolicyViolationsPreview`. This count may differ from `resource_summary.
|
1019
|
+
# noncompliant_count` because each OrgPolicyViolation is specific to a resource *
|
1020
|
+
# *and** constraint. If there are multiple constraints being evaluated (i.e.
|
1021
|
+
# multiple policies in the overlay), a single resource may violate multiple
|
1022
|
+
# constraints.
|
1023
|
+
# Corresponds to the JSON property `violationsCount`
|
1024
|
+
# @return [Fixnum]
|
1025
|
+
attr_accessor :violations_count
|
1026
|
+
|
1027
|
+
def initialize(**args)
|
1028
|
+
update!(**args)
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
# Update properties of this object
|
1032
|
+
def update!(**args)
|
1033
|
+
@name = args[:name] if args.key?(:name)
|
1034
|
+
@overlay = args[:overlay] if args.key?(:overlay)
|
1035
|
+
@resource_counts = args[:resource_counts] if args.key?(:resource_counts)
|
1036
|
+
@state = args[:state] if args.key?(:state)
|
1037
|
+
@violations_count = args[:violations_count] if args.key?(:violations_count)
|
1038
|
+
end
|
1039
|
+
end
|
1040
|
+
|
1041
|
+
# A summary of the state of all resources scanned for compliance with the
|
1042
|
+
# changed OrgPolicy.
|
1043
|
+
class GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts
|
1044
|
+
include Google::Apis::Core::Hashable
|
1045
|
+
|
1046
|
+
# Number of scanned resources with zero violations.
|
1047
|
+
# Corresponds to the JSON property `compliant`
|
1048
|
+
# @return [Fixnum]
|
1049
|
+
attr_accessor :compliant
|
1050
|
+
|
1051
|
+
# Number of resources that returned an error when scanned.
|
1052
|
+
# Corresponds to the JSON property `errors`
|
1053
|
+
# @return [Fixnum]
|
1054
|
+
attr_accessor :errors
|
1055
|
+
|
1056
|
+
# Number of scanned resources with at least one violation.
|
1057
|
+
# Corresponds to the JSON property `noncompliant`
|
1058
|
+
# @return [Fixnum]
|
1059
|
+
attr_accessor :noncompliant
|
1060
|
+
|
1061
|
+
# Number of resources checked for compliance. Must equal: unenforced +
|
1062
|
+
# noncompliant + compliant + error
|
1063
|
+
# Corresponds to the JSON property `scanned`
|
1064
|
+
# @return [Fixnum]
|
1065
|
+
attr_accessor :scanned
|
1066
|
+
|
1067
|
+
# Number of resources where the constraint was not enforced, i.e. the Policy set
|
1068
|
+
# `enforced: false` for that resource.
|
1069
|
+
# Corresponds to the JSON property `unenforced`
|
1070
|
+
# @return [Fixnum]
|
1071
|
+
attr_accessor :unenforced
|
1072
|
+
|
1073
|
+
def initialize(**args)
|
1074
|
+
update!(**args)
|
1075
|
+
end
|
1076
|
+
|
1077
|
+
# Update properties of this object
|
1078
|
+
def update!(**args)
|
1079
|
+
@compliant = args[:compliant] if args.key?(:compliant)
|
1080
|
+
@errors = args[:errors] if args.key?(:errors)
|
1081
|
+
@noncompliant = args[:noncompliant] if args.key?(:noncompliant)
|
1082
|
+
@scanned = args[:scanned] if args.key?(:scanned)
|
1083
|
+
@unenforced = args[:unenforced] if args.key?(:unenforced)
|
1084
|
+
end
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
# ResourceContext provides the context we know about a resource. It is similar
|
1088
|
+
# in concept to google.cloud.asset.v1.Resource, but focuses on the information
|
1089
|
+
# specifically used by Simulator.
|
1090
|
+
class GoogleCloudPolicysimulatorV1betaResourceContext
|
1091
|
+
include Google::Apis::Core::Hashable
|
1092
|
+
|
1093
|
+
# The ancestry path of the resource in Google Cloud [resource hierarchy](https://
|
1094
|
+
# cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
|
1095
|
+
# represented as a list of relative resource names. An ancestry path starts with
|
1096
|
+
# the closest ancestor in the hierarchy and ends at root. If the resource is a
|
1097
|
+
# project, folder, or organization, the ancestry path starts from the resource
|
1098
|
+
# itself. Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
|
1099
|
+
# Corresponds to the JSON property `ancestors`
|
1100
|
+
# @return [Array<String>]
|
1101
|
+
attr_accessor :ancestors
|
1102
|
+
|
1103
|
+
# The asset type of the resource as defined by CAIS. Example: `compute.
|
1104
|
+
# googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/
|
1105
|
+
# asset-inventory/docs/supported-asset-types) for more information.
|
1106
|
+
# Corresponds to the JSON property `assetType`
|
1107
|
+
# @return [String]
|
1108
|
+
attr_accessor :asset_type
|
1109
|
+
|
1110
|
+
# The full name of the resource. Example: `//compute.googleapis.com/projects/
|
1111
|
+
# my_project_123/zones/zone1/instances/instance1` See [Resource names](https://
|
1112
|
+
# cloud.google.com/apis/design/resource_names#full_resource_name) for more
|
1113
|
+
# information.
|
1114
|
+
# Corresponds to the JSON property `resource`
|
1115
|
+
# @return [String]
|
1116
|
+
attr_accessor :resource
|
1117
|
+
|
1118
|
+
def initialize(**args)
|
1119
|
+
update!(**args)
|
1120
|
+
end
|
1121
|
+
|
1122
|
+
# Update properties of this object
|
1123
|
+
def update!(**args)
|
1124
|
+
@ancestors = args[:ancestors] if args.key?(:ancestors)
|
1125
|
+
@asset_type = args[:asset_type] if args.key?(:asset_type)
|
1126
|
+
@resource = args[:resource] if args.key?(:resource)
|
1127
|
+
end
|
1128
|
+
end
|
1129
|
+
|
183
1130
|
# Specifies the audit configuration for a service. The configuration determines
|
184
1131
|
# which permission types are logged, and what identities, if any, are exempted
|
185
1132
|
# from logging. An AuditConfig must have one or more AuditLogConfigs. If there
|