blob: 0e0328a301ed08d8ee883db00a97156414e06240 [file] [log] [blame]
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -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.projects.html">projects</a></h1>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -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="#create">create(body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080082<p class="firstline">Request that a new Project be created. The result is an Operation which</p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070083<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070084 <code><a href="#delete">delete(projectId, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080085<p class="firstline">Marks the Project identified by the specified</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070086<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070087 <code><a href="#get">get(projectId, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080088<p class="firstline">Retrieves the Project identified by the specified</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070089<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#getAncestry">getAncestry(projectId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080091<p class="firstline">Gets a list of ancestors in the resource hierarchy for the Project</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#getEffectiveOrgPolicy">getEffectiveOrgPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070094<p class="firstline">Gets the effective `Policy` on a resource. This is the result of merging</p>
95<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080097<p class="firstline">Returns the IAM access control policy for the specified Project.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#getOrgPolicy">getOrgPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700100<p class="firstline">Gets a `Policy` on a resource.</p>
101<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700102 <code><a href="#list">list(pageSize=None, filter=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Lists Projects that the caller has the `resourcemanager.projects.get`</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#listAvailableOrgPolicyConstraints">listAvailableOrgPolicyConstraints(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700106<p class="firstline">Lists `Constraints` that could be applied on the specified resource.</p>
107<p class="toc_element">
108 <code><a href="#listAvailableOrgPolicyConstraints_next">listAvailableOrgPolicyConstraints_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#listOrgPolicies">listOrgPolicies(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700112<p class="firstline">Lists all the `Policies` set for a particular resource.</p>
113<p class="toc_element">
114 <code><a href="#listOrgPolicies_next">listOrgPolicies_next(previous_request, previous_response)</a></code></p>
115<p class="firstline">Retrieves the next page of results.</p>
116<p class="toc_element">
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700117 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
118<p class="firstline">Retrieves the next page of results.</p>
119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700121<p class="firstline">Sets the IAM access control policy for the specified Project.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700122<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 <code><a href="#setOrgPolicy">setOrgPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700124<p class="firstline">Updates the specified `Policy` on the resource. Creates a new `Policy` for</p>
125<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700127<p class="firstline">Returns permissions that a caller has on the specified Project.</p>
128<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 <code><a href="#undelete">undelete(projectId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800130<p class="firstline">Restores the Project identified by the specified</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700131<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 <code><a href="#update">update(projectId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800133<p class="firstline">Updates the attributes of the Project identified by the specified</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700134<h3>Method Details</h3>
135<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700136 <code class="details" id="clearOrgPolicy">clearOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700137 <pre>Clears a `Policy` from a resource.
138
139Args:
140 resource: string, Name of the resource for the `Policy` to clear. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700142 The object takes the form of:
143
144{ # The request sent to the ClearOrgPolicy method.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700145 &quot;constraint&quot;: &quot;A String&quot;, # Name of the `Constraint` of the `Policy` to clear.
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 &quot;etag&quot;: &quot;A String&quot;, # The current version, for concurrency control. Not sending an `etag`
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700147 # will cause the `Policy` to be cleared blindly.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700148 }
149
150 x__xgafv: string, V1 error format.
151 Allowed values
152 1 - v1 error format
153 2 - v2 error format
154
155Returns:
156 An object of the form:
157
158 { # A generic empty message that you can re-use to avoid defining duplicated
159 # empty messages in your APIs. A typical example is to use it as the request
160 # or the response type of an API method. For instance:
161 #
162 # service Foo {
163 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
164 # }
165 #
166 # The JSON representation for `Empty` is empty JSON object `{}`.
167 }</pre>
168</div>
169
170<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 <code class="details" id="create">create(body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800172 <pre>Request that a new Project be created. The result is an Operation which
Dan O'Mearadd494642020-05-01 07:42:23 -0700173can be used to track the creation process. This process usually takes a few
174seconds, but can sometimes take much longer. The tracking Operation is
175automatically deleted after a few hours, so there is no need to call
176DeleteOperation.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700177
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178Authorization requires the Google IAM permission
179`resourcemanager.projects.create` on the specified parent for the new
180project. The parent is identified by a specified ResourceId,
181which must include both an ID and a type, such as organization.
182
183This method does not associate the new project with a billing account.
184You can set or update the billing account associated with a project using
185the [`projects.updateBillingInfo`]
186(/billing/reference/rest/v1/projects/updateBillingInfo) method.
187
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700188Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700190 The object takes the form of:
191
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800192{ # A Project is a high-level Google Cloud Platform entity. It is a
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700193 # container for ACLs, APIs, App Engine Apps, VMs, and other
194 # Google Cloud Platform resources.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700195 &quot;projectNumber&quot;: &quot;A String&quot;, # The number uniquely identifying the project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700196 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700197 # Example: &lt;code&gt;415104041262&lt;/code&gt;
198 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700199 &quot;projectId&quot;: &quot;A String&quot;, # The unique, user-assigned ID of the Project.
200 # It must be 6 to 30 lowercase letters, digits, or hyphens.
201 # It must start with a letter.
202 # Trailing hyphens are prohibited.
203 #
204 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
205 # Read-only after creation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700206 &quot;createTime&quot;: &quot;A String&quot;, # Creation time.
207 #
208 # Read-only.
209 &quot;labels&quot;: { # The labels associated with this Project.
210 #
211 # Label keys must be between 1 and 63 characters long and must conform
212 # to the following regular expression: a-z{0,62}.
213 #
214 # Label values must be between 0 and 63 characters long and must conform
215 # to the regular expression [a-z0-9_-]{0,63}. A label value can be empty.
216 #
217 # No more than 256 labels can be associated with a given resource.
218 #
219 # Clients should store labels in a representation such as JSON that does not
220 # depend on specific characters being disallowed.
221 #
222 # Example: &lt;code&gt;&quot;environment&quot; : &quot;dev&quot;&lt;/code&gt;
223 # Read-write.
224 &quot;a_key&quot;: &quot;A String&quot;,
225 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700226 &quot;lifecycleState&quot;: &quot;A String&quot;, # The Project lifecycle state.
227 #
228 # Read-only.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700229 &quot;name&quot;: &quot;A String&quot;, # The optional user-assigned display name of the Project.
230 # When present it must be between 4 to 30 characters.
231 # Allowed characters are: lowercase and uppercase letters, numbers,
232 # hyphen, single-quote, double-quote, space, and exclamation point.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700233 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700234 # Example: &lt;code&gt;My Project&lt;/code&gt;
235 # Read-write.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700236 &quot;parent&quot;: { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
237 #
238 # Supported parent types include &quot;organization&quot; and &quot;folder&quot;. Once set, the
239 # parent cannot be cleared. The `parent` can be set on creation or using the
240 # `UpdateProject` method; the end user must have the
241 # `resourcemanager.projects.create` permission on the parent.
242 #
243 # Read-write.
244 # Cloud Platform is a generic term for something you (a developer) may want to
245 # interact with through one of our API&#x27;s. Some examples are an App Engine app,
246 # a Compute Engine instance, a Cloud SQL database, and so on.
247 &quot;type&quot;: &quot;A String&quot;, # Required field representing the resource type this id is for.
248 # At present, the valid types are: &quot;organization&quot;, &quot;folder&quot;, and &quot;project&quot;.
249 &quot;id&quot;: &quot;A String&quot;, # Required field for the type-specific id. This should correspond to the id
250 # used in the type-specific API&#x27;s.
251 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700252 }
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700253
254 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800255 Allowed values
256 1 - v1 error format
257 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700258
259Returns:
260 An object of the form:
261
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800262 { # This resource represents a long-running operation that is the result of a
263 # network API call.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700264 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
265 # different programming environments, including REST APIs and RPC APIs. It is
266 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
267 # three pieces of data: error code, error message, and error details.
268 #
269 # You can find out more about this error model and how to work with it in the
270 # [API Design Guide](https://cloud.google.com/apis/design/errors).
271 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
272 # message types for APIs to use.
273 {
274 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
275 },
276 ],
277 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
278 # user-facing error message should be localized and sent in the
279 # google.rpc.Status.details field, or localized by the client.
280 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700281 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700282 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 # If `true`, the operation is completed, and either `error` or `response` is
Thomas Coffee2f245372017-03-27 10:39:26 -0700284 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Thomas Coffee2f245372017-03-27 10:39:26 -0700286 # method returns no data on success, such as `Delete`, the response is
287 # `google.protobuf.Empty`. If the original method is standard
288 # `Get`/`Create`/`Update`, the response should be the resource. For other
289 # methods, the response should have the type `XxxResponse`, where `Xxx`
290 # is the original method name. For example, if the original method name
291 # is `TakeSnapshot()`, the inferred response type is
292 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700293 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Thomas Coffee2f245372017-03-27 10:39:26 -0700294 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700295 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Thomas Coffee2f245372017-03-27 10:39:26 -0700296 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700297 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700298 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
299 # contains progress information and common metadata such as create time.
300 # Some services might not provide such metadata. Any method that returns a
301 # long-running operation should document the metadata type, if any.
302 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700304 }</pre>
305</div>
306
307<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700308 <code class="details" id="delete">delete(projectId, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800309 <pre>Marks the Project identified by the specified
310`project_id` (for example, `my-project-123`) for deletion.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700311This method will only affect the Project if it has a lifecycle state of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800312ACTIVE.
313
Bu Sun Kim65020912020-05-20 12:08:20 -0700314This method changes the Project&#x27;s lifecycle state from
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800315ACTIVE
316to DELETE_REQUESTED.
317The deletion starts at an unspecified time,
318at which point the Project is no longer accessible.
319
320Until the deletion completes, you can check the lifecycle state
321checked by retrieving the Project with GetProject,
322and the Project remains visible to ListProjects.
323However, you cannot update the project.
324
325After the deletion completes, the Project is not retrievable by
326the GetProject and
327ListProjects methods.
328
329The caller must have modify permissions for this Project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700330
331Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800332 projectId: string, The Project ID (for example, `foo-bar-123`).
333
334Required. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700335 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800336 Allowed values
337 1 - v1 error format
338 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700339
340Returns:
341 An object of the form:
342
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800343 { # A generic empty message that you can re-use to avoid defining duplicated
344 # empty messages in your APIs. A typical example is to use it as the request
345 # or the response type of an API method. For instance:
346 #
347 # service Foo {
348 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
349 # }
350 #
351 # The JSON representation for `Empty` is empty JSON object `{}`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700352 }</pre>
353</div>
354
355<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700356 <code class="details" id="get">get(projectId, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800357 <pre>Retrieves the Project identified by the specified
358`project_id` (for example, `my-project-123`).
359
360The caller must have read permissions for this Project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700361
362Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800363 projectId: string, The Project ID (for example, `my-project-123`).
364
365Required. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700366 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800367 Allowed values
368 1 - v1 error format
369 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700370
371Returns:
372 An object of the form:
373
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800374 { # A Project is a high-level Google Cloud Platform entity. It is a
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700375 # container for ACLs, APIs, App Engine Apps, VMs, and other
376 # Google Cloud Platform resources.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700377 &quot;projectNumber&quot;: &quot;A String&quot;, # The number uniquely identifying the project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700378 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700379 # Example: &lt;code&gt;415104041262&lt;/code&gt;
380 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700381 &quot;projectId&quot;: &quot;A String&quot;, # The unique, user-assigned ID of the Project.
382 # It must be 6 to 30 lowercase letters, digits, or hyphens.
383 # It must start with a letter.
384 # Trailing hyphens are prohibited.
385 #
386 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
387 # Read-only after creation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700388 &quot;createTime&quot;: &quot;A String&quot;, # Creation time.
389 #
390 # Read-only.
391 &quot;labels&quot;: { # The labels associated with this Project.
392 #
393 # Label keys must be between 1 and 63 characters long and must conform
394 # to the following regular expression: a-z{0,62}.
395 #
396 # Label values must be between 0 and 63 characters long and must conform
397 # to the regular expression [a-z0-9_-]{0,63}. A label value can be empty.
398 #
399 # No more than 256 labels can be associated with a given resource.
400 #
401 # Clients should store labels in a representation such as JSON that does not
402 # depend on specific characters being disallowed.
403 #
404 # Example: &lt;code&gt;&quot;environment&quot; : &quot;dev&quot;&lt;/code&gt;
405 # Read-write.
406 &quot;a_key&quot;: &quot;A String&quot;,
407 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700408 &quot;lifecycleState&quot;: &quot;A String&quot;, # The Project lifecycle state.
409 #
410 # Read-only.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700411 &quot;name&quot;: &quot;A String&quot;, # The optional user-assigned display name of the Project.
412 # When present it must be between 4 to 30 characters.
413 # Allowed characters are: lowercase and uppercase letters, numbers,
414 # hyphen, single-quote, double-quote, space, and exclamation point.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700415 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700416 # Example: &lt;code&gt;My Project&lt;/code&gt;
417 # Read-write.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700418 &quot;parent&quot;: { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
419 #
420 # Supported parent types include &quot;organization&quot; and &quot;folder&quot;. Once set, the
421 # parent cannot be cleared. The `parent` can be set on creation or using the
422 # `UpdateProject` method; the end user must have the
423 # `resourcemanager.projects.create` permission on the parent.
424 #
425 # Read-write.
426 # Cloud Platform is a generic term for something you (a developer) may want to
427 # interact with through one of our API&#x27;s. Some examples are an App Engine app,
428 # a Compute Engine instance, a Cloud SQL database, and so on.
429 &quot;type&quot;: &quot;A String&quot;, # Required field representing the resource type this id is for.
430 # At present, the valid types are: &quot;organization&quot;, &quot;folder&quot;, and &quot;project&quot;.
431 &quot;id&quot;: &quot;A String&quot;, # Required field for the type-specific id. This should correspond to the id
432 # used in the type-specific API&#x27;s.
433 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700434 }</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700435</div>
436
437<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438 <code class="details" id="getAncestry">getAncestry(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800439 <pre>Gets a list of ancestors in the resource hierarchy for the Project
440identified by the specified `project_id` (for example, `my-project-123`).
441
442The caller must have read permissions for this Project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700443
444Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800445 projectId: string, The Project ID (for example, `my-project-123`).
446
447Required. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800449 The object takes the form of:
450
451{ # The request sent to the
452 # GetAncestry
453 # method.
454 }
455
456 x__xgafv: string, V1 error format.
457 Allowed values
458 1 - v1 error format
459 2 - v2 error format
460
461Returns:
462 An object of the form:
463
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700464 { # Response from the
465 # projects.getAncestry
466 # method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 &quot;ancestor&quot;: [ # Ancestors are ordered from bottom to top of the resource hierarchy. The
468 # first ancestor is the project itself, followed by the project&#x27;s parent,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700469 # etc..
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800470 { # Identifying information for a single ancestor of a project.
Bu Sun Kim65020912020-05-20 12:08:20 -0700471 &quot;resourceId&quot;: { # A container to reference an id for any resource type. A `resource` in Google # Resource id of the ancestor.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800472 # Cloud Platform is a generic term for something you (a developer) may want to
Bu Sun Kim65020912020-05-20 12:08:20 -0700473 # interact with through one of our API&#x27;s. Some examples are an App Engine app,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800474 # a Compute Engine instance, a Cloud SQL database, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700475 &quot;type&quot;: &quot;A String&quot;, # Required field representing the resource type this id is for.
476 # At present, the valid types are: &quot;organization&quot;, &quot;folder&quot;, and &quot;project&quot;.
477 &quot;id&quot;: &quot;A String&quot;, # Required field for the type-specific id. This should correspond to the id
478 # used in the type-specific API&#x27;s.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800479 },
480 },
481 ],
482 }</pre>
483</div>
484
485<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700486 <code class="details" id="getEffectiveOrgPolicy">getEffectiveOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700487 <pre>Gets the effective `Policy` on a resource. This is the result of merging
488`Policies` in the resource hierarchy. The returned `Policy` will not have
489an `etag`set because it is a computed `Policy` across multiple resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700490Subtrees of Resource Manager resource hierarchy with &#x27;under:&#x27; prefix will
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700491not be expanded.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700492
493Args:
494 resource: string, The name of the resource to start computing the effective `Policy`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700495 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700496 The object takes the form of:
497
498{ # The request sent to the GetEffectiveOrgPolicy method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700499 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` to compute the effective `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700500 }
501
502 x__xgafv: string, V1 error format.
503 Allowed values
504 1 - v1 error format
505 2 - v2 error format
506
507Returns:
508 An object of the form:
509
510 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
511 # for configurations of Cloud Platform resources.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700512 &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.
513 # resource.
514 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
515 # configuration is acceptable.
516 #
517 # Suppose you have a `Constraint`
518 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
519 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
520 # behavior:
521 # - If the `Policy` at this resource has enforced set to `false`, serial
522 # port connection attempts will be allowed.
523 # - If the `Policy` at this resource has enforced set to `true`, serial
524 # port connection attempts will be refused.
525 # - If the `Policy` at this resource is `RestoreDefault`, serial port
526 # connection attempts will be allowed.
527 # - If no `Policy` is set at this resource or anywhere higher in the
528 # resource hierarchy, serial port connection attempts will be allowed.
529 # - If no `Policy` is set at this resource, but one exists higher in the
530 # resource hierarchy, the behavior is as if the`Policy` were set at
531 # this resource.
532 #
533 # The following examples demonstrate the different possible layerings:
534 #
535 # Example 1 (nearest `Constraint` wins):
536 # `organizations/foo` has a `Policy` with:
537 # {enforced: false}
538 # `projects/bar` has no `Policy` set.
539 # The constraint at `projects/bar` and `organizations/foo` will not be
540 # enforced.
541 #
542 # Example 2 (enforcement gets replaced):
543 # `organizations/foo` has a `Policy` with:
544 # {enforced: false}
545 # `projects/bar` has a `Policy` with:
546 # {enforced: true}
547 # The constraint at `organizations/foo` is not enforced.
548 # The constraint at `projects/bar` is enforced.
549 #
550 # Example 3 (RestoreDefault):
551 # `organizations/foo` has a `Policy` with:
552 # {enforced: true}
553 # `projects/bar` has a `Policy` with:
554 # {RestoreDefault: {}}
555 # The constraint at `organizations/foo` is enforced.
556 # The constraint at `projects/bar` is not enforced, because
557 # `constraint_default` for the `Constraint` is `ALLOW`.
558 },
559 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
560 # `Constraint` type.
561 # `constraint_default` enforcement behavior of the specific `Constraint` at
562 # this resource.
563 #
564 # Suppose that `constraint_default` is set to `ALLOW` for the
565 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
566 # foo.com sets a `Policy` at their Organization resource node that restricts
567 # the allowed service activations to deny all service activations. They
568 # could then set a `Policy` with the `policy_type` `restore_default` on
569 # several experimental projects, restoring the `constraint_default`
570 # enforcement of the `Constraint` for only those projects, allowing those
571 # projects to have all services activated.
572 },
573 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
574 # server, not specified by the caller, and represents the last time a call to
575 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
576 # be ignored.
577 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
578 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
579 # concurrency control.
580 #
581 # When the `Policy` is returned from either a `GetPolicy` or a
582 # `ListOrgPolicy` request, this `etag` indicates the version of the current
583 # `Policy` to use when executing a read-modify-write loop.
584 #
585 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
586 # `etag` will be unset.
587 #
588 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
589 # that was returned from a `GetOrgPolicy` request as part of a
590 # read-modify-write loop for concurrency control. Not setting the `etag`in a
591 # `SetOrgPolicy` request will result in an unconditional write of the
592 # `Policy`.
593 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
594 # `constraints/serviceuser.services`.
595 #
596 # A [list of available
597 # constraints](/resource-manager/docs/organization-policy/org-policy-constraints)
598 # is available.
599 #
600 # Immutable after creation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700601 &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 -0700602 # resource.
603 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700604 # `ListPolicy` can define specific values and subtrees of Cloud Resource
605 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
606 # are allowed or denied by setting the `allowed_values` and `denied_values`
607 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
608 # The `under:` prefix is used to denote resource subtree values.
609 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -0700610 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700611 # same as values with no prefix.
612 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -0700613 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
614 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
615 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700616 # The `supports_under` field of the associated `Constraint` defines whether
617 # ancestry prefixes can be used. You can set `allowed_values` and
618 # `denied_values` in the same `Policy` if `all_values` is
619 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
620 # values. If `all_values` is set to either `ALLOW` or `DENY`,
621 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700622 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700623 &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 -0700624 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700625 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700626 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700627 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
628 # that matches the value specified in this `Policy`. If `suggested_value`
629 # is not set, it will inherit the value specified higher in the hierarchy,
630 # unless `inherit_from_parent` is `false`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700631 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
632 # is set to `ALL_VALUES_UNSPECIFIED`.
633 &quot;A String&quot;,
634 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700635 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700636 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700637 # By default, a `ListPolicy` set at a resource supersedes any `Policy` set
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700638 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
639 # set to `true`, then the values from the effective `Policy` of the parent
640 # resource are inherited, meaning the values set in this `Policy` are
641 # added to the values inherited up the hierarchy.
642 #
643 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -0700644 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700645 # simple and understandable. However, it is possible to set a `Policy` with
646 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
647 # In this case, the values that are allowed must be in `allowed_values` and
648 # not present in `denied_values`.
649 #
650 # For example, suppose you have a `Constraint`
651 # `constraints/serviceuser.services`, which has a `constraint_type` of
652 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
653 # Suppose that at the Organization level, a `Policy` is applied that
654 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
655 # `Policy` is applied to a project below the Organization that has
656 # `inherit_from_parent` set to `false` and field all_values set to DENY,
657 # then an attempt to activate any API will be denied.
658 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700659 # The following examples demonstrate different possible layerings for
660 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700661 #
662 # Example 1 (no inherited values):
663 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700664 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700665 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700666 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700667 # The accepted values at `organizations/foo` are `E1`, `E2`.
668 # The accepted values at `projects/bar` are `E3`, and `E4`.
669 #
670 # Example 2 (inherited values):
671 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700672 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700673 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700674 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700675 # The accepted values at `organizations/foo` are `E1`, `E2`.
676 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
677 #
678 # Example 3 (inheriting both allowed and denied values):
679 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700680 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700681 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700682 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700683 # The accepted values at `organizations/foo` are `E1`, `E2`.
684 # The value accepted at `projects/bar` is `E2`.
685 #
686 # Example 4 (RestoreDefault):
687 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700689 # `projects/bar` has a `Policy` with values:
690 # {RestoreDefault: {}}
691 # The accepted values at `organizations/foo` are `E1`, `E2`.
692 # The accepted values at `projects/bar` are either all or none depending on
693 # the value of `constraint_default` (if `ALLOW`, all; if
694 # `DENY`, none).
695 #
696 # Example 5 (no policy inherits parent policy):
697 # `organizations/foo` has no `Policy` set.
698 # `projects/bar` has no `Policy` set.
699 # The accepted values at both levels are either all or none depending on
700 # the value of `constraint_default` (if `ALLOW`, all; if
701 # `DENY`, none).
702 #
703 # Example 6 (ListConstraint allowing all):
704 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700705 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700706 # `projects/bar` has a `Policy` with:
707 # {all: ALLOW}
708 # The accepted values at `organizations/foo` are `E1`, E2`.
709 # Any value is accepted at `projects/bar`.
710 #
711 # Example 7 (ListConstraint allowing none):
712 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700713 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700714 # `projects/bar` has a `Policy` with:
715 # {all: DENY}
716 # The accepted values at `organizations/foo` are `E1`, E2`.
717 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700718 #
719 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
720 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -0700721 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700722 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700723 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700724 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 # {allowed_values: &quot;under:projects/P3&quot;}
726 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700727 # The accepted values at `organizations/foo` are `organizations/O1`,
728 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
729 # `projects/P3`.
730 # The accepted values at `projects/bar` are `organizations/O1`,
731 # `folders/F1`, `projects/P1`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700732 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700733 }</pre>
734</div>
735
736<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700737 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800738 <pre>Returns the IAM access control policy for the specified Project.
739Permission is denied if the policy or the resource does not exist.
740
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700741Authorization requires the Google IAM permission
742`resourcemanager.projects.getIamPolicy` on the project.
743
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700744For additional information about `resource` (e.g. my-project-id) structure
745and identification, see [Resource Names](/apis/design/resource_names).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800747Args:
748 resource: string, REQUIRED: The resource for which the policy is being requested.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400749See the operation documentation for the appropriate value for this field. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700750 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700751 The object takes the form of:
752
753{ # Request message for `GetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
Dan O'Mearadd494642020-05-01 07:42:23 -0700755 # `GetIamPolicy`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700756 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -0700757 #
758 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
759 # rejected.
760 #
761 # Requests for policies with any conditional bindings must specify version 3.
762 # Policies without any conditional bindings may specify any valid value or
763 # leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700764 #
765 # To learn which resources support conditions in their IAM policies, see the
766 # [IAM
767 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700768 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700769 }
770
771 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800772 Allowed values
773 1 - v1 error format
774 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700775
776Returns:
777 An object of the form:
778
Dan O'Mearadd494642020-05-01 07:42:23 -0700779 { # An Identity and Access Management (IAM) policy, which specifies access
780 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800781 #
782 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700783 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
784 # `members` to a single `role`. Members can be user accounts, service accounts,
785 # Google groups, and domains (such as G Suite). A `role` is a named list of
786 # permissions; each `role` can be an IAM predefined role or a user-created
787 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800788 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700789 # For some types of Google Cloud resources, a `binding` can also specify a
790 # `condition`, which is a logical expression that allows access to a resource
791 # only if the expression evaluates to `true`. A condition can add constraints
792 # based on attributes of the request, the resource, or both. To learn which
793 # resources support conditions in their IAM policies, see the
794 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700795 #
796 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800797 #
798 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700799 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800800 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700801 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
802 # &quot;members&quot;: [
803 # &quot;user:mike@example.com&quot;,
804 # &quot;group:admins@example.com&quot;,
805 # &quot;domain:google.com&quot;,
806 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800807 # ]
808 # },
809 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700810 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
811 # &quot;members&quot;: [
812 # &quot;user:eve@example.com&quot;
813 # ],
814 # &quot;condition&quot;: {
815 # &quot;title&quot;: &quot;expirable access&quot;,
816 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
817 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700818 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800819 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700820 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700821 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
822 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800823 # }
824 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700825 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700826 #
827 # bindings:
828 # - members:
829 # - user:mike@example.com
830 # - group:admins@example.com
831 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700832 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
833 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700834 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700835 # - user:eve@example.com
836 # role: roles/resourcemanager.organizationViewer
837 # condition:
838 # title: expirable access
839 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700840 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700841 # - etag: BwWWja0YfJA=
842 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700843 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800844 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700845 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700846 &quot;version&quot;: 42, # Specifies the format of the policy.
847 #
848 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
849 # are rejected.
850 #
851 # Any operation that affects conditional role bindings must specify version
852 # `3`. This requirement applies to the following operations:
853 #
854 # * Getting a policy that includes a conditional role binding
855 # * Adding a conditional role binding to a policy
856 # * Changing a conditional role binding in a policy
857 # * Removing any role binding, with or without a condition, from a policy
858 # that includes conditions
859 #
860 # **Important:** If you use IAM Conditions, you must include the `etag` field
861 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
862 # you to overwrite a version `3` policy with a version `1` policy, and all of
863 # the conditions in the version `3` policy are lost.
864 #
865 # If a policy does not include any conditions, operations on that policy may
866 # specify any valid version or leave the field unset.
867 #
868 # To learn which resources support conditions in their IAM policies, see the
869 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700870 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
871 # prevent simultaneous updates of a policy from overwriting each other.
872 # It is strongly suggested that systems make use of the `etag` in the
873 # read-modify-write cycle to perform policy updates in order to avoid race
874 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
875 # systems are expected to put that etag in the request to `setIamPolicy` to
876 # ensure that their change will be applied to the same version of the policy.
877 #
878 # **Important:** If you use IAM Conditions, you must include the `etag` field
879 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
880 # you to overwrite a version `3` policy with a version `1` policy, and all of
881 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700882 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
883 { # Specifies the audit configuration for a service.
884 # The configuration determines which permission types are logged, and what
885 # identities, if any, are exempted from logging.
886 # An AuditConfig must have one or more AuditLogConfigs.
887 #
888 # If there are AuditConfigs for both `allServices` and a specific service,
889 # the union of the two AuditConfigs is used for that service: the log_types
890 # specified in each AuditConfig are enabled, and the exempted_members in each
891 # AuditLogConfig are exempted.
892 #
893 # Example Policy with multiple AuditConfigs:
894 #
895 # {
896 # &quot;audit_configs&quot;: [
897 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700898 # &quot;service&quot;: &quot;allServices&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700899 # &quot;audit_log_configs&quot;: [
900 # {
901 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
902 # &quot;exempted_members&quot;: [
903 # &quot;user:jose@example.com&quot;
904 # ]
905 # },
906 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700907 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700908 # },
909 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700910 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 # }
912 # ]
913 # },
914 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700915 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700916 # &quot;audit_log_configs&quot;: [
917 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700918 # &quot;log_type&quot;: &quot;DATA_READ&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700919 # },
920 # {
921 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
922 # &quot;exempted_members&quot;: [
923 # &quot;user:aliya@example.com&quot;
924 # ]
925 # }
926 # ]
927 # }
928 # ]
929 # }
930 #
931 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
932 # logging. It also exempts jose@example.com from DATA_READ logging, and
933 # aliya@example.com from DATA_WRITE logging.
934 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
935 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
936 # `allServices` is a special value that covers all services.
937 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
938 { # Provides the configuration for logging a type of permissions.
939 # Example:
940 #
941 # {
942 # &quot;audit_log_configs&quot;: [
943 # {
944 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
945 # &quot;exempted_members&quot;: [
946 # &quot;user:jose@example.com&quot;
947 # ]
948 # },
949 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700950 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700951 # }
952 # ]
953 # }
954 #
955 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
956 # jose@example.com from DATA_READ logging.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700957 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -0700958 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
959 # permission.
960 # Follows the same format of Binding.members.
961 &quot;A String&quot;,
962 ],
963 },
964 ],
965 },
966 ],
967 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700968 # `condition` that determines how and when the `bindings` are applied. Each
969 # of the `bindings` must contain at least one member.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400970 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700971 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
972 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700973 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
974 #
975 # If the condition evaluates to `true`, then this binding applies to the
976 # current request.
977 #
978 # If the condition evaluates to `false`, then this binding does not apply to
979 # the current request. However, a different role binding might grant the same
980 # role to one or more of the members in this binding.
981 #
982 # To learn which resources support conditions in their IAM policies, see the
983 # [IAM
984 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
985 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
986 # are documented at https://github.com/google/cel-spec.
987 #
988 # Example (Comparison):
989 #
990 # title: &quot;Summary size limit&quot;
991 # description: &quot;Determines if a summary is less than 100 chars&quot;
992 # expression: &quot;document.summary.size() &lt; 100&quot;
993 #
994 # Example (Equality):
995 #
996 # title: &quot;Requestor is owner&quot;
997 # description: &quot;Determines if requestor is the document owner&quot;
998 # expression: &quot;document.owner == request.auth.claims.email&quot;
999 #
1000 # Example (Logic):
1001 #
1002 # title: &quot;Public documents&quot;
1003 # description: &quot;Determine whether the document should be publicly visible&quot;
1004 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1005 #
1006 # Example (Data Manipulation):
1007 #
1008 # title: &quot;Notification string&quot;
1009 # description: &quot;Create a notification string with a timestamp.&quot;
1010 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1011 #
1012 # The exact variables and functions that may be referenced within an expression
1013 # are determined by the service that evaluates it. See the service
1014 # documentation for additional information.
1015 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1016 # its purpose. This can be used e.g. in UIs which allow to enter the
1017 # expression.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001018 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1019 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07001020 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1021 # reporting, e.g. a file name and a position in the file.
1022 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1023 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07001024 },
1025 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001026 # `members` can have the following values:
1027 #
1028 # * `allUsers`: A special identifier that represents anyone who is
1029 # on the internet; with or without a Google account.
1030 #
1031 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1032 # who is authenticated with a Google account or a service account.
1033 #
1034 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001035 # account. For example, `alice@example.com` .
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001036 #
1037 #
1038 # * `serviceAccount:{emailid}`: An email address that represents a service
1039 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1040 #
1041 # * `group:{emailid}`: An email address that represents a Google group.
1042 # For example, `admins@example.com`.
1043 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001044 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1045 # identifier) representing a user that has been recently deleted. For
1046 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1047 # recovered, this value reverts to `user:{emailid}` and the recovered user
1048 # retains the role in the binding.
1049 #
1050 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1051 # unique identifier) representing a service account that has been recently
1052 # deleted. For example,
1053 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1054 # If the service account is undeleted, this value reverts to
1055 # `serviceAccount:{emailid}` and the undeleted service account retains the
1056 # role in the binding.
1057 #
1058 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1059 # identifier) representing a Google group that has been recently
1060 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1061 # the group is recovered, this value reverts to `group:{emailid}` and the
1062 # recovered group retains the role in the binding.
1063 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001064 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001065 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001066 # users of that domain. For example, `google.com` or `example.com`.
1067 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001068 &quot;A String&quot;,
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001069 ],
1070 },
1071 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001072 }</pre>
1073</div>
1074
1075<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001076 <code class="details" id="getOrgPolicy">getOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001077 <pre>Gets a `Policy` on a resource.
1078
1079If no `Policy` is set on the resource, a `Policy` is returned with default
1080values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
1081`etag` value can be used with `SetOrgPolicy()` to create or update a
1082`Policy` during read-modify-write.
1083
1084Args:
1085 resource: string, Name of the resource the `Policy` is set on. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001086 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001087 The object takes the form of:
1088
1089{ # The request sent to the GetOrgPolicy method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001090 &quot;constraint&quot;: &quot;A String&quot;, # Name of the `Constraint` to get the `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001091 }
1092
1093 x__xgafv: string, V1 error format.
1094 Allowed values
1095 1 - v1 error format
1096 2 - v2 error format
1097
1098Returns:
1099 An object of the form:
1100
1101 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
1102 # for configurations of Cloud Platform resources.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001103 &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.
1104 # resource.
1105 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
1106 # configuration is acceptable.
1107 #
1108 # Suppose you have a `Constraint`
1109 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
1110 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
1111 # behavior:
1112 # - If the `Policy` at this resource has enforced set to `false`, serial
1113 # port connection attempts will be allowed.
1114 # - If the `Policy` at this resource has enforced set to `true`, serial
1115 # port connection attempts will be refused.
1116 # - If the `Policy` at this resource is `RestoreDefault`, serial port
1117 # connection attempts will be allowed.
1118 # - If no `Policy` is set at this resource or anywhere higher in the
1119 # resource hierarchy, serial port connection attempts will be allowed.
1120 # - If no `Policy` is set at this resource, but one exists higher in the
1121 # resource hierarchy, the behavior is as if the`Policy` were set at
1122 # this resource.
1123 #
1124 # The following examples demonstrate the different possible layerings:
1125 #
1126 # Example 1 (nearest `Constraint` wins):
1127 # `organizations/foo` has a `Policy` with:
1128 # {enforced: false}
1129 # `projects/bar` has no `Policy` set.
1130 # The constraint at `projects/bar` and `organizations/foo` will not be
1131 # enforced.
1132 #
1133 # Example 2 (enforcement gets replaced):
1134 # `organizations/foo` has a `Policy` with:
1135 # {enforced: false}
1136 # `projects/bar` has a `Policy` with:
1137 # {enforced: true}
1138 # The constraint at `organizations/foo` is not enforced.
1139 # The constraint at `projects/bar` is enforced.
1140 #
1141 # Example 3 (RestoreDefault):
1142 # `organizations/foo` has a `Policy` with:
1143 # {enforced: true}
1144 # `projects/bar` has a `Policy` with:
1145 # {RestoreDefault: {}}
1146 # The constraint at `organizations/foo` is enforced.
1147 # The constraint at `projects/bar` is not enforced, because
1148 # `constraint_default` for the `Constraint` is `ALLOW`.
1149 },
1150 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
1151 # `Constraint` type.
1152 # `constraint_default` enforcement behavior of the specific `Constraint` at
1153 # this resource.
1154 #
1155 # Suppose that `constraint_default` is set to `ALLOW` for the
1156 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
1157 # foo.com sets a `Policy` at their Organization resource node that restricts
1158 # the allowed service activations to deny all service activations. They
1159 # could then set a `Policy` with the `policy_type` `restore_default` on
1160 # several experimental projects, restoring the `constraint_default`
1161 # enforcement of the `Constraint` for only those projects, allowing those
1162 # projects to have all services activated.
1163 },
1164 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
1165 # server, not specified by the caller, and represents the last time a call to
1166 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
1167 # be ignored.
1168 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
1169 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
1170 # concurrency control.
1171 #
1172 # When the `Policy` is returned from either a `GetPolicy` or a
1173 # `ListOrgPolicy` request, this `etag` indicates the version of the current
1174 # `Policy` to use when executing a read-modify-write loop.
1175 #
1176 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
1177 # `etag` will be unset.
1178 #
1179 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
1180 # that was returned from a `GetOrgPolicy` request as part of a
1181 # read-modify-write loop for concurrency control. Not setting the `etag`in a
1182 # `SetOrgPolicy` request will result in an unconditional write of the
1183 # `Policy`.
1184 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
1185 # `constraints/serviceuser.services`.
1186 #
1187 # A [list of available
1188 # constraints](/resource-manager/docs/organization-policy/org-policy-constraints)
1189 # is available.
1190 #
1191 # Immutable after creation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001192 &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 -07001193 # resource.
1194 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001195 # `ListPolicy` can define specific values and subtrees of Cloud Resource
1196 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
1197 # are allowed or denied by setting the `allowed_values` and `denied_values`
1198 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
1199 # The `under:` prefix is used to denote resource subtree values.
1200 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -07001201 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001202 # same as values with no prefix.
1203 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -07001204 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
1205 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
1206 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001207 # The `supports_under` field of the associated `Constraint` defines whether
1208 # ancestry prefixes can be used. You can set `allowed_values` and
1209 # `denied_values` in the same `Policy` if `all_values` is
1210 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
1211 # values. If `all_values` is set to either `ALLOW` or `DENY`,
1212 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001213 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001214 &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 -07001215 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001216 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001217 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001218 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
1219 # that matches the value specified in this `Policy`. If `suggested_value`
1220 # is not set, it will inherit the value specified higher in the hierarchy,
1221 # unless `inherit_from_parent` is `false`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001222 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
1223 # is set to `ALL_VALUES_UNSPECIFIED`.
1224 &quot;A String&quot;,
1225 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001226 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001227 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001228 # By default, a `ListPolicy` set at a resource supersedes any `Policy` set
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001229 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
1230 # set to `true`, then the values from the effective `Policy` of the parent
1231 # resource are inherited, meaning the values set in this `Policy` are
1232 # added to the values inherited up the hierarchy.
1233 #
1234 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -07001235 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001236 # simple and understandable. However, it is possible to set a `Policy` with
1237 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
1238 # In this case, the values that are allowed must be in `allowed_values` and
1239 # not present in `denied_values`.
1240 #
1241 # For example, suppose you have a `Constraint`
1242 # `constraints/serviceuser.services`, which has a `constraint_type` of
1243 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
1244 # Suppose that at the Organization level, a `Policy` is applied that
1245 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
1246 # `Policy` is applied to a project below the Organization that has
1247 # `inherit_from_parent` set to `false` and field all_values set to DENY,
1248 # then an attempt to activate any API will be denied.
1249 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001250 # The following examples demonstrate different possible layerings for
1251 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001252 #
1253 # Example 1 (no inherited values):
1254 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001255 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001256 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001257 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001258 # The accepted values at `organizations/foo` are `E1`, `E2`.
1259 # The accepted values at `projects/bar` are `E3`, and `E4`.
1260 #
1261 # Example 2 (inherited values):
1262 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001263 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001264 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001265 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001266 # The accepted values at `organizations/foo` are `E1`, `E2`.
1267 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
1268 #
1269 # Example 3 (inheriting both allowed and denied values):
1270 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001271 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001272 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001273 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001274 # The accepted values at `organizations/foo` are `E1`, `E2`.
1275 # The value accepted at `projects/bar` is `E2`.
1276 #
1277 # Example 4 (RestoreDefault):
1278 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001279 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001280 # `projects/bar` has a `Policy` with values:
1281 # {RestoreDefault: {}}
1282 # The accepted values at `organizations/foo` are `E1`, `E2`.
1283 # The accepted values at `projects/bar` are either all or none depending on
1284 # the value of `constraint_default` (if `ALLOW`, all; if
1285 # `DENY`, none).
1286 #
1287 # Example 5 (no policy inherits parent policy):
1288 # `organizations/foo` has no `Policy` set.
1289 # `projects/bar` has no `Policy` set.
1290 # The accepted values at both levels are either all or none depending on
1291 # the value of `constraint_default` (if `ALLOW`, all; if
1292 # `DENY`, none).
1293 #
1294 # Example 6 (ListConstraint allowing all):
1295 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001296 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001297 # `projects/bar` has a `Policy` with:
1298 # {all: ALLOW}
1299 # The accepted values at `organizations/foo` are `E1`, E2`.
1300 # Any value is accepted at `projects/bar`.
1301 #
1302 # Example 7 (ListConstraint allowing none):
1303 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001304 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001305 # `projects/bar` has a `Policy` with:
1306 # {all: DENY}
1307 # The accepted values at `organizations/foo` are `E1`, E2`.
1308 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001309 #
1310 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
1311 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07001312 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001313 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001314 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001315 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001316 # {allowed_values: &quot;under:projects/P3&quot;}
1317 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001318 # The accepted values at `organizations/foo` are `organizations/O1`,
1319 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
1320 # `projects/P3`.
1321 # The accepted values at `projects/bar` are `organizations/O1`,
1322 # `folders/F1`, `projects/P1`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001323 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001324 }</pre>
1325</div>
1326
1327<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001328 <code class="details" id="list">list(pageSize=None, filter=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001329 <pre>Lists Projects that the caller has the `resourcemanager.projects.get`
1330permission on and satisfy the specified filter.
1331
1332This method returns Projects in an unspecified order.
1333This method is eventually consistent with project mutations; this means
1334that a newly created project may not appear in the results or recent
1335updates to an existing project may not be reflected in the results. To
1336retrieve the latest state of a project, use the
1337GetProject method.
1338
1339NOTE: If the request filter contains a `parent.type` and `parent.id` and
1340the caller has the `resourcemanager.projects.list` permission on the
1341parent, the results will be drawn from an alternate index which provides
1342more consistent results. In future versions of this API, this List method
1343will be split into List and Search to properly capture the behavorial
1344difference.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001345
1346Args:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001347 pageSize: integer, The maximum number of Projects to return in the response.
1348The server can return fewer Projects than requested.
1349If unspecified, server picks an appropriate default.
1350
1351Optional.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001352 filter: string, An expression for filtering the results of the request. Filter rules are
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001353case insensitive. Some eligible fields for filtering are:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001354
1355+ `name`
1356+ `id`
Dan O'Mearadd494642020-05-01 07:42:23 -07001357+ `labels.&lt;key&gt;` (where *key* is the name of a label)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001358+ `parent.type`
1359+ `parent.id`
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001360+ `lifecycleState`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001361
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001362Some examples of filter strings:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001363
1364| Filter | Description |
1365|------------------|-----------------------------------------------------|
Bu Sun Kim65020912020-05-20 12:08:20 -07001366| name:how* | The project&#x27;s name starts with &quot;how&quot;. |
1367| name:Howl | The project&#x27;s name is `Howl` or `howl`. |
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001368| name:HOWL | Equivalent to above. |
1369| NAME:howl | Equivalent to above. |
1370| labels.color:* | The project has the label `color`. |
Bu Sun Kim65020912020-05-20 12:08:20 -07001371| labels.color:red | The project&#x27;s label `color` has the value `red`. |
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001372| labels.color:red&amp;nbsp;labels.size:big | The project&#x27;s label `color` |
1373: : has the value `red` and its :
1374: : label`size` has the value :
1375: : `big`. :
1376| lifecycleState:DELETE_REQUESTED | Only show projects that are |
1377: : pending deletion. :
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001378
1379If no filter is specified, the call will return projects for which the user
1380has the `resourcemanager.projects.get` permission.
1381
1382NOTE: To perform a by-parent query (eg., what projects are directly in a
1383Folder), the caller must have the `resourcemanager.projects.list`
1384permission on the parent and the filter must contain both a `parent.type`
1385and a `parent.id` restriction
Bu Sun Kim65020912020-05-20 12:08:20 -07001386(example: &quot;parent.type:folder parent.id:123&quot;). In this case an alternate
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001387search index is used which provides more consistent results.
1388
1389Optional.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001390 pageToken: string, A pagination token returned from a previous call to ListProjects
1391that indicates from where listing should continue.
1392
1393Optional.
Bu Sun Kim65020912020-05-20 12:08:20 -07001394 x__xgafv: string, V1 error format.
1395 Allowed values
1396 1 - v1 error format
1397 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001398
1399Returns:
1400 An object of the form:
1401
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001402 { # A page of the response received from the
1403 # ListProjects
1404 # method.
1405 #
1406 # A paginated response where more pages are available has
1407 # `next_page_token` set. This token can be used in a subsequent request to
1408 # retrieve the next request page.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001409 &quot;nextPageToken&quot;: &quot;A String&quot;, # Pagination token.
1410 #
1411 # If the result set is too large to fit in a single response, this token
1412 # is returned. It encodes the position of the current result cursor.
1413 # Feeding this value into a new list request with the `page_token` parameter
1414 # gives the next page of the results.
1415 #
1416 # When `next_page_token` is not filled in, there is no next page and
1417 # the list returned is the last page in the result set.
1418 #
1419 # Pagination tokens have a limited lifetime.
Bu Sun Kim65020912020-05-20 12:08:20 -07001420 &quot;projects&quot;: [ # The list of Projects that matched the list filter. This list can
1421 # be paginated.
1422 { # A Project is a high-level Google Cloud Platform entity. It is a
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001423 # container for ACLs, APIs, App Engine Apps, VMs, and other
1424 # Google Cloud Platform resources.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001425 &quot;projectNumber&quot;: &quot;A String&quot;, # The number uniquely identifying the project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001426 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001427 # Example: &lt;code&gt;415104041262&lt;/code&gt;
1428 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001429 &quot;projectId&quot;: &quot;A String&quot;, # The unique, user-assigned ID of the Project.
1430 # It must be 6 to 30 lowercase letters, digits, or hyphens.
1431 # It must start with a letter.
1432 # Trailing hyphens are prohibited.
1433 #
1434 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
1435 # Read-only after creation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001436 &quot;createTime&quot;: &quot;A String&quot;, # Creation time.
1437 #
1438 # Read-only.
1439 &quot;labels&quot;: { # The labels associated with this Project.
1440 #
1441 # Label keys must be between 1 and 63 characters long and must conform
1442 # to the following regular expression: a-z{0,62}.
1443 #
1444 # Label values must be between 0 and 63 characters long and must conform
1445 # to the regular expression [a-z0-9_-]{0,63}. A label value can be empty.
1446 #
1447 # No more than 256 labels can be associated with a given resource.
1448 #
1449 # Clients should store labels in a representation such as JSON that does not
1450 # depend on specific characters being disallowed.
1451 #
1452 # Example: &lt;code&gt;&quot;environment&quot; : &quot;dev&quot;&lt;/code&gt;
1453 # Read-write.
1454 &quot;a_key&quot;: &quot;A String&quot;,
1455 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001456 &quot;lifecycleState&quot;: &quot;A String&quot;, # The Project lifecycle state.
1457 #
1458 # Read-only.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001459 &quot;name&quot;: &quot;A String&quot;, # The optional user-assigned display name of the Project.
1460 # When present it must be between 4 to 30 characters.
1461 # Allowed characters are: lowercase and uppercase letters, numbers,
1462 # hyphen, single-quote, double-quote, space, and exclamation point.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001463 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001464 # Example: &lt;code&gt;My Project&lt;/code&gt;
1465 # Read-write.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001466 &quot;parent&quot;: { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
1467 #
1468 # Supported parent types include &quot;organization&quot; and &quot;folder&quot;. Once set, the
1469 # parent cannot be cleared. The `parent` can be set on creation or using the
1470 # `UpdateProject` method; the end user must have the
1471 # `resourcemanager.projects.create` permission on the parent.
1472 #
1473 # Read-write.
1474 # Cloud Platform is a generic term for something you (a developer) may want to
1475 # interact with through one of our API&#x27;s. Some examples are an App Engine app,
1476 # a Compute Engine instance, a Cloud SQL database, and so on.
1477 &quot;type&quot;: &quot;A String&quot;, # Required field representing the resource type this id is for.
1478 # At present, the valid types are: &quot;organization&quot;, &quot;folder&quot;, and &quot;project&quot;.
1479 &quot;id&quot;: &quot;A String&quot;, # Required field for the type-specific id. This should correspond to the id
1480 # used in the type-specific API&#x27;s.
1481 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001482 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001483 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001484 }</pre>
1485</div>
1486
1487<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001488 <code class="details" id="listAvailableOrgPolicyConstraints">listAvailableOrgPolicyConstraints(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001489 <pre>Lists `Constraints` that could be applied on the specified resource.
1490
1491Args:
1492 resource: string, Name of the resource to list `Constraints` for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001493 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001494 The object takes the form of:
1495
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001496{ # The request sent to the `ListAvailableOrgPolicyConstraints` method on the
1497 # project, folder, or organization.
Bu Sun Kim65020912020-05-20 12:08:20 -07001498 &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 -07001499 # and will be ignored. The server may at any point start using this field.
Bu Sun Kim65020912020-05-20 12:08:20 -07001500 &quot;pageSize&quot;: 42, # Size of the pages to be returned. This is currently unsupported and will
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001501 # be ignored. The server may at any point start using this field to limit
1502 # page size.
1503 }
1504
1505 x__xgafv: string, V1 error format.
1506 Allowed values
1507 1 - v1 error format
1508 2 - v2 error format
1509
1510Returns:
1511 An object of the form:
1512
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001513 { # The response returned from the `ListAvailableOrgPolicyConstraints` method.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001514 # Returns all `Constraints` that could be set at this level of the hierarchy
1515 # (contrast with the response from `ListPolicies`, which returns all policies
1516 # which are set).
Bu Sun Kim65020912020-05-20 12:08:20 -07001517 &quot;constraints&quot;: [ # The collection of constraints that are settable on the request resource.
1518 { # A `Constraint` describes a way in which a resource&#x27;s configuration can be
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001519 # restricted. For example, it controls which cloud services can be activated
1520 # across an organization, or whether a Compute Engine instance can have
1521 # serial port connections established. `Constraints` can be configured by the
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001522 # organization&#x27;s policy administrator to fit the needs of the organzation by
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001523 # setting Policies for `Constraints` at different locations in the
Bu Sun Kim65020912020-05-20 12:08:20 -07001524 # organization&#x27;s resource hierarchy. Policies are inherited down the resource
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001525 # hierarchy from higher levels, but can also be overridden. For details about
1526 # the inheritance rules please read about
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001527 # [Policies](/resource-manager/reference/rest/v1/Policy).
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001528 #
1529 # `Constraints` have a default behavior determined by the `constraint_default`
1530 # field, which is the enforcement behavior that is used in the absence of a
1531 # `Policy` being defined or inherited for the resource in question.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001532 &quot;booleanConstraint&quot;: { # A `Constraint` that is either enforced or not. # Defines this constraint as being a BooleanConstraint.
1533 #
1534 # For example a constraint `constraints/compute.disableSerialPortAccess`.
1535 # If it is enforced on a VM instance, serial port connections will not be
1536 # opened to that instance.
1537 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001538 &quot;name&quot;: &quot;A String&quot;, # Immutable value, required to globally be unique. For example,
1539 # `constraints/serviceuser.services`
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001540 &quot;displayName&quot;: &quot;A String&quot;, # The human readable name.
1541 #
1542 # Mutable.
1543 &quot;version&quot;: 42, # Version of the `Constraint`. Default version is 0;
Bu Sun Kim65020912020-05-20 12:08:20 -07001544 &quot;listConstraint&quot;: { # A `Constraint` that allows or disallows a list of string values, which are # Defines this constraint as being a ListConstraint.
1545 # configured by an Organization&#x27;s policy administrator with a `Policy`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001546 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
1547 # that matches the value specified in this `Constraint`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001548 &quot;supportsUnder&quot;: True or False, # Indicates whether subtrees of Cloud Resource Manager resource hierarchy
1549 # can be used in `Policy.allowed_values` and `Policy.denied_values`. For
1550 # example, `&quot;under:folders/123&quot;` would match any resource under the
1551 # &#x27;folders/123&#x27; folder.
Bu Sun Kim65020912020-05-20 12:08:20 -07001552 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001553 &quot;constraintDefault&quot;: &quot;A String&quot;, # The evaluation behavior of this constraint in the absence of &#x27;Policy&#x27;.
Bu Sun Kim65020912020-05-20 12:08:20 -07001554 &quot;description&quot;: &quot;A String&quot;, # Detailed description of what this `Constraint` controls as well as how and
1555 # where it is enforced.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001556 #
1557 # Mutable.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001558 },
1559 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001560 &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 -07001561 }</pre>
1562</div>
1563
1564<div class="method">
1565 <code class="details" id="listAvailableOrgPolicyConstraints_next">listAvailableOrgPolicyConstraints_next(previous_request, previous_response)</code>
1566 <pre>Retrieves the next page of results.
1567
1568Args:
1569 previous_request: The request for the previous page. (required)
1570 previous_response: The response from the request for the previous page. (required)
1571
1572Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001573 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001574 page. Returns None if there are no more items in the collection.
1575 </pre>
1576</div>
1577
1578<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001579 <code class="details" id="listOrgPolicies">listOrgPolicies(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001580 <pre>Lists all the `Policies` set for a particular resource.
1581
1582Args:
1583 resource: string, Name of the resource to list Policies for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001584 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001585 The object takes the form of:
1586
1587{ # The request sent to the ListOrgPolicies method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001588 &quot;pageSize&quot;: 42, # Size of the pages to be returned. This is currently unsupported and will
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001589 # be ignored. The server may at any point start using this field to limit
1590 # page size.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001591 &quot;pageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently unsupported
1592 # and will be ignored. The server may at any point start using this field.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001593 }
1594
1595 x__xgafv: string, V1 error format.
1596 Allowed values
1597 1 - v1 error format
1598 2 - v2 error format
1599
1600Returns:
1601 An object of the form:
1602
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001603 { # The response returned from the `ListOrgPolicies` method. It will be empty
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001604 # if no `Policies` are set on the resource.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001605 &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently not used, but
1606 # the server may at any point start supplying a valid token.
Bu Sun Kim65020912020-05-20 12:08:20 -07001607 &quot;policies&quot;: [ # The `Policies` that are set on the resource. It will be empty if no
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001608 # `Policies` are set.
1609 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
1610 # for configurations of Cloud Platform resources.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001611 &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.
1612 # resource.
1613 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
1614 # configuration is acceptable.
1615 #
1616 # Suppose you have a `Constraint`
1617 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
1618 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
1619 # behavior:
1620 # - If the `Policy` at this resource has enforced set to `false`, serial
1621 # port connection attempts will be allowed.
1622 # - If the `Policy` at this resource has enforced set to `true`, serial
1623 # port connection attempts will be refused.
1624 # - If the `Policy` at this resource is `RestoreDefault`, serial port
1625 # connection attempts will be allowed.
1626 # - If no `Policy` is set at this resource or anywhere higher in the
1627 # resource hierarchy, serial port connection attempts will be allowed.
1628 # - If no `Policy` is set at this resource, but one exists higher in the
1629 # resource hierarchy, the behavior is as if the`Policy` were set at
1630 # this resource.
1631 #
1632 # The following examples demonstrate the different possible layerings:
1633 #
1634 # Example 1 (nearest `Constraint` wins):
1635 # `organizations/foo` has a `Policy` with:
1636 # {enforced: false}
1637 # `projects/bar` has no `Policy` set.
1638 # The constraint at `projects/bar` and `organizations/foo` will not be
1639 # enforced.
1640 #
1641 # Example 2 (enforcement gets replaced):
1642 # `organizations/foo` has a `Policy` with:
1643 # {enforced: false}
1644 # `projects/bar` has a `Policy` with:
1645 # {enforced: true}
1646 # The constraint at `organizations/foo` is not enforced.
1647 # The constraint at `projects/bar` is enforced.
1648 #
1649 # Example 3 (RestoreDefault):
1650 # `organizations/foo` has a `Policy` with:
1651 # {enforced: true}
1652 # `projects/bar` has a `Policy` with:
1653 # {RestoreDefault: {}}
1654 # The constraint at `organizations/foo` is enforced.
1655 # The constraint at `projects/bar` is not enforced, because
1656 # `constraint_default` for the `Constraint` is `ALLOW`.
1657 },
1658 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
1659 # `Constraint` type.
1660 # `constraint_default` enforcement behavior of the specific `Constraint` at
1661 # this resource.
1662 #
1663 # Suppose that `constraint_default` is set to `ALLOW` for the
1664 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
1665 # foo.com sets a `Policy` at their Organization resource node that restricts
1666 # the allowed service activations to deny all service activations. They
1667 # could then set a `Policy` with the `policy_type` `restore_default` on
1668 # several experimental projects, restoring the `constraint_default`
1669 # enforcement of the `Constraint` for only those projects, allowing those
1670 # projects to have all services activated.
1671 },
1672 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
1673 # server, not specified by the caller, and represents the last time a call to
1674 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
1675 # be ignored.
1676 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
1677 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
1678 # concurrency control.
1679 #
1680 # When the `Policy` is returned from either a `GetPolicy` or a
1681 # `ListOrgPolicy` request, this `etag` indicates the version of the current
1682 # `Policy` to use when executing a read-modify-write loop.
1683 #
1684 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
1685 # `etag` will be unset.
1686 #
1687 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
1688 # that was returned from a `GetOrgPolicy` request as part of a
1689 # read-modify-write loop for concurrency control. Not setting the `etag`in a
1690 # `SetOrgPolicy` request will result in an unconditional write of the
1691 # `Policy`.
1692 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
1693 # `constraints/serviceuser.services`.
1694 #
1695 # A [list of available
1696 # constraints](/resource-manager/docs/organization-policy/org-policy-constraints)
1697 # is available.
1698 #
1699 # Immutable after creation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001700 &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 -07001701 # resource.
1702 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001703 # `ListPolicy` can define specific values and subtrees of Cloud Resource
1704 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
1705 # are allowed or denied by setting the `allowed_values` and `denied_values`
1706 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
1707 # The `under:` prefix is used to denote resource subtree values.
1708 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -07001709 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001710 # same as values with no prefix.
1711 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -07001712 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
1713 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
1714 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001715 # The `supports_under` field of the associated `Constraint` defines whether
1716 # ancestry prefixes can be used. You can set `allowed_values` and
1717 # `denied_values` in the same `Policy` if `all_values` is
1718 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
1719 # values. If `all_values` is set to either `ALLOW` or `DENY`,
1720 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001721 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001722 &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 -07001723 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001724 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001725 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001726 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
1727 # that matches the value specified in this `Policy`. If `suggested_value`
1728 # is not set, it will inherit the value specified higher in the hierarchy,
1729 # unless `inherit_from_parent` is `false`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001730 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
1731 # is set to `ALL_VALUES_UNSPECIFIED`.
1732 &quot;A String&quot;,
1733 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001734 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001735 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001736 # By default, a `ListPolicy` set at a resource supersedes any `Policy` set
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001737 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
1738 # set to `true`, then the values from the effective `Policy` of the parent
1739 # resource are inherited, meaning the values set in this `Policy` are
1740 # added to the values inherited up the hierarchy.
1741 #
1742 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -07001743 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001744 # simple and understandable. However, it is possible to set a `Policy` with
1745 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
1746 # In this case, the values that are allowed must be in `allowed_values` and
1747 # not present in `denied_values`.
1748 #
1749 # For example, suppose you have a `Constraint`
1750 # `constraints/serviceuser.services`, which has a `constraint_type` of
1751 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
1752 # Suppose that at the Organization level, a `Policy` is applied that
1753 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
1754 # `Policy` is applied to a project below the Organization that has
1755 # `inherit_from_parent` set to `false` and field all_values set to DENY,
1756 # then an attempt to activate any API will be denied.
1757 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001758 # The following examples demonstrate different possible layerings for
1759 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001760 #
1761 # Example 1 (no inherited values):
1762 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001763 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001764 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001765 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001766 # The accepted values at `organizations/foo` are `E1`, `E2`.
1767 # The accepted values at `projects/bar` are `E3`, and `E4`.
1768 #
1769 # Example 2 (inherited values):
1770 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001771 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001772 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001773 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001774 # The accepted values at `organizations/foo` are `E1`, `E2`.
1775 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
1776 #
1777 # Example 3 (inheriting both allowed and denied values):
1778 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001779 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001780 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001781 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001782 # The accepted values at `organizations/foo` are `E1`, `E2`.
1783 # The value accepted at `projects/bar` is `E2`.
1784 #
1785 # Example 4 (RestoreDefault):
1786 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001787 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001788 # `projects/bar` has a `Policy` with values:
1789 # {RestoreDefault: {}}
1790 # The accepted values at `organizations/foo` are `E1`, `E2`.
1791 # The accepted values at `projects/bar` are either all or none depending on
1792 # the value of `constraint_default` (if `ALLOW`, all; if
1793 # `DENY`, none).
1794 #
1795 # Example 5 (no policy inherits parent policy):
1796 # `organizations/foo` has no `Policy` set.
1797 # `projects/bar` has no `Policy` set.
1798 # The accepted values at both levels are either all or none depending on
1799 # the value of `constraint_default` (if `ALLOW`, all; if
1800 # `DENY`, none).
1801 #
1802 # Example 6 (ListConstraint allowing all):
1803 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001804 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001805 # `projects/bar` has a `Policy` with:
1806 # {all: ALLOW}
1807 # The accepted values at `organizations/foo` are `E1`, E2`.
1808 # Any value is accepted at `projects/bar`.
1809 #
1810 # Example 7 (ListConstraint allowing none):
1811 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001812 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001813 # `projects/bar` has a `Policy` with:
1814 # {all: DENY}
1815 # The accepted values at `organizations/foo` are `E1`, E2`.
1816 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001817 #
1818 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
1819 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07001820 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001821 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001822 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001823 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001824 # {allowed_values: &quot;under:projects/P3&quot;}
1825 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001826 # The accepted values at `organizations/foo` are `organizations/O1`,
1827 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
1828 # `projects/P3`.
1829 # The accepted values at `projects/bar` are `organizations/O1`,
1830 # `folders/F1`, `projects/P1`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001831 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001832 },
1833 ],
1834 }</pre>
1835</div>
1836
1837<div class="method">
1838 <code class="details" id="listOrgPolicies_next">listOrgPolicies_next(previous_request, previous_response)</code>
1839 <pre>Retrieves the next page of results.
1840
1841Args:
1842 previous_request: The request for the previous page. (required)
1843 previous_response: The response from the request for the previous page. (required)
1844
1845Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001846 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001847 page. Returns None if there are no more items in the collection.
1848 </pre>
1849</div>
1850
1851<div class="method">
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001852 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1853 <pre>Retrieves the next page of results.
1854
1855Args:
1856 previous_request: The request for the previous page. (required)
1857 previous_response: The response from the request for the previous page. (required)
1858
1859Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001860 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001861 page. Returns None if there are no more items in the collection.
1862 </pre>
1863</div>
1864
1865<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001866 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001867 <pre>Sets the IAM access control policy for the specified Project.
1868
1869CAUTION: This method will replace the existing policy, and cannot be used
1870to append additional IAM settings.
1871
1872NOTE: Removing service accounts from policies or changing their roles can
1873render services completely inoperable. It is important to understand how
1874the service account is being used before removing or updating its roles.
1875
1876For additional information about `resource` (e.g. my-project-id) structure
1877and identification, see [Resource Names](/apis/design/resource_names).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001878
1879The following constraints apply when using `setIamPolicy()`:
1880
1881+ Project does not support `allUsers` and `allAuthenticatedUsers` as
1882`members` in a `Binding` of a `Policy`.
1883
Dan O'Mearadd494642020-05-01 07:42:23 -07001884+ The owner role can be granted to a `user`, `serviceAccount`, or a group
1885that is part of an organization. For example,
1886group@myownpersonaldomain.com could be added as an owner to a project in
1887the myownpersonaldomain.com organization, but not the examplepetstore.com
1888organization.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001889
1890+ Service accounts can be made owners of a project directly
1891without any restrictions. However, to be added as an owner, a user must be
1892invited via Cloud Platform console and must accept the invitation.
1893
1894+ A user cannot be granted the owner role using `setIamPolicy()`. The user
1895must be granted the owner role using the Cloud Platform Console and must
1896explicitly accept the invitation.
1897
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001898+ You can only grant ownership of a project to a member by using the
1899GCP Console. Inviting a member will deliver an invitation email that
1900they must accept. An invitation email is not generated if you are
1901granting a role other than owner, or if both the member you are inviting
1902and the project are part of your organization.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001903
1904+ Membership changes that leave the project without any owners that have
1905accepted the Terms of Service (ToS) will be rejected.
1906
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001907+ If the project is not part of an organization, there must be at least
1908one owner who has accepted the Terms of Service (ToS) agreement in the
1909policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner
1910from the policy will fail. This restriction also applies to legacy
1911projects that no longer have owners who have accepted the ToS. Edits to
1912IAM policies will be rejected until the lack of a ToS-accepting owner is
1913rectified.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001914
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001915Authorization requires the Google IAM permission
1916`resourcemanager.projects.setIamPolicy` on the project
1917
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001918Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001919 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001920See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001921 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001922 The object takes the form of:
1923
1924{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001925 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001926 # the policy is limited to a few 10s of KB. An empty policy is a
1927 # valid policy but certain Cloud Platform services (such as Projects)
1928 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07001929 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001930 #
1931 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001932 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1933 # `members` to a single `role`. Members can be user accounts, service accounts,
1934 # Google groups, and domains (such as G Suite). A `role` is a named list of
1935 # permissions; each `role` can be an IAM predefined role or a user-created
1936 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001937 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001938 # For some types of Google Cloud resources, a `binding` can also specify a
1939 # `condition`, which is a logical expression that allows access to a resource
1940 # only if the expression evaluates to `true`. A condition can add constraints
1941 # based on attributes of the request, the resource, or both. To learn which
1942 # resources support conditions in their IAM policies, see the
1943 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001944 #
1945 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001946 #
1947 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001948 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001949 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001950 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1951 # &quot;members&quot;: [
1952 # &quot;user:mike@example.com&quot;,
1953 # &quot;group:admins@example.com&quot;,
1954 # &quot;domain:google.com&quot;,
1955 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001956 # ]
1957 # },
1958 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001959 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1960 # &quot;members&quot;: [
1961 # &quot;user:eve@example.com&quot;
1962 # ],
1963 # &quot;condition&quot;: {
1964 # &quot;title&quot;: &quot;expirable access&quot;,
1965 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1966 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001967 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001968 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001969 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001970 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1971 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001972 # }
1973 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001974 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001975 #
1976 # bindings:
1977 # - members:
1978 # - user:mike@example.com
1979 # - group:admins@example.com
1980 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001981 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1982 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001983 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001984 # - user:eve@example.com
1985 # role: roles/resourcemanager.organizationViewer
1986 # condition:
1987 # title: expirable access
1988 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001989 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001990 # - etag: BwWWja0YfJA=
1991 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001992 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001993 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001994 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001995 &quot;version&quot;: 42, # Specifies the format of the policy.
1996 #
1997 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1998 # are rejected.
1999 #
2000 # Any operation that affects conditional role bindings must specify version
2001 # `3`. This requirement applies to the following operations:
2002 #
2003 # * Getting a policy that includes a conditional role binding
2004 # * Adding a conditional role binding to a policy
2005 # * Changing a conditional role binding in a policy
2006 # * Removing any role binding, with or without a condition, from a policy
2007 # that includes conditions
2008 #
2009 # **Important:** If you use IAM Conditions, you must include the `etag` field
2010 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2011 # you to overwrite a version `3` policy with a version `1` policy, and all of
2012 # the conditions in the version `3` policy are lost.
2013 #
2014 # If a policy does not include any conditions, operations on that policy may
2015 # specify any valid version or leave the field unset.
2016 #
2017 # To learn which resources support conditions in their IAM policies, see the
2018 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002019 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
2020 # prevent simultaneous updates of a policy from overwriting each other.
2021 # It is strongly suggested that systems make use of the `etag` in the
2022 # read-modify-write cycle to perform policy updates in order to avoid race
2023 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
2024 # systems are expected to put that etag in the request to `setIamPolicy` to
2025 # ensure that their change will be applied to the same version of the policy.
2026 #
2027 # **Important:** If you use IAM Conditions, you must include the `etag` field
2028 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2029 # you to overwrite a version `3` policy with a version `1` policy, and all of
2030 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07002031 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2032 { # Specifies the audit configuration for a service.
2033 # The configuration determines which permission types are logged, and what
2034 # identities, if any, are exempted from logging.
2035 # An AuditConfig must have one or more AuditLogConfigs.
2036 #
2037 # If there are AuditConfigs for both `allServices` and a specific service,
2038 # the union of the two AuditConfigs is used for that service: the log_types
2039 # specified in each AuditConfig are enabled, and the exempted_members in each
2040 # AuditLogConfig are exempted.
2041 #
2042 # Example Policy with multiple AuditConfigs:
2043 #
2044 # {
2045 # &quot;audit_configs&quot;: [
2046 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002047 # &quot;service&quot;: &quot;allServices&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07002048 # &quot;audit_log_configs&quot;: [
2049 # {
2050 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2051 # &quot;exempted_members&quot;: [
2052 # &quot;user:jose@example.com&quot;
2053 # ]
2054 # },
2055 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002056 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -07002057 # },
2058 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002059 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -07002060 # }
2061 # ]
2062 # },
2063 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002064 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07002065 # &quot;audit_log_configs&quot;: [
2066 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002067 # &quot;log_type&quot;: &quot;DATA_READ&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -07002068 # },
2069 # {
2070 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
2071 # &quot;exempted_members&quot;: [
2072 # &quot;user:aliya@example.com&quot;
2073 # ]
2074 # }
2075 # ]
2076 # }
2077 # ]
2078 # }
2079 #
2080 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
2081 # logging. It also exempts jose@example.com from DATA_READ logging, and
2082 # aliya@example.com from DATA_WRITE logging.
2083 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
2084 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
2085 # `allServices` is a special value that covers all services.
2086 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2087 { # Provides the configuration for logging a type of permissions.
2088 # Example:
2089 #
2090 # {
2091 # &quot;audit_log_configs&quot;: [
2092 # {
2093 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2094 # &quot;exempted_members&quot;: [
2095 # &quot;user:jose@example.com&quot;
2096 # ]
2097 # },
2098 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002099 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -07002100 # }
2101 # ]
2102 # }
2103 #
2104 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
2105 # jose@example.com from DATA_READ logging.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002106 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -07002107 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
2108 # permission.
2109 # Follows the same format of Binding.members.
2110 &quot;A String&quot;,
2111 ],
2112 },
2113 ],
2114 },
2115 ],
2116 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07002117 # `condition` that determines how and when the `bindings` are applied. Each
2118 # of the `bindings` must contain at least one member.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002119 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002120 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
2121 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002122 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
2123 #
2124 # If the condition evaluates to `true`, then this binding applies to the
2125 # current request.
2126 #
2127 # If the condition evaluates to `false`, then this binding does not apply to
2128 # the current request. However, a different role binding might grant the same
2129 # role to one or more of the members in this binding.
2130 #
2131 # To learn which resources support conditions in their IAM policies, see the
2132 # [IAM
2133 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2134 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2135 # are documented at https://github.com/google/cel-spec.
2136 #
2137 # Example (Comparison):
2138 #
2139 # title: &quot;Summary size limit&quot;
2140 # description: &quot;Determines if a summary is less than 100 chars&quot;
2141 # expression: &quot;document.summary.size() &lt; 100&quot;
2142 #
2143 # Example (Equality):
2144 #
2145 # title: &quot;Requestor is owner&quot;
2146 # description: &quot;Determines if requestor is the document owner&quot;
2147 # expression: &quot;document.owner == request.auth.claims.email&quot;
2148 #
2149 # Example (Logic):
2150 #
2151 # title: &quot;Public documents&quot;
2152 # description: &quot;Determine whether the document should be publicly visible&quot;
2153 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2154 #
2155 # Example (Data Manipulation):
2156 #
2157 # title: &quot;Notification string&quot;
2158 # description: &quot;Create a notification string with a timestamp.&quot;
2159 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2160 #
2161 # The exact variables and functions that may be referenced within an expression
2162 # are determined by the service that evaluates it. See the service
2163 # documentation for additional information.
2164 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2165 # its purpose. This can be used e.g. in UIs which allow to enter the
2166 # expression.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002167 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2168 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07002169 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2170 # reporting, e.g. a file name and a position in the file.
2171 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2172 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07002173 },
2174 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002175 # `members` can have the following values:
2176 #
2177 # * `allUsers`: A special identifier that represents anyone who is
2178 # on the internet; with or without a Google account.
2179 #
2180 # * `allAuthenticatedUsers`: A special identifier that represents anyone
2181 # who is authenticated with a Google account or a service account.
2182 #
2183 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07002184 # account. For example, `alice@example.com` .
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002185 #
2186 #
2187 # * `serviceAccount:{emailid}`: An email address that represents a service
2188 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
2189 #
2190 # * `group:{emailid}`: An email address that represents a Google group.
2191 # For example, `admins@example.com`.
2192 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002193 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
2194 # identifier) representing a user that has been recently deleted. For
2195 # example, `alice@example.com?uid=123456789012345678901`. If the user is
2196 # recovered, this value reverts to `user:{emailid}` and the recovered user
2197 # retains the role in the binding.
2198 #
2199 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
2200 # unique identifier) representing a service account that has been recently
2201 # deleted. For example,
2202 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
2203 # If the service account is undeleted, this value reverts to
2204 # `serviceAccount:{emailid}` and the undeleted service account retains the
2205 # role in the binding.
2206 #
2207 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
2208 # identifier) representing a Google group that has been recently
2209 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
2210 # the group is recovered, this value reverts to `group:{emailid}` and the
2211 # recovered group retains the role in the binding.
2212 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002213 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002214 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002215 # users of that domain. For example, `google.com` or `example.com`.
2216 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002217 &quot;A String&quot;,
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002218 ],
2219 },
2220 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002221 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002222 &quot;updateMask&quot;: &quot;A String&quot;, # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002223 # the fields in the mask will be modified. If no mask is provided, the
2224 # following default mask is used:
Dan O'Mearadd494642020-05-01 07:42:23 -07002225 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002226 # `paths: &quot;bindings, etag&quot;`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002227 }
2228
2229 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002230 Allowed values
2231 1 - v1 error format
2232 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002233
2234Returns:
2235 An object of the form:
2236
Dan O'Mearadd494642020-05-01 07:42:23 -07002237 { # An Identity and Access Management (IAM) policy, which specifies access
2238 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002239 #
2240 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002241 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
2242 # `members` to a single `role`. Members can be user accounts, service accounts,
2243 # Google groups, and domains (such as G Suite). A `role` is a named list of
2244 # permissions; each `role` can be an IAM predefined role or a user-created
2245 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002246 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002247 # For some types of Google Cloud resources, a `binding` can also specify a
2248 # `condition`, which is a logical expression that allows access to a resource
2249 # only if the expression evaluates to `true`. A condition can add constraints
2250 # based on attributes of the request, the resource, or both. To learn which
2251 # resources support conditions in their IAM policies, see the
2252 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07002253 #
2254 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002255 #
2256 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07002257 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002258 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07002259 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
2260 # &quot;members&quot;: [
2261 # &quot;user:mike@example.com&quot;,
2262 # &quot;group:admins@example.com&quot;,
2263 # &quot;domain:google.com&quot;,
2264 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002265 # ]
2266 # },
2267 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07002268 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
2269 # &quot;members&quot;: [
2270 # &quot;user:eve@example.com&quot;
2271 # ],
2272 # &quot;condition&quot;: {
2273 # &quot;title&quot;: &quot;expirable access&quot;,
2274 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
2275 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002276 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002277 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07002278 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002279 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
2280 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002281 # }
2282 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002283 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002284 #
2285 # bindings:
2286 # - members:
2287 # - user:mike@example.com
2288 # - group:admins@example.com
2289 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07002290 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
2291 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002292 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07002293 # - user:eve@example.com
2294 # role: roles/resourcemanager.organizationViewer
2295 # condition:
2296 # title: expirable access
2297 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07002298 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07002299 # - etag: BwWWja0YfJA=
2300 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002301 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002302 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07002303 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07002304 &quot;version&quot;: 42, # Specifies the format of the policy.
2305 #
2306 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
2307 # are rejected.
2308 #
2309 # Any operation that affects conditional role bindings must specify version
2310 # `3`. This requirement applies to the following operations:
2311 #
2312 # * Getting a policy that includes a conditional role binding
2313 # * Adding a conditional role binding to a policy
2314 # * Changing a conditional role binding in a policy
2315 # * Removing any role binding, with or without a condition, from a policy
2316 # that includes conditions
2317 #
2318 # **Important:** If you use IAM Conditions, you must include the `etag` field
2319 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2320 # you to overwrite a version `3` policy with a version `1` policy, and all of
2321 # the conditions in the version `3` policy are lost.
2322 #
2323 # If a policy does not include any conditions, operations on that policy may
2324 # specify any valid version or leave the field unset.
2325 #
2326 # To learn which resources support conditions in their IAM policies, see the
2327 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002328 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
2329 # prevent simultaneous updates of a policy from overwriting each other.
2330 # It is strongly suggested that systems make use of the `etag` in the
2331 # read-modify-write cycle to perform policy updates in order to avoid race
2332 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
2333 # systems are expected to put that etag in the request to `setIamPolicy` to
2334 # ensure that their change will be applied to the same version of the policy.
2335 #
2336 # **Important:** If you use IAM Conditions, you must include the `etag` field
2337 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2338 # you to overwrite a version `3` policy with a version `1` policy, and all of
2339 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07002340 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2341 { # Specifies the audit configuration for a service.
2342 # The configuration determines which permission types are logged, and what
2343 # identities, if any, are exempted from logging.
2344 # An AuditConfig must have one or more AuditLogConfigs.
2345 #
2346 # If there are AuditConfigs for both `allServices` and a specific service,
2347 # the union of the two AuditConfigs is used for that service: the log_types
2348 # specified in each AuditConfig are enabled, and the exempted_members in each
2349 # AuditLogConfig are exempted.
2350 #
2351 # Example Policy with multiple AuditConfigs:
2352 #
2353 # {
2354 # &quot;audit_configs&quot;: [
2355 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002356 # &quot;service&quot;: &quot;allServices&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07002357 # &quot;audit_log_configs&quot;: [
2358 # {
2359 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2360 # &quot;exempted_members&quot;: [
2361 # &quot;user:jose@example.com&quot;
2362 # ]
2363 # },
2364 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002365 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -07002366 # },
2367 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002368 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -07002369 # }
2370 # ]
2371 # },
2372 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002373 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07002374 # &quot;audit_log_configs&quot;: [
2375 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002376 # &quot;log_type&quot;: &quot;DATA_READ&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -07002377 # },
2378 # {
2379 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
2380 # &quot;exempted_members&quot;: [
2381 # &quot;user:aliya@example.com&quot;
2382 # ]
2383 # }
2384 # ]
2385 # }
2386 # ]
2387 # }
2388 #
2389 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
2390 # logging. It also exempts jose@example.com from DATA_READ logging, and
2391 # aliya@example.com from DATA_WRITE logging.
2392 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
2393 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
2394 # `allServices` is a special value that covers all services.
2395 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2396 { # Provides the configuration for logging a type of permissions.
2397 # Example:
2398 #
2399 # {
2400 # &quot;audit_log_configs&quot;: [
2401 # {
2402 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2403 # &quot;exempted_members&quot;: [
2404 # &quot;user:jose@example.com&quot;
2405 # ]
2406 # },
2407 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002408 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -07002409 # }
2410 # ]
2411 # }
2412 #
2413 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
2414 # jose@example.com from DATA_READ logging.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002415 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -07002416 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
2417 # permission.
2418 # Follows the same format of Binding.members.
2419 &quot;A String&quot;,
2420 ],
2421 },
2422 ],
2423 },
2424 ],
2425 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07002426 # `condition` that determines how and when the `bindings` are applied. Each
2427 # of the `bindings` must contain at least one member.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002428 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002429 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
2430 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002431 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
2432 #
2433 # If the condition evaluates to `true`, then this binding applies to the
2434 # current request.
2435 #
2436 # If the condition evaluates to `false`, then this binding does not apply to
2437 # the current request. However, a different role binding might grant the same
2438 # role to one or more of the members in this binding.
2439 #
2440 # To learn which resources support conditions in their IAM policies, see the
2441 # [IAM
2442 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2443 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2444 # are documented at https://github.com/google/cel-spec.
2445 #
2446 # Example (Comparison):
2447 #
2448 # title: &quot;Summary size limit&quot;
2449 # description: &quot;Determines if a summary is less than 100 chars&quot;
2450 # expression: &quot;document.summary.size() &lt; 100&quot;
2451 #
2452 # Example (Equality):
2453 #
2454 # title: &quot;Requestor is owner&quot;
2455 # description: &quot;Determines if requestor is the document owner&quot;
2456 # expression: &quot;document.owner == request.auth.claims.email&quot;
2457 #
2458 # Example (Logic):
2459 #
2460 # title: &quot;Public documents&quot;
2461 # description: &quot;Determine whether the document should be publicly visible&quot;
2462 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2463 #
2464 # Example (Data Manipulation):
2465 #
2466 # title: &quot;Notification string&quot;
2467 # description: &quot;Create a notification string with a timestamp.&quot;
2468 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2469 #
2470 # The exact variables and functions that may be referenced within an expression
2471 # are determined by the service that evaluates it. See the service
2472 # documentation for additional information.
2473 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2474 # its purpose. This can be used e.g. in UIs which allow to enter the
2475 # expression.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002476 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2477 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07002478 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2479 # reporting, e.g. a file name and a position in the file.
2480 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2481 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07002482 },
2483 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002484 # `members` can have the following values:
2485 #
2486 # * `allUsers`: A special identifier that represents anyone who is
2487 # on the internet; with or without a Google account.
2488 #
2489 # * `allAuthenticatedUsers`: A special identifier that represents anyone
2490 # who is authenticated with a Google account or a service account.
2491 #
2492 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07002493 # account. For example, `alice@example.com` .
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002494 #
2495 #
2496 # * `serviceAccount:{emailid}`: An email address that represents a service
2497 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
2498 #
2499 # * `group:{emailid}`: An email address that represents a Google group.
2500 # For example, `admins@example.com`.
2501 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002502 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
2503 # identifier) representing a user that has been recently deleted. For
2504 # example, `alice@example.com?uid=123456789012345678901`. If the user is
2505 # recovered, this value reverts to `user:{emailid}` and the recovered user
2506 # retains the role in the binding.
2507 #
2508 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
2509 # unique identifier) representing a service account that has been recently
2510 # deleted. For example,
2511 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
2512 # If the service account is undeleted, this value reverts to
2513 # `serviceAccount:{emailid}` and the undeleted service account retains the
2514 # role in the binding.
2515 #
2516 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
2517 # identifier) representing a Google group that has been recently
2518 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
2519 # the group is recovered, this value reverts to `group:{emailid}` and the
2520 # recovered group retains the role in the binding.
2521 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002522 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002523 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002524 # users of that domain. For example, `google.com` or `example.com`.
2525 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002526 &quot;A String&quot;,
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002527 ],
2528 },
2529 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002530 }</pre>
2531</div>
2532
2533<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002534 <code class="details" id="setOrgPolicy">setOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002535 <pre>Updates the specified `Policy` on the resource. Creates a new `Policy` for
2536that `Constraint` on the resource if one does not exist.
2537
2538Not supplying an `etag` on the request `Policy` results in an unconditional
2539write of the `Policy`.
2540
2541Args:
2542 resource: string, Resource name of the resource to attach the `Policy`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002543 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002544 The object takes the form of:
2545
2546{ # The request sent to the SetOrgPolicyRequest method.
Bu Sun Kim65020912020-05-20 12:08:20 -07002547 &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 -07002548 # for configurations of Cloud Platform resources.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002549 &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.
2550 # resource.
2551 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
2552 # configuration is acceptable.
2553 #
2554 # Suppose you have a `Constraint`
2555 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
2556 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
2557 # behavior:
2558 # - If the `Policy` at this resource has enforced set to `false`, serial
2559 # port connection attempts will be allowed.
2560 # - If the `Policy` at this resource has enforced set to `true`, serial
2561 # port connection attempts will be refused.
2562 # - If the `Policy` at this resource is `RestoreDefault`, serial port
2563 # connection attempts will be allowed.
2564 # - If no `Policy` is set at this resource or anywhere higher in the
2565 # resource hierarchy, serial port connection attempts will be allowed.
2566 # - If no `Policy` is set at this resource, but one exists higher in the
2567 # resource hierarchy, the behavior is as if the`Policy` were set at
2568 # this resource.
2569 #
2570 # The following examples demonstrate the different possible layerings:
2571 #
2572 # Example 1 (nearest `Constraint` wins):
2573 # `organizations/foo` has a `Policy` with:
2574 # {enforced: false}
2575 # `projects/bar` has no `Policy` set.
2576 # The constraint at `projects/bar` and `organizations/foo` will not be
2577 # enforced.
2578 #
2579 # Example 2 (enforcement gets replaced):
2580 # `organizations/foo` has a `Policy` with:
2581 # {enforced: false}
2582 # `projects/bar` has a `Policy` with:
2583 # {enforced: true}
2584 # The constraint at `organizations/foo` is not enforced.
2585 # The constraint at `projects/bar` is enforced.
2586 #
2587 # Example 3 (RestoreDefault):
2588 # `organizations/foo` has a `Policy` with:
2589 # {enforced: true}
2590 # `projects/bar` has a `Policy` with:
2591 # {RestoreDefault: {}}
2592 # The constraint at `organizations/foo` is enforced.
2593 # The constraint at `projects/bar` is not enforced, because
2594 # `constraint_default` for the `Constraint` is `ALLOW`.
2595 },
2596 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
2597 # `Constraint` type.
2598 # `constraint_default` enforcement behavior of the specific `Constraint` at
2599 # this resource.
2600 #
2601 # Suppose that `constraint_default` is set to `ALLOW` for the
2602 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
2603 # foo.com sets a `Policy` at their Organization resource node that restricts
2604 # the allowed service activations to deny all service activations. They
2605 # could then set a `Policy` with the `policy_type` `restore_default` on
2606 # several experimental projects, restoring the `constraint_default`
2607 # enforcement of the `Constraint` for only those projects, allowing those
2608 # projects to have all services activated.
2609 },
2610 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
2611 # server, not specified by the caller, and represents the last time a call to
2612 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
2613 # be ignored.
2614 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
2615 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
2616 # concurrency control.
2617 #
2618 # When the `Policy` is returned from either a `GetPolicy` or a
2619 # `ListOrgPolicy` request, this `etag` indicates the version of the current
2620 # `Policy` to use when executing a read-modify-write loop.
2621 #
2622 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
2623 # `etag` will be unset.
2624 #
2625 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
2626 # that was returned from a `GetOrgPolicy` request as part of a
2627 # read-modify-write loop for concurrency control. Not setting the `etag`in a
2628 # `SetOrgPolicy` request will result in an unconditional write of the
2629 # `Policy`.
2630 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
2631 # `constraints/serviceuser.services`.
2632 #
2633 # A [list of available
2634 # constraints](/resource-manager/docs/organization-policy/org-policy-constraints)
2635 # is available.
2636 #
2637 # Immutable after creation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002638 &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 -07002639 # resource.
2640 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002641 # `ListPolicy` can define specific values and subtrees of Cloud Resource
2642 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
2643 # are allowed or denied by setting the `allowed_values` and `denied_values`
2644 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
2645 # The `under:` prefix is used to denote resource subtree values.
2646 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -07002647 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002648 # same as values with no prefix.
2649 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -07002650 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
2651 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
2652 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002653 # The `supports_under` field of the associated `Constraint` defines whether
2654 # ancestry prefixes can be used. You can set `allowed_values` and
2655 # `denied_values` in the same `Policy` if `all_values` is
2656 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
2657 # values. If `all_values` is set to either `ALLOW` or `DENY`,
2658 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002659 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002660 &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 -07002661 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002662 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002663 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002664 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
2665 # that matches the value specified in this `Policy`. If `suggested_value`
2666 # is not set, it will inherit the value specified higher in the hierarchy,
2667 # unless `inherit_from_parent` is `false`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002668 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
2669 # is set to `ALL_VALUES_UNSPECIFIED`.
2670 &quot;A String&quot;,
2671 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002672 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002673 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002674 # By default, a `ListPolicy` set at a resource supersedes any `Policy` set
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002675 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
2676 # set to `true`, then the values from the effective `Policy` of the parent
2677 # resource are inherited, meaning the values set in this `Policy` are
2678 # added to the values inherited up the hierarchy.
2679 #
2680 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -07002681 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002682 # simple and understandable. However, it is possible to set a `Policy` with
2683 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
2684 # In this case, the values that are allowed must be in `allowed_values` and
2685 # not present in `denied_values`.
2686 #
2687 # For example, suppose you have a `Constraint`
2688 # `constraints/serviceuser.services`, which has a `constraint_type` of
2689 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
2690 # Suppose that at the Organization level, a `Policy` is applied that
2691 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
2692 # `Policy` is applied to a project below the Organization that has
2693 # `inherit_from_parent` set to `false` and field all_values set to DENY,
2694 # then an attempt to activate any API will be denied.
2695 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002696 # The following examples demonstrate different possible layerings for
2697 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002698 #
2699 # Example 1 (no inherited values):
2700 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002701 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002702 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002703 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002704 # The accepted values at `organizations/foo` are `E1`, `E2`.
2705 # The accepted values at `projects/bar` are `E3`, and `E4`.
2706 #
2707 # Example 2 (inherited values):
2708 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002709 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002710 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002711 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002712 # The accepted values at `organizations/foo` are `E1`, `E2`.
2713 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
2714 #
2715 # Example 3 (inheriting both allowed and denied values):
2716 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002717 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002718 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07002719 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002720 # The accepted values at `organizations/foo` are `E1`, `E2`.
2721 # The value accepted at `projects/bar` is `E2`.
2722 #
2723 # Example 4 (RestoreDefault):
2724 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002725 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002726 # `projects/bar` has a `Policy` with values:
2727 # {RestoreDefault: {}}
2728 # The accepted values at `organizations/foo` are `E1`, `E2`.
2729 # The accepted values at `projects/bar` are either all or none depending on
2730 # the value of `constraint_default` (if `ALLOW`, all; if
2731 # `DENY`, none).
2732 #
2733 # Example 5 (no policy inherits parent policy):
2734 # `organizations/foo` has no `Policy` set.
2735 # `projects/bar` has no `Policy` set.
2736 # The accepted values at both levels are either all or none depending on
2737 # the value of `constraint_default` (if `ALLOW`, all; if
2738 # `DENY`, none).
2739 #
2740 # Example 6 (ListConstraint allowing all):
2741 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002742 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002743 # `projects/bar` has a `Policy` with:
2744 # {all: ALLOW}
2745 # The accepted values at `organizations/foo` are `E1`, E2`.
2746 # Any value is accepted at `projects/bar`.
2747 #
2748 # Example 7 (ListConstraint allowing none):
2749 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002750 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002751 # `projects/bar` has a `Policy` with:
2752 # {all: DENY}
2753 # The accepted values at `organizations/foo` are `E1`, E2`.
2754 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002755 #
2756 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
2757 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07002758 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002759 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002760 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002761 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07002762 # {allowed_values: &quot;under:projects/P3&quot;}
2763 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002764 # The accepted values at `organizations/foo` are `organizations/O1`,
2765 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
2766 # `projects/P3`.
2767 # The accepted values at `projects/bar` are `organizations/O1`,
2768 # `folders/F1`, `projects/P1`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002769 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002770 },
2771 }
2772
2773 x__xgafv: string, V1 error format.
2774 Allowed values
2775 1 - v1 error format
2776 2 - v2 error format
2777
2778Returns:
2779 An object of the form:
2780
2781 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
2782 # for configurations of Cloud Platform resources.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002783 &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.
2784 # resource.
2785 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
2786 # configuration is acceptable.
2787 #
2788 # Suppose you have a `Constraint`
2789 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
2790 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
2791 # behavior:
2792 # - If the `Policy` at this resource has enforced set to `false`, serial
2793 # port connection attempts will be allowed.
2794 # - If the `Policy` at this resource has enforced set to `true`, serial
2795 # port connection attempts will be refused.
2796 # - If the `Policy` at this resource is `RestoreDefault`, serial port
2797 # connection attempts will be allowed.
2798 # - If no `Policy` is set at this resource or anywhere higher in the
2799 # resource hierarchy, serial port connection attempts will be allowed.
2800 # - If no `Policy` is set at this resource, but one exists higher in the
2801 # resource hierarchy, the behavior is as if the`Policy` were set at
2802 # this resource.
2803 #
2804 # The following examples demonstrate the different possible layerings:
2805 #
2806 # Example 1 (nearest `Constraint` wins):
2807 # `organizations/foo` has a `Policy` with:
2808 # {enforced: false}
2809 # `projects/bar` has no `Policy` set.
2810 # The constraint at `projects/bar` and `organizations/foo` will not be
2811 # enforced.
2812 #
2813 # Example 2 (enforcement gets replaced):
2814 # `organizations/foo` has a `Policy` with:
2815 # {enforced: false}
2816 # `projects/bar` has a `Policy` with:
2817 # {enforced: true}
2818 # The constraint at `organizations/foo` is not enforced.
2819 # The constraint at `projects/bar` is enforced.
2820 #
2821 # Example 3 (RestoreDefault):
2822 # `organizations/foo` has a `Policy` with:
2823 # {enforced: true}
2824 # `projects/bar` has a `Policy` with:
2825 # {RestoreDefault: {}}
2826 # The constraint at `organizations/foo` is enforced.
2827 # The constraint at `projects/bar` is not enforced, because
2828 # `constraint_default` for the `Constraint` is `ALLOW`.
2829 },
2830 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
2831 # `Constraint` type.
2832 # `constraint_default` enforcement behavior of the specific `Constraint` at
2833 # this resource.
2834 #
2835 # Suppose that `constraint_default` is set to `ALLOW` for the
2836 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
2837 # foo.com sets a `Policy` at their Organization resource node that restricts
2838 # the allowed service activations to deny all service activations. They
2839 # could then set a `Policy` with the `policy_type` `restore_default` on
2840 # several experimental projects, restoring the `constraint_default`
2841 # enforcement of the `Constraint` for only those projects, allowing those
2842 # projects to have all services activated.
2843 },
2844 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
2845 # server, not specified by the caller, and represents the last time a call to
2846 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
2847 # be ignored.
2848 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
2849 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
2850 # concurrency control.
2851 #
2852 # When the `Policy` is returned from either a `GetPolicy` or a
2853 # `ListOrgPolicy` request, this `etag` indicates the version of the current
2854 # `Policy` to use when executing a read-modify-write loop.
2855 #
2856 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
2857 # `etag` will be unset.
2858 #
2859 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
2860 # that was returned from a `GetOrgPolicy` request as part of a
2861 # read-modify-write loop for concurrency control. Not setting the `etag`in a
2862 # `SetOrgPolicy` request will result in an unconditional write of the
2863 # `Policy`.
2864 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
2865 # `constraints/serviceuser.services`.
2866 #
2867 # A [list of available
2868 # constraints](/resource-manager/docs/organization-policy/org-policy-constraints)
2869 # is available.
2870 #
2871 # Immutable after creation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002872 &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 -07002873 # resource.
2874 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002875 # `ListPolicy` can define specific values and subtrees of Cloud Resource
2876 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
2877 # are allowed or denied by setting the `allowed_values` and `denied_values`
2878 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
2879 # The `under:` prefix is used to denote resource subtree values.
2880 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -07002881 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002882 # same as values with no prefix.
2883 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -07002884 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
2885 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
2886 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002887 # The `supports_under` field of the associated `Constraint` defines whether
2888 # ancestry prefixes can be used. You can set `allowed_values` and
2889 # `denied_values` in the same `Policy` if `all_values` is
2890 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
2891 # values. If `all_values` is set to either `ALLOW` or `DENY`,
2892 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002893 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002894 &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 -07002895 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002896 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002897 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002898 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
2899 # that matches the value specified in this `Policy`. If `suggested_value`
2900 # is not set, it will inherit the value specified higher in the hierarchy,
2901 # unless `inherit_from_parent` is `false`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002902 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
2903 # is set to `ALL_VALUES_UNSPECIFIED`.
2904 &quot;A String&quot;,
2905 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002906 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002907 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002908 # By default, a `ListPolicy` set at a resource supersedes any `Policy` set
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002909 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
2910 # set to `true`, then the values from the effective `Policy` of the parent
2911 # resource are inherited, meaning the values set in this `Policy` are
2912 # added to the values inherited up the hierarchy.
2913 #
2914 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -07002915 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002916 # simple and understandable. However, it is possible to set a `Policy` with
2917 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
2918 # In this case, the values that are allowed must be in `allowed_values` and
2919 # not present in `denied_values`.
2920 #
2921 # For example, suppose you have a `Constraint`
2922 # `constraints/serviceuser.services`, which has a `constraint_type` of
2923 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
2924 # Suppose that at the Organization level, a `Policy` is applied that
2925 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
2926 # `Policy` is applied to a project below the Organization that has
2927 # `inherit_from_parent` set to `false` and field all_values set to DENY,
2928 # then an attempt to activate any API will be denied.
2929 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002930 # The following examples demonstrate different possible layerings for
2931 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002932 #
2933 # Example 1 (no inherited values):
2934 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002935 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002936 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002937 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002938 # The accepted values at `organizations/foo` are `E1`, `E2`.
2939 # The accepted values at `projects/bar` are `E3`, and `E4`.
2940 #
2941 # Example 2 (inherited values):
2942 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002943 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002944 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002945 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002946 # The accepted values at `organizations/foo` are `E1`, `E2`.
2947 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
2948 #
2949 # Example 3 (inheriting both allowed and denied values):
2950 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002951 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002952 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07002953 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002954 # The accepted values at `organizations/foo` are `E1`, `E2`.
2955 # The value accepted at `projects/bar` is `E2`.
2956 #
2957 # Example 4 (RestoreDefault):
2958 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002959 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002960 # `projects/bar` has a `Policy` with values:
2961 # {RestoreDefault: {}}
2962 # The accepted values at `organizations/foo` are `E1`, `E2`.
2963 # The accepted values at `projects/bar` are either all or none depending on
2964 # the value of `constraint_default` (if `ALLOW`, all; if
2965 # `DENY`, none).
2966 #
2967 # Example 5 (no policy inherits parent policy):
2968 # `organizations/foo` has no `Policy` set.
2969 # `projects/bar` has no `Policy` set.
2970 # The accepted values at both levels are either all or none depending on
2971 # the value of `constraint_default` (if `ALLOW`, all; if
2972 # `DENY`, none).
2973 #
2974 # Example 6 (ListConstraint allowing all):
2975 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002976 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002977 # `projects/bar` has a `Policy` with:
2978 # {all: ALLOW}
2979 # The accepted values at `organizations/foo` are `E1`, E2`.
2980 # Any value is accepted at `projects/bar`.
2981 #
2982 # Example 7 (ListConstraint allowing none):
2983 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002984 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002985 # `projects/bar` has a `Policy` with:
2986 # {all: DENY}
2987 # The accepted values at `organizations/foo` are `E1`, E2`.
2988 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002989 #
2990 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
2991 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07002992 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002993 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002994 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002995 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07002996 # {allowed_values: &quot;under:projects/P3&quot;}
2997 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002998 # The accepted values at `organizations/foo` are `organizations/O1`,
2999 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
3000 # `projects/P3`.
3001 # The accepted values at `projects/bar` are `organizations/O1`,
3002 # `folders/F1`, `projects/P1`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003003 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07003004 }</pre>
3005</div>
3006
3007<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003008 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003009 <pre>Returns permissions that a caller has on the specified Project.
3010
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003011For additional information about `resource` (e.g. my-project-id) structure
3012and identification, see [Resource Names](/apis/design/resource_names).
3013
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003014There are no permissions required for making this API call.
3015
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003016Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003017 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003018See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003019 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003020 The object takes the form of:
3021
3022{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07003023 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
3024 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003025 # information see
3026 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07003027 &quot;A String&quot;,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003028 ],
3029 }
3030
3031 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003032 Allowed values
3033 1 - v1 error format
3034 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003035
3036Returns:
3037 An object of the form:
3038
3039 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07003040 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003041 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07003042 &quot;A String&quot;,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003043 ],
3044 }</pre>
3045</div>
3046
3047<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003048 <code class="details" id="undelete">undelete(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003049 <pre>Restores the Project identified by the specified
3050`project_id` (for example, `my-project-123`).
3051You can only use this method for a Project that has a lifecycle state of
3052DELETE_REQUESTED.
3053After deletion starts, the Project cannot be restored.
3054
3055The caller must have modify permissions for this Project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003056
3057Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003058 projectId: string, The project ID (for example, `foo-bar-123`).
3059
3060Required. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003061 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003062 The object takes the form of:
3063
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003064{ # The request sent to the UndeleteProject
3065 # method.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003066 }
3067
3068 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003069 Allowed values
3070 1 - v1 error format
3071 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003072
3073Returns:
3074 An object of the form:
3075
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003076 { # A generic empty message that you can re-use to avoid defining duplicated
3077 # empty messages in your APIs. A typical example is to use it as the request
3078 # or the response type of an API method. For instance:
3079 #
3080 # service Foo {
3081 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
3082 # }
3083 #
3084 # The JSON representation for `Empty` is empty JSON object `{}`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003085 }</pre>
3086</div>
3087
3088<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003089 <code class="details" id="update">update(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003090 <pre>Updates the attributes of the Project identified by the specified
3091`project_id` (for example, `my-project-123`).
3092
3093The caller must have modify permissions for this Project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003094
3095Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003096 projectId: string, The project ID (for example, `my-project-123`).
3097
3098Required. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003099 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003100 The object takes the form of:
3101
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003102{ # A Project is a high-level Google Cloud Platform entity. It is a
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003103 # container for ACLs, APIs, App Engine Apps, VMs, and other
3104 # Google Cloud Platform resources.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003105 &quot;projectNumber&quot;: &quot;A String&quot;, # The number uniquely identifying the project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003106 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003107 # Example: &lt;code&gt;415104041262&lt;/code&gt;
3108 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003109 &quot;projectId&quot;: &quot;A String&quot;, # The unique, user-assigned ID of the Project.
3110 # It must be 6 to 30 lowercase letters, digits, or hyphens.
3111 # It must start with a letter.
3112 # Trailing hyphens are prohibited.
3113 #
3114 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
3115 # Read-only after creation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003116 &quot;createTime&quot;: &quot;A String&quot;, # Creation time.
3117 #
3118 # Read-only.
3119 &quot;labels&quot;: { # The labels associated with this Project.
3120 #
3121 # Label keys must be between 1 and 63 characters long and must conform
3122 # to the following regular expression: a-z{0,62}.
3123 #
3124 # Label values must be between 0 and 63 characters long and must conform
3125 # to the regular expression [a-z0-9_-]{0,63}. A label value can be empty.
3126 #
3127 # No more than 256 labels can be associated with a given resource.
3128 #
3129 # Clients should store labels in a representation such as JSON that does not
3130 # depend on specific characters being disallowed.
3131 #
3132 # Example: &lt;code&gt;&quot;environment&quot; : &quot;dev&quot;&lt;/code&gt;
3133 # Read-write.
3134 &quot;a_key&quot;: &quot;A String&quot;,
3135 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003136 &quot;lifecycleState&quot;: &quot;A String&quot;, # The Project lifecycle state.
3137 #
3138 # Read-only.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003139 &quot;name&quot;: &quot;A String&quot;, # The optional user-assigned display name of the Project.
3140 # When present it must be between 4 to 30 characters.
3141 # Allowed characters are: lowercase and uppercase letters, numbers,
3142 # hyphen, single-quote, double-quote, space, and exclamation point.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003143 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003144 # Example: &lt;code&gt;My Project&lt;/code&gt;
3145 # Read-write.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003146 &quot;parent&quot;: { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
3147 #
3148 # Supported parent types include &quot;organization&quot; and &quot;folder&quot;. Once set, the
3149 # parent cannot be cleared. The `parent` can be set on creation or using the
3150 # `UpdateProject` method; the end user must have the
3151 # `resourcemanager.projects.create` permission on the parent.
3152 #
3153 # Read-write.
3154 # Cloud Platform is a generic term for something you (a developer) may want to
3155 # interact with through one of our API&#x27;s. Some examples are an App Engine app,
3156 # a Compute Engine instance, a Cloud SQL database, and so on.
3157 &quot;type&quot;: &quot;A String&quot;, # Required field representing the resource type this id is for.
3158 # At present, the valid types are: &quot;organization&quot;, &quot;folder&quot;, and &quot;project&quot;.
3159 &quot;id&quot;: &quot;A String&quot;, # Required field for the type-specific id. This should correspond to the id
3160 # used in the type-specific API&#x27;s.
3161 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003162 }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003163
3164 x__xgafv: string, V1 error format.
3165 Allowed values
3166 1 - v1 error format
3167 2 - v2 error format
3168
3169Returns:
3170 An object of the form:
3171
3172 { # A Project is a high-level Google Cloud Platform entity. It is a
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003173 # container for ACLs, APIs, App Engine Apps, VMs, and other
3174 # Google Cloud Platform resources.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003175 &quot;projectNumber&quot;: &quot;A String&quot;, # The number uniquely identifying the project.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003176 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003177 # Example: &lt;code&gt;415104041262&lt;/code&gt;
3178 # Read-only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003179 &quot;projectId&quot;: &quot;A String&quot;, # The unique, user-assigned ID of the Project.
3180 # It must be 6 to 30 lowercase letters, digits, or hyphens.
3181 # It must start with a letter.
3182 # Trailing hyphens are prohibited.
3183 #
3184 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
3185 # Read-only after creation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003186 &quot;createTime&quot;: &quot;A String&quot;, # Creation time.
3187 #
3188 # Read-only.
3189 &quot;labels&quot;: { # The labels associated with this Project.
3190 #
3191 # Label keys must be between 1 and 63 characters long and must conform
3192 # to the following regular expression: a-z{0,62}.
3193 #
3194 # Label values must be between 0 and 63 characters long and must conform
3195 # to the regular expression [a-z0-9_-]{0,63}. A label value can be empty.
3196 #
3197 # No more than 256 labels can be associated with a given resource.
3198 #
3199 # Clients should store labels in a representation such as JSON that does not
3200 # depend on specific characters being disallowed.
3201 #
3202 # Example: &lt;code&gt;&quot;environment&quot; : &quot;dev&quot;&lt;/code&gt;
3203 # Read-write.
3204 &quot;a_key&quot;: &quot;A String&quot;,
3205 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003206 &quot;lifecycleState&quot;: &quot;A String&quot;, # The Project lifecycle state.
3207 #
3208 # Read-only.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003209 &quot;name&quot;: &quot;A String&quot;, # The optional user-assigned display name of the Project.
3210 # When present it must be between 4 to 30 characters.
3211 # Allowed characters are: lowercase and uppercase letters, numbers,
3212 # hyphen, single-quote, double-quote, space, and exclamation point.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003213 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003214 # Example: &lt;code&gt;My Project&lt;/code&gt;
3215 # Read-write.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003216 &quot;parent&quot;: { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
3217 #
3218 # Supported parent types include &quot;organization&quot; and &quot;folder&quot;. Once set, the
3219 # parent cannot be cleared. The `parent` can be set on creation or using the
3220 # `UpdateProject` method; the end user must have the
3221 # `resourcemanager.projects.create` permission on the parent.
3222 #
3223 # Read-write.
3224 # Cloud Platform is a generic term for something you (a developer) may want to
3225 # interact with through one of our API&#x27;s. Some examples are an App Engine app,
3226 # a Compute Engine instance, a Cloud SQL database, and so on.
3227 &quot;type&quot;: &quot;A String&quot;, # Required field representing the resource type this id is for.
3228 # At present, the valid types are: &quot;organization&quot;, &quot;folder&quot;, and &quot;project&quot;.
3229 &quot;id&quot;: &quot;A String&quot;, # Required field for the type-specific id. This should correspond to the id
3230 # used in the type-specific API&#x27;s.
3231 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003232 }</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003233</div>
3234
3235</body></html>