google-apis-policysimulator_v1 0.38.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,349 +22,6 @@ module Google
22
22
  module Apis
23
23
  module 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/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::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
- # 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::PolicysimulatorV1::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::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec]
144
- attr_accessor :dry_run_spec
145
-
146
- # Optional. An opaque tag indicating the current state of the policy, used for
147
- # concurrency control. This 'etag' is computed by the server based on the value
148
- # of other fields, and may be sent on update and delete requests to ensure the
149
- # client has an up-to-date value before proceeding.
150
- # Corresponds to the JSON property `etag`
151
- # @return [String]
152
- attr_accessor :etag
153
-
154
- # Immutable. The resource name of the policy. Must be one of the following forms,
155
- # where `constraint_name` is the name of the constraint which this policy
156
- # configures: * `projects/`project_number`/policies/`constraint_name`` * `
157
- # folders/`folder_id`/policies/`constraint_name`` * `organizations/`
158
- # organization_id`/policies/`constraint_name`` For example, `projects/123/
159
- # policies/compute.disableSerialPortAccess`. Note: `projects/`project_id`/
160
- # policies/`constraint_name`` is also an acceptable name for API requests, but
161
- # responses will return the name using the equivalent project number.
162
- # Corresponds to the JSON property `name`
163
- # @return [String]
164
- attr_accessor :name
165
-
166
- # Defines a Google Cloud policy specification which is used to specify
167
- # constraints for configurations of Google Cloud resources.
168
- # Corresponds to the JSON property `spec`
169
- # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec]
170
- attr_accessor :spec
171
-
172
- def initialize(**args)
173
- update!(**args)
174
- end
175
-
176
- # Update properties of this object
177
- def update!(**args)
178
- @alternate = args[:alternate] if args.key?(:alternate)
179
- @dry_run_spec = args[:dry_run_spec] if args.key?(:dry_run_spec)
180
- @etag = args[:etag] if args.key?(:etag)
181
- @name = args[:name] if args.key?(:name)
182
- @spec = args[:spec] if args.key?(:spec)
183
- end
184
- end
185
-
186
- # Defines a Google Cloud policy specification which is used to specify
187
- # constraints for configurations of Google Cloud resources.
188
- class GoogleCloudOrgpolicyV2PolicySpec
189
- include Google::Apis::Core::Hashable
190
-
191
- # An opaque tag indicating the current version of the policySpec, used for
192
- # concurrency control. This field is ignored if used in a `CreatePolicy` request.
193
- # When the policy is returned from either a `GetPolicy` or a `ListPolicies`
194
- # request, this `etag` indicates the version of the current policySpec to use
195
- # when executing a read-modify-write loop. When the policy is returned from a `
196
- # GetEffectivePolicy` request, the `etag` will be unset.
197
- # Corresponds to the JSON property `etag`
198
- # @return [String]
199
- attr_accessor :etag
200
-
201
- # Determines the inheritance behavior for this policy. If `inherit_from_parent`
202
- # is true, policy rules set higher up in the hierarchy (up to the closest root)
203
- # are inherited and present in the effective policy. If it is false, then no
204
- # rules are inherited, and this policy becomes the new root for evaluation. This
205
- # field can be set only for policies which configure list constraints.
206
- # Corresponds to the JSON property `inheritFromParent`
207
- # @return [Boolean]
208
- attr_accessor :inherit_from_parent
209
- alias_method :inherit_from_parent?, :inherit_from_parent
210
-
211
- # Ignores policies set above this resource and restores the `constraint_default`
212
- # enforcement behavior of the specific constraint at this resource. This field
213
- # can be set in policies for either list or boolean constraints. If set, `rules`
214
- # must be empty and `inherit_from_parent` must be set to false.
215
- # Corresponds to the JSON property `reset`
216
- # @return [Boolean]
217
- attr_accessor :reset
218
- alias_method :reset?, :reset
219
-
220
- # In policies for boolean constraints, the following requirements apply: - There
221
- # must be one and only one policy rule where condition is unset. - Boolean
222
- # policy rules with conditions must set `enforced` to the opposite of the policy
223
- # rule without a condition. - During policy evaluation, policy rules with
224
- # conditions that are true for a target resource take precedence.
225
- # Corresponds to the JSON property `rules`
226
- # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpecPolicyRule>]
227
- attr_accessor :rules
228
-
229
- # Output only. The time stamp this was previously updated. This represents the
230
- # last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
231
- # Corresponds to the JSON property `updateTime`
232
- # @return [String]
233
- attr_accessor :update_time
234
-
235
- def initialize(**args)
236
- update!(**args)
237
- end
238
-
239
- # Update properties of this object
240
- def update!(**args)
241
- @etag = args[:etag] if args.key?(:etag)
242
- @inherit_from_parent = args[:inherit_from_parent] if args.key?(:inherit_from_parent)
243
- @reset = args[:reset] if args.key?(:reset)
244
- @rules = args[:rules] if args.key?(:rules)
245
- @update_time = args[:update_time] if args.key?(:update_time)
246
- end
247
- end
248
-
249
- # A rule used to express this policy.
250
- class GoogleCloudOrgpolicyV2PolicySpecPolicyRule
251
- include Google::Apis::Core::Hashable
252
-
253
- # Setting this to true means that all values are allowed. This field can be set
254
- # only in policies for list constraints.
255
- # Corresponds to the JSON property `allowAll`
256
- # @return [Boolean]
257
- attr_accessor :allow_all
258
- alias_method :allow_all?, :allow_all
259
-
260
- # Represents a textual expression in the Common Expression Language (CEL) syntax.
261
- # CEL is a C-like expression language. The syntax and semantics of CEL are
262
- # documented at https://github.com/google/cel-spec. Example (Comparison): title:
263
- # "Summary size limit" description: "Determines if a summary is less than 100
264
- # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
265
- # Requestor is owner" description: "Determines if requestor is the document
266
- # owner" expression: "document.owner == request.auth.claims.email" Example (
267
- # Logic): title: "Public documents" description: "Determine whether the document
268
- # should be publicly visible" expression: "document.type != 'private' &&
269
- # document.type != 'internal'" Example (Data Manipulation): title: "Notification
270
- # string" description: "Create a notification string with a timestamp."
271
- # expression: "'New message received at ' + string(document.create_time)" The
272
- # exact variables and functions that may be referenced within an expression are
273
- # determined by the service that evaluates it. See the service documentation for
274
- # additional information.
275
- # Corresponds to the JSON property `condition`
276
- # @return [Google::Apis::PolicysimulatorV1::GoogleTypeExpr]
277
- attr_accessor :condition
278
-
279
- # Setting this to true means that all values are denied. This field can be set
280
- # only in policies for list constraints.
281
- # Corresponds to the JSON property `denyAll`
282
- # @return [Boolean]
283
- attr_accessor :deny_all
284
- alias_method :deny_all?, :deny_all
285
-
286
- # If `true`, then the policy is enforced. If `false`, then any configuration is
287
- # acceptable. This field can be set only in policies for boolean constraints.
288
- # Corresponds to the JSON property `enforce`
289
- # @return [Boolean]
290
- attr_accessor :enforce
291
- alias_method :enforce?, :enforce
292
-
293
- # Optional. Required for GMCs if parameters defined in constraints. Pass
294
- # parameter values when policy enforcement is enabled. Ensure that parameter
295
- # value types match those defined in the constraint definition. For example: ` "
296
- # allowedLocations" : ["us-east1", "us-west1"], "allowAll" : true `
297
- # Corresponds to the JSON property `parameters`
298
- # @return [Hash<String,Object>]
299
- attr_accessor :parameters
300
-
301
- # A message that holds specific allowed and denied values. This message can
302
- # define specific values and subtrees of the Resource Manager resource hierarchy
303
- # (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is
304
- # achieved by using the `under:` and optional `is:` prefixes. The `under:`
305
- # prefix is used to denote resource subtree values. The `is:` prefix is used to
306
- # denote specific values, and is required only if the value contains a ":".
307
- # Values prefixed with "is:" are treated the same as values with no prefix.
308
- # Ancestry subtrees must be in one of the following formats: - `projects/` (for
309
- # example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`)
310
- # - `organizations/` (for example, `organizations/1234`) The `supports_under`
311
- # field of the associated `Constraint` defines whether ancestry prefixes can be
312
- # used.
313
- # Corresponds to the JSON property `values`
314
- # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues]
315
- attr_accessor :values
316
-
317
- def initialize(**args)
318
- update!(**args)
319
- end
320
-
321
- # Update properties of this object
322
- def update!(**args)
323
- @allow_all = args[:allow_all] if args.key?(:allow_all)
324
- @condition = args[:condition] if args.key?(:condition)
325
- @deny_all = args[:deny_all] if args.key?(:deny_all)
326
- @enforce = args[:enforce] if args.key?(:enforce)
327
- @parameters = args[:parameters] if args.key?(:parameters)
328
- @values = args[:values] if args.key?(:values)
329
- end
330
- end
331
-
332
- # A message that holds specific allowed and denied values. This message can
333
- # define specific values and subtrees of the Resource Manager resource hierarchy
334
- # (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is
335
- # achieved by using the `under:` and optional `is:` prefixes. The `under:`
336
- # prefix is used to denote resource subtree values. The `is:` prefix is used to
337
- # denote specific values, and is required only if the value contains a ":".
338
- # Values prefixed with "is:" are treated the same as values with no prefix.
339
- # Ancestry subtrees must be in one of the following formats: - `projects/` (for
340
- # example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`)
341
- # - `organizations/` (for example, `organizations/1234`) The `supports_under`
342
- # field of the associated `Constraint` defines whether ancestry prefixes can be
343
- # used.
344
- class GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues
345
- include Google::Apis::Core::Hashable
346
-
347
- # List of values allowed at this resource.
348
- # Corresponds to the JSON property `allowedValues`
349
- # @return [Array<String>]
350
- attr_accessor :allowed_values
351
-
352
- # List of values denied at this resource.
353
- # Corresponds to the JSON property `deniedValues`
354
- # @return [Array<String>]
355
- attr_accessor :denied_values
356
-
357
- def initialize(**args)
358
- update!(**args)
359
- end
360
-
361
- # Update properties of this object
362
- def update!(**args)
363
- @allowed_values = args[:allowed_values] if args.key?(:allowed_values)
364
- @denied_values = args[:denied_values] if args.key?(:denied_values)
365
- end
366
- end
367
-
368
25
  # A summary and comparison of the principal's access under the current (baseline)
