File: orgpolicy_v2.folders.policies.html

package info (click to toggle)
python-googleapi 2.180.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 527,124 kB
  • sloc: python: 11,076; javascript: 249; sh: 114; makefile: 59
file content (915 lines) | stat: -rw-r--r-- 173,932 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
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
<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="orgpolicy_v2.html">Organization Policy API</a> . <a href="orgpolicy_v2.folders.html">folders</a> . <a href="orgpolicy_v2.folders.policies.html">policies</a></h1>
<h2>Instance Methods</h2>
<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, x__xgafv=None)</a></code></p>
<p class="firstline">Creates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Google Cloud resource.</p>
<p class="toc_element">
  <code><a href="#delete">delete(name, etag=None, x__xgafv=None)</a></code></p>
<p class="firstline">Deletes a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or organization policy does not exist.</p>
<p class="toc_element">
  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets a policy on a resource. If no policy is set on the resource, `NOT_FOUND` is returned. The `etag` value can be used with `UpdatePolicy()` to update a policy during read-modify-write.</p>
<p class="toc_element">
  <code><a href="#getEffectivePolicy">getEffectivePolicy(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets the effective policy on a resource. This is the result of merging policies in the resource hierarchy and evaluating conditions. The returned policy will not have an `etag` or `condition` set because it is an evaluated policy across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.</p>
<p class="toc_element">
  <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Retrieves all of the policies that exist on a particular resource.</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>
<p class="toc_element">
  <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.</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, x__xgafv=None)</code>
  <pre>Creates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Google Cloud resource.

Args:
  parent: string, Required. The Google Cloud resource that will parent the new policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}` (required)
  body: object, The request body.
    The object takes the form of:

{ # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
  &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.
  },
}

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

Returns:
  An object of the form:

    { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
  &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.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="delete">delete(name, etag=None, x__xgafv=None)</code>
  <pre>Deletes a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or organization policy does not exist.

Args:
  name: string, Required. Name of the policy to delete. See the policy entry for naming rules. (required)
  etag: string, Optional. The current etag of policy. If an etag is provided and does not match the current etag of the policy, deletion will be blocked and an ABORTED error will be returned.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}</pre>
</div>

<div class="method">
    <code class="details" id="get">get(name, x__xgafv=None)</code>
  <pre>Gets a policy on a resource. If no policy is set on the resource, `NOT_FOUND` is returned. The `etag` value can be used with `UpdatePolicy()` to update a policy during read-modify-write.

Args:
  name: string, Required. Resource name of the policy. See Policy for naming requirements. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
  &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.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="getEffectivePolicy">getEffectivePolicy(name, x__xgafv=None)</code>
  <pre>Gets the effective policy on a resource. This is the result of merging policies in the resource hierarchy and evaluating conditions. The returned policy will not have an `etag` or `condition` set because it is an evaluated policy across multiple resources. Subtrees of Resource Manager resource hierarchy with &#x27;under:&#x27; prefix will not be expanded.

Args:
  name: string, Required. The effective policy to compute. See Policy for naming requirements. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
  &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.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
  <pre>Retrieves all of the policies that exist on a particular resource.

Args:
  parent: string, Required. The target Google Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}` (required)
  pageSize: integer, Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.
  pageToken: string, Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response returned from the ListPolicies method. It will be empty if no policies are set on the resource.
  &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently not used, but the server may at any point start supplying a valid token.
  &quot;policies&quot;: [ # All policies that exist on the resource. It will be empty if no policies are set.
    { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
      &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.
      },
    },
  ],
}</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>

<div class="method">
    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
  <pre>Updates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.

Args:
  name: string, 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. (required)
  body: object, The request body.
    The object takes the form of:

{ # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
  &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.
  },
}

  updateMask: string, Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
  &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.
  },
}</pre>
</div>

</body></html>