File: policysimulator_v1beta.organizations.locations.orgPolicyViolationsPreviews.html

package info (click to toggle)
python-googleapi 2.186.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 553,432 kB
  • sloc: python: 11,087; javascript: 249; sh: 114; makefile: 59
file content (799 lines) | stat: -rw-r--r-- 135,825 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="policysimulator_v1beta.html">Policy Simulator API</a> . <a href="policysimulator_v1beta.organizations.html">organizations</a> . <a href="policysimulator_v1beta.organizations.locations.html">locations</a> . <a href="policysimulator_v1beta.organizations.locations.orgPolicyViolationsPreviews.html">orgPolicyViolationsPreviews</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="policysimulator_v1beta.organizations.locations.orgPolicyViolationsPreviews.operations.html">operations()</a></code>
</p>
<p class="firstline">Returns the operations Resource.</p>

<p class="toc_element">
  <code><a href="policysimulator_v1beta.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.html">orgPolicyViolations()</a></code>
</p>
<p class="firstline">Returns the orgPolicyViolations Resource.</p>

<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#create">create(parent, body=None, orgPolicyViolationsPreviewId=None, x__xgafv=None)</a></code></p>
<p class="firstline">CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.</p>
<p class="toc_element">
  <code><a href="#generate">generate(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.</p>
<p class="toc_element">
  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.</p>
<p class="toc_element">
  <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="create">create(parent, body=None, orgPolicyViolationsPreviewId=None, x__xgafv=None)</code>
  <pre>CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.

Args:
  parent: string, Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global` (required)
  body: object, The request body.
    The object takes the form of:

{ # OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when this `OrgPolicyViolationsPreview` was created.
  &quot;customConstraints&quot;: [ # Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
    &quot;A String&quot;,
  ],
  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`
  &quot;overlay&quot;: { # The proposed changes to OrgPolicy. # Required. The proposed changes we are previewing violations for.
    &quot;customConstraints&quot;: [ # Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.
      { # A change to an OrgPolicy custom constraint.
        &quot;customConstraint&quot;: { # A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*. # Optional. The new or updated custom constraint.
          &quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
          &quot;condition&quot;: &quot;A String&quot;, # A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(&quot;[production|test]_.*_(\d)+&quot;)` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
          &quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
          &quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI. The max length of the display_name is 200 characters.
          &quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
            &quot;A String&quot;,
          ],
          &quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.
          &quot;resourceTypes&quot;: [ # Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
            &quot;A String&quot;,
          ],
          &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
        },
        &quot;customConstraintParent&quot;: &quot;A String&quot;, # Optional. Resource the constraint is attached to. Example: &quot;organization/987654&quot;
      },
    ],
    &quot;policies&quot;: [ # Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.
      { # A change to an OrgPolicy.
        &quot;policy&quot;: { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources. # Optional. The new or updated OrgPolicy.
          &quot;alternate&quot;: { # Similar to PolicySpec but with an extra &#x27;launch&#x27; field for launch reference. The PolicySpec here is specific for dry-run. # Deprecated.
            &quot;launch&quot;: &quot;A String&quot;, # Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.
            &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Specify constraint for configurations of Google Cloud resources.
              &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
              &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
              &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
              &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
                { # A rule used to express this policy.
                  &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
                  &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                    &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                    &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                    &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                    &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                  },
                  &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
                  &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
                  &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                    &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                  },
                  &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                    &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                      &quot;A String&quot;,
                    ],
                    &quot;deniedValues&quot;: [ # List of values denied at this resource.
                      &quot;A String&quot;,
                    ],
                  },
                },
              ],
              &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
            },
          },
          &quot;dryRunSpec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it&#x27;s enforced.
            &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
            &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
            &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
            &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
              { # A rule used to express this policy.
                &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
                &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                  &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                  &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                  &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                  &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                },
                &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
                &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
                &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                  &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                },
                &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                  &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                    &quot;A String&quot;,
                  ],
                  &quot;deniedValues&quot;: [ # List of values denied at this resource.
                    &quot;A String&quot;,
                  ],
                },
              },
            ],
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
          },
          &quot;etag&quot;: &quot;A String&quot;, # Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This &#x27;etag&#x27; is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
          &quot;name&quot;: &quot;A String&quot;, # Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
          &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Basic information about the organization policy.
            &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
            &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
            &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
            &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
              { # A rule used to express this policy.
                &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
                &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                  &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                  &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                  &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                  &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                },
                &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
                &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
                &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                  &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                },
                &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                  &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                    &quot;A String&quot;,
                  ],
                  &quot;deniedValues&quot;: [ # List of values denied at this resource.
                    &quot;A String&quot;,
                  ],
                },
              },
            ],
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
          },
        },
        &quot;policyParent&quot;: &quot;A String&quot;, # Optional. The parent of the policy we are attaching to. Example: &quot;projects/123456&quot;
      },
    ],
  },
  &quot;resourceCounts&quot;: { # A summary of the state of all resources scanned for compliance with the changed OrgPolicy. # Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
    &quot;compliant&quot;: 42, # Output only. Number of scanned resources with zero violations.
    &quot;errors&quot;: 42, # Output only. Number of resources that returned an error when scanned.
    &quot;noncompliant&quot;: 42, # Output only. Number of scanned resources with at least one violation.
    &quot;scanned&quot;: 42, # Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error
    &quot;unenforced&quot;: 42, # Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.
  },
  &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the `OrgPolicyViolationsPreview`.
  &quot;violationsCount&quot;: 42, # Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.
}

  orgPolicyViolationsPreviewId: string, Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="generate">generate(parent, body=None, x__xgafv=None)</code>
  <pre>GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.