369
26
  # policies and the proposed (simulated) policies for a single access tuple.
370
27
  class GoogleCloudPolicysimulatorV1AccessStateDiff
@@ -955,636 +612,6 @@ module Google
955
612
  end
956
613
  end
957
614
 
958
- # CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
959
- # OrgPolicyViolationsPreview generations operation.
960
- class GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata
961
- include Google::Apis::Core::Hashable
962
-
963
- # Time when the request was received.
964
- # Corresponds to the JSON property `requestTime`
965
- # @return [String]
966
- attr_accessor :request_time
967
-
968
- # Total number of resources that need scanning. Should equal resource_scanned +
969
- # resources_pending
970
- # Corresponds to the JSON property `resourcesFound`
971
- # @return [Fixnum]
972
- attr_accessor :resources_found
973
-
974
- # Number of resources still to scan.
975
- # Corresponds to the JSON property `resourcesPending`
976
- # @return [Fixnum]
977
- attr_accessor :resources_pending
978
-
979
- # Number of resources already scanned.
980
- # Corresponds to the JSON property `resourcesScanned`
981
- # @return [Fixnum]
982
- attr_accessor :resources_scanned
983
-
984
- # Time when the request started processing, i.e., when the state was set to
985
- # RUNNING.
986
- # Corresponds to the JSON property `startTime`
987
- # @return [String]
988
- attr_accessor :start_time
989
-
990
- # Output only. The current state of the operation.
991
- # Corresponds to the JSON property `state`
992
- # @return [String]
993
- attr_accessor :state
994
-
995
- def initialize(**args)
996
- update!(**args)
997
- end
998
-
999
- # Update properties of this object
1000
- def update!(**args)
1001
- @request_time = args[:request_time] if args.key?(:request_time)
1002
- @resources_found = args[:resources_found] if args.key?(:resources_found)
1003
- @resources_pending = args[:resources_pending] if args.key?(:resources_pending)
1004
- @resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
1005
- @start_time = args[:start_time] if args.key?(:start_time)
1006
- @state = args[:state] if args.key?(:state)
1007
- end
1008
- end
1009
-
1010
- # GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
1011
- # OrgPolicyViolationsPreview generations operation.
1012
- class GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata
1013
- include Google::Apis::Core::Hashable
1014
-
1015
- # Time when the request was received.
1016
- # Corresponds to the JSON property `requestTime`
1017
- # @return [String]
1018
- attr_accessor :request_time
1019
-
1020
- # Total number of resources that need scanning. Should equal resource_scanned +
1021
- # resources_pending
1022
- # Corresponds to the JSON property `resourcesFound`
1023
- # @return [Fixnum]
1024
- attr_accessor :resources_found
1025
-
1026
- # Number of resources still to scan.
1027
- # Corresponds to the JSON property `resourcesPending`
1028
- # @return [Fixnum]
1029
- attr_accessor :resources_pending
1030
-
1031
- # Number of resources already scanned.
1032
- # Corresponds to the JSON property `resourcesScanned`
1033
- # @return [Fixnum]
1034
- attr_accessor :resources_scanned
1035
-
1036
- # Time when the request started processing, i.e. when the state was set to
1037
- # RUNNING.
1038
- # Corresponds to the JSON property `startTime`
1039
- # @return [String]
1040
- attr_accessor :start_time
1041
-
1042
- # The current state of the operation.
1043
- # Corresponds to the JSON property `state`
1044
- # @return [String]
1045
- attr_accessor :state
1046
-
1047
- def initialize(**args)
1048
- update!(**args)
1049
- end
1050
-
1051
- # Update properties of this object
1052
- def update!(**args)
1053
- @request_time = args[:request_time] if args.key?(:request_time)
1054
- @resources_found = args[:resources_found] if args.key?(:resources_found)
1055
- @resources_pending = args[:resources_pending] if args.key?(:resources_pending)
1056
- @resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
1057
- @start_time = args[:start_time] if args.key?(:start_time)
1058
- @state = args[:state] if args.key?(:state)
1059
- end
1060
- end
1061
-
1062
- # The proposed changes to OrgPolicy.
1063
- class GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay
1064
- include Google::Apis::Core::Hashable
1065
-
1066
- # Optional. The OrgPolicy CustomConstraint changes to preview violations for.
1067
- # Any existing CustomConstraints with the same name will be overridden in the
1068
- # simulation. That is, violations will be determined as if all custom
1069
- # constraints in the overlay were instantiated. Only a single custom_constraint
1070
- # is supported in the overlay at a time. For evaluating multiple constraints,
1071
- # multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each
1072
- # request evaluates a single constraint.
1073
- # Corresponds to the JSON property `customConstraints`
1074
- # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay>]
1075
- attr_accessor :custom_constraints
1076
-
1077
- # Optional. The OrgPolicy changes to preview violations for. Any existing
1078
- # OrgPolicies with the same name will be overridden in the simulation. That is,
1079
- # violations will be determined as if all policies in the overlay were created
1080
- # or updated.
1081
- # Corresponds to the JSON property `policies`
1082
- # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay>]
1083
- attr_accessor :policies
1084
-
1085
- def initialize(**args)
1086
- update!(**args)
1087
- end
1088
-
1089
- # Update properties of this object
1090
- def update!(**args)
1091
- @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
1092
- @policies = args[:policies] if args.key?(:policies)
1093
- end
1094
- end
1095
-
1096
- # A change to an OrgPolicy custom constraint.
1097
- class GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay
1098
- include Google::Apis::Core::Hashable
1099
-
1100
- # A custom constraint defined by customers which can *only* be applied to the
1101
- # given resource types and organization. By creating a custom constraint,
1102
- # customers can apply policies of this custom constraint. *Creating a custom
1103
- # constraint itself does NOT apply any policy enforcement*.
1104
- # Corresponds to the JSON property `customConstraint`
1105
- # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint]
1106
- attr_accessor :custom_constraint
1107
-
1108
- # Optional. Resource the constraint is attached to. Example: "organization/
1109
- # 987654"
1110
- # Corresponds to the JSON property `customConstraintParent`
1111
- # @return [String]
1112
- attr_accessor :custom_constraint_parent
1113
-
1114
- def initialize(**args)
1115
- update!(**args)
1116
- end
1117
-
1118
- # Update properties of this object
1119
- def update!(**args)
1120
- @custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
1121
- @custom_constraint_parent = args[:custom_constraint_parent] if args.key?(:custom_constraint_parent)
1122
- end
1123
- end
1124
-
1125
- # A change to an OrgPolicy.
1126
- class GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay
1127
- include Google::Apis::Core::Hashable
1128
-
1129
- # Defines an organization policy which is used to specify constraints for
1130
- # configurations of Google Cloud resources.
1131
- # Corresponds to the JSON property `policy`
1132
- # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2Policy]
1133
- attr_accessor :policy
1134
-
1135
- # Optional. The parent of the policy we are attaching to. Example: "projects/
1136
- # 123456"
1137
- # Corresponds to the JSON property `policyParent`
1138
- # @return [String]
1139
- attr_accessor :policy_parent
1140
-
1141
- def initialize(**args)
1142
- update!(**args)
1143
- end
1144
-
1145
- # Update properties of this object
1146
- def update!(**args)
1147
- @policy = args[:policy] if args.key?(:policy)
1148
- @policy_parent = args[:policy_parent] if args.key?(:policy_parent)
1149
- end
1150
- end
1151
-
1152
- # OrgPolicyViolationsPreview is a resource providing a preview of the violations
1153
- # that will exist if an OrgPolicy change is made. The list of violations are
1154
- # modeled as child resources and retrieved via a ListOrgPolicyViolations API
1155
- # call. There are potentially more OrgPolicyViolations than could fit in an
1156
- # embedded field. Thus, the use of a child resource instead of a field.
1157
- class GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview
1158
- include Google::Apis::Core::Hashable
1159
-
1160
- # Output only. Time when this `OrgPolicyViolationsPreview` was created.
1161
- # Corresponds to the JSON property `createTime`
1162
- # @return [String]
1163
- attr_accessor :create_time
1164
-
1165
- # Output only. The names of the constraints against which all `
1166
- # OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `
1167
- # PolicyOverlay` then it contains the name of the configured custom constraint,
1168
- # applicable to the specified policies. Otherwise it contains the name of the
1169
- # constraint specified in `CustomConstraintOverlay`. Format: `organizations/`
1170
- # organization_id`/customConstraints/`custom_constraint_id`` Example: `
1171
- # organizations/123/customConstraints/custom.createOnlyE2TypeVms`
1172
- # Corresponds to the JSON property `customConstraints`
1173
- # @return [Array<String>]
1174
- attr_accessor :custom_constraints
1175
-
1176
- # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the
1177
- # following format: `organizations/`organization`/locations/`location`/
1178
- # orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`` Example: `
1179
- # organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/
1180
- # 506a5f7f`
1181
- # Corresponds to the JSON property `name`
1182
- # @return [String]
1183
- attr_accessor :name
1184
-
1185
- # The proposed changes to OrgPolicy.
1186
- # Corresponds to the JSON property `overlay`
1187
- # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay]
1188
- attr_accessor :overlay
1189
-
1190
- # A summary of the state of all resources scanned for compliance with the
1191
- # changed OrgPolicy.
1192
- # Corresponds to the JSON property `resourceCounts`
1193
- # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts]
1194
- attr_accessor :resource_counts
1195
-
1196
- # Output only. The state of the `OrgPolicyViolationsPreview`.
1197
- # Corresponds to the JSON property `state`
1198
- # @return [String]
1199
- attr_accessor :state
1200
-
1201
- # Output only. The number of OrgPolicyViolations in this `
1202
- # OrgPolicyViolationsPreview`. This count may differ from `resource_summary.
1203
- # noncompliant_count` because each OrgPolicyViolation is specific to a resource *
1204
- # *and** constraint. If there are multiple constraints being evaluated (i.e.
1205
- # multiple policies in the overlay), a single resource may violate multiple
1206
- # constraints.
1207
- # Corresponds to the JSON property `violationsCount`
1208
- # @return [Fixnum]
1209
- attr_accessor :violations_count
1210
-
1211
- def initialize(**args)
1212
- update!(**args)
1213
- end
1214
-
1215
- # Update properties of this object
1216
- def update!(**args)
1217
- @create_time = args[:create_time] if args.key?(:create_time)
1218
- @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
1219
- @name = args[:name] if args.key?(:name)
1220
- @overlay = args[:overlay] if args.key?(:overlay)
1221
- @resource_counts = args[:resource_counts] if args.key?(:resource_counts)
1222
- @state = args[:state] if args.key?(:state)
1223
- @violations_count = args[:violations_count] if args.key?(:violations_count)
1224
- end
1225
- end
1226
-
1227
- # A summary of the state of all resources scanned for compliance with the
1228
- # changed OrgPolicy.
1229
- class GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts
1230
- include Google::Apis::Core::Hashable
1231
-
1232
- # Output only. Number of scanned resources with zero violations.
1233
- # Corresponds to the JSON property `compliant`
1234
- # @return [Fixnum]
1235
- attr_accessor :compliant
1236
-
1237
- # Output only. Number of resources that returned an error when scanned.
1238
- # Corresponds to the JSON property `errors`
1239
- # @return [Fixnum]
1240
- attr_accessor :errors
1241
-
1242
- # Output only. Number of scanned resources with at least one violation.
1243
- # Corresponds to the JSON property `noncompliant`
1244
- # @return [Fixnum]
1245
- attr_accessor :noncompliant
1246
-
1247
- # Output only. Number of resources checked for compliance. Must equal:
1248
- # unenforced + noncompliant + compliant + error
1249
- # Corresponds to the JSON property `scanned`
1250
- # @return [Fixnum]
1251
- attr_accessor :scanned
1252
-
1253
- # Output only. Number of resources where the constraint was not enforced, i.e.
1254
- # the Policy set `enforced: false` for that resource.
1255
- # Corresponds to the JSON property `unenforced`
1256
- # @return [Fixnum]
1257
- attr_accessor :unenforced
1258
-
1259
- def initialize(**args)
1260
- update!(**args)
1261
- end
1262
-
1263
- # Update properties of this object
1264
- def update!(**args)
1265
- @compliant = args[:compliant] if args.key?(:compliant)
1266
- @errors = args[:errors] if args.key?(:errors)
1267
- @noncompliant = args[:noncompliant] if args.key?(:noncompliant)
1268
- @scanned = args[:scanned] if args.key?(:scanned)
1269
- @unenforced = args[:unenforced] if args.key?(:unenforced)
1270
- end
1271
- end
1272
-
1273
- # CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
1274
- # OrgPolicyViolationsPreview generations operation.
1275
- class GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata
1276
- include Google::Apis::Core::Hashable
1277
-
1278
- # Time when the request was received.
1279
- # Corresponds to the JSON property `requestTime`
1280
- # @return [String]
1281
- attr_accessor :request_time
1282
-
1283
- # Total number of resources that need scanning. Should equal resource_scanned +
1284
- # resources_pending
1285
- # Corresponds to the JSON property `resourcesFound`
1286
- # @return [Fixnum]
1287
- attr_accessor :resources_found
1288
-
1289
- # Number of resources still to scan.
1290
- # Corresponds to the JSON property `resourcesPending`
1291
- # @return [Fixnum]
1292
- attr_accessor :resources_pending
1293
-
1294
- # Number of resources already scanned.
1295
- # Corresponds to the JSON property `resourcesScanned`
1296
- # @return [Fixnum]
1297
- attr_accessor :resources_scanned
1298
-
1299
- # Time when the request started processing, i.e., when the state was set to
1300
- # RUNNING.
1301
- # Corresponds to the JSON property `startTime`
1302
- # @return [String]
1303
- attr_accessor :start_time
1304
-
1305
- # Output only. The current state of the operation.
1306
- # Corresponds to the JSON property `state`
1307
- # @return [String]
1308
- attr_accessor :state
1309
-
1310
- def initialize(**args)
1311
- update!(**args)
1312
- end
1313
-
1314
- # Update properties of this object
1315
- def update!(**args)
1316
- @request_time = args[:request_time] if args.key?(:request_time)
1317
- @resources_found = args[:resources_found] if args.key?(:resources_found)
1318
- @resources_pending = args[:resources_pending] if args.key?(:resources_pending)
1319
- @resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
1320
- @start_time = args[:start_time] if args.key?(:start_time)
1321
- @state = args[:state] if args.key?(:state)
1322
- end
1323
- end
1324
-
1325
- # GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an
1326
- # OrgPolicyViolationsPreview generations operation.
1327
- class GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata
1328
- include Google::Apis::Core::Hashable
1329
-
1330
- # Time when the request was received.
1331
- # Corresponds to the JSON property `requestTime`
1332
- # @return [String]
1333
- attr_accessor :request_time
1334
-
1335
- # Total number of resources that need scanning. Should equal resource_scanned +
1336
- # resources_pending
1337
- # Corresponds to the JSON property `resourcesFound`
1338
- # @return [Fixnum]
1339
- attr_accessor :resources_found
1340
-
1341
- # Number of resources still to scan.
1342
- # Corresponds to the JSON property `resourcesPending`
1343
- # @return [Fixnum]
1344
- attr_accessor :resources_pending
1345
-
1346
- # Number of resources already scanned.
1347
- # Corresponds to the JSON property `resourcesScanned`
1348
- # @return [Fixnum]
1349
- attr_accessor :resources_scanned
1350
-
1351
- # Time when the request started processing, i.e. when the state was set to
1352
- # RUNNING.
1353
- # Corresponds to the JSON property `startTime`
1354
- # @return [String]
1355
- attr_accessor :start_time
1356
-
1357
- # The current state of the operation.
1358
- # Corresponds to the JSON property `state`
1359
- # @return [String]
1360
- attr_accessor :state
1361
-
1362
- def initialize(**args)
1363
- update!(**args)
1364
- end
1365
-
1366
- # Update properties of this object
1367
- def update!(**args)
1368
- @request_time = args[:request_time] if args.key?(:request_time)
1369
- @resources_found = args[:resources_found] if args.key?(:resources_found)
1370
- @resources_pending = args[:resources_pending] if args.key?(:resources_pending)
1371
- @resources_scanned = args[:resources_scanned] if args.key?(:resources_scanned)
1372
- @start_time = args[:start_time] if args.key?(:start_time)
1373
- @state = args[:state] if args.key?(:state)
1374
- end
1375
- end
1376
-
1377
- # The proposed changes to OrgPolicy.
1378
- class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay
1379
- include Google::Apis::Core::Hashable
1380
-
1381
- # Optional. The OrgPolicy CustomConstraint changes to preview violations for.
1382
- # Any existing CustomConstraints with the same name will be overridden in the
1383
- # simulation. That is, violations will be determined as if all custom
1384
- # constraints in the overlay were instantiated. Only a single custom_constraint
1385
- # is supported in the overlay at a time. For evaluating multiple constraints,
1386
- # multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each
1387
- # request evaluates a single constraint.
1388
- # Corresponds to the JSON property `customConstraints`
1389
- # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay>]
1390
- attr_accessor :custom_constraints
1391
-
1392
- # Optional. The OrgPolicy changes to preview violations for. Any existing
1393
- # OrgPolicies with the same name will be overridden in the simulation. That is,
1394
- # violations will be determined as if all policies in the overlay were created
1395
- # or updated.
1396
- # Corresponds to the JSON property `policies`
1397
- # @return [Array<Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay>]
1398
- attr_accessor :policies
1399
-
1400
- def initialize(**args)
1401
- update!(**args)
1402
- end
1403
-
1404
- # Update properties of this object
1405
- def update!(**args)
1406
- @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
1407
- @policies = args[:policies] if args.key?(:policies)
1408
- end
1409
- end
1410
-
1411
- # A change to an OrgPolicy custom constraint.
1412
- class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay
1413
- include Google::Apis::Core::Hashable
1414
-
1415
- # A custom constraint defined by customers which can *only* be applied to the
1416
- # given resource types and organization. By creating a custom constraint,
1417
- # customers can apply policies of this custom constraint. *Creating a custom
1418
- # constraint itself does NOT apply any policy enforcement*.
1419
- # Corresponds to the JSON property `customConstraint`
1420
- # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2CustomConstraint]
1421
- attr_accessor :custom_constraint
1422
-
1423
- # Optional. Resource the constraint is attached to. Example: "organization/
1424
- # 987654"
1425
- # Corresponds to the JSON property `customConstraintParent`
1426
- # @return [String]
1427
- attr_accessor :custom_constraint_parent
1428
-
1429
- def initialize(**args)
1430
- update!(**args)
1431
- end
1432
-
1433
- # Update properties of this object
1434
- def update!(**args)
1435
- @custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
1436
- @custom_constraint_parent = args[:custom_constraint_parent] if args.key?(:custom_constraint_parent)
1437
- end
1438
- end
1439
-
1440
- # A change to an OrgPolicy.
1441
- class GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay
1442
- include Google::Apis::Core::Hashable
1443
-
1444
- # Defines an organization policy which is used to specify constraints for
1445
- # configurations of Google Cloud resources.
1446
- # Corresponds to the JSON property `policy`
1447
- # @return [Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2Policy]
1448
- attr_accessor :policy
1449
-
1450
- # Optional. The parent of the policy we are attaching to. Example: "projects/
1451
- # 123456"
1452
- # Corresponds to the JSON property `policyParent`
1453
- # @return [String]
1454
- attr_accessor :policy_parent
1455
-
1456
- def initialize(**args)
1457
- update!(**args)
1458
- end
1459
-
1460
- # Update properties of this object
1461
- def update!(**args)
1462
- @policy = args[:policy] if args.key?(:policy)
1463
- @policy_parent = args[:policy_parent] if args.key?(:policy_parent)
1464
- end
1465
- end
1466
-
1467
- # OrgPolicyViolationsPreview is a resource providing a preview of the violations
1468
- # that will exist if an OrgPolicy change is made. The list of violations are
1469
- # modeled as child resources and retrieved via a ListOrgPolicyViolations API
1470
- # call. There are potentially more OrgPolicyViolations than could fit in an
1471
- # embedded field. Thus, the use of a child resource instead of a field.
1472
- class GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
1473
- include Google::Apis::Core::Hashable
1474
-
1475
- # Output only. Time when this `OrgPolicyViolationsPreview` was created.
1476
- # Corresponds to the JSON property `createTime`
1477
- # @return [String]
1478
- attr_accessor :create_time
1479
-
1480
- # Output only. The names of the constraints against which all `
1481
- # OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `
1482
- # PolicyOverlay` then it contains the name of the configured custom constraint,
1483
- # applicable to the specified policies. Otherwise it contains the name of the
1484
- # constraint specified in `CustomConstraintOverlay`. Format: `organizations/`
1485
- # organization_id`/customConstraints/`custom_constraint_id`` Example: `
1486
- # organizations/123/customConstraints/custom.createOnlyE2TypeVms`
1487
- # Corresponds to the JSON property `customConstraints`
1488
- # @return [Array<String>]
1489
- attr_accessor :custom_constraints
1490
-
1491
- # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the
1492
- # following format: `organizations/`organization`/locations/`location`/
1493
- # orgPolicyViolationsPreviews/`orgPolicyViolationsPreview`` Example: `
1494
- # organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/
1495
- # 506a5f7f`
1496
- # Corresponds to the JSON property `name`
1497
- # @return [String]
1498
- attr_accessor :name
1499
-
1500
- # The proposed changes to OrgPolicy.
1501
- # Corresponds to the JSON property `overlay`
1502
- # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay]
1503
- attr_accessor :overlay
1504
-
1505
- # A summary of the state of all resources scanned for compliance with the
1506
- # changed OrgPolicy.
1507
- # Corresponds to the JSON property `resourceCounts`
1508
- # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts]
1509
- attr_accessor :resource_counts
1510
-
1511
- # Output only. The state of the `OrgPolicyViolationsPreview`.
1512
- # Corresponds to the JSON property `state`
1513
- # @return [String]
1514
- attr_accessor :state
1515
-
1516
- # Output only. The number of OrgPolicyViolations in this `
1517
- # OrgPolicyViolationsPreview`. This count may differ from `resource_summary.
1518
- # noncompliant_count` because each OrgPolicyViolation is specific to a resource *
1519
- # *and** constraint. If there are multiple constraints being evaluated (i.e.
1520
- # multiple policies in the overlay), a single resource may violate multiple
1521
- # constraints.
1522
- # Corresponds to the JSON property `violationsCount`
1523
- # @return [Fixnum]
1524
- attr_accessor :violations_count
1525
-
1526
- def initialize(**args)
1527
- update!(**args)
1528
- end
1529
-
1530
- # Update properties of this object
1531
- def update!(**args)
1532
- @create_time = args[:create_time] if args.key?(:create_time)
1533
- @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints)
1534
- @name = args[:name] if args.key?(:name)
1535
- @overlay = args[:overlay] if args.key?(:overlay)
1536
- @resource_counts = args[:resource_counts] if args.key?(:resource_counts)
1537
- @state = args[:state] if args.key?(:state)
1538
- @violations_count = args[:violations_count] if args.key?(:violations_count)
1539
- end
1540
- end
1541
-
1542
- # A summary of the state of all resources scanned for compliance with the
1543
- # changed OrgPolicy.
1544
- class GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts
1545
- include Google::Apis::Core::Hashable
1546
-
1547
- # Output only. Number of scanned resources with zero violations.
1548
- # Corresponds to the JSON property `compliant`
1549
- # @return [Fixnum]
1550
- attr_accessor :compliant
1551
-
1552
- # Output only. Number of resources that returned an error when scanned.
1553
- # Corresponds to the JSON property `errors`
1554
- # @return [Fixnum]
1555
- attr_accessor :errors
1556
-
1557
- # Output only. Number of scanned resources with at least one violation.
1558
- # Corresponds to the JSON property `noncompliant`
1559
- # @return [Fixnum]
1560
- attr_accessor :noncompliant
1561
-
1562
- # Output only. Number of resources checked for compliance. Must equal:
1563
- # unenforced + noncompliant + compliant + error
1564
- # Corresponds to the JSON property `scanned`
1565
- # @return [Fixnum]
1566
- attr_accessor :scanned
1567
-
1568
- # Output only. Number of resources where the constraint was not enforced, i.e.
1569
- # the Policy set `enforced: false` for that resource.
1570
- # Corresponds to the JSON property `unenforced`
1571
- # @return [Fixnum]
1572
- attr_accessor :unenforced
1573
-
1574
- def initialize(**args)
1575
- update!(**args)
1576
- end
1577
-
1578
- # Update properties of this object
1579
- def update!(**args)
1580
- @compliant = args[:compliant] if args.key?(:compliant)
1581
- @errors = args[:errors] if args.key?(:errors)
1582
- @noncompliant = args[:noncompliant] if args.key?(:noncompliant)
1583
- @scanned = args[:scanned] if args.key?(:scanned)
1584
- @unenforced = args[:unenforced] if args.key?(:unenforced)
1585
- end
1586
- end
1587
-
1588
615
  # Specifies the audit configuration for a service. The configuration determines
1589
616
  # which permission types are logged, and what identities, if any, are exempted
1590
617
  # from logging. An AuditConfig must have one or more AuditLogConfigs. If there