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