blob: 10c57399d17d7e06875934fb7343ce86285e9696 [file] [log] [blame]
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="cloudresourcemanager_v1.html">Cloud Resource Manager API</a> . <a href="cloudresourcemanager_v1.folders.html">folders</a></h1>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#clearOrgPolicy">clearOrgPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070079<p class="firstline">Clears a `Policy` from a resource.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#getEffectiveOrgPolicy">getEffectiveOrgPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070082<p class="firstline">Gets the effective `Policy` on a resource. This is the result of merging</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#getOrgPolicy">getOrgPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070085<p class="firstline">Gets a `Policy` on a resource.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#listAvailableOrgPolicyConstraints">listAvailableOrgPolicyConstraints(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070088<p class="firstline">Lists `Constraints` that could be applied on the specified resource.</p>
89<p class="toc_element">
90 <code><a href="#listAvailableOrgPolicyConstraints_next">listAvailableOrgPolicyConstraints_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#listOrgPolicies">listOrgPolicies(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070094<p class="firstline">Lists all the `Policies` set for a particular resource.</p>
95<p class="toc_element">
96 <code><a href="#listOrgPolicies_next">listOrgPolicies_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#setOrgPolicy">setOrgPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700100<p class="firstline">Updates the specified `Policy` on the resource. Creates a new `Policy` for</p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700101<h3>Method Details</h3>
102<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700103 <code class="details" id="clearOrgPolicy">clearOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700104 <pre>Clears a `Policy` from a resource.
105
106Args:
107 resource: string, Name of the resource for the `Policy` to clear. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700109 The object takes the form of:
110
111{ # The request sent to the ClearOrgPolicy method.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700112 &quot;constraint&quot;: &quot;A String&quot;, # Name of the `Constraint` of the `Policy` to clear.
Bu Sun Kim65020912020-05-20 12:08:20 -0700113 &quot;etag&quot;: &quot;A String&quot;, # The current version, for concurrency control. Not sending an `etag`
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700114 # will cause the `Policy` to be cleared blindly.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700115 }
116
117 x__xgafv: string, V1 error format.
118 Allowed values
119 1 - v1 error format
120 2 - v2 error format
121
122Returns:
123 An object of the form:
124
125 { # A generic empty message that you can re-use to avoid defining duplicated
126 # empty messages in your APIs. A typical example is to use it as the request
127 # or the response type of an API method. For instance:
128 #
129 # service Foo {
130 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
131 # }
132 #
133 # The JSON representation for `Empty` is empty JSON object `{}`.
134 }</pre>
135</div>
136
137<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 <code class="details" id="getEffectiveOrgPolicy">getEffectiveOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700139 <pre>Gets the effective `Policy` on a resource. This is the result of merging
140`Policies` in the resource hierarchy. The returned `Policy` will not have
141an `etag`set because it is a computed `Policy` across multiple resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700142Subtrees of Resource Manager resource hierarchy with &#x27;under:&#x27; prefix will
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700143not be expanded.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700144
145Args:
146 resource: string, The name of the resource to start computing the effective `Policy`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700148 The object takes the form of:
149
150{ # The request sent to the GetEffectiveOrgPolicy method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700151 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` to compute the effective `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700152 }
153
154 x__xgafv: string, V1 error format.
155 Allowed values
156 1 - v1 error format
157 2 - v2 error format
158
159Returns:
160 An object of the form:
161
162 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
163 # for configurations of Cloud Platform resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700164 &quot;listPolicy&quot;: { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700165 # resource.
166 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167 # `ListPolicy` can define specific values and subtrees of Cloud Resource
168 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
169 # are allowed or denied by setting the `allowed_values` and `denied_values`
170 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
171 # The `under:` prefix is used to denote resource subtree values.
172 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -0700173 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174 # same as values with no prefix.
175 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -0700176 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
177 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
178 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700179 # The `supports_under` field of the associated `Constraint` defines whether
180 # ancestry prefixes can be used. You can set `allowed_values` and
181 # `denied_values` in the same `Policy` if `all_values` is
182 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
183 # values. If `all_values` is set to either `ALLOW` or `DENY`,
184 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700185 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Bu Sun Kim65020912020-05-20 12:08:20 -0700186 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700188 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700189 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700190 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
191 # that matches the value specified in this `Policy`. If `suggested_value`
192 # is not set, it will inherit the value specified higher in the hierarchy,
193 # unless `inherit_from_parent` is `false`.
194 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700195 #
196 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
197 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
198 # set to `true`, then the values from the effective `Policy` of the parent
199 # resource are inherited, meaning the values set in this `Policy` are
200 # added to the values inherited up the hierarchy.
201 #
202 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -0700203 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700204 # simple and understandable. However, it is possible to set a `Policy` with
205 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
206 # In this case, the values that are allowed must be in `allowed_values` and
207 # not present in `denied_values`.
208 #
209 # For example, suppose you have a `Constraint`
210 # `constraints/serviceuser.services`, which has a `constraint_type` of
211 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
212 # Suppose that at the Organization level, a `Policy` is applied that
213 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
214 # `Policy` is applied to a project below the Organization that has
215 # `inherit_from_parent` set to `false` and field all_values set to DENY,
216 # then an attempt to activate any API will be denied.
217 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218 # The following examples demonstrate different possible layerings for
219 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700220 #
221 # Example 1 (no inherited values):
222 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700223 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700224 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700225 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700226 # The accepted values at `organizations/foo` are `E1`, `E2`.
227 # The accepted values at `projects/bar` are `E3`, and `E4`.
228 #
229 # Example 2 (inherited values):
230 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700231 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700232 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700233 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700234 # The accepted values at `organizations/foo` are `E1`, `E2`.
235 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
236 #
237 # Example 3 (inheriting both allowed and denied values):
238 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700239 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700240 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700242 # The accepted values at `organizations/foo` are `E1`, `E2`.
243 # The value accepted at `projects/bar` is `E2`.
244 #
245 # Example 4 (RestoreDefault):
246 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700247 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700248 # `projects/bar` has a `Policy` with values:
249 # {RestoreDefault: {}}
250 # The accepted values at `organizations/foo` are `E1`, `E2`.
251 # The accepted values at `projects/bar` are either all or none depending on
252 # the value of `constraint_default` (if `ALLOW`, all; if
253 # `DENY`, none).
254 #
255 # Example 5 (no policy inherits parent policy):
256 # `organizations/foo` has no `Policy` set.
257 # `projects/bar` has no `Policy` set.
258 # The accepted values at both levels are either all or none depending on
259 # the value of `constraint_default` (if `ALLOW`, all; if
260 # `DENY`, none).
261 #
262 # Example 6 (ListConstraint allowing all):
263 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700265 # `projects/bar` has a `Policy` with:
266 # {all: ALLOW}
267 # The accepted values at `organizations/foo` are `E1`, E2`.
268 # Any value is accepted at `projects/bar`.
269 #
270 # Example 7 (ListConstraint allowing none):
271 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700273 # `projects/bar` has a `Policy` with:
274 # {all: DENY}
275 # The accepted values at `organizations/foo` are `E1`, E2`.
276 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700277 #
278 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
279 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -0700280 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700281 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700282 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700284 # {allowed_values: &quot;under:projects/P3&quot;}
285 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700286 # The accepted values at `organizations/foo` are `organizations/O1`,
287 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
288 # `projects/P3`.
289 # The accepted values at `projects/bar` are `organizations/O1`,
290 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 &quot;deniedValues&quot;: [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700293 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700294 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700295 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700296 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
297 # concurrency control.
298 #
299 # When the `Policy` is returned from either a `GetPolicy` or a
300 # `ListOrgPolicy` request, this `etag` indicates the version of the current
301 # `Policy` to use when executing a read-modify-write loop.
302 #
303 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
304 # `etag` will be unset.
305 #
306 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
307 # that was returned from a `GetOrgPolicy` request as part of a
308 # read-modify-write loop for concurrency control. Not setting the `etag`in a
309 # `SetOrgPolicy` request will result in an unconditional write of the
310 # `Policy`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700311 &quot;booleanPolicy&quot;: { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700312 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700313 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700314 # configuration is acceptable.
315 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 # Suppose you have a `Constraint`
317 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
318 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
319 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700320 # - If the `Policy` at this resource has enforced set to `false`, serial
321 # port connection attempts will be allowed.
322 # - If the `Policy` at this resource has enforced set to `true`, serial
323 # port connection attempts will be refused.
324 # - If the `Policy` at this resource is `RestoreDefault`, serial port
325 # connection attempts will be allowed.
326 # - If no `Policy` is set at this resource or anywhere higher in the
327 # resource hierarchy, serial port connection attempts will be allowed.
328 # - If no `Policy` is set at this resource, but one exists higher in the
329 # resource hierarchy, the behavior is as if the`Policy` were set at
330 # this resource.
331 #
332 # The following examples demonstrate the different possible layerings:
333 #
334 # Example 1 (nearest `Constraint` wins):
335 # `organizations/foo` has a `Policy` with:
336 # {enforced: false}
337 # `projects/bar` has no `Policy` set.
338 # The constraint at `projects/bar` and `organizations/foo` will not be
339 # enforced.
340 #
341 # Example 2 (enforcement gets replaced):
342 # `organizations/foo` has a `Policy` with:
343 # {enforced: false}
344 # `projects/bar` has a `Policy` with:
345 # {enforced: true}
346 # The constraint at `organizations/foo` is not enforced.
347 # The constraint at `projects/bar` is enforced.
348 #
349 # Example 3 (RestoreDefault):
350 # `organizations/foo` has a `Policy` with:
351 # {enforced: true}
352 # `projects/bar` has a `Policy` with:
353 # {RestoreDefault: {}}
354 # The constraint at `organizations/foo` is enforced.
355 # The constraint at `projects/bar` is not enforced, because
356 # `constraint_default` for the `Constraint` is `ALLOW`.
357 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700358 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
359 # `constraints/serviceuser.services`.
360 #
361 # Immutable after creation.
362 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
363 # server, not specified by the caller, and represents the last time a call to
364 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
365 # be ignored.
366 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
367 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
368 # `Constraint` type.
369 # `constraint_default` enforcement behavior of the specific `Constraint` at
370 # this resource.
371 #
372 # Suppose that `constraint_default` is set to `ALLOW` for the
373 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
374 # foo.com sets a `Policy` at their Organization resource node that restricts
375 # the allowed service activations to deny all service activations. They
376 # could then set a `Policy` with the `policy_type` `restore_default` on
377 # several experimental projects, restoring the `constraint_default`
378 # enforcement of the `Constraint` for only those projects, allowing those
379 # projects to have all services activated.
380 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700381 }</pre>
382</div>
383
384<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700385 <code class="details" id="getOrgPolicy">getOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700386 <pre>Gets a `Policy` on a resource.
387
388If no `Policy` is set on the resource, a `Policy` is returned with default
389values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
390`etag` value can be used with `SetOrgPolicy()` to create or update a
391`Policy` during read-modify-write.
392
393Args:
394 resource: string, Name of the resource the `Policy` is set on. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700395 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700396 The object takes the form of:
397
398{ # The request sent to the GetOrgPolicy method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700399 &quot;constraint&quot;: &quot;A String&quot;, # Name of the `Constraint` to get the `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700400 }
401
402 x__xgafv: string, V1 error format.
403 Allowed values
404 1 - v1 error format
405 2 - v2 error format
406
407Returns:
408 An object of the form:
409
410 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
411 # for configurations of Cloud Platform resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 &quot;listPolicy&quot;: { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700413 # resource.
414 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 # `ListPolicy` can define specific values and subtrees of Cloud Resource
416 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
417 # are allowed or denied by setting the `allowed_values` and `denied_values`
418 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
419 # The `under:` prefix is used to denote resource subtree values.
420 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -0700421 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700422 # same as values with no prefix.
423 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -0700424 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
425 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
426 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 # The `supports_under` field of the associated `Constraint` defines whether
428 # ancestry prefixes can be used. You can set `allowed_values` and
429 # `denied_values` in the same `Policy` if `all_values` is
430 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
431 # values. If `all_values` is set to either `ALLOW` or `DENY`,
432 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700433 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Bu Sun Kim65020912020-05-20 12:08:20 -0700434 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700435 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700436 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700437 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700438 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
439 # that matches the value specified in this `Policy`. If `suggested_value`
440 # is not set, it will inherit the value specified higher in the hierarchy,
441 # unless `inherit_from_parent` is `false`.
442 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700443 #
444 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
445 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
446 # set to `true`, then the values from the effective `Policy` of the parent
447 # resource are inherited, meaning the values set in this `Policy` are
448 # added to the values inherited up the hierarchy.
449 #
450 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -0700451 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700452 # simple and understandable. However, it is possible to set a `Policy` with
453 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
454 # In this case, the values that are allowed must be in `allowed_values` and
455 # not present in `denied_values`.
456 #
457 # For example, suppose you have a `Constraint`
458 # `constraints/serviceuser.services`, which has a `constraint_type` of
459 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
460 # Suppose that at the Organization level, a `Policy` is applied that
461 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
462 # `Policy` is applied to a project below the Organization that has
463 # `inherit_from_parent` set to `false` and field all_values set to DENY,
464 # then an attempt to activate any API will be denied.
465 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700466 # The following examples demonstrate different possible layerings for
467 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700468 #
469 # Example 1 (no inherited values):
470 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700471 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700472 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700473 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700474 # The accepted values at `organizations/foo` are `E1`, `E2`.
475 # The accepted values at `projects/bar` are `E3`, and `E4`.
476 #
477 # Example 2 (inherited values):
478 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700479 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700480 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700481 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700482 # The accepted values at `organizations/foo` are `E1`, `E2`.
483 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
484 #
485 # Example 3 (inheriting both allowed and denied values):
486 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700487 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700488 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700490 # The accepted values at `organizations/foo` are `E1`, `E2`.
491 # The value accepted at `projects/bar` is `E2`.
492 #
493 # Example 4 (RestoreDefault):
494 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700495 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700496 # `projects/bar` has a `Policy` with values:
497 # {RestoreDefault: {}}
498 # The accepted values at `organizations/foo` are `E1`, `E2`.
499 # The accepted values at `projects/bar` are either all or none depending on
500 # the value of `constraint_default` (if `ALLOW`, all; if
501 # `DENY`, none).
502 #
503 # Example 5 (no policy inherits parent policy):
504 # `organizations/foo` has no `Policy` set.
505 # `projects/bar` has no `Policy` set.
506 # The accepted values at both levels are either all or none depending on
507 # the value of `constraint_default` (if `ALLOW`, all; if
508 # `DENY`, none).
509 #
510 # Example 6 (ListConstraint allowing all):
511 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700512 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700513 # `projects/bar` has a `Policy` with:
514 # {all: ALLOW}
515 # The accepted values at `organizations/foo` are `E1`, E2`.
516 # Any value is accepted at `projects/bar`.
517 #
518 # Example 7 (ListConstraint allowing none):
519 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700521 # `projects/bar` has a `Policy` with:
522 # {all: DENY}
523 # The accepted values at `organizations/foo` are `E1`, E2`.
524 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700525 #
526 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
527 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -0700528 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700529 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700530 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700531 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 # {allowed_values: &quot;under:projects/P3&quot;}
533 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700534 # The accepted values at `organizations/foo` are `organizations/O1`,
535 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
536 # `projects/P3`.
537 # The accepted values at `projects/bar` are `organizations/O1`,
538 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700539 &quot;deniedValues&quot;: [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700540 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700542 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700543 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
545 # concurrency control.
546 #
547 # When the `Policy` is returned from either a `GetPolicy` or a
548 # `ListOrgPolicy` request, this `etag` indicates the version of the current
549 # `Policy` to use when executing a read-modify-write loop.
550 #
551 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
552 # `etag` will be unset.
553 #
554 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
555 # that was returned from a `GetOrgPolicy` request as part of a
556 # read-modify-write loop for concurrency control. Not setting the `etag`in a
557 # `SetOrgPolicy` request will result in an unconditional write of the
558 # `Policy`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700559 &quot;booleanPolicy&quot;: { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700560 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700561 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700562 # configuration is acceptable.
563 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700564 # Suppose you have a `Constraint`
565 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
566 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
567 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700568 # - If the `Policy` at this resource has enforced set to `false`, serial
569 # port connection attempts will be allowed.
570 # - If the `Policy` at this resource has enforced set to `true`, serial
571 # port connection attempts will be refused.
572 # - If the `Policy` at this resource is `RestoreDefault`, serial port
573 # connection attempts will be allowed.
574 # - If no `Policy` is set at this resource or anywhere higher in the
575 # resource hierarchy, serial port connection attempts will be allowed.
576 # - If no `Policy` is set at this resource, but one exists higher in the
577 # resource hierarchy, the behavior is as if the`Policy` were set at
578 # this resource.
579 #
580 # The following examples demonstrate the different possible layerings:
581 #
582 # Example 1 (nearest `Constraint` wins):
583 # `organizations/foo` has a `Policy` with:
584 # {enforced: false}
585 # `projects/bar` has no `Policy` set.
586 # The constraint at `projects/bar` and `organizations/foo` will not be
587 # enforced.
588 #
589 # Example 2 (enforcement gets replaced):
590 # `organizations/foo` has a `Policy` with:
591 # {enforced: false}
592 # `projects/bar` has a `Policy` with:
593 # {enforced: true}
594 # The constraint at `organizations/foo` is not enforced.
595 # The constraint at `projects/bar` is enforced.
596 #
597 # Example 3 (RestoreDefault):
598 # `organizations/foo` has a `Policy` with:
599 # {enforced: true}
600 # `projects/bar` has a `Policy` with:
601 # {RestoreDefault: {}}
602 # The constraint at `organizations/foo` is enforced.
603 # The constraint at `projects/bar` is not enforced, because
604 # `constraint_default` for the `Constraint` is `ALLOW`.
605 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700606 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
607 # `constraints/serviceuser.services`.
608 #
609 # Immutable after creation.
610 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
611 # server, not specified by the caller, and represents the last time a call to
612 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
613 # be ignored.
614 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
615 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
616 # `Constraint` type.
617 # `constraint_default` enforcement behavior of the specific `Constraint` at
618 # this resource.
619 #
620 # Suppose that `constraint_default` is set to `ALLOW` for the
621 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
622 # foo.com sets a `Policy` at their Organization resource node that restricts
623 # the allowed service activations to deny all service activations. They
624 # could then set a `Policy` with the `policy_type` `restore_default` on
625 # several experimental projects, restoring the `constraint_default`
626 # enforcement of the `Constraint` for only those projects, allowing those
627 # projects to have all services activated.
628 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700629 }</pre>
630</div>
631
632<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700633 <code class="details" id="listAvailableOrgPolicyConstraints">listAvailableOrgPolicyConstraints(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700634 <pre>Lists `Constraints` that could be applied on the specified resource.
635
636Args:
637 resource: string, Name of the resource to list `Constraints` for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700638 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700639 The object takes the form of:
640
641{ # The request sent to the [ListAvailableOrgPolicyConstraints]
642 # google.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700643 &quot;pageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently unsupported
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700644 # and will be ignored. The server may at any point start using this field.
Bu Sun Kim65020912020-05-20 12:08:20 -0700645 &quot;pageSize&quot;: 42, # Size of the pages to be returned. This is currently unsupported and will
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700646 # be ignored. The server may at any point start using this field to limit
647 # page size.
648 }
649
650 x__xgafv: string, V1 error format.
651 Allowed values
652 1 - v1 error format
653 2 - v2 error format
654
655Returns:
656 An object of the form:
657
658 { # The response returned from the ListAvailableOrgPolicyConstraints method.
659 # Returns all `Constraints` that could be set at this level of the hierarchy
660 # (contrast with the response from `ListPolicies`, which returns all policies
661 # which are set).
Bu Sun Kim65020912020-05-20 12:08:20 -0700662 &quot;constraints&quot;: [ # The collection of constraints that are settable on the request resource.
663 { # A `Constraint` describes a way in which a resource&#x27;s configuration can be
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700664 # restricted. For example, it controls which cloud services can be activated
665 # across an organization, or whether a Compute Engine instance can have
666 # serial port connections established. `Constraints` can be configured by the
Bu Sun Kim65020912020-05-20 12:08:20 -0700667 # organization&#x27;s policy adminstrator to fit the needs of the organzation by
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700668 # setting Policies for `Constraints` at different locations in the
Bu Sun Kim65020912020-05-20 12:08:20 -0700669 # organization&#x27;s resource hierarchy. Policies are inherited down the resource
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700670 # hierarchy from higher levels, but can also be overridden. For details about
671 # the inheritance rules please read about
672 # Policies.
673 #
674 # `Constraints` have a default behavior determined by the `constraint_default`
675 # field, which is the enforcement behavior that is used in the absence of a
676 # `Policy` being defined or inherited for the resource in question.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700677 &quot;name&quot;: &quot;A String&quot;, # Immutable value, required to globally be unique. For example,
678 # `constraints/serviceuser.services`
Bu Sun Kim65020912020-05-20 12:08:20 -0700679 &quot;listConstraint&quot;: { # A `Constraint` that allows or disallows a list of string values, which are # Defines this constraint as being a ListConstraint.
680 # configured by an Organization&#x27;s policy administrator with a `Policy`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700681 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
682 # that matches the value specified in this `Constraint`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700683 &quot;supportsUnder&quot;: True or False, # Indicates whether subtrees of Cloud Resource Manager resource hierarchy
684 # can be used in `Policy.allowed_values` and `Policy.denied_values`. For
685 # example, `&quot;under:folders/123&quot;` would match any resource under the
686 # &#x27;folders/123&#x27; folder.
Bu Sun Kim65020912020-05-20 12:08:20 -0700687 },
688 &quot;version&quot;: 42, # Version of the `Constraint`. Default version is 0;
689 &quot;description&quot;: &quot;A String&quot;, # Detailed description of what this `Constraint` controls as well as how and
690 # where it is enforced.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700691 #
692 # Mutable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700693 &quot;displayName&quot;: &quot;A String&quot;, # The human readable name.
694 #
695 # Mutable.
696 &quot;booleanConstraint&quot;: { # A `Constraint` that is either enforced or not. # Defines this constraint as being a BooleanConstraint.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700697 #
698 # For example a constraint `constraints/compute.disableSerialPortAccess`.
699 # If it is enforced on a VM instance, serial port connections will not be
700 # opened to that instance.
701 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700702 &quot;constraintDefault&quot;: &quot;A String&quot;, # The evaluation behavior of this constraint in the absense of &#x27;Policy&#x27;.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700703 },
704 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700705 &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently not used.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700706 }</pre>
707</div>
708
709<div class="method">
710 <code class="details" id="listAvailableOrgPolicyConstraints_next">listAvailableOrgPolicyConstraints_next(previous_request, previous_response)</code>
711 <pre>Retrieves the next page of results.
712
713Args:
714 previous_request: The request for the previous page. (required)
715 previous_response: The response from the request for the previous page. (required)
716
717Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700718 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700719 page. Returns None if there are no more items in the collection.
720 </pre>
721</div>
722
723<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700724 <code class="details" id="listOrgPolicies">listOrgPolicies(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700725 <pre>Lists all the `Policies` set for a particular resource.
726
727Args:
728 resource: string, Name of the resource to list Policies for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700729 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700730 The object takes the form of:
731
732{ # The request sent to the ListOrgPolicies method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700733 &quot;pageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently unsupported
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700734 # and will be ignored. The server may at any point start using this field.
Bu Sun Kim65020912020-05-20 12:08:20 -0700735 &quot;pageSize&quot;: 42, # Size of the pages to be returned. This is currently unsupported and will
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700736 # be ignored. The server may at any point start using this field to limit
737 # page size.
738 }
739
740 x__xgafv: string, V1 error format.
741 Allowed values
742 1 - v1 error format
743 2 - v2 error format
744
745Returns:
746 An object of the form:
747
748 { # The response returned from the ListOrgPolicies method. It will be empty
749 # if no `Policies` are set on the resource.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700750 &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently not used, but
751 # the server may at any point start supplying a valid token.
Bu Sun Kim65020912020-05-20 12:08:20 -0700752 &quot;policies&quot;: [ # The `Policies` that are set on the resource. It will be empty if no
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700753 # `Policies` are set.
754 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
755 # for configurations of Cloud Platform resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700756 &quot;listPolicy&quot;: { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700757 # resource.
758 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700759 # `ListPolicy` can define specific values and subtrees of Cloud Resource
760 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
761 # are allowed or denied by setting the `allowed_values` and `denied_values`
762 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
763 # The `under:` prefix is used to denote resource subtree values.
764 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -0700765 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700766 # same as values with no prefix.
767 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -0700768 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
769 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
770 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700771 # The `supports_under` field of the associated `Constraint` defines whether
772 # ancestry prefixes can be used. You can set `allowed_values` and
773 # `denied_values` in the same `Policy` if `all_values` is
774 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
775 # values. If `all_values` is set to either `ALLOW` or `DENY`,
776 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700777 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700779 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700780 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700781 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700782 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
783 # that matches the value specified in this `Policy`. If `suggested_value`
784 # is not set, it will inherit the value specified higher in the hierarchy,
785 # unless `inherit_from_parent` is `false`.
786 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700787 #
788 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
789 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
790 # set to `true`, then the values from the effective `Policy` of the parent
791 # resource are inherited, meaning the values set in this `Policy` are
792 # added to the values inherited up the hierarchy.
793 #
794 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700796 # simple and understandable. However, it is possible to set a `Policy` with
797 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
798 # In this case, the values that are allowed must be in `allowed_values` and
799 # not present in `denied_values`.
800 #
801 # For example, suppose you have a `Constraint`
802 # `constraints/serviceuser.services`, which has a `constraint_type` of
803 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
804 # Suppose that at the Organization level, a `Policy` is applied that
805 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
806 # `Policy` is applied to a project below the Organization that has
807 # `inherit_from_parent` set to `false` and field all_values set to DENY,
808 # then an attempt to activate any API will be denied.
809 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700810 # The following examples demonstrate different possible layerings for
811 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700812 #
813 # Example 1 (no inherited values):
814 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700815 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700816 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700817 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700818 # The accepted values at `organizations/foo` are `E1`, `E2`.
819 # The accepted values at `projects/bar` are `E3`, and `E4`.
820 #
821 # Example 2 (inherited values):
822 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700823 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700824 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700825 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700826 # The accepted values at `organizations/foo` are `E1`, `E2`.
827 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
828 #
829 # Example 3 (inheriting both allowed and denied values):
830 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700831 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700832 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700833 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700834 # The accepted values at `organizations/foo` are `E1`, `E2`.
835 # The value accepted at `projects/bar` is `E2`.
836 #
837 # Example 4 (RestoreDefault):
838 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700839 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700840 # `projects/bar` has a `Policy` with values:
841 # {RestoreDefault: {}}
842 # The accepted values at `organizations/foo` are `E1`, `E2`.
843 # The accepted values at `projects/bar` are either all or none depending on
844 # the value of `constraint_default` (if `ALLOW`, all; if
845 # `DENY`, none).
846 #
847 # Example 5 (no policy inherits parent policy):
848 # `organizations/foo` has no `Policy` set.
849 # `projects/bar` has no `Policy` set.
850 # The accepted values at both levels are either all or none depending on
851 # the value of `constraint_default` (if `ALLOW`, all; if
852 # `DENY`, none).
853 #
854 # Example 6 (ListConstraint allowing all):
855 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700856 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700857 # `projects/bar` has a `Policy` with:
858 # {all: ALLOW}
859 # The accepted values at `organizations/foo` are `E1`, E2`.
860 # Any value is accepted at `projects/bar`.
861 #
862 # Example 7 (ListConstraint allowing none):
863 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700864 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700865 # `projects/bar` has a `Policy` with:
866 # {all: DENY}
867 # The accepted values at `organizations/foo` are `E1`, E2`.
868 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700869 #
870 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
871 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -0700872 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700873 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700874 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700875 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700876 # {allowed_values: &quot;under:projects/P3&quot;}
877 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700878 # The accepted values at `organizations/foo` are `organizations/O1`,
879 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
880 # `projects/P3`.
881 # The accepted values at `projects/bar` are `organizations/O1`,
882 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700883 &quot;deniedValues&quot;: [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700884 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700885 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700886 ],
887 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700888 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
889 # concurrency control.
890 #
891 # When the `Policy` is returned from either a `GetPolicy` or a
892 # `ListOrgPolicy` request, this `etag` indicates the version of the current
893 # `Policy` to use when executing a read-modify-write loop.
894 #
895 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
896 # `etag` will be unset.
897 #
898 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
899 # that was returned from a `GetOrgPolicy` request as part of a
900 # read-modify-write loop for concurrency control. Not setting the `etag`in a
901 # `SetOrgPolicy` request will result in an unconditional write of the
902 # `Policy`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 &quot;booleanPolicy&quot;: { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700904 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700905 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700906 # configuration is acceptable.
907 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700908 # Suppose you have a `Constraint`
909 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
910 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
911 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700912 # - If the `Policy` at this resource has enforced set to `false`, serial
913 # port connection attempts will be allowed.
914 # - If the `Policy` at this resource has enforced set to `true`, serial
915 # port connection attempts will be refused.
916 # - If the `Policy` at this resource is `RestoreDefault`, serial port
917 # connection attempts will be allowed.
918 # - If no `Policy` is set at this resource or anywhere higher in the
919 # resource hierarchy, serial port connection attempts will be allowed.
920 # - If no `Policy` is set at this resource, but one exists higher in the
921 # resource hierarchy, the behavior is as if the`Policy` were set at
922 # this resource.
923 #
924 # The following examples demonstrate the different possible layerings:
925 #
926 # Example 1 (nearest `Constraint` wins):
927 # `organizations/foo` has a `Policy` with:
928 # {enforced: false}
929 # `projects/bar` has no `Policy` set.
930 # The constraint at `projects/bar` and `organizations/foo` will not be
931 # enforced.
932 #
933 # Example 2 (enforcement gets replaced):
934 # `organizations/foo` has a `Policy` with:
935 # {enforced: false}
936 # `projects/bar` has a `Policy` with:
937 # {enforced: true}
938 # The constraint at `organizations/foo` is not enforced.
939 # The constraint at `projects/bar` is enforced.
940 #
941 # Example 3 (RestoreDefault):
942 # `organizations/foo` has a `Policy` with:
943 # {enforced: true}
944 # `projects/bar` has a `Policy` with:
945 # {RestoreDefault: {}}
946 # The constraint at `organizations/foo` is enforced.
947 # The constraint at `projects/bar` is not enforced, because
948 # `constraint_default` for the `Constraint` is `ALLOW`.
949 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700950 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
951 # `constraints/serviceuser.services`.
952 #
953 # Immutable after creation.
954 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
955 # server, not specified by the caller, and represents the last time a call to
956 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
957 # be ignored.
958 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
959 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
960 # `Constraint` type.
961 # `constraint_default` enforcement behavior of the specific `Constraint` at
962 # this resource.
963 #
964 # Suppose that `constraint_default` is set to `ALLOW` for the
965 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
966 # foo.com sets a `Policy` at their Organization resource node that restricts
967 # the allowed service activations to deny all service activations. They
968 # could then set a `Policy` with the `policy_type` `restore_default` on
969 # several experimental projects, restoring the `constraint_default`
970 # enforcement of the `Constraint` for only those projects, allowing those
971 # projects to have all services activated.
972 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700973 },
974 ],
975 }</pre>
976</div>
977
978<div class="method">
979 <code class="details" id="listOrgPolicies_next">listOrgPolicies_next(previous_request, previous_response)</code>
980 <pre>Retrieves the next page of results.
981
982Args:
983 previous_request: The request for the previous page. (required)
984 previous_response: The response from the request for the previous page. (required)
985
986Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700987 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700988 page. Returns None if there are no more items in the collection.
989 </pre>
990</div>
991
992<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700993 <code class="details" id="setOrgPolicy">setOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700994 <pre>Updates the specified `Policy` on the resource. Creates a new `Policy` for
995that `Constraint` on the resource if one does not exist.
996
997Not supplying an `etag` on the request `Policy` results in an unconditional
998write of the `Policy`.
999
1000Args:
1001 resource: string, Resource name of the resource to attach the `Policy`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001002 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001003 The object takes the form of:
1004
1005{ # The request sent to the SetOrgPolicyRequest method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001006 &quot;policy&quot;: { # Defines a Cloud Organization `Policy` which is used to specify `Constraints` # `Policy` to set on the resource.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001007 # for configurations of Cloud Platform resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07001008 &quot;listPolicy&quot;: { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001009 # resource.
1010 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001011 # `ListPolicy` can define specific values and subtrees of Cloud Resource
1012 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
1013 # are allowed or denied by setting the `allowed_values` and `denied_values`
1014 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
1015 # The `under:` prefix is used to denote resource subtree values.
1016 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -07001017 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001018 # same as values with no prefix.
1019 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -07001020 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
1021 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
1022 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001023 # The `supports_under` field of the associated `Constraint` defines whether
1024 # ancestry prefixes can be used. You can set `allowed_values` and
1025 # `denied_values` in the same `Policy` if `all_values` is
1026 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
1027 # values. If `all_values` is set to either `ALLOW` or `DENY`,
1028 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001029 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Bu Sun Kim65020912020-05-20 12:08:20 -07001030 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001031 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001032 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001033 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001034 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
1035 # that matches the value specified in this `Policy`. If `suggested_value`
1036 # is not set, it will inherit the value specified higher in the hierarchy,
1037 # unless `inherit_from_parent` is `false`.
1038 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001039 #
1040 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
1041 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
1042 # set to `true`, then the values from the effective `Policy` of the parent
1043 # resource are inherited, meaning the values set in this `Policy` are
1044 # added to the values inherited up the hierarchy.
1045 #
1046 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -07001047 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001048 # simple and understandable. However, it is possible to set a `Policy` with
1049 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
1050 # In this case, the values that are allowed must be in `allowed_values` and
1051 # not present in `denied_values`.
1052 #
1053 # For example, suppose you have a `Constraint`
1054 # `constraints/serviceuser.services`, which has a `constraint_type` of
1055 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
1056 # Suppose that at the Organization level, a `Policy` is applied that
1057 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
1058 # `Policy` is applied to a project below the Organization that has
1059 # `inherit_from_parent` set to `false` and field all_values set to DENY,
1060 # then an attempt to activate any API will be denied.
1061 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001062 # The following examples demonstrate different possible layerings for
1063 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001064 #
1065 # Example 1 (no inherited values):
1066 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001067 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001068 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001069 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001070 # The accepted values at `organizations/foo` are `E1`, `E2`.
1071 # The accepted values at `projects/bar` are `E3`, and `E4`.
1072 #
1073 # Example 2 (inherited values):
1074 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001075 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001076 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001077 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001078 # The accepted values at `organizations/foo` are `E1`, `E2`.
1079 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
1080 #
1081 # Example 3 (inheriting both allowed and denied values):
1082 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001083 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001084 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001085 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001086 # The accepted values at `organizations/foo` are `E1`, `E2`.
1087 # The value accepted at `projects/bar` is `E2`.
1088 #
1089 # Example 4 (RestoreDefault):
1090 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001091 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001092 # `projects/bar` has a `Policy` with values:
1093 # {RestoreDefault: {}}
1094 # The accepted values at `organizations/foo` are `E1`, `E2`.
1095 # The accepted values at `projects/bar` are either all or none depending on
1096 # the value of `constraint_default` (if `ALLOW`, all; if
1097 # `DENY`, none).
1098 #
1099 # Example 5 (no policy inherits parent policy):
1100 # `organizations/foo` has no `Policy` set.
1101 # `projects/bar` has no `Policy` set.
1102 # The accepted values at both levels are either all or none depending on
1103 # the value of `constraint_default` (if `ALLOW`, all; if
1104 # `DENY`, none).
1105 #
1106 # Example 6 (ListConstraint allowing all):
1107 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001108 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001109 # `projects/bar` has a `Policy` with:
1110 # {all: ALLOW}
1111 # The accepted values at `organizations/foo` are `E1`, E2`.
1112 # Any value is accepted at `projects/bar`.
1113 #
1114 # Example 7 (ListConstraint allowing none):
1115 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001116 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001117 # `projects/bar` has a `Policy` with:
1118 # {all: DENY}
1119 # The accepted values at `organizations/foo` are `E1`, E2`.
1120 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001121 #
1122 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
1123 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07001124 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001125 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001126 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001127 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001128 # {allowed_values: &quot;under:projects/P3&quot;}
1129 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001130 # The accepted values at `organizations/foo` are `organizations/O1`,
1131 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
1132 # `projects/P3`.
1133 # The accepted values at `projects/bar` are `organizations/O1`,
1134 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001135 &quot;deniedValues&quot;: [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001136 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001137 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001138 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001139 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001140 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
1141 # concurrency control.
1142 #
1143 # When the `Policy` is returned from either a `GetPolicy` or a
1144 # `ListOrgPolicy` request, this `etag` indicates the version of the current
1145 # `Policy` to use when executing a read-modify-write loop.
1146 #
1147 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
1148 # `etag` will be unset.
1149 #
1150 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
1151 # that was returned from a `GetOrgPolicy` request as part of a
1152 # read-modify-write loop for concurrency control. Not setting the `etag`in a
1153 # `SetOrgPolicy` request will result in an unconditional write of the
1154 # `Policy`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001155 &quot;booleanPolicy&quot;: { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001156 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001157 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001158 # configuration is acceptable.
1159 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001160 # Suppose you have a `Constraint`
1161 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
1162 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
1163 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001164 # - If the `Policy` at this resource has enforced set to `false`, serial
1165 # port connection attempts will be allowed.
1166 # - If the `Policy` at this resource has enforced set to `true`, serial
1167 # port connection attempts will be refused.
1168 # - If the `Policy` at this resource is `RestoreDefault`, serial port
1169 # connection attempts will be allowed.
1170 # - If no `Policy` is set at this resource or anywhere higher in the
1171 # resource hierarchy, serial port connection attempts will be allowed.
1172 # - If no `Policy` is set at this resource, but one exists higher in the
1173 # resource hierarchy, the behavior is as if the`Policy` were set at
1174 # this resource.
1175 #
1176 # The following examples demonstrate the different possible layerings:
1177 #
1178 # Example 1 (nearest `Constraint` wins):
1179 # `organizations/foo` has a `Policy` with:
1180 # {enforced: false}
1181 # `projects/bar` has no `Policy` set.
1182 # The constraint at `projects/bar` and `organizations/foo` will not be
1183 # enforced.
1184 #
1185 # Example 2 (enforcement gets replaced):
1186 # `organizations/foo` has a `Policy` with:
1187 # {enforced: false}
1188 # `projects/bar` has a `Policy` with:
1189 # {enforced: true}
1190 # The constraint at `organizations/foo` is not enforced.
1191 # The constraint at `projects/bar` is enforced.
1192 #
1193 # Example 3 (RestoreDefault):
1194 # `organizations/foo` has a `Policy` with:
1195 # {enforced: true}
1196 # `projects/bar` has a `Policy` with:
1197 # {RestoreDefault: {}}
1198 # The constraint at `organizations/foo` is enforced.
1199 # The constraint at `projects/bar` is not enforced, because
1200 # `constraint_default` for the `Constraint` is `ALLOW`.
1201 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001202 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
1203 # `constraints/serviceuser.services`.
1204 #
1205 # Immutable after creation.
1206 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
1207 # server, not specified by the caller, and represents the last time a call to
1208 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
1209 # be ignored.
1210 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
1211 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
1212 # `Constraint` type.
1213 # `constraint_default` enforcement behavior of the specific `Constraint` at
1214 # this resource.
1215 #
1216 # Suppose that `constraint_default` is set to `ALLOW` for the
1217 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
1218 # foo.com sets a `Policy` at their Organization resource node that restricts
1219 # the allowed service activations to deny all service activations. They
1220 # could then set a `Policy` with the `policy_type` `restore_default` on
1221 # several experimental projects, restoring the `constraint_default`
1222 # enforcement of the `Constraint` for only those projects, allowing those
1223 # projects to have all services activated.
1224 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001225 },
1226 }
1227
1228 x__xgafv: string, V1 error format.
1229 Allowed values
1230 1 - v1 error format
1231 2 - v2 error format
1232
1233Returns:
1234 An object of the form:
1235
1236 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
1237 # for configurations of Cloud Platform resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07001238 &quot;listPolicy&quot;: { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001239 # resource.
1240 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001241 # `ListPolicy` can define specific values and subtrees of Cloud Resource
1242 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
1243 # are allowed or denied by setting the `allowed_values` and `denied_values`
1244 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
1245 # The `under:` prefix is used to denote resource subtree values.
1246 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -07001247 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001248 # same as values with no prefix.
1249 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -07001250 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
1251 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
1252 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001253 # The `supports_under` field of the associated `Constraint` defines whether
1254 # ancestry prefixes can be used. You can set `allowed_values` and
1255 # `denied_values` in the same `Policy` if `all_values` is
1256 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
1257 # values. If `all_values` is set to either `ALLOW` or `DENY`,
1258 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001259 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Bu Sun Kim65020912020-05-20 12:08:20 -07001260 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001261 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001262 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001263 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001264 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
1265 # that matches the value specified in this `Policy`. If `suggested_value`
1266 # is not set, it will inherit the value specified higher in the hierarchy,
1267 # unless `inherit_from_parent` is `false`.
1268 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001269 #
1270 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
1271 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
1272 # set to `true`, then the values from the effective `Policy` of the parent
1273 # resource are inherited, meaning the values set in this `Policy` are
1274 # added to the values inherited up the hierarchy.
1275 #
1276 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -07001277 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001278 # simple and understandable. However, it is possible to set a `Policy` with
1279 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
1280 # In this case, the values that are allowed must be in `allowed_values` and
1281 # not present in `denied_values`.
1282 #
1283 # For example, suppose you have a `Constraint`
1284 # `constraints/serviceuser.services`, which has a `constraint_type` of
1285 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
1286 # Suppose that at the Organization level, a `Policy` is applied that
1287 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
1288 # `Policy` is applied to a project below the Organization that has
1289 # `inherit_from_parent` set to `false` and field all_values set to DENY,
1290 # then an attempt to activate any API will be denied.
1291 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001292 # The following examples demonstrate different possible layerings for
1293 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001294 #
1295 # Example 1 (no inherited values):
1296 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001297 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001298 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001299 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001300 # The accepted values at `organizations/foo` are `E1`, `E2`.
1301 # The accepted values at `projects/bar` are `E3`, and `E4`.
1302 #
1303 # Example 2 (inherited values):
1304 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001305 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001306 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001307 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001308 # The accepted values at `organizations/foo` are `E1`, `E2`.
1309 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
1310 #
1311 # Example 3 (inheriting both allowed and denied values):
1312 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001313 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001314 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001315 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001316 # The accepted values at `organizations/foo` are `E1`, `E2`.
1317 # The value accepted at `projects/bar` is `E2`.
1318 #
1319 # Example 4 (RestoreDefault):
1320 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001321 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001322 # `projects/bar` has a `Policy` with values:
1323 # {RestoreDefault: {}}
1324 # The accepted values at `organizations/foo` are `E1`, `E2`.
1325 # The accepted values at `projects/bar` are either all or none depending on
1326 # the value of `constraint_default` (if `ALLOW`, all; if
1327 # `DENY`, none).
1328 #
1329 # Example 5 (no policy inherits parent policy):
1330 # `organizations/foo` has no `Policy` set.
1331 # `projects/bar` has no `Policy` set.
1332 # The accepted values at both levels are either all or none depending on
1333 # the value of `constraint_default` (if `ALLOW`, all; if
1334 # `DENY`, none).
1335 #
1336 # Example 6 (ListConstraint allowing all):
1337 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001338 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001339 # `projects/bar` has a `Policy` with:
1340 # {all: ALLOW}
1341 # The accepted values at `organizations/foo` are `E1`, E2`.
1342 # Any value is accepted at `projects/bar`.
1343 #
1344 # Example 7 (ListConstraint allowing none):
1345 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001346 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001347 # `projects/bar` has a `Policy` with:
1348 # {all: DENY}
1349 # The accepted values at `organizations/foo` are `E1`, E2`.
1350 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001351 #
1352 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
1353 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07001354 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001355 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001356 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001357 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001358 # {allowed_values: &quot;under:projects/P3&quot;}
1359 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001360 # The accepted values at `organizations/foo` are `organizations/O1`,
1361 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
1362 # `projects/P3`.
1363 # The accepted values at `projects/bar` are `organizations/O1`,
1364 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001365 &quot;deniedValues&quot;: [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001366 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001367 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001368 ],
1369 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001370 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
1371 # concurrency control.
1372 #
1373 # When the `Policy` is returned from either a `GetPolicy` or a
1374 # `ListOrgPolicy` request, this `etag` indicates the version of the current
1375 # `Policy` to use when executing a read-modify-write loop.
1376 #
1377 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
1378 # `etag` will be unset.
1379 #
1380 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
1381 # that was returned from a `GetOrgPolicy` request as part of a
1382 # read-modify-write loop for concurrency control. Not setting the `etag`in a
1383 # `SetOrgPolicy` request will result in an unconditional write of the
1384 # `Policy`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001385 &quot;booleanPolicy&quot;: { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001386 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001387 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001388 # configuration is acceptable.
1389 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001390 # Suppose you have a `Constraint`
1391 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
1392 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
1393 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001394 # - If the `Policy` at this resource has enforced set to `false`, serial
1395 # port connection attempts will be allowed.
1396 # - If the `Policy` at this resource has enforced set to `true`, serial
1397 # port connection attempts will be refused.
1398 # - If the `Policy` at this resource is `RestoreDefault`, serial port
1399 # connection attempts will be allowed.
1400 # - If no `Policy` is set at this resource or anywhere higher in the
1401 # resource hierarchy, serial port connection attempts will be allowed.
1402 # - If no `Policy` is set at this resource, but one exists higher in the
1403 # resource hierarchy, the behavior is as if the`Policy` were set at
1404 # this resource.
1405 #
1406 # The following examples demonstrate the different possible layerings:
1407 #
1408 # Example 1 (nearest `Constraint` wins):
1409 # `organizations/foo` has a `Policy` with:
1410 # {enforced: false}
1411 # `projects/bar` has no `Policy` set.
1412 # The constraint at `projects/bar` and `organizations/foo` will not be
1413 # enforced.
1414 #
1415 # Example 2 (enforcement gets replaced):
1416 # `organizations/foo` has a `Policy` with:
1417 # {enforced: false}
1418 # `projects/bar` has a `Policy` with:
1419 # {enforced: true}
1420 # The constraint at `organizations/foo` is not enforced.
1421 # The constraint at `projects/bar` is enforced.
1422 #
1423 # Example 3 (RestoreDefault):
1424 # `organizations/foo` has a `Policy` with:
1425 # {enforced: true}
1426 # `projects/bar` has a `Policy` with:
1427 # {RestoreDefault: {}}
1428 # The constraint at `organizations/foo` is enforced.
1429 # The constraint at `projects/bar` is not enforced, because
1430 # `constraint_default` for the `Constraint` is `ALLOW`.
1431 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001432 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
1433 # `constraints/serviceuser.services`.
1434 #
1435 # Immutable after creation.
1436 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
1437 # server, not specified by the caller, and represents the last time a call to
1438 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
1439 # be ignored.
1440 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
1441 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
1442 # `Constraint` type.
1443 # `constraint_default` enforcement behavior of the specific `Constraint` at
1444 # this resource.
1445 #
1446 # Suppose that `constraint_default` is set to `ALLOW` for the
1447 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
1448 # foo.com sets a `Policy` at their Organization resource node that restricts
1449 # the allowed service activations to deny all service activations. They
1450 # could then set a `Policy` with the `policy_type` `restore_default` on
1451 # several experimental projects, restoring the `constraint_default`
1452 # enforcement of the `Constraint` for only those projects, allowing those
1453 # projects to have all services activated.
1454 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001455 }</pre>
1456</div>
1457
1458</body></html>