Args:
  parent: string, Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global` (required)
  body: object, The request body.
    The object takes the form of:

{ # OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when this `OrgPolicyViolationsPreview` was created.
  &quot;customConstraints&quot;: [ # Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
    &quot;A String&quot;,
  ],
  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`
  &quot;overlay&quot;: { # The proposed changes to OrgPolicy. # Required. The proposed changes we are previewing violations for.
    &quot;customConstraints&quot;: [ # Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.
      { # A change to an OrgPolicy custom constraint.
        &quot;customConstraint&quot;: { # A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*. # Optional. The new or updated custom constraint.
          &quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
          &quot;condition&quot;: &quot;A String&quot;, # A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(&quot;[production|test]_.*_(\d)+&quot;)` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
          &quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
          &quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI. The max length of the display_name is 200 characters.
          &quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
            &quot;A String&quot;,
          ],
          &quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.
          &quot;resourceTypes&quot;: [ # Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
            &quot;A String&quot;,
          ],
          &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
        },
        &quot;customConstraintParent&quot;: &quot;A String&quot;, # Optional. Resource the constraint is attached to. Example: &quot;organization/987654&quot;
      },
    ],
    &quot;policies&quot;: [ # Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.
      { # A change to an OrgPolicy.
        &quot;policy&quot;: { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources. # Optional. The new or updated OrgPolicy.
          &quot;alternate&quot;: { # Similar to PolicySpec but with an extra &#x27;launch&#x27; field for launch reference. The PolicySpec here is specific for dry-run. # Deprecated.
            &quot;launch&quot;: &quot;A String&quot;, # Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.
            &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Specify constraint for configurations of Google Cloud resources.
              &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
              &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
              &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
              &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
                { # A rule used to express this policy.
                  &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
                  &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                    &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                    &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                    &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                    &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                  },
                  &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
                  &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
                  &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                    &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                  },
                  &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                    &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                      &quot;A String&quot;,
                    ],
                    &quot;deniedValues&quot;: [ # List of values denied at this resource.
                      &quot;A String&quot;,
                    ],
                  },
                },
              ],
              &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
            },
          },
          &quot;dryRunSpec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it&#x27;s enforced.
            &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
            &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
            &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
            &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
              { # A rule used to express this policy.
                &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
                &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                  &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                  &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                  &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                  &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                },
                &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
                &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
                &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                  &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                },
                &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                  &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                    &quot;A String&quot;,
                  ],
                  &quot;deniedValues&quot;: [ # List of values denied at this resource.
                    &quot;A String&quot;,
                  ],
                },
              },
            ],
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
          },
          &quot;etag&quot;: &quot;A String&quot;, # Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This &#x27;etag&#x27; is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
          &quot;name&quot;: &quot;A String&quot;, # Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
          &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Basic information about the organization policy.
            &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
            &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
            &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
            &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
              { # A rule used to express this policy.
                &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
                &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                  &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                  &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                  &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                  &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                },
                &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
                &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
                &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                  &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                },
                &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                  &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                    &quot;A String&quot;,
                  ],
                  &quot;deniedValues&quot;: [ # List of values denied at this resource.
                    &quot;A String&quot;,
                  ],
                },
              },
            ],
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
          },
        },
        &quot;policyParent&quot;: &quot;A String&quot;, # Optional. The parent of the policy we are attaching to. Example: &quot;projects/123456&quot;
      },
    ],
  },
  &quot;resourceCounts&quot;: { # A summary of the state of all resources scanned for compliance with the changed OrgPolicy. # Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
    &quot;compliant&quot;: 42, # Output only. Number of scanned resources with zero violations.
    &quot;errors&quot;: 42, # Output only. Number of resources that returned an error when scanned.
    &quot;noncompliant&quot;: 42, # Output only. Number of scanned resources with at least one violation.
    &quot;scanned&quot;: 42, # Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error
    &quot;unenforced&quot;: 42, # Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.
  },
  &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the `OrgPolicyViolationsPreview`.
  &quot;violationsCount&quot;: 42, # Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="get">get(name, x__xgafv=None)</code>
  <pre>GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.

