blob: 56479ce6764cafea00d8a1d231ed87719f588567 [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 Kim65020912020-05-20 12:08:20 -0700112 &quot;etag&quot;: &quot;A String&quot;, # The current version, for concurrency control. Not sending an `etag`
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700113 # will cause the `Policy` to be cleared blindly.
Bu Sun Kim65020912020-05-20 12:08:20 -0700114 &quot;constraint&quot;: &quot;A String&quot;, # Name of the `Constraint` of the `Policy` to clear.
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;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700165 # server, not specified by the caller, and represents the last time a call to
166 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
167 # be ignored.
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
169 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700170 # `Constraint` type.
171 # `constraint_default` enforcement behavior of the specific `Constraint` at
172 # this resource.
173 #
174 # Suppose that `constraint_default` is set to `ALLOW` for the
175 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
176 # foo.com sets a `Policy` at their Organization resource node that restricts
177 # the allowed service activations to deny all service activations. They
178 # could then set a `Policy` with the `policy_type` `restore_default` on
179 # several experimental projects, restoring the `constraint_default`
180 # enforcement of the `Constraint` for only those projects, allowing those
181 # projects to have all services activated.
182 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 &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 -0700184 # resource.
185 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700186 # `ListPolicy` can define specific values and subtrees of Cloud Resource
187 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
188 # are allowed or denied by setting the `allowed_values` and `denied_values`
189 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
190 # The `under:` prefix is used to denote resource subtree values.
191 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -0700192 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193 # same as values with no prefix.
194 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
196 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
197 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 # The `supports_under` field of the associated `Constraint` defines whether
199 # ancestry prefixes can be used. You can set `allowed_values` and
200 # `denied_values` in the same `Policy` if `all_values` is
201 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
202 # values. If `all_values` is set to either `ALLOW` or `DENY`,
203 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 &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 -0700205 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700207 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700208 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
209 # that matches the value specified in this `Policy`. If `suggested_value`
210 # is not set, it will inherit the value specified higher in the hierarchy,
211 # unless `inherit_from_parent` is `false`.
212 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700213 #
214 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
215 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
216 # set to `true`, then the values from the effective `Policy` of the parent
217 # resource are inherited, meaning the values set in this `Policy` are
218 # added to the values inherited up the hierarchy.
219 #
220 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -0700221 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700222 # simple and understandable. However, it is possible to set a `Policy` with
223 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
224 # In this case, the values that are allowed must be in `allowed_values` and
225 # not present in `denied_values`.
226 #
227 # For example, suppose you have a `Constraint`
228 # `constraints/serviceuser.services`, which has a `constraint_type` of
229 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
230 # Suppose that at the Organization level, a `Policy` is applied that
231 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
232 # `Policy` is applied to a project below the Organization that has
233 # `inherit_from_parent` set to `false` and field all_values set to DENY,
234 # then an attempt to activate any API will be denied.
235 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236 # The following examples demonstrate different possible layerings for
237 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700238 #
239 # Example 1 (no inherited values):
240 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700242 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700244 # The accepted values at `organizations/foo` are `E1`, `E2`.
245 # The accepted values at `projects/bar` are `E3`, and `E4`.
246 #
247 # Example 2 (inherited values):
248 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700249 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700250 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700251 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700252 # The accepted values at `organizations/foo` are `E1`, `E2`.
253 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
254 #
255 # Example 3 (inheriting both allowed and denied values):
256 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700258 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700259 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700260 # The accepted values at `organizations/foo` are `E1`, `E2`.
261 # The value accepted at `projects/bar` is `E2`.
262 #
263 # Example 4 (RestoreDefault):
264 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700265 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700266 # `projects/bar` has a `Policy` with values:
267 # {RestoreDefault: {}}
268 # The accepted values at `organizations/foo` are `E1`, `E2`.
269 # The accepted values at `projects/bar` are either all or none depending on
270 # the value of `constraint_default` (if `ALLOW`, all; if
271 # `DENY`, none).
272 #
273 # Example 5 (no policy inherits parent policy):
274 # `organizations/foo` has no `Policy` set.
275 # `projects/bar` has no `Policy` set.
276 # The accepted values at both levels are either all or none depending on
277 # the value of `constraint_default` (if `ALLOW`, all; if
278 # `DENY`, none).
279 #
280 # Example 6 (ListConstraint allowing all):
281 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700282 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700283 # `projects/bar` has a `Policy` with:
284 # {all: ALLOW}
285 # The accepted values at `organizations/foo` are `E1`, E2`.
286 # Any value is accepted at `projects/bar`.
287 #
288 # Example 7 (ListConstraint allowing none):
289 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700291 # `projects/bar` has a `Policy` with:
292 # {all: DENY}
293 # The accepted values at `organizations/foo` are `E1`, E2`.
294 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700295 #
296 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
297 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -0700298 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700299 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700300 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700301 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700302 # {allowed_values: &quot;under:projects/P3&quot;}
303 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700304 # The accepted values at `organizations/foo` are `organizations/O1`,
305 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
306 # `projects/P3`.
307 # The accepted values at `projects/bar` are `organizations/O1`,
308 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 &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 -0700310 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700311 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700312 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700313 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700314 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700315 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
316 # concurrency control.
317 #
318 # When the `Policy` is returned from either a `GetPolicy` or a
319 # `ListOrgPolicy` request, this `etag` indicates the version of the current
320 # `Policy` to use when executing a read-modify-write loop.
321 #
322 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
323 # `etag` will be unset.
324 #
325 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
326 # that was returned from a `GetOrgPolicy` request as part of a
327 # read-modify-write loop for concurrency control. Not setting the `etag`in a
328 # `SetOrgPolicy` request will result in an unconditional write of the
329 # `Policy`.
330 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
331 # `constraints/serviceuser.services`.
332 #
333 # Immutable after creation.
334 &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 -0700335 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700336 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700337 # configuration is acceptable.
338 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700339 # Suppose you have a `Constraint`
340 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
341 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
342 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700343 # - If the `Policy` at this resource has enforced set to `false`, serial
344 # port connection attempts will be allowed.
345 # - If the `Policy` at this resource has enforced set to `true`, serial
346 # port connection attempts will be refused.
347 # - If the `Policy` at this resource is `RestoreDefault`, serial port
348 # connection attempts will be allowed.
349 # - If no `Policy` is set at this resource or anywhere higher in the
350 # resource hierarchy, serial port connection attempts will be allowed.
351 # - If no `Policy` is set at this resource, but one exists higher in the
352 # resource hierarchy, the behavior is as if the`Policy` were set at
353 # this resource.
354 #
355 # The following examples demonstrate the different possible layerings:
356 #
357 # Example 1 (nearest `Constraint` wins):
358 # `organizations/foo` has a `Policy` with:
359 # {enforced: false}
360 # `projects/bar` has no `Policy` set.
361 # The constraint at `projects/bar` and `organizations/foo` will not be
362 # enforced.
363 #
364 # Example 2 (enforcement gets replaced):
365 # `organizations/foo` has a `Policy` with:
366 # {enforced: false}
367 # `projects/bar` has a `Policy` with:
368 # {enforced: true}
369 # The constraint at `organizations/foo` is not enforced.
370 # The constraint at `projects/bar` is enforced.
371 #
372 # Example 3 (RestoreDefault):
373 # `organizations/foo` has a `Policy` with:
374 # {enforced: true}
375 # `projects/bar` has a `Policy` with:
376 # {RestoreDefault: {}}
377 # The constraint at `organizations/foo` is enforced.
378 # The constraint at `projects/bar` is not enforced, because
379 # `constraint_default` for the `Constraint` is `ALLOW`.
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;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700413 # server, not specified by the caller, and represents the last time a call to
414 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
415 # be ignored.
Bu Sun Kim65020912020-05-20 12:08:20 -0700416 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
417 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700418 # `Constraint` type.
419 # `constraint_default` enforcement behavior of the specific `Constraint` at
420 # this resource.
421 #
422 # Suppose that `constraint_default` is set to `ALLOW` for the
423 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
424 # foo.com sets a `Policy` at their Organization resource node that restricts
425 # the allowed service activations to deny all service activations. They
426 # could then set a `Policy` with the `policy_type` `restore_default` on
427 # several experimental projects, restoring the `constraint_default`
428 # enforcement of the `Constraint` for only those projects, allowing those
429 # projects to have all services activated.
430 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700431 &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 -0700432 # resource.
433 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700434 # `ListPolicy` can define specific values and subtrees of Cloud Resource
435 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
436 # are allowed or denied by setting the `allowed_values` and `denied_values`
437 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
438 # The `under:` prefix is used to denote resource subtree values.
439 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -0700440 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700441 # same as values with no prefix.
442 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -0700443 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
444 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
445 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700446 # The `supports_under` field of the associated `Constraint` defines whether
447 # ancestry prefixes can be used. You can set `allowed_values` and
448 # `denied_values` in the same `Policy` if `all_values` is
449 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
450 # values. If `all_values` is set to either `ALLOW` or `DENY`,
451 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700452 &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 -0700453 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700455 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700456 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
457 # that matches the value specified in this `Policy`. If `suggested_value`
458 # is not set, it will inherit the value specified higher in the hierarchy,
459 # unless `inherit_from_parent` is `false`.
460 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700461 #
462 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
463 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
464 # set to `true`, then the values from the effective `Policy` of the parent
465 # resource are inherited, meaning the values set in this `Policy` are
466 # added to the values inherited up the hierarchy.
467 #
468 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -0700469 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700470 # simple and understandable. However, it is possible to set a `Policy` with
471 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
472 # In this case, the values that are allowed must be in `allowed_values` and
473 # not present in `denied_values`.
474 #
475 # For example, suppose you have a `Constraint`
476 # `constraints/serviceuser.services`, which has a `constraint_type` of
477 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
478 # Suppose that at the Organization level, a `Policy` is applied that
479 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
480 # `Policy` is applied to a project below the Organization that has
481 # `inherit_from_parent` set to `false` and field all_values set to DENY,
482 # then an attempt to activate any API will be denied.
483 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700484 # The following examples demonstrate different possible layerings for
485 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700486 #
487 # Example 1 (no inherited values):
488 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700491 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700492 # The accepted values at `organizations/foo` are `E1`, `E2`.
493 # The accepted values at `projects/bar` are `E3`, and `E4`.
494 #
495 # Example 2 (inherited values):
496 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700497 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700498 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700499 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700500 # The accepted values at `organizations/foo` are `E1`, `E2`.
501 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
502 #
503 # Example 3 (inheriting both allowed and denied values):
504 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700505 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700506 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700507 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700508 # The accepted values at `organizations/foo` are `E1`, `E2`.
509 # The value accepted at `projects/bar` is `E2`.
510 #
511 # Example 4 (RestoreDefault):
512 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700513 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700514 # `projects/bar` has a `Policy` with values:
515 # {RestoreDefault: {}}
516 # The accepted values at `organizations/foo` are `E1`, `E2`.
517 # The accepted values at `projects/bar` are either all or none depending on
518 # the value of `constraint_default` (if `ALLOW`, all; if
519 # `DENY`, none).
520 #
521 # Example 5 (no policy inherits parent policy):
522 # `organizations/foo` has no `Policy` set.
523 # `projects/bar` has no `Policy` set.
524 # The accepted values at both levels are either all or none depending on
525 # the value of `constraint_default` (if `ALLOW`, all; if
526 # `DENY`, none).
527 #
528 # Example 6 (ListConstraint allowing all):
529 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700530 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700531 # `projects/bar` has a `Policy` with:
532 # {all: ALLOW}
533 # The accepted values at `organizations/foo` are `E1`, E2`.
534 # Any value is accepted at `projects/bar`.
535 #
536 # Example 7 (ListConstraint allowing none):
537 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700538 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700539 # `projects/bar` has a `Policy` with:
540 # {all: DENY}
541 # The accepted values at `organizations/foo` are `E1`, E2`.
542 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700543 #
544 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
545 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -0700546 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700547 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700548 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700549 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700550 # {allowed_values: &quot;under:projects/P3&quot;}
551 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700552 # The accepted values at `organizations/foo` are `organizations/O1`,
553 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
554 # `projects/P3`.
555 # The accepted values at `projects/bar` are `organizations/O1`,
556 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700557 &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 -0700558 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700559 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700560 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700561 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700562 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700563 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
564 # concurrency control.
565 #
566 # When the `Policy` is returned from either a `GetPolicy` or a
567 # `ListOrgPolicy` request, this `etag` indicates the version of the current
568 # `Policy` to use when executing a read-modify-write loop.
569 #
570 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
571 # `etag` will be unset.
572 #
573 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
574 # that was returned from a `GetOrgPolicy` request as part of a
575 # read-modify-write loop for concurrency control. Not setting the `etag`in a
576 # `SetOrgPolicy` request will result in an unconditional write of the
577 # `Policy`.
578 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
579 # `constraints/serviceuser.services`.
580 #
581 # Immutable after creation.
582 &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 -0700583 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700584 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700585 # configuration is acceptable.
586 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700587 # Suppose you have a `Constraint`
588 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
589 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
590 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700591 # - If the `Policy` at this resource has enforced set to `false`, serial
592 # port connection attempts will be allowed.
593 # - If the `Policy` at this resource has enforced set to `true`, serial
594 # port connection attempts will be refused.
595 # - If the `Policy` at this resource is `RestoreDefault`, serial port
596 # connection attempts will be allowed.
597 # - If no `Policy` is set at this resource or anywhere higher in the
598 # resource hierarchy, serial port connection attempts will be allowed.
599 # - If no `Policy` is set at this resource, but one exists higher in the
600 # resource hierarchy, the behavior is as if the`Policy` were set at
601 # this resource.
602 #
603 # The following examples demonstrate the different possible layerings:
604 #
605 # Example 1 (nearest `Constraint` wins):
606 # `organizations/foo` has a `Policy` with:
607 # {enforced: false}
608 # `projects/bar` has no `Policy` set.
609 # The constraint at `projects/bar` and `organizations/foo` will not be
610 # enforced.
611 #
612 # Example 2 (enforcement gets replaced):
613 # `organizations/foo` has a `Policy` with:
614 # {enforced: false}
615 # `projects/bar` has a `Policy` with:
616 # {enforced: true}
617 # The constraint at `organizations/foo` is not enforced.
618 # The constraint at `projects/bar` is enforced.
619 #
620 # Example 3 (RestoreDefault):
621 # `organizations/foo` has a `Policy` with:
622 # {enforced: true}
623 # `projects/bar` has a `Policy` with:
624 # {RestoreDefault: {}}
625 # The constraint at `organizations/foo` is enforced.
626 # The constraint at `projects/bar` is not enforced, because
627 # `constraint_default` for the `Constraint` is `ALLOW`.
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;nextPageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently not used.
663 &quot;constraints&quot;: [ # The collection of constraints that are settable on the request resource.
664 { # A `Constraint` describes a way in which a resource&#x27;s configuration can be
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700665 # restricted. For example, it controls which cloud services can be activated
666 # across an organization, or whether a Compute Engine instance can have
667 # serial port connections established. `Constraints` can be configured by the
Bu Sun Kim65020912020-05-20 12:08:20 -0700668 # organization&#x27;s policy adminstrator to fit the needs of the organzation by
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700669 # setting Policies for `Constraints` at different locations in the
Bu Sun Kim65020912020-05-20 12:08:20 -0700670 # organization&#x27;s resource hierarchy. Policies are inherited down the resource
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700671 # hierarchy from higher levels, but can also be overridden. For details about
672 # the inheritance rules please read about
673 # Policies.
674 #
675 # `Constraints` have a default behavior determined by the `constraint_default`
676 # field, which is the enforcement behavior that is used in the absence of a
677 # `Policy` being defined or inherited for the resource in question.
Bu Sun Kim65020912020-05-20 12:08:20 -0700678 &quot;listConstraint&quot;: { # A `Constraint` that allows or disallows a list of string values, which are # Defines this constraint as being a ListConstraint.
679 # configured by an Organization&#x27;s policy administrator with a `Policy`.
680 &quot;supportsUnder&quot;: True or False, # Indicates whether subtrees of Cloud Resource Manager resource hierarchy
681 # can be used in `Policy.allowed_values` and `Policy.denied_values`. For
682 # example, `&quot;under:folders/123&quot;` would match any resource under the
683 # &#x27;folders/123&#x27; folder.
684 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
685 # that matches the value specified in this `Constraint`.
686 },
687 &quot;version&quot;: 42, # Version of the `Constraint`. Default version is 0;
688 &quot;description&quot;: &quot;A String&quot;, # Detailed description of what this `Constraint` controls as well as how and
689 # where it is enforced.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700690 #
691 # Mutable.
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 &quot;displayName&quot;: &quot;A String&quot;, # The human readable name.
693 #
694 # Mutable.
695 &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 -0700696 #
697 # For example a constraint `constraints/compute.disableSerialPortAccess`.
698 # If it is enforced on a VM instance, serial port connections will not be
699 # opened to that instance.
700 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700701 &quot;constraintDefault&quot;: &quot;A String&quot;, # The evaluation behavior of this constraint in the absense of &#x27;Policy&#x27;.
702 &quot;name&quot;: &quot;A String&quot;, # Immutable value, required to globally be unique. For example,
703 # `constraints/serviceuser.services`
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700704 },
705 ],
706 }</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 Kim65020912020-05-20 12:08:20 -0700750 &quot;policies&quot;: [ # The `Policies` that are set on the resource. It will be empty if no
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700751 # `Policies` are set.
752 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
753 # for configurations of Cloud Platform resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700755 # server, not specified by the caller, and represents the last time a call to
756 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
757 # be ignored.
Bu Sun Kim65020912020-05-20 12:08:20 -0700758 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
759 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700760 # `Constraint` type.
761 # `constraint_default` enforcement behavior of the specific `Constraint` at
762 # this resource.
763 #
764 # Suppose that `constraint_default` is set to `ALLOW` for the
765 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
766 # foo.com sets a `Policy` at their Organization resource node that restricts
767 # the allowed service activations to deny all service activations. They
768 # could then set a `Policy` with the `policy_type` `restore_default` on
769 # several experimental projects, restoring the `constraint_default`
770 # enforcement of the `Constraint` for only those projects, allowing those
771 # projects to have all services activated.
772 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 &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 -0700774 # resource.
775 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700776 # `ListPolicy` can define specific values and subtrees of Cloud Resource
777 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
778 # are allowed or denied by setting the `allowed_values` and `denied_values`
779 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
780 # The `under:` prefix is used to denote resource subtree values.
781 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -0700782 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700783 # same as values with no prefix.
784 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -0700785 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
786 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
787 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700788 # The `supports_under` field of the associated `Constraint` defines whether
789 # ancestry prefixes can be used. You can set `allowed_values` and
790 # `denied_values` in the same `Policy` if `all_values` is
791 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
792 # values. If `all_values` is set to either `ALLOW` or `DENY`,
793 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700794 &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 -0700795 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700796 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700797 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700798 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
799 # that matches the value specified in this `Policy`. If `suggested_value`
800 # is not set, it will inherit the value specified higher in the hierarchy,
801 # unless `inherit_from_parent` is `false`.
802 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700803 #
804 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
805 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
806 # set to `true`, then the values from the effective `Policy` of the parent
807 # resource are inherited, meaning the values set in this `Policy` are
808 # added to the values inherited up the hierarchy.
809 #
810 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -0700811 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700812 # simple and understandable. However, it is possible to set a `Policy` with
813 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
814 # In this case, the values that are allowed must be in `allowed_values` and
815 # not present in `denied_values`.
816 #
817 # For example, suppose you have a `Constraint`
818 # `constraints/serviceuser.services`, which has a `constraint_type` of
819 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
820 # Suppose that at the Organization level, a `Policy` is applied that
821 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
822 # `Policy` is applied to a project below the Organization that has
823 # `inherit_from_parent` set to `false` and field all_values set to DENY,
824 # then an attempt to activate any API will be denied.
825 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700826 # The following examples demonstrate different possible layerings for
827 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700828 #
829 # Example 1 (no inherited 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;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700832 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700833 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700834 # The accepted values at `organizations/foo` are `E1`, `E2`.
835 # The accepted values at `projects/bar` are `E3`, and `E4`.
836 #
837 # Example 2 (inherited values):
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:
Bu Sun Kim65020912020-05-20 12:08:20 -0700841 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700842 # The accepted values at `organizations/foo` are `E1`, `E2`.
843 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
844 #
845 # Example 3 (inheriting both allowed and denied values):
846 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700847 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700848 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700849 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700850 # The accepted values at `organizations/foo` are `E1`, `E2`.
851 # The value accepted at `projects/bar` is `E2`.
852 #
853 # Example 4 (RestoreDefault):
854 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700855 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700856 # `projects/bar` has a `Policy` with values:
857 # {RestoreDefault: {}}
858 # The accepted values at `organizations/foo` are `E1`, `E2`.
859 # The accepted values at `projects/bar` are either all or none depending on
860 # the value of `constraint_default` (if `ALLOW`, all; if
861 # `DENY`, none).
862 #
863 # Example 5 (no policy inherits parent policy):
864 # `organizations/foo` has no `Policy` set.
865 # `projects/bar` has no `Policy` set.
866 # The accepted values at both levels are either all or none depending on
867 # the value of `constraint_default` (if `ALLOW`, all; if
868 # `DENY`, none).
869 #
870 # Example 6 (ListConstraint allowing all):
871 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700872 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700873 # `projects/bar` has a `Policy` with:
874 # {all: ALLOW}
875 # The accepted values at `organizations/foo` are `E1`, E2`.
876 # Any value is accepted at `projects/bar`.
877 #
878 # Example 7 (ListConstraint allowing none):
879 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700880 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700881 # `projects/bar` has a `Policy` with:
882 # {all: DENY}
883 # The accepted values at `organizations/foo` are `E1`, E2`.
884 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700885 #
886 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
887 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -0700888 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700889 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700890 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700891 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700892 # {allowed_values: &quot;under:projects/P3&quot;}
893 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700894 # The accepted values at `organizations/foo` are `organizations/O1`,
895 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
896 # `projects/P3`.
897 # The accepted values at `projects/bar` are `organizations/O1`,
898 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700899 &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 -0700900 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700901 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700902 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700904 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700905 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
906 # concurrency control.
907 #
908 # When the `Policy` is returned from either a `GetPolicy` or a
909 # `ListOrgPolicy` request, this `etag` indicates the version of the current
910 # `Policy` to use when executing a read-modify-write loop.
911 #
912 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
913 # `etag` will be unset.
914 #
915 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
916 # that was returned from a `GetOrgPolicy` request as part of a
917 # read-modify-write loop for concurrency control. Not setting the `etag`in a
918 # `SetOrgPolicy` request will result in an unconditional write of the
919 # `Policy`.
920 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
921 # `constraints/serviceuser.services`.
922 #
923 # Immutable after creation.
924 &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 -0700925 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700926 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700927 # configuration is acceptable.
928 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700929 # Suppose you have a `Constraint`
930 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
931 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
932 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700933 # - If the `Policy` at this resource has enforced set to `false`, serial
934 # port connection attempts will be allowed.
935 # - If the `Policy` at this resource has enforced set to `true`, serial
936 # port connection attempts will be refused.
937 # - If the `Policy` at this resource is `RestoreDefault`, serial port
938 # connection attempts will be allowed.
939 # - If no `Policy` is set at this resource or anywhere higher in the
940 # resource hierarchy, serial port connection attempts will be allowed.
941 # - If no `Policy` is set at this resource, but one exists higher in the
942 # resource hierarchy, the behavior is as if the`Policy` were set at
943 # this resource.
944 #
945 # The following examples demonstrate the different possible layerings:
946 #
947 # Example 1 (nearest `Constraint` wins):
948 # `organizations/foo` has a `Policy` with:
949 # {enforced: false}
950 # `projects/bar` has no `Policy` set.
951 # The constraint at `projects/bar` and `organizations/foo` will not be
952 # enforced.
953 #
954 # Example 2 (enforcement gets replaced):
955 # `organizations/foo` has a `Policy` with:
956 # {enforced: false}
957 # `projects/bar` has a `Policy` with:
958 # {enforced: true}
959 # The constraint at `organizations/foo` is not enforced.
960 # The constraint at `projects/bar` is enforced.
961 #
962 # Example 3 (RestoreDefault):
963 # `organizations/foo` has a `Policy` with:
964 # {enforced: true}
965 # `projects/bar` has a `Policy` with:
966 # {RestoreDefault: {}}
967 # The constraint at `organizations/foo` is enforced.
968 # The constraint at `projects/bar` is not enforced, because
969 # `constraint_default` for the `Constraint` is `ALLOW`.
970 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700971 },
972 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700973 &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently not used, but
974 # the server may at any point start supplying a valid token.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700975 }</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;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001009 # server, not specified by the caller, and represents the last time a call to
1010 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
1011 # be ignored.
Bu Sun Kim65020912020-05-20 12:08:20 -07001012 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
1013 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001014 # `Constraint` type.
1015 # `constraint_default` enforcement behavior of the specific `Constraint` at
1016 # this resource.
1017 #
1018 # Suppose that `constraint_default` is set to `ALLOW` for the
1019 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
1020 # foo.com sets a `Policy` at their Organization resource node that restricts
1021 # the allowed service activations to deny all service activations. They
1022 # could then set a `Policy` with the `policy_type` `restore_default` on
1023 # several experimental projects, restoring the `constraint_default`
1024 # enforcement of the `Constraint` for only those projects, allowing those
1025 # projects to have all services activated.
1026 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001027 &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 -07001028 # resource.
1029 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001030 # `ListPolicy` can define specific values and subtrees of Cloud Resource
1031 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
1032 # are allowed or denied by setting the `allowed_values` and `denied_values`
1033 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
1034 # The `under:` prefix is used to denote resource subtree values.
1035 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -07001036 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001037 # same as values with no prefix.
1038 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -07001039 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
1040 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
1041 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001042 # The `supports_under` field of the associated `Constraint` defines whether
1043 # ancestry prefixes can be used. You can set `allowed_values` and
1044 # `denied_values` in the same `Policy` if `all_values` is
1045 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
1046 # values. If `all_values` is set to either `ALLOW` or `DENY`,
1047 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07001048 &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 -07001049 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001050 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001051 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001052 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
1053 # that matches the value specified in this `Policy`. If `suggested_value`
1054 # is not set, it will inherit the value specified higher in the hierarchy,
1055 # unless `inherit_from_parent` is `false`.
1056 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001057 #
1058 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
1059 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
1060 # set to `true`, then the values from the effective `Policy` of the parent
1061 # resource are inherited, meaning the values set in this `Policy` are
1062 # added to the values inherited up the hierarchy.
1063 #
1064 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -07001065 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001066 # simple and understandable. However, it is possible to set a `Policy` with
1067 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
1068 # In this case, the values that are allowed must be in `allowed_values` and
1069 # not present in `denied_values`.
1070 #
1071 # For example, suppose you have a `Constraint`
1072 # `constraints/serviceuser.services`, which has a `constraint_type` of
1073 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
1074 # Suppose that at the Organization level, a `Policy` is applied that
1075 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
1076 # `Policy` is applied to a project below the Organization that has
1077 # `inherit_from_parent` set to `false` and field all_values set to DENY,
1078 # then an attempt to activate any API will be denied.
1079 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001080 # The following examples demonstrate different possible layerings for
1081 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001082 #
1083 # Example 1 (no inherited values):
1084 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001085 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001086 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001087 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001088 # The accepted values at `organizations/foo` are `E1`, `E2`.
1089 # The accepted values at `projects/bar` are `E3`, and `E4`.
1090 #
1091 # Example 2 (inherited values):
1092 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001093 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001094 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001095 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001096 # The accepted values at `organizations/foo` are `E1`, `E2`.
1097 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
1098 #
1099 # Example 3 (inheriting both allowed and denied values):
1100 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001101 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001102 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001103 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001104 # The accepted values at `organizations/foo` are `E1`, `E2`.
1105 # The value accepted at `projects/bar` is `E2`.
1106 #
1107 # Example 4 (RestoreDefault):
1108 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001109 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001110 # `projects/bar` has a `Policy` with values:
1111 # {RestoreDefault: {}}
1112 # The accepted values at `organizations/foo` are `E1`, `E2`.
1113 # The accepted values at `projects/bar` are either all or none depending on
1114 # the value of `constraint_default` (if `ALLOW`, all; if
1115 # `DENY`, none).
1116 #
1117 # Example 5 (no policy inherits parent policy):
1118 # `organizations/foo` has no `Policy` set.
1119 # `projects/bar` has no `Policy` set.
1120 # The accepted values at both levels are either all or none depending on
1121 # the value of `constraint_default` (if `ALLOW`, all; if
1122 # `DENY`, none).
1123 #
1124 # Example 6 (ListConstraint allowing all):
1125 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001126 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001127 # `projects/bar` has a `Policy` with:
1128 # {all: ALLOW}
1129 # The accepted values at `organizations/foo` are `E1`, E2`.
1130 # Any value is accepted at `projects/bar`.
1131 #
1132 # Example 7 (ListConstraint allowing none):
1133 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001134 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001135 # `projects/bar` has a `Policy` with:
1136 # {all: DENY}
1137 # The accepted values at `organizations/foo` are `E1`, E2`.
1138 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001139 #
1140 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
1141 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07001142 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001143 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001144 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001145 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001146 # {allowed_values: &quot;under:projects/P3&quot;}
1147 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001148 # The accepted values at `organizations/foo` are `organizations/O1`,
1149 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
1150 # `projects/P3`.
1151 # The accepted values at `projects/bar` are `organizations/O1`,
1152 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001153 &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 -07001154 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001155 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001156 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001157 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001158 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001159 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
1160 # concurrency control.
1161 #
1162 # When the `Policy` is returned from either a `GetPolicy` or a
1163 # `ListOrgPolicy` request, this `etag` indicates the version of the current
1164 # `Policy` to use when executing a read-modify-write loop.
1165 #
1166 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
1167 # `etag` will be unset.
1168 #
1169 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
1170 # that was returned from a `GetOrgPolicy` request as part of a
1171 # read-modify-write loop for concurrency control. Not setting the `etag`in a
1172 # `SetOrgPolicy` request will result in an unconditional write of the
1173 # `Policy`.
1174 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
1175 # `constraints/serviceuser.services`.
1176 #
1177 # Immutable after creation.
1178 &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 -07001179 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001180 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001181 # configuration is acceptable.
1182 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001183 # Suppose you have a `Constraint`
1184 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
1185 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
1186 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001187 # - If the `Policy` at this resource has enforced set to `false`, serial
1188 # port connection attempts will be allowed.
1189 # - If the `Policy` at this resource has enforced set to `true`, serial
1190 # port connection attempts will be refused.
1191 # - If the `Policy` at this resource is `RestoreDefault`, serial port
1192 # connection attempts will be allowed.
1193 # - If no `Policy` is set at this resource or anywhere higher in the
1194 # resource hierarchy, serial port connection attempts will be allowed.
1195 # - If no `Policy` is set at this resource, but one exists higher in the
1196 # resource hierarchy, the behavior is as if the`Policy` were set at
1197 # this resource.
1198 #
1199 # The following examples demonstrate the different possible layerings:
1200 #
1201 # Example 1 (nearest `Constraint` wins):
1202 # `organizations/foo` has a `Policy` with:
1203 # {enforced: false}
1204 # `projects/bar` has no `Policy` set.
1205 # The constraint at `projects/bar` and `organizations/foo` will not be
1206 # enforced.
1207 #
1208 # Example 2 (enforcement gets replaced):
1209 # `organizations/foo` has a `Policy` with:
1210 # {enforced: false}
1211 # `projects/bar` has a `Policy` with:
1212 # {enforced: true}
1213 # The constraint at `organizations/foo` is not enforced.
1214 # The constraint at `projects/bar` is enforced.
1215 #
1216 # Example 3 (RestoreDefault):
1217 # `organizations/foo` has a `Policy` with:
1218 # {enforced: true}
1219 # `projects/bar` has a `Policy` with:
1220 # {RestoreDefault: {}}
1221 # The constraint at `organizations/foo` is enforced.
1222 # The constraint at `projects/bar` is not enforced, because
1223 # `constraint_default` for the `Constraint` is `ALLOW`.
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;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001239 # server, not specified by the caller, and represents the last time a call to
1240 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
1241 # be ignored.
Bu Sun Kim65020912020-05-20 12:08:20 -07001242 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
1243 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001244 # `Constraint` type.
1245 # `constraint_default` enforcement behavior of the specific `Constraint` at
1246 # this resource.
1247 #
1248 # Suppose that `constraint_default` is set to `ALLOW` for the
1249 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
1250 # foo.com sets a `Policy` at their Organization resource node that restricts
1251 # the allowed service activations to deny all service activations. They
1252 # could then set a `Policy` with the `policy_type` `restore_default` on
1253 # several experimental projects, restoring the `constraint_default`
1254 # enforcement of the `Constraint` for only those projects, allowing those
1255 # projects to have all services activated.
1256 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001257 &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 -07001258 # resource.
1259 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001260 # `ListPolicy` can define specific values and subtrees of Cloud Resource
1261 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
1262 # are allowed or denied by setting the `allowed_values` and `denied_values`
1263 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
1264 # The `under:` prefix is used to denote resource subtree values.
1265 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -07001266 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001267 # same as values with no prefix.
1268 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -07001269 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
1270 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
1271 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001272 # The `supports_under` field of the associated `Constraint` defines whether
1273 # ancestry prefixes can be used. You can set `allowed_values` and
1274 # `denied_values` in the same `Policy` if `all_values` is
1275 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
1276 # values. If `all_values` is set to either `ALLOW` or `DENY`,
1277 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07001278 &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 -07001279 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001280 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001281 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001282 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
1283 # that matches the value specified in this `Policy`. If `suggested_value`
1284 # is not set, it will inherit the value specified higher in the hierarchy,
1285 # unless `inherit_from_parent` is `false`.
1286 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001287 #
1288 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
1289 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
1290 # set to `true`, then the values from the effective `Policy` of the parent
1291 # resource are inherited, meaning the values set in this `Policy` are
1292 # added to the values inherited up the hierarchy.
1293 #
1294 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -07001295 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001296 # simple and understandable. However, it is possible to set a `Policy` with
1297 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
1298 # In this case, the values that are allowed must be in `allowed_values` and
1299 # not present in `denied_values`.
1300 #
1301 # For example, suppose you have a `Constraint`
1302 # `constraints/serviceuser.services`, which has a `constraint_type` of
1303 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
1304 # Suppose that at the Organization level, a `Policy` is applied that
1305 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
1306 # `Policy` is applied to a project below the Organization that has
1307 # `inherit_from_parent` set to `false` and field all_values set to DENY,
1308 # then an attempt to activate any API will be denied.
1309 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001310 # The following examples demonstrate different possible layerings for
1311 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001312 #
1313 # Example 1 (no inherited values):
1314 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001315 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001316 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001317 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001318 # The accepted values at `organizations/foo` are `E1`, `E2`.
1319 # The accepted values at `projects/bar` are `E3`, and `E4`.
1320 #
1321 # Example 2 (inherited values):
1322 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001323 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001324 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001325 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001326 # The accepted values at `organizations/foo` are `E1`, `E2`.
1327 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
1328 #
1329 # Example 3 (inheriting both allowed and denied values):
1330 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001331 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001332 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001333 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001334 # The accepted values at `organizations/foo` are `E1`, `E2`.
1335 # The value accepted at `projects/bar` is `E2`.
1336 #
1337 # Example 4 (RestoreDefault):
1338 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001339 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001340 # `projects/bar` has a `Policy` with values:
1341 # {RestoreDefault: {}}
1342 # The accepted values at `organizations/foo` are `E1`, `E2`.
1343 # The accepted values at `projects/bar` are either all or none depending on
1344 # the value of `constraint_default` (if `ALLOW`, all; if
1345 # `DENY`, none).
1346 #
1347 # Example 5 (no policy inherits parent policy):
1348 # `organizations/foo` has no `Policy` set.
1349 # `projects/bar` has no `Policy` set.
1350 # The accepted values at both levels are either all or none depending on
1351 # the value of `constraint_default` (if `ALLOW`, all; if
1352 # `DENY`, none).
1353 #
1354 # Example 6 (ListConstraint allowing all):
1355 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001356 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001357 # `projects/bar` has a `Policy` with:
1358 # {all: ALLOW}
1359 # The accepted values at `organizations/foo` are `E1`, E2`.
1360 # Any value is accepted at `projects/bar`.
1361 #
1362 # Example 7 (ListConstraint allowing none):
1363 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001364 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001365 # `projects/bar` has a `Policy` with:
1366 # {all: DENY}
1367 # The accepted values at `organizations/foo` are `E1`, E2`.
1368 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001369 #
1370 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
1371 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07001372 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001373 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001374 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001375 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001376 # {allowed_values: &quot;under:projects/P3&quot;}
1377 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001378 # The accepted values at `organizations/foo` are `organizations/O1`,
1379 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
1380 # `projects/P3`.
1381 # The accepted values at `projects/bar` are `organizations/O1`,
1382 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001383 &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 -07001384 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001385 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001386 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001387 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001388 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001389 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
1390 # concurrency control.
1391 #
1392 # When the `Policy` is returned from either a `GetPolicy` or a
1393 # `ListOrgPolicy` request, this `etag` indicates the version of the current
1394 # `Policy` to use when executing a read-modify-write loop.
1395 #
1396 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
1397 # `etag` will be unset.
1398 #
1399 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
1400 # that was returned from a `GetOrgPolicy` request as part of a
1401 # read-modify-write loop for concurrency control. Not setting the `etag`in a
1402 # `SetOrgPolicy` request will result in an unconditional write of the
1403 # `Policy`.
1404 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
1405 # `constraints/serviceuser.services`.
1406 #
1407 # Immutable after creation.
1408 &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 -07001409 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001411 # configuration is acceptable.
1412 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001413 # Suppose you have a `Constraint`
1414 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
1415 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
1416 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001417 # - If the `Policy` at this resource has enforced set to `false`, serial
1418 # port connection attempts will be allowed.
1419 # - If the `Policy` at this resource has enforced set to `true`, serial
1420 # port connection attempts will be refused.
1421 # - If the `Policy` at this resource is `RestoreDefault`, serial port
1422 # connection attempts will be allowed.
1423 # - If no `Policy` is set at this resource or anywhere higher in the
1424 # resource hierarchy, serial port connection attempts will be allowed.
1425 # - If no `Policy` is set at this resource, but one exists higher in the
1426 # resource hierarchy, the behavior is as if the`Policy` were set at
1427 # this resource.
1428 #
1429 # The following examples demonstrate the different possible layerings:
1430 #
1431 # Example 1 (nearest `Constraint` wins):
1432 # `organizations/foo` has a `Policy` with:
1433 # {enforced: false}
1434 # `projects/bar` has no `Policy` set.
1435 # The constraint at `projects/bar` and `organizations/foo` will not be
1436 # enforced.
1437 #
1438 # Example 2 (enforcement gets replaced):
1439 # `organizations/foo` has a `Policy` with:
1440 # {enforced: false}
1441 # `projects/bar` has a `Policy` with:
1442 # {enforced: true}
1443 # The constraint at `organizations/foo` is not enforced.
1444 # The constraint at `projects/bar` is enforced.
1445 #
1446 # Example 3 (RestoreDefault):
1447 # `organizations/foo` has a `Policy` with:
1448 # {enforced: true}
1449 # `projects/bar` has a `Policy` with:
1450 # {RestoreDefault: {}}
1451 # The constraint at `organizations/foo` is enforced.
1452 # The constraint at `projects/bar` is not enforced, because
1453 # `constraint_default` for the `Constraint` is `ALLOW`.
1454 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001455 }</pre>
1456</div>
1457
1458</body></html>