Args:
  name: string, Required. The name of the OrgPolicyViolationsPreview to get. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when this `OrgPolicyViolationsPreview` was created.
  &quot;customConstraints&quot;: [ # Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
    &quot;A String&quot;,
  ],
  &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`
  &quot;overlay&quot;: { # The proposed changes to OrgPolicy. # Required. The proposed changes we are previewing violations for.
    &quot;customConstraints&quot;: [ # Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.
      { # A change to an OrgPolicy custom constraint.
        &quot;customConstraint&quot;: { # A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*. # Optional. The new or updated custom constraint.
          &quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
          &quot;condition&quot;: &quot;A String&quot;, # A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(&quot;[production|test]_.*_(\d)+&quot;)` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
          &quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
          &quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI. The max length of the display_name is 200 characters.
          &quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
            &quot;A String&quot;,
          ],
          &quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.
          &quot;resourceTypes&quot;: [ # Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
            &quot;A String&quot;,
          ],
          &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
        },
        &quot;customConstraintParent&quot;: &quot;A String&quot;, # Optional. Resource the constraint is attached to. Example: &quot;organization/987654&quot;
      },
    ],
    &quot;policies&quot;: [ # Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.
      { # A change to an OrgPolicy.
        &quot;policy&quot;: { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources. # Optional. The new or updated OrgPolicy.
          &quot;alternate&quot;: { # Similar to PolicySpec but with an extra &#x27;launch&#x27; field for launch reference. The PolicySpec here is specific for dry-run. # Deprecated.
            &quot;launch&quot;: &quot;A String&quot;, # Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.
            &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Specify constraint for configurations of Google Cloud resources.
              &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
              &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
              &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
              &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
                { # A rule used to express this policy.
                  &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
                  &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                    &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                    &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                    &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                    &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                  },
                  &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
                  &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
                  &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                    &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                  },
                  &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                    &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                      &quot;A String&quot;,
                    ],
                    &quot;deniedValues&quot;: [ # List of values denied at this resource.
                      &quot;A String&quot;,
                    ],
                  },
                },
              ],
              &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
            },
          },
          &quot;dryRunSpec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it&#x27;s enforced.
            &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
            &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
            &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
            &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
              { # A rule used to express this policy.
                &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
                &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                  &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                  &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                  &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                  &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                },
                &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
                &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
                &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                  &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                },
                &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                  &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                    &quot;A String&quot;,
                  ],
                  &quot;deniedValues&quot;: [ # List of values denied at this resource.
                    &quot;A String&quot;,
                  ],
                },
              },
            ],
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
          },
          &quot;etag&quot;: &quot;A String&quot;, # Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This &#x27;etag&#x27; is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
          &quot;name&quot;: &quot;A String&quot;, # Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
          &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Basic information about the organization policy.
            &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
            &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
            &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
            &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
              { # A rule used to express this policy.
                &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
                &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                  &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                  &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                  &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                  &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                },
                &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
                &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
                &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                  &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                },
                &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                  &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                    &quot;A String&quot;,
                  ],
                  &quot;deniedValues&quot;: [ # List of values denied at this resource.
                    &quot;A String&quot;,
                  ],
                },
              },
            ],
            &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
          },
        },
        &quot;policyParent&quot;: &quot;A String&quot;, # Optional. The parent of the policy we are attaching to. Example: &quot;projects/123456&quot;
      },
    ],
  },
  &quot;resourceCounts&quot;: { # A summary of the state of all resources scanned for compliance with the changed OrgPolicy. # Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
    &quot;compliant&quot;: 42, # Output only. Number of scanned resources with zero violations.
    &quot;errors&quot;: 42, # Output only. Number of resources that returned an error when scanned.
    &quot;noncompliant&quot;: 42, # Output only. Number of scanned resources with at least one violation.
    &quot;scanned&quot;: 42, # Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error
    &quot;unenforced&quot;: 42, # Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.
  },
  &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the `OrgPolicyViolationsPreview`.
  &quot;violationsCount&quot;: 42, # Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
  <pre>ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.

Args:
  parent: string, Required. The parent the violations are scoped to. Format: `organizations/{organization}/locations/{location}` Example: `organizations/my-example-org/locations/global` (required)
  pageSize: integer, Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.
  pageToken: string, Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # ListOrgPolicyViolationsPreviewsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.
  &quot;nextPageToken&quot;: &quot;A String&quot;, # A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.
  &quot;orgPolicyViolationsPreviews&quot;: [ # The list of OrgPolicyViolationsPreview
    { # OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when this `OrgPolicyViolationsPreview` was created.
      &quot;customConstraints&quot;: [ # Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`
        &quot;A String&quot;,
      ],
      &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`
      &quot;overlay&quot;: { # The proposed changes to OrgPolicy. # Required. The proposed changes we are previewing violations for.
        &quot;customConstraints&quot;: [ # Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.
          { # A change to an OrgPolicy custom constraint.
            &quot;customConstraint&quot;: { # A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*. # Optional. The new or updated custom constraint.
              &quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
              &quot;condition&quot;: &quot;A String&quot;, # A Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches(&quot;[production|test]_.*_(\d)+&quot;)` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
              &quot;description&quot;: &quot;A String&quot;, # Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
              &quot;displayName&quot;: &quot;A String&quot;, # One line display name for the UI. The max length of the display_name is 200 characters.
              &quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
                &quot;A String&quot;,
              ],
              &quot;name&quot;: &quot;A String&quot;, # Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.
              &quot;resourceTypes&quot;: [ # Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
                &quot;A String&quot;,
              ],
              &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` methods were called.
            },
            &quot;customConstraintParent&quot;: &quot;A String&quot;, # Optional. Resource the constraint is attached to. Example: &quot;organization/987654&quot;
          },
        ],
        &quot;policies&quot;: [ # Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.
          { # A change to an OrgPolicy.
            &quot;policy&quot;: { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources. # Optional. The new or updated OrgPolicy.
              &quot;alternate&quot;: { # Similar to PolicySpec but with an extra &#x27;launch&#x27; field for launch reference. The PolicySpec here is specific for dry-run. # Deprecated.
                &quot;launch&quot;: &quot;A String&quot;, # Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.
                &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Specify constraint for configurations of Google Cloud resources.
                  &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
                  &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
                  &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
                  &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
                    { # A rule used to express this policy.
                      &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
                      &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                        &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                        &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                        &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                        &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                      },
                      &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
                      &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
                      &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                        &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                      },
                      &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                        &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                          &quot;A String&quot;,
                        ],
                        &quot;deniedValues&quot;: [ # List of values denied at this resource.
                          &quot;A String&quot;,
                        ],
                      },
                    },
                  ],
                  &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
                },
              },
              &quot;dryRunSpec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it&#x27;s enforced.
                &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
                &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
                &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
                &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
                  { # A rule used to express this policy.
                    &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
                    &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                      &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                      &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                      &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                      &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                    },
                    &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
                    &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
                    &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                      &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                    },
                    &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                      &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                        &quot;A String&quot;,
                      ],
                      &quot;deniedValues&quot;: [ # List of values denied at this resource.
                        &quot;A String&quot;,
                      ],
                    },
                  },
                ],
                &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
              },
              &quot;etag&quot;: &quot;A String&quot;, # Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This &#x27;etag&#x27; is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
              &quot;name&quot;: &quot;A String&quot;, # Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
              &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Basic information about the organization policy.
                &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
                &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
                &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
                &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
                  { # A rule used to express this policy.
                    &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
                    &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                      &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                      &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                      &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                      &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
                    },
                    &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
                    &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
                    &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                      &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                    },
                    &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                      &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                        &quot;A String&quot;,
                      ],
                      &quot;deniedValues&quot;: [ # List of values denied at this resource.
                        &quot;A String&quot;,
                      ],
                    },
                  },
                ],
                &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
              },
            },
            &quot;policyParent&quot;: &quot;A String&quot;, # Optional. The parent of the policy we are attaching to. Example: &quot;projects/123456&quot;
          },
        ],
      },
      &quot;resourceCounts&quot;: { # A summary of the state of all resources scanned for compliance with the changed OrgPolicy. # Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
        &quot;compliant&quot;: 42, # Output only. Number of scanned resources with zero violations.
        &quot;errors&quot;: 42, # Output only. Number of resources that returned an error when scanned.
        &quot;noncompliant&quot;: 42, # Output only. Number of scanned resources with at least one violation.
        &quot;scanned&quot;: 42, # Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error
        &quot;unenforced&quot;: 42, # Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.
      },
      &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the `OrgPolicyViolationsPreview`.
      &quot;violationsCount&quot;: 42, # Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.
    },
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

</body></html>