blob: 6a891b82bc141e389c02d3b437fb2d93962b37e0 [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 Kim715bd7f2019-06-14 16:50:42 -0700102 <code><a href="#list">list(pageSize=None, pageToken=None, x__xgafv=None, filter=None)</a></code></p>
103<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 Kim715bd7f2019-06-14 16:50:42 -0700121<p class="firstline">Sets the IAM access control policy for the specified Project. Overwrites</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.
145 "etag": "A String", # The current version, for concurrency control. Not sending an `etag`
146 # will cause the `Policy` to be cleared blindly.
147 "constraint": "A String", # Name of the `Constraint` of the `Policy` to clear.
148 }
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
Dan O'Mearadd494642020-05-01 07:42:23 -0700193 # container for ACLs, APIs, App Engine Apps, VMs, and other
194 # Google Cloud Platform resources.
195 "name": "A String", # The optional user-assigned display name of the Project.
196 # When present it must be between 4 to 30 characters.
197 # Allowed characters are: lowercase and uppercase letters, numbers,
198 # hyphen, single-quote, double-quote, space, and exclamation point.
199 #
200 # Example: &lt;code&gt;My Project&lt;/code&gt;
201 # Read-write.
202 "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
203 #
204 # Supported parent types include "organization" and "folder". Once set, the
205 # parent cannot be cleared. The `parent` can be set on creation or using the
206 # `UpdateProject` method; the end user must have the
207 # `resourcemanager.projects.create` permission on the parent.
208 #
209 # Read-write.
210 # Cloud Platform is a generic term for something you (a developer) may want to
211 # interact with through one of our API's. Some examples are an App Engine app,
212 # a Compute Engine instance, a Cloud SQL database, and so on.
213 "type": "A String", # Required field representing the resource type this id is for.
214 # At present, the valid types are: "organization", "folder", and "project".
215 "id": "A String", # Required field for the type-specific id. This should correspond to the id
216 # used in the type-specific API's.
217 },
218 "projectId": "A String", # The unique, user-assigned ID of the Project.
219 # It must be 6 to 30 lowercase letters, digits, or hyphens.
220 # It must start with a letter.
221 # Trailing hyphens are prohibited.
222 #
223 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
224 # Read-only after creation.
225 "labels": { # The labels associated with this Project.
226 #
227 # Label keys must be between 1 and 63 characters long and must conform
228 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
229 #
230 # Label values must be between 0 and 63 characters long and must conform
231 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
232 # value can be empty.
233 #
234 # No more than 256 labels can be associated with a given resource.
235 #
236 # Clients should store labels in a representation such as JSON that does not
237 # depend on specific characters being disallowed.
238 #
239 # Example: &lt;code&gt;"environment" : "dev"&lt;/code&gt;
240 # Read-write.
241 "a_key": "A String",
242 },
243 "projectNumber": "A String", # The number uniquely identifying the project.
244 #
245 # Example: &lt;code&gt;415104041262&lt;/code&gt;
246 # Read-only.
247 "lifecycleState": "A String", # The Project lifecycle state.
248 #
249 # Read-only.
250 "createTime": "A String", # Creation time.
251 #
252 # Read-only.
253 }
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700254
255 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800256 Allowed values
257 1 - v1 error format
258 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700259
260Returns:
261 An object of the form:
262
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800263 { # This resource represents a long-running operation that is the result of a
264 # network API call.
265 "metadata": { # Service-specific metadata associated with the operation. It typically
266 # contains progress information and common metadata such as create time.
267 # Some services might not provide such metadata. Any method that returns a
268 # long-running operation should document the metadata type, if any.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700269 "a_key": "", # Properties of the object. Contains field @type with type URL.
270 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
272 # different programming environments, including REST APIs and RPC APIs. It is
273 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
274 # three pieces of data: error code, error message, and error details.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800275 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700276 # You can find out more about this error model and how to work with it in the
277 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800278 "message": "A String", # A developer-facing error message, which should be in English. Any
279 # user-facing error message should be localized and sent in the
280 # google.rpc.Status.details field, or localized by the client.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700281 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700282 "details": [ # A list of messages that carry the error details. There is a common set of
283 # message types for APIs to use.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700284 {
285 "a_key": "", # Properties of the object. Contains field @type with type URL.
286 },
287 ],
288 },
Thomas Coffee2f245372017-03-27 10:39:26 -0700289 "done": True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700290 # If `true`, the operation is completed, and either `error` or `response` is
Thomas Coffee2f245372017-03-27 10:39:26 -0700291 # available.
292 "response": { # The normal response of the operation in case of success. If the original
293 # method returns no data on success, such as `Delete`, the response is
294 # `google.protobuf.Empty`. If the original method is standard
295 # `Get`/`Create`/`Update`, the response should be the resource. For other
296 # methods, the response should have the type `XxxResponse`, where `Xxx`
297 # is the original method name. For example, if the original method name
298 # is `TakeSnapshot()`, the inferred response type is
299 # `TakeSnapshotResponse`.
300 "a_key": "", # Properties of the object. Contains field @type with type URL.
301 },
302 "name": "A String", # The server-assigned name, which is only unique within the same service that
303 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700304 # `name` should be a resource name ending with `operations/{unique_id}`.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700305 }</pre>
306</div>
307
308<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700309 <code class="details" id="delete">delete(projectId, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800310 <pre>Marks the Project identified by the specified
311`project_id` (for example, `my-project-123`) for deletion.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700312This method will only affect the Project if it has a lifecycle state of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800313ACTIVE.
314
315This method changes the Project's lifecycle state from
316ACTIVE
317to DELETE_REQUESTED.
318The deletion starts at an unspecified time,
319at which point the Project is no longer accessible.
320
321Until the deletion completes, you can check the lifecycle state
322checked by retrieving the Project with GetProject,
323and the Project remains visible to ListProjects.
324However, you cannot update the project.
325
326After the deletion completes, the Project is not retrievable by
327the GetProject and
328ListProjects methods.
329
330The caller must have modify permissions for this Project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700331
332Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800333 projectId: string, The Project ID (for example, `foo-bar-123`).
334
335Required. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700336 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800337 Allowed values
338 1 - v1 error format
339 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700340
341Returns:
342 An object of the form:
343
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800344 { # A generic empty message that you can re-use to avoid defining duplicated
345 # empty messages in your APIs. A typical example is to use it as the request
346 # or the response type of an API method. For instance:
347 #
348 # service Foo {
349 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
350 # }
351 #
352 # The JSON representation for `Empty` is empty JSON object `{}`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700353 }</pre>
354</div>
355
356<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700357 <code class="details" id="get">get(projectId, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800358 <pre>Retrieves the Project identified by the specified
359`project_id` (for example, `my-project-123`).
360
361The caller must have read permissions for this Project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700362
363Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800364 projectId: string, The Project ID (for example, `my-project-123`).
365
366Required. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700367 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800368 Allowed values
369 1 - v1 error format
370 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700371
372Returns:
373 An object of the form:
374
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800375 { # A Project is a high-level Google Cloud Platform entity. It is a
Dan O'Mearadd494642020-05-01 07:42:23 -0700376 # container for ACLs, APIs, App Engine Apps, VMs, and other
377 # Google Cloud Platform resources.
378 "name": "A String", # The optional user-assigned display name of the Project.
379 # When present it must be between 4 to 30 characters.
380 # Allowed characters are: lowercase and uppercase letters, numbers,
381 # hyphen, single-quote, double-quote, space, and exclamation point.
382 #
383 # Example: &lt;code&gt;My Project&lt;/code&gt;
384 # Read-write.
385 "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
386 #
387 # Supported parent types include "organization" and "folder". Once set, the
388 # parent cannot be cleared. The `parent` can be set on creation or using the
389 # `UpdateProject` method; the end user must have the
390 # `resourcemanager.projects.create` permission on the parent.
391 #
392 # Read-write.
393 # Cloud Platform is a generic term for something you (a developer) may want to
394 # interact with through one of our API's. Some examples are an App Engine app,
395 # a Compute Engine instance, a Cloud SQL database, and so on.
396 "type": "A String", # Required field representing the resource type this id is for.
397 # At present, the valid types are: "organization", "folder", and "project".
398 "id": "A String", # Required field for the type-specific id. This should correspond to the id
399 # used in the type-specific API's.
400 },
401 "projectId": "A String", # The unique, user-assigned ID of the Project.
402 # It must be 6 to 30 lowercase letters, digits, or hyphens.
403 # It must start with a letter.
404 # Trailing hyphens are prohibited.
405 #
406 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
407 # Read-only after creation.
408 "labels": { # The labels associated with this Project.
409 #
410 # Label keys must be between 1 and 63 characters long and must conform
411 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
412 #
413 # Label values must be between 0 and 63 characters long and must conform
414 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
415 # value can be empty.
416 #
417 # No more than 256 labels can be associated with a given resource.
418 #
419 # Clients should store labels in a representation such as JSON that does not
420 # depend on specific characters being disallowed.
421 #
422 # Example: &lt;code&gt;"environment" : "dev"&lt;/code&gt;
423 # Read-write.
424 "a_key": "A String",
425 },
426 "projectNumber": "A String", # The number uniquely identifying the project.
427 #
428 # Example: &lt;code&gt;415104041262&lt;/code&gt;
429 # Read-only.
430 "lifecycleState": "A String", # The Project lifecycle state.
431 #
432 # Read-only.
433 "createTime": "A String", # Creation time.
434 #
435 # Read-only.
436 }</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700437</div>
438
439<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700440 <code class="details" id="getAncestry">getAncestry(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800441 <pre>Gets a list of ancestors in the resource hierarchy for the Project
442identified by the specified `project_id` (for example, `my-project-123`).
443
444The caller must have read permissions for this Project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700445
446Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800447 projectId: string, The Project ID (for example, `my-project-123`).
448
449Required. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700450 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800451 The object takes the form of:
452
453{ # The request sent to the
454 # GetAncestry
455 # method.
456 }
457
458 x__xgafv: string, V1 error format.
459 Allowed values
460 1 - v1 error format
461 2 - v2 error format
462
463Returns:
464 An object of the form:
465
466 { # Response from the GetAncestry method.
467 "ancestor": [ # Ancestors are ordered from bottom to top of the resource hierarchy. The
468 # first ancestor is the project itself, followed by the project'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.
471 "resourceId": { # A container to reference an id for any resource type. A `resource` in Google # Resource id of the ancestor.
472 # Cloud Platform is a generic term for something you (a developer) may want to
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400473 # interact with through one of our API'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.
475 "type": "A String", # Required field representing the resource type this id is for.
Dan O'Mearadd494642020-05-01 07:42:23 -0700476 # At present, the valid types are: "organization", "folder", and "project".
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800477 "id": "A String", # Required field for the type-specific id. This should correspond to the id
478 # used in the type-specific API's.
479 },
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 Kim715bd7f2019-06-14 16:50:42 -0700490Subtrees of Resource Manager resource hierarchy with 'under:' prefix will
491not 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.
499 "constraint": "A String", # The name of the `Constraint` to compute the effective `Policy`.
500 }
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.
512 "updateTime": "A String", # The time stamp the `Policy` was previously updated. This is set by the
513 # server, not specified by the caller, and represents the last time a call to
514 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
515 # be ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700516 "version": 42, # Version of the `Policy`. Default version is 0;
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700517 "constraint": "A String", # The name of the `Constraint` the `Policy` is configuring, for example,
518 # `constraints/serviceuser.services`.
519 #
520 # Immutable after creation.
521 "restoreDefault": { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
522 # `Constraint` type.
523 # `constraint_default` enforcement behavior of the specific `Constraint` at
524 # this resource.
525 #
526 # Suppose that `constraint_default` is set to `ALLOW` for the
527 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
528 # foo.com sets a `Policy` at their Organization resource node that restricts
529 # the allowed service activations to deny all service activations. They
530 # could then set a `Policy` with the `policy_type` `restore_default` on
531 # several experimental projects, restoring the `constraint_default`
532 # enforcement of the `Constraint` for only those projects, allowing those
533 # projects to have all services activated.
534 },
535 "listPolicy": { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
536 # resource.
537 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700538 # `ListPolicy` can define specific values and subtrees of Cloud Resource
539 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
540 # are allowed or denied by setting the `allowed_values` and `denied_values`
541 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
542 # The `under:` prefix is used to denote resource subtree values.
543 # The `is:` prefix is used to denote specific values, and is required only
544 # if the value contains a ":". Values prefixed with "is:" are treated the
545 # same as values with no prefix.
546 # Ancestry subtrees must be in one of the following formats:
Dan O'Mearadd494642020-05-01 07:42:23 -0700547 # - "projects/&lt;project-id&gt;", e.g. "projects/tokyo-rain-123"
548 # - "folders/&lt;folder-id&gt;", e.g. "folders/1234"
549 # - "organizations/&lt;organization-id&gt;", e.g. "organizations/1234"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700550 # The `supports_under` field of the associated `Constraint` defines whether
551 # ancestry prefixes can be used. You can set `allowed_values` and
552 # `denied_values` in the same `Policy` if `all_values` is
553 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
554 # values. If `all_values` is set to either `ALLOW` or `DENY`,
555 # `allowed_values` and `denied_values` must be unset.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700556 "allValues": "A String", # The policy all_values state.
Dan O'Mearadd494642020-05-01 07:42:23 -0700557 "deniedValues": [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700558 # is set to `ALL_VALUES_UNSPECIFIED`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700559 "A String",
560 ],
561 "inheritFromParent": True or False, # Determines the inheritance behavior for this `Policy`.
562 #
563 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
564 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
565 # set to `true`, then the values from the effective `Policy` of the parent
566 # resource are inherited, meaning the values set in this `Policy` are
567 # added to the values inherited up the hierarchy.
568 #
569 # Setting `Policy` hierarchies that inherit both allowed values and denied
570 # values isn't recommended in most circumstances to keep the configuration
571 # simple and understandable. However, it is possible to set a `Policy` with
572 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
573 # In this case, the values that are allowed must be in `allowed_values` and
574 # not present in `denied_values`.
575 #
576 # For example, suppose you have a `Constraint`
577 # `constraints/serviceuser.services`, which has a `constraint_type` of
578 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
579 # Suppose that at the Organization level, a `Policy` is applied that
580 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
581 # `Policy` is applied to a project below the Organization that has
582 # `inherit_from_parent` set to `false` and field all_values set to DENY,
583 # then an attempt to activate any API will be denied.
584 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700585 # The following examples demonstrate different possible layerings for
586 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700587 #
588 # Example 1 (no inherited values):
589 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -0700590 # {allowed_values: "E1" allowed_values:"E2"}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591 # `projects/bar` has `inherit_from_parent` `false` and values:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700592 # {allowed_values: "E3" allowed_values: "E4"}
593 # The accepted values at `organizations/foo` are `E1`, `E2`.
594 # The accepted values at `projects/bar` are `E3`, and `E4`.
595 #
596 # Example 2 (inherited values):
597 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -0700598 # {allowed_values: "E1" allowed_values:"E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700599 # `projects/bar` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -0700600 # {value: "E3" value: "E4" inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700601 # The accepted values at `organizations/foo` are `E1`, `E2`.
602 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
603 #
604 # Example 3 (inheriting both allowed and denied values):
605 # `organizations/foo` has a `Policy` with values:
606 # {allowed_values: "E1" allowed_values: "E2"}
607 # `projects/bar` has a `Policy` with:
608 # {denied_values: "E1"}
609 # The accepted values at `organizations/foo` are `E1`, `E2`.
610 # The value accepted at `projects/bar` is `E2`.
611 #
612 # Example 4 (RestoreDefault):
613 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -0700614 # {allowed_values: "E1" allowed_values:"E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700615 # `projects/bar` has a `Policy` with values:
616 # {RestoreDefault: {}}
617 # The accepted values at `organizations/foo` are `E1`, `E2`.
618 # The accepted values at `projects/bar` are either all or none depending on
619 # the value of `constraint_default` (if `ALLOW`, all; if
620 # `DENY`, none).
621 #
622 # Example 5 (no policy inherits parent policy):
623 # `organizations/foo` has no `Policy` set.
624 # `projects/bar` has no `Policy` set.
625 # The accepted values at both levels are either all or none depending on
626 # the value of `constraint_default` (if `ALLOW`, all; if
627 # `DENY`, none).
628 #
629 # Example 6 (ListConstraint allowing all):
630 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -0700631 # {allowed_values: "E1" allowed_values: "E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700632 # `projects/bar` has a `Policy` with:
633 # {all: ALLOW}
634 # The accepted values at `organizations/foo` are `E1`, E2`.
635 # Any value is accepted at `projects/bar`.
636 #
637 # Example 7 (ListConstraint allowing none):
638 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -0700639 # {allowed_values: "E1" allowed_values: "E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700640 # `projects/bar` has a `Policy` with:
641 # {all: DENY}
642 # The accepted values at `organizations/foo` are `E1`, E2`.
643 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700644 #
645 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
646 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -0700647 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700648 # `organizations/foo` has a `Policy` with values:
649 # {allowed_values: "under:organizations/O1"}
650 # `projects/bar` has a `Policy` with:
651 # {allowed_values: "under:projects/P3"}
652 # {denied_values: "under:folders/F2"}
653 # The accepted values at `organizations/foo` are `organizations/O1`,
654 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
655 # `projects/P3`.
656 # The accepted values at `projects/bar` are `organizations/O1`,
657 # `folders/F1`, `projects/P1`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700658 "suggestedValue": "A String", # Optional. The Google Cloud Console will try to default to a configuration
659 # that matches the value specified in this `Policy`. If `suggested_value`
660 # is not set, it will inherit the value specified higher in the hierarchy,
661 # unless `inherit_from_parent` is `false`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700662 "allowedValues": [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700663 # is set to `ALL_VALUES_UNSPECIFIED`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700664 "A String",
665 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700666 },
667 "booleanPolicy": { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
668 # resource.
669 "enforced": True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
670 # configuration is acceptable.
671 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700672 # Suppose you have a `Constraint`
673 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
674 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
675 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700676 # - If the `Policy` at this resource has enforced set to `false`, serial
677 # port connection attempts will be allowed.
678 # - If the `Policy` at this resource has enforced set to `true`, serial
679 # port connection attempts will be refused.
680 # - If the `Policy` at this resource is `RestoreDefault`, serial port
681 # connection attempts will be allowed.
682 # - If no `Policy` is set at this resource or anywhere higher in the
683 # resource hierarchy, serial port connection attempts will be allowed.
684 # - If no `Policy` is set at this resource, but one exists higher in the
685 # resource hierarchy, the behavior is as if the`Policy` were set at
686 # this resource.
687 #
688 # The following examples demonstrate the different possible layerings:
689 #
690 # Example 1 (nearest `Constraint` wins):
691 # `organizations/foo` has a `Policy` with:
692 # {enforced: false}
693 # `projects/bar` has no `Policy` set.
694 # The constraint at `projects/bar` and `organizations/foo` will not be
695 # enforced.
696 #
697 # Example 2 (enforcement gets replaced):
698 # `organizations/foo` has a `Policy` with:
699 # {enforced: false}
700 # `projects/bar` has a `Policy` with:
701 # {enforced: true}
702 # The constraint at `organizations/foo` is not enforced.
703 # The constraint at `projects/bar` is enforced.
704 #
705 # Example 3 (RestoreDefault):
706 # `organizations/foo` has a `Policy` with:
707 # {enforced: true}
708 # `projects/bar` has a `Policy` with:
709 # {RestoreDefault: {}}
710 # The constraint at `organizations/foo` is enforced.
711 # The constraint at `projects/bar` is not enforced, because
712 # `constraint_default` for the `Constraint` is `ALLOW`.
713 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700714 "etag": "A String", # An opaque tag indicating the current version of the `Policy`, used for
715 # concurrency control.
716 #
717 # When the `Policy` is returned from either a `GetPolicy` or a
718 # `ListOrgPolicy` request, this `etag` indicates the version of the current
719 # `Policy` to use when executing a read-modify-write loop.
720 #
721 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
722 # `etag` will be unset.
723 #
724 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
725 # that was returned from a `GetOrgPolicy` request as part of a
726 # read-modify-write loop for concurrency control. Not setting the `etag`in a
727 # `SetOrgPolicy` request will result in an unconditional write of the
728 # `Policy`.
729 }</pre>
730</div>
731
732<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700733 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800734 <pre>Returns the IAM access control policy for the specified Project.
735Permission is denied if the policy or the resource does not exist.
736
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700737Authorization requires the Google IAM permission
738`resourcemanager.projects.getIamPolicy` on the project.
739
740For additional information about resource structure and identification,
741see [Resource Names](/apis/design/resource_names).
742
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800743Args:
744 resource: string, REQUIRED: The resource for which the policy is being requested.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400745See the operation documentation for the appropriate value for this field. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700747 The object takes the form of:
748
749{ # Request message for `GetIamPolicy` method.
Dan O'Mearadd494642020-05-01 07:42:23 -0700750 "options": { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
751 # `GetIamPolicy`.
752 "requestedPolicyVersion": 42, # Optional. The policy format version to be returned.
753 #
754 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
755 # rejected.
756 #
757 # Requests for policies with any conditional bindings must specify version 3.
758 # Policies without any conditional bindings may specify any valid value or
759 # leave the field unset.
760 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700761 }
762
763 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800764 Allowed values
765 1 - v1 error format
766 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700767
768Returns:
769 An object of the form:
770
Dan O'Mearadd494642020-05-01 07:42:23 -0700771 { # An Identity and Access Management (IAM) policy, which specifies access
772 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800773 #
774 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700775 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
776 # `members` to a single `role`. Members can be user accounts, service accounts,
777 # Google groups, and domains (such as G Suite). A `role` is a named list of
778 # permissions; each `role` can be an IAM predefined role or a user-created
779 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800780 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700781 # Optionally, a `binding` can specify a `condition`, which is a logical
782 # expression that allows access to a resource only if the expression evaluates
783 # to `true`. A condition can add constraints based on attributes of the
784 # request, the resource, or both.
785 #
786 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800787 #
788 # {
789 # "bindings": [
790 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700791 # "role": "roles/resourcemanager.organizationAdmin",
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800792 # "members": [
793 # "user:mike@example.com",
794 # "group:admins@example.com",
795 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700796 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800797 # ]
798 # },
799 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700800 # "role": "roles/resourcemanager.organizationViewer",
801 # "members": ["user:eve@example.com"],
802 # "condition": {
803 # "title": "expirable access",
804 # "description": "Does not grant access after Sep 2020",
805 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
806 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800807 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700808 # ],
809 # "etag": "BwWWja0YfJA=",
810 # "version": 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800811 # }
812 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700813 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700814 #
815 # bindings:
816 # - members:
817 # - user:mike@example.com
818 # - group:admins@example.com
819 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700820 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
821 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700822 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700823 # - user:eve@example.com
824 # role: roles/resourcemanager.organizationViewer
825 # condition:
826 # title: expirable access
827 # description: Does not grant access after Sep 2020
828 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
829 # - etag: BwWWja0YfJA=
830 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700831 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800832 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700833 # [IAM documentation](https://cloud.google.com/iam/docs/).
834 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
835 # `condition` that determines how and when the `bindings` are applied. Each
836 # of the `bindings` must contain at least one member.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400837 { # Associates `members` with a `role`.
838 "role": "A String", # Role that is assigned to `members`.
839 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400840 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
841 # `members` can have the following values:
842 #
843 # * `allUsers`: A special identifier that represents anyone who is
844 # on the internet; with or without a Google account.
845 #
846 # * `allAuthenticatedUsers`: A special identifier that represents anyone
847 # who is authenticated with a Google account or a service account.
848 #
849 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700850 # account. For example, `alice@example.com` .
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400851 #
852 #
853 # * `serviceAccount:{emailid}`: An email address that represents a service
854 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
855 #
856 # * `group:{emailid}`: An email address that represents a Google group.
857 # For example, `admins@example.com`.
858 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700859 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
860 # identifier) representing a user that has been recently deleted. For
861 # example, `alice@example.com?uid=123456789012345678901`. If the user is
862 # recovered, this value reverts to `user:{emailid}` and the recovered user
863 # retains the role in the binding.
864 #
865 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
866 # unique identifier) representing a service account that has been recently
867 # deleted. For example,
868 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
869 # If the service account is undeleted, this value reverts to
870 # `serviceAccount:{emailid}` and the undeleted service account retains the
871 # role in the binding.
872 #
873 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
874 # identifier) representing a Google group that has been recently
875 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
876 # the group is recovered, this value reverts to `group:{emailid}` and the
877 # recovered group retains the role in the binding.
878 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400879 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700880 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400881 # users of that domain. For example, `google.com` or `example.com`.
882 #
883 "A String",
884 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700885 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
886 # NOTE: An unsatisfied condition will not allow user access via current
887 # binding. Different bindings, including their conditions, are examined
888 # independently.
889 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
890 # are documented at https://github.com/google/cel-spec.
891 #
892 # Example (Comparison):
893 #
894 # title: "Summary size limit"
895 # description: "Determines if a summary is less than 100 chars"
896 # expression: "document.summary.size() &lt; 100"
897 #
898 # Example (Equality):
899 #
900 # title: "Requestor is owner"
901 # description: "Determines if requestor is the document owner"
902 # expression: "document.owner == request.auth.claims.email"
903 #
904 # Example (Logic):
905 #
906 # title: "Public documents"
907 # description: "Determine whether the document should be publicly visible"
908 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
909 #
910 # Example (Data Manipulation):
911 #
912 # title: "Notification string"
913 # description: "Create a notification string with a timestamp."
914 # expression: "'New message received at ' + string(document.create_time)"
915 #
916 # The exact variables and functions that may be referenced within an expression
917 # are determined by the service that evaluates it. See the service
918 # documentation for additional information.
919 "description": "A String", # Optional. Description of the expression. This is a longer text which
920 # describes the expression, e.g. when hovered over it in a UI.
921 "expression": "A String", # Textual representation of an expression in Common Expression Language
922 # syntax.
923 "location": "A String", # Optional. String indicating the location of the expression for error
924 # reporting, e.g. a file name and a position in the file.
925 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
926 # its purpose. This can be used e.g. in UIs which allow to enter the
927 # expression.
928 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400929 },
930 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400931 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
932 { # Specifies the audit configuration for a service.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700933 # The configuration determines which permission types are logged, and what
934 # identities, if any, are exempted from logging.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400935 # An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400936 #
937 # If there are AuditConfigs for both `allServices` and a specific service,
938 # the union of the two AuditConfigs is used for that service: the log_types
939 # specified in each AuditConfig are enabled, and the exempted_members in each
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700940 # AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400941 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400942 # Example Policy with multiple AuditConfigs:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400943 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400944 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400945 # "audit_configs": [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400946 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400947 # "service": "allServices"
948 # "audit_log_configs": [
949 # {
950 # "log_type": "DATA_READ",
951 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -0700952 # "user:jose@example.com"
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400953 # ]
954 # },
955 # {
956 # "log_type": "DATA_WRITE",
957 # },
958 # {
959 # "log_type": "ADMIN_READ",
960 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400961 # ]
962 # },
963 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700964 # "service": "sampleservice.googleapis.com"
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400965 # "audit_log_configs": [
966 # {
967 # "log_type": "DATA_READ",
968 # },
969 # {
970 # "log_type": "DATA_WRITE",
971 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -0700972 # "user:aliya@example.com"
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400973 # ]
974 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400975 # ]
976 # }
977 # ]
978 # }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400979 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700980 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
981 # logging. It also exempts jose@example.com from DATA_READ logging, and
982 # aliya@example.com from DATA_WRITE logging.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400983 "auditLogConfigs": [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400984 { # Provides the configuration for logging a type of permissions.
985 # Example:
986 #
987 # {
988 # "audit_log_configs": [
989 # {
990 # "log_type": "DATA_READ",
991 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -0700992 # "user:jose@example.com"
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400993 # ]
994 # },
995 # {
996 # "log_type": "DATA_WRITE",
997 # }
998 # ]
999 # }
1000 #
1001 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
Dan O'Mearadd494642020-05-01 07:42:23 -07001002 # jose@example.com from DATA_READ logging.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001003 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of
1004 # permission.
1005 # Follows the same format of Binding.members.
1006 "A String",
1007 ],
1008 "logType": "A String", # The log type that this config enables.
1009 },
1010 ],
1011 "service": "A String", # Specifies a service that will be enabled for audit logging.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001012 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001013 # `allServices` is a special value that covers all services.
1014 },
1015 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001016 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
1017 # prevent simultaneous updates of a policy from overwriting each other.
1018 # It is strongly suggested that systems make use of the `etag` in the
1019 # read-modify-write cycle to perform policy updates in order to avoid race
1020 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1021 # systems are expected to put that etag in the request to `setIamPolicy` to
1022 # ensure that their change will be applied to the same version of the policy.
1023 #
1024 # **Important:** If you use IAM Conditions, you must include the `etag` field
1025 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1026 # you to overwrite a version `3` policy with a version `1` policy, and all of
1027 # the conditions in the version `3` policy are lost.
1028 "version": 42, # Specifies the format of the policy.
1029 #
1030 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1031 # are rejected.
1032 #
1033 # Any operation that affects conditional role bindings must specify version
1034 # `3`. This requirement applies to the following operations:
1035 #
1036 # * Getting a policy that includes a conditional role binding
1037 # * Adding a conditional role binding to a policy
1038 # * Changing a conditional role binding in a policy
1039 # * Removing any role binding, with or without a condition, from a policy
1040 # that includes conditions
1041 #
1042 # **Important:** If you use IAM Conditions, you must include the `etag` field
1043 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1044 # you to overwrite a version `3` policy with a version `1` policy, and all of
1045 # the conditions in the version `3` policy are lost.
1046 #
1047 # If a policy does not include any conditions, operations on that policy may
1048 # specify any valid version or leave the field unset.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001049 }</pre>
1050</div>
1051
1052<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001053 <code class="details" id="getOrgPolicy">getOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001054 <pre>Gets a `Policy` on a resource.
1055
1056If no `Policy` is set on the resource, a `Policy` is returned with default
1057values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
1058`etag` value can be used with `SetOrgPolicy()` to create or update a
1059`Policy` during read-modify-write.
1060
1061Args:
1062 resource: string, Name of the resource the `Policy` is set on. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001063 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001064 The object takes the form of:
1065
1066{ # The request sent to the GetOrgPolicy method.
1067 "constraint": "A String", # Name of the `Constraint` to get the `Policy`.
1068 }
1069
1070 x__xgafv: string, V1 error format.
1071 Allowed values
1072 1 - v1 error format
1073 2 - v2 error format
1074
1075Returns:
1076 An object of the form:
1077
1078 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
1079 # for configurations of Cloud Platform resources.
1080 "updateTime": "A String", # The time stamp the `Policy` was previously updated. This is set by the
1081 # server, not specified by the caller, and represents the last time a call to
1082 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
1083 # be ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001084 "version": 42, # Version of the `Policy`. Default version is 0;
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001085 "constraint": "A String", # The name of the `Constraint` the `Policy` is configuring, for example,
1086 # `constraints/serviceuser.services`.
1087 #
1088 # Immutable after creation.
1089 "restoreDefault": { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
1090 # `Constraint` type.
1091 # `constraint_default` enforcement behavior of the specific `Constraint` at
1092 # this resource.
1093 #
1094 # Suppose that `constraint_default` is set to `ALLOW` for the
1095 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
1096 # foo.com sets a `Policy` at their Organization resource node that restricts
1097 # the allowed service activations to deny all service activations. They
1098 # could then set a `Policy` with the `policy_type` `restore_default` on
1099 # several experimental projects, restoring the `constraint_default`
1100 # enforcement of the `Constraint` for only those projects, allowing those
1101 # projects to have all services activated.
1102 },
1103 "listPolicy": { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
1104 # resource.
1105 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001106 # `ListPolicy` can define specific values and subtrees of Cloud Resource
1107 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
1108 # are allowed or denied by setting the `allowed_values` and `denied_values`
1109 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
1110 # The `under:` prefix is used to denote resource subtree values.
1111 # The `is:` prefix is used to denote specific values, and is required only
1112 # if the value contains a ":". Values prefixed with "is:" are treated the
1113 # same as values with no prefix.
1114 # Ancestry subtrees must be in one of the following formats:
Dan O'Mearadd494642020-05-01 07:42:23 -07001115 # - "projects/&lt;project-id&gt;", e.g. "projects/tokyo-rain-123"
1116 # - "folders/&lt;folder-id&gt;", e.g. "folders/1234"
1117 # - "organizations/&lt;organization-id&gt;", e.g. "organizations/1234"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001118 # The `supports_under` field of the associated `Constraint` defines whether
1119 # ancestry prefixes can be used. You can set `allowed_values` and
1120 # `denied_values` in the same `Policy` if `all_values` is
1121 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
1122 # values. If `all_values` is set to either `ALLOW` or `DENY`,
1123 # `allowed_values` and `denied_values` must be unset.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001124 "allValues": "A String", # The policy all_values state.
Dan O'Mearadd494642020-05-01 07:42:23 -07001125 "deniedValues": [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001126 # is set to `ALL_VALUES_UNSPECIFIED`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001127 "A String",
1128 ],
1129 "inheritFromParent": True or False, # Determines the inheritance behavior for this `Policy`.
1130 #
1131 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
1132 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
1133 # set to `true`, then the values from the effective `Policy` of the parent
1134 # resource are inherited, meaning the values set in this `Policy` are
1135 # added to the values inherited up the hierarchy.
1136 #
1137 # Setting `Policy` hierarchies that inherit both allowed values and denied
1138 # values isn't recommended in most circumstances to keep the configuration
1139 # simple and understandable. However, it is possible to set a `Policy` with
1140 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
1141 # In this case, the values that are allowed must be in `allowed_values` and
1142 # not present in `denied_values`.
1143 #
1144 # For example, suppose you have a `Constraint`
1145 # `constraints/serviceuser.services`, which has a `constraint_type` of
1146 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
1147 # Suppose that at the Organization level, a `Policy` is applied that
1148 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
1149 # `Policy` is applied to a project below the Organization that has
1150 # `inherit_from_parent` set to `false` and field all_values set to DENY,
1151 # then an attempt to activate any API will be denied.
1152 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001153 # The following examples demonstrate different possible layerings for
1154 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001155 #
1156 # Example 1 (no inherited values):
1157 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001158 # {allowed_values: "E1" allowed_values:"E2"}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001159 # `projects/bar` has `inherit_from_parent` `false` and values:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001160 # {allowed_values: "E3" allowed_values: "E4"}
1161 # The accepted values at `organizations/foo` are `E1`, `E2`.
1162 # The accepted values at `projects/bar` are `E3`, and `E4`.
1163 #
1164 # Example 2 (inherited values):
1165 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001166 # {allowed_values: "E1" allowed_values:"E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001167 # `projects/bar` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001168 # {value: "E3" value: "E4" inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001169 # The accepted values at `organizations/foo` are `E1`, `E2`.
1170 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
1171 #
1172 # Example 3 (inheriting both allowed and denied values):
1173 # `organizations/foo` has a `Policy` with values:
1174 # {allowed_values: "E1" allowed_values: "E2"}
1175 # `projects/bar` has a `Policy` with:
1176 # {denied_values: "E1"}
1177 # The accepted values at `organizations/foo` are `E1`, `E2`.
1178 # The value accepted at `projects/bar` is `E2`.
1179 #
1180 # Example 4 (RestoreDefault):
1181 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001182 # {allowed_values: "E1" allowed_values:"E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001183 # `projects/bar` has a `Policy` with values:
1184 # {RestoreDefault: {}}
1185 # The accepted values at `organizations/foo` are `E1`, `E2`.
1186 # The accepted values at `projects/bar` are either all or none depending on
1187 # the value of `constraint_default` (if `ALLOW`, all; if
1188 # `DENY`, none).
1189 #
1190 # Example 5 (no policy inherits parent policy):
1191 # `organizations/foo` has no `Policy` set.
1192 # `projects/bar` has no `Policy` set.
1193 # The accepted values at both levels are either all or none depending on
1194 # the value of `constraint_default` (if `ALLOW`, all; if
1195 # `DENY`, none).
1196 #
1197 # Example 6 (ListConstraint allowing all):
1198 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001199 # {allowed_values: "E1" allowed_values: "E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001200 # `projects/bar` has a `Policy` with:
1201 # {all: ALLOW}
1202 # The accepted values at `organizations/foo` are `E1`, E2`.
1203 # Any value is accepted at `projects/bar`.
1204 #
1205 # Example 7 (ListConstraint allowing none):
1206 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001207 # {allowed_values: "E1" allowed_values: "E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001208 # `projects/bar` has a `Policy` with:
1209 # {all: DENY}
1210 # The accepted values at `organizations/foo` are `E1`, E2`.
1211 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001212 #
1213 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
1214 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07001215 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001216 # `organizations/foo` has a `Policy` with values:
1217 # {allowed_values: "under:organizations/O1"}
1218 # `projects/bar` has a `Policy` with:
1219 # {allowed_values: "under:projects/P3"}
1220 # {denied_values: "under:folders/F2"}
1221 # The accepted values at `organizations/foo` are `organizations/O1`,
1222 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
1223 # `projects/P3`.
1224 # The accepted values at `projects/bar` are `organizations/O1`,
1225 # `folders/F1`, `projects/P1`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001226 "suggestedValue": "A String", # Optional. The Google Cloud Console will try to default to a configuration
1227 # that matches the value specified in this `Policy`. If `suggested_value`
1228 # is not set, it will inherit the value specified higher in the hierarchy,
1229 # unless `inherit_from_parent` is `false`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001230 "allowedValues": [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001231 # is set to `ALL_VALUES_UNSPECIFIED`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001232 "A String",
1233 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001234 },
1235 "booleanPolicy": { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
1236 # resource.
1237 "enforced": True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
1238 # configuration is acceptable.
1239 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001240 # Suppose you have a `Constraint`
1241 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
1242 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
1243 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001244 # - If the `Policy` at this resource has enforced set to `false`, serial
1245 # port connection attempts will be allowed.
1246 # - If the `Policy` at this resource has enforced set to `true`, serial
1247 # port connection attempts will be refused.
1248 # - If the `Policy` at this resource is `RestoreDefault`, serial port
1249 # connection attempts will be allowed.
1250 # - If no `Policy` is set at this resource or anywhere higher in the
1251 # resource hierarchy, serial port connection attempts will be allowed.
1252 # - If no `Policy` is set at this resource, but one exists higher in the
1253 # resource hierarchy, the behavior is as if the`Policy` were set at
1254 # this resource.
1255 #
1256 # The following examples demonstrate the different possible layerings:
1257 #
1258 # Example 1 (nearest `Constraint` wins):
1259 # `organizations/foo` has a `Policy` with:
1260 # {enforced: false}
1261 # `projects/bar` has no `Policy` set.
1262 # The constraint at `projects/bar` and `organizations/foo` will not be
1263 # enforced.
1264 #
1265 # Example 2 (enforcement gets replaced):
1266 # `organizations/foo` has a `Policy` with:
1267 # {enforced: false}
1268 # `projects/bar` has a `Policy` with:
1269 # {enforced: true}
1270 # The constraint at `organizations/foo` is not enforced.
1271 # The constraint at `projects/bar` is enforced.
1272 #
1273 # Example 3 (RestoreDefault):
1274 # `organizations/foo` has a `Policy` with:
1275 # {enforced: true}
1276 # `projects/bar` has a `Policy` with:
1277 # {RestoreDefault: {}}
1278 # The constraint at `organizations/foo` is enforced.
1279 # The constraint at `projects/bar` is not enforced, because
1280 # `constraint_default` for the `Constraint` is `ALLOW`.
1281 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001282 "etag": "A String", # An opaque tag indicating the current version of the `Policy`, used for
1283 # concurrency control.
1284 #
1285 # When the `Policy` is returned from either a `GetPolicy` or a
1286 # `ListOrgPolicy` request, this `etag` indicates the version of the current
1287 # `Policy` to use when executing a read-modify-write loop.
1288 #
1289 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
1290 # `etag` will be unset.
1291 #
1292 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
1293 # that was returned from a `GetOrgPolicy` request as part of a
1294 # read-modify-write loop for concurrency control. Not setting the `etag`in a
1295 # `SetOrgPolicy` request will result in an unconditional write of the
1296 # `Policy`.
1297 }</pre>
1298</div>
1299
1300<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001301 <code class="details" id="list">list(pageSize=None, pageToken=None, x__xgafv=None, filter=None)</code>
1302 <pre>Lists Projects that the caller has the `resourcemanager.projects.get`
1303permission on and satisfy the specified filter.
1304
1305This method returns Projects in an unspecified order.
1306This method is eventually consistent with project mutations; this means
1307that a newly created project may not appear in the results or recent
1308updates to an existing project may not be reflected in the results. To
1309retrieve the latest state of a project, use the
1310GetProject method.
1311
1312NOTE: If the request filter contains a `parent.type` and `parent.id` and
1313the caller has the `resourcemanager.projects.list` permission on the
1314parent, the results will be drawn from an alternate index which provides
1315more consistent results. In future versions of this API, this List method
1316will be split into List and Search to properly capture the behavorial
1317difference.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001318
1319Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001320 pageSize: integer, The maximum number of Projects to return in the response.
1321The server can return fewer Projects than requested.
1322If unspecified, server picks an appropriate default.
1323
1324Optional.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001325 pageToken: string, A pagination token returned from a previous call to ListProjects
1326that indicates from where listing should continue.
1327
1328Optional.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001329 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001330 Allowed values
1331 1 - v1 error format
1332 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001333 filter: string, An expression for filtering the results of the request. Filter rules are
1334case insensitive. The fields eligible for filtering are:
1335
1336+ `name`
1337+ `id`
Dan O'Mearadd494642020-05-01 07:42:23 -07001338+ `labels.&lt;key&gt;` (where *key* is the name of a label)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001339+ `parent.type`
1340+ `parent.id`
1341
1342Some examples of using labels as filters:
1343
1344| Filter | Description |
1345|------------------|-----------------------------------------------------|
1346| name:how* | The project's name starts with "how". |
1347| name:Howl | The project's name is `Howl` or `howl`. |
1348| name:HOWL | Equivalent to above. |
1349| NAME:howl | Equivalent to above. |
1350| labels.color:* | The project has the label `color`. |
1351| labels.color:red | The project's label `color` has the value `red`. |
Dan O'Mearadd494642020-05-01 07:42:23 -07001352| labels.color:red&amp;nbsp;labels.size:big |The project's label `color` has
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001353 the value `red` and its label `size` has the value `big`. |
1354
1355If no filter is specified, the call will return projects for which the user
1356has the `resourcemanager.projects.get` permission.
1357
1358NOTE: To perform a by-parent query (eg., what projects are directly in a
1359Folder), the caller must have the `resourcemanager.projects.list`
1360permission on the parent and the filter must contain both a `parent.type`
1361and a `parent.id` restriction
1362(example: "parent.type:folder parent.id:123"). In this case an alternate
1363search index is used which provides more consistent results.
1364
1365Optional.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001366
1367Returns:
1368 An object of the form:
1369
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001370 { # A page of the response received from the
1371 # ListProjects
1372 # method.
1373 #
1374 # A paginated response where more pages are available has
1375 # `next_page_token` set. This token can be used in a subsequent request to
1376 # retrieve the next request page.
1377 "nextPageToken": "A String", # Pagination token.
1378 #
1379 # If the result set is too large to fit in a single response, this token
1380 # is returned. It encodes the position of the current result cursor.
1381 # Feeding this value into a new list request with the `page_token` parameter
1382 # gives the next page of the results.
1383 #
1384 # When `next_page_token` is not filled in, there is no next page and
1385 # the list returned is the last page in the result set.
1386 #
1387 # Pagination tokens have a limited lifetime.
1388 "projects": [ # The list of Projects that matched the list filter. This list can
1389 # be paginated.
1390 { # A Project is a high-level Google Cloud Platform entity. It is a
Dan O'Mearadd494642020-05-01 07:42:23 -07001391 # container for ACLs, APIs, App Engine Apps, VMs, and other
1392 # Google Cloud Platform resources.
1393 "name": "A String", # The optional user-assigned display name of the Project.
1394 # When present it must be between 4 to 30 characters.
1395 # Allowed characters are: lowercase and uppercase letters, numbers,
1396 # hyphen, single-quote, double-quote, space, and exclamation point.
1397 #
1398 # Example: &lt;code&gt;My Project&lt;/code&gt;
1399 # Read-write.
1400 "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
1401 #
1402 # Supported parent types include "organization" and "folder". Once set, the
1403 # parent cannot be cleared. The `parent` can be set on creation or using the
1404 # `UpdateProject` method; the end user must have the
1405 # `resourcemanager.projects.create` permission on the parent.
1406 #
1407 # Read-write.
1408 # Cloud Platform is a generic term for something you (a developer) may want to
1409 # interact with through one of our API's. Some examples are an App Engine app,
1410 # a Compute Engine instance, a Cloud SQL database, and so on.
1411 "type": "A String", # Required field representing the resource type this id is for.
1412 # At present, the valid types are: "organization", "folder", and "project".
1413 "id": "A String", # Required field for the type-specific id. This should correspond to the id
1414 # used in the type-specific API's.
1415 },
1416 "projectId": "A String", # The unique, user-assigned ID of the Project.
1417 # It must be 6 to 30 lowercase letters, digits, or hyphens.
1418 # It must start with a letter.
1419 # Trailing hyphens are prohibited.
1420 #
1421 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
1422 # Read-only after creation.
1423 "labels": { # The labels associated with this Project.
1424 #
1425 # Label keys must be between 1 and 63 characters long and must conform
1426 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
1427 #
1428 # Label values must be between 0 and 63 characters long and must conform
1429 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
1430 # value can be empty.
1431 #
1432 # No more than 256 labels can be associated with a given resource.
1433 #
1434 # Clients should store labels in a representation such as JSON that does not
1435 # depend on specific characters being disallowed.
1436 #
1437 # Example: &lt;code&gt;"environment" : "dev"&lt;/code&gt;
1438 # Read-write.
1439 "a_key": "A String",
1440 },
1441 "projectNumber": "A String", # The number uniquely identifying the project.
1442 #
1443 # Example: &lt;code&gt;415104041262&lt;/code&gt;
1444 # Read-only.
1445 "lifecycleState": "A String", # The Project lifecycle state.
1446 #
1447 # Read-only.
1448 "createTime": "A String", # Creation time.
1449 #
1450 # Read-only.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001451 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001452 ],
1453 }</pre>
1454</div>
1455
1456<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001457 <code class="details" id="listAvailableOrgPolicyConstraints">listAvailableOrgPolicyConstraints(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001458 <pre>Lists `Constraints` that could be applied on the specified resource.
1459
1460Args:
1461 resource: string, Name of the resource to list `Constraints` for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001462 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001463 The object takes the form of:
1464
1465{ # The request sent to the [ListAvailableOrgPolicyConstraints]
1466 # google.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method.
1467 "pageToken": "A String", # Page token used to retrieve the next page. This is currently unsupported
1468 # and will be ignored. The server may at any point start using this field.
1469 "pageSize": 42, # Size of the pages to be returned. This is currently unsupported and will
1470 # be ignored. The server may at any point start using this field to limit
1471 # page size.
1472 }
1473
1474 x__xgafv: string, V1 error format.
1475 Allowed values
1476 1 - v1 error format
1477 2 - v2 error format
1478
1479Returns:
1480 An object of the form:
1481
1482 { # The response returned from the ListAvailableOrgPolicyConstraints method.
1483 # Returns all `Constraints` that could be set at this level of the hierarchy
1484 # (contrast with the response from `ListPolicies`, which returns all policies
1485 # which are set).
1486 "nextPageToken": "A String", # Page token used to retrieve the next page. This is currently not used.
1487 "constraints": [ # The collection of constraints that are settable on the request resource.
1488 { # A `Constraint` describes a way in which a resource's configuration can be
1489 # restricted. For example, it controls which cloud services can be activated
1490 # across an organization, or whether a Compute Engine instance can have
1491 # serial port connections established. `Constraints` can be configured by the
1492 # organization's policy adminstrator to fit the needs of the organzation by
1493 # setting Policies for `Constraints` at different locations in the
1494 # organization's resource hierarchy. Policies are inherited down the resource
1495 # hierarchy from higher levels, but can also be overridden. For details about
1496 # the inheritance rules please read about
1497 # Policies.
1498 #
1499 # `Constraints` have a default behavior determined by the `constraint_default`
1500 # field, which is the enforcement behavior that is used in the absence of a
1501 # `Policy` being defined or inherited for the resource in question.
1502 "constraintDefault": "A String", # The evaluation behavior of this constraint in the absense of 'Policy'.
1503 "displayName": "A String", # The human readable name.
1504 #
1505 # Mutable.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001506 "name": "A String", # Immutable value, required to globally be unique. For example,
1507 # `constraints/serviceuser.services`
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001508 "booleanConstraint": { # A `Constraint` that is either enforced or not. # Defines this constraint as being a BooleanConstraint.
1509 #
1510 # For example a constraint `constraints/compute.disableSerialPortAccess`.
1511 # If it is enforced on a VM instance, serial port connections will not be
1512 # opened to that instance.
1513 },
1514 "version": 42, # Version of the `Constraint`. Default version is 0;
1515 "listConstraint": { # A `Constraint` that allows or disallows a list of string values, which are # Defines this constraint as being a ListConstraint.
1516 # configured by an Organization's policy administrator with a `Policy`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001517 "supportsUnder": True or False, # Indicates whether subtrees of Cloud Resource Manager resource hierarchy
1518 # can be used in `Policy.allowed_values` and `Policy.denied_values`. For
1519 # example, `"under:folders/123"` would match any resource under the
1520 # 'folders/123' folder.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001521 "suggestedValue": "A String", # Optional. The Google Cloud Console will try to default to a configuration
1522 # that matches the value specified in this `Constraint`.
1523 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001524 "description": "A String", # Detailed description of what this `Constraint` controls as well as how and
1525 # where it is enforced.
1526 #
1527 # Mutable.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001528 },
1529 ],
1530 }</pre>
1531</div>
1532
1533<div class="method">
1534 <code class="details" id="listAvailableOrgPolicyConstraints_next">listAvailableOrgPolicyConstraints_next(previous_request, previous_response)</code>
1535 <pre>Retrieves the next page of results.
1536
1537Args:
1538 previous_request: The request for the previous page. (required)
1539 previous_response: The response from the request for the previous page. (required)
1540
1541Returns:
1542 A request object that you can call 'execute()' on to request the next
1543 page. Returns None if there are no more items in the collection.
1544 </pre>
1545</div>
1546
1547<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001548 <code class="details" id="listOrgPolicies">listOrgPolicies(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001549 <pre>Lists all the `Policies` set for a particular resource.
1550
1551Args:
1552 resource: string, Name of the resource to list Policies for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001553 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001554 The object takes the form of:
1555
1556{ # The request sent to the ListOrgPolicies method.
1557 "pageToken": "A String", # Page token used to retrieve the next page. This is currently unsupported
1558 # and will be ignored. The server may at any point start using this field.
1559 "pageSize": 42, # Size of the pages to be returned. This is currently unsupported and will
1560 # be ignored. The server may at any point start using this field to limit
1561 # page size.
1562 }
1563
1564 x__xgafv: string, V1 error format.
1565 Allowed values
1566 1 - v1 error format
1567 2 - v2 error format
1568
1569Returns:
1570 An object of the form:
1571
1572 { # The response returned from the ListOrgPolicies method. It will be empty
1573 # if no `Policies` are set on the resource.
1574 "nextPageToken": "A String", # Page token used to retrieve the next page. This is currently not used, but
1575 # the server may at any point start supplying a valid token.
1576 "policies": [ # The `Policies` that are set on the resource. It will be empty if no
1577 # `Policies` are set.
1578 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
1579 # for configurations of Cloud Platform resources.
1580 "updateTime": "A String", # The time stamp the `Policy` was previously updated. This is set by the
1581 # server, not specified by the caller, and represents the last time a call to
1582 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
1583 # be ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001584 "version": 42, # Version of the `Policy`. Default version is 0;
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001585 "constraint": "A String", # The name of the `Constraint` the `Policy` is configuring, for example,
1586 # `constraints/serviceuser.services`.
1587 #
1588 # Immutable after creation.
1589 "restoreDefault": { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
1590 # `Constraint` type.
1591 # `constraint_default` enforcement behavior of the specific `Constraint` at
1592 # this resource.
1593 #
1594 # Suppose that `constraint_default` is set to `ALLOW` for the
1595 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
1596 # foo.com sets a `Policy` at their Organization resource node that restricts
1597 # the allowed service activations to deny all service activations. They
1598 # could then set a `Policy` with the `policy_type` `restore_default` on
1599 # several experimental projects, restoring the `constraint_default`
1600 # enforcement of the `Constraint` for only those projects, allowing those
1601 # projects to have all services activated.
1602 },
1603 "listPolicy": { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
1604 # resource.
1605 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001606 # `ListPolicy` can define specific values and subtrees of Cloud Resource
1607 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
1608 # are allowed or denied by setting the `allowed_values` and `denied_values`
1609 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
1610 # The `under:` prefix is used to denote resource subtree values.
1611 # The `is:` prefix is used to denote specific values, and is required only
1612 # if the value contains a ":". Values prefixed with "is:" are treated the
1613 # same as values with no prefix.
1614 # Ancestry subtrees must be in one of the following formats:
Dan O'Mearadd494642020-05-01 07:42:23 -07001615 # - "projects/&lt;project-id&gt;", e.g. "projects/tokyo-rain-123"
1616 # - "folders/&lt;folder-id&gt;", e.g. "folders/1234"
1617 # - "organizations/&lt;organization-id&gt;", e.g. "organizations/1234"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001618 # The `supports_under` field of the associated `Constraint` defines whether
1619 # ancestry prefixes can be used. You can set `allowed_values` and
1620 # `denied_values` in the same `Policy` if `all_values` is
1621 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
1622 # values. If `all_values` is set to either `ALLOW` or `DENY`,
1623 # `allowed_values` and `denied_values` must be unset.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001624 "allValues": "A String", # The policy all_values state.
Dan O'Mearadd494642020-05-01 07:42:23 -07001625 "deniedValues": [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001626 # is set to `ALL_VALUES_UNSPECIFIED`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001627 "A String",
1628 ],
1629 "inheritFromParent": True or False, # Determines the inheritance behavior for this `Policy`.
1630 #
1631 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
1632 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
1633 # set to `true`, then the values from the effective `Policy` of the parent
1634 # resource are inherited, meaning the values set in this `Policy` are
1635 # added to the values inherited up the hierarchy.
1636 #
1637 # Setting `Policy` hierarchies that inherit both allowed values and denied
1638 # values isn't recommended in most circumstances to keep the configuration
1639 # simple and understandable. However, it is possible to set a `Policy` with
1640 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
1641 # In this case, the values that are allowed must be in `allowed_values` and
1642 # not present in `denied_values`.
1643 #
1644 # For example, suppose you have a `Constraint`
1645 # `constraints/serviceuser.services`, which has a `constraint_type` of
1646 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
1647 # Suppose that at the Organization level, a `Policy` is applied that
1648 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
1649 # `Policy` is applied to a project below the Organization that has
1650 # `inherit_from_parent` set to `false` and field all_values set to DENY,
1651 # then an attempt to activate any API will be denied.
1652 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001653 # The following examples demonstrate different possible layerings for
1654 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001655 #
1656 # Example 1 (no inherited values):
1657 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001658 # {allowed_values: "E1" allowed_values:"E2"}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001659 # `projects/bar` has `inherit_from_parent` `false` and values:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001660 # {allowed_values: "E3" allowed_values: "E4"}
1661 # The accepted values at `organizations/foo` are `E1`, `E2`.
1662 # The accepted values at `projects/bar` are `E3`, and `E4`.
1663 #
1664 # Example 2 (inherited values):
1665 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001666 # {allowed_values: "E1" allowed_values:"E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001667 # `projects/bar` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001668 # {value: "E3" value: "E4" inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001669 # The accepted values at `organizations/foo` are `E1`, `E2`.
1670 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
1671 #
1672 # Example 3 (inheriting both allowed and denied values):
1673 # `organizations/foo` has a `Policy` with values:
1674 # {allowed_values: "E1" allowed_values: "E2"}
1675 # `projects/bar` has a `Policy` with:
1676 # {denied_values: "E1"}
1677 # The accepted values at `organizations/foo` are `E1`, `E2`.
1678 # The value accepted at `projects/bar` is `E2`.
1679 #
1680 # Example 4 (RestoreDefault):
1681 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001682 # {allowed_values: "E1" allowed_values:"E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001683 # `projects/bar` has a `Policy` with values:
1684 # {RestoreDefault: {}}
1685 # The accepted values at `organizations/foo` are `E1`, `E2`.
1686 # The accepted values at `projects/bar` are either all or none depending on
1687 # the value of `constraint_default` (if `ALLOW`, all; if
1688 # `DENY`, none).
1689 #
1690 # Example 5 (no policy inherits parent policy):
1691 # `organizations/foo` has no `Policy` set.
1692 # `projects/bar` has no `Policy` set.
1693 # The accepted values at both levels are either all or none depending on
1694 # the value of `constraint_default` (if `ALLOW`, all; if
1695 # `DENY`, none).
1696 #
1697 # Example 6 (ListConstraint allowing all):
1698 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001699 # {allowed_values: "E1" allowed_values: "E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001700 # `projects/bar` has a `Policy` with:
1701 # {all: ALLOW}
1702 # The accepted values at `organizations/foo` are `E1`, E2`.
1703 # Any value is accepted at `projects/bar`.
1704 #
1705 # Example 7 (ListConstraint allowing none):
1706 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07001707 # {allowed_values: "E1" allowed_values: "E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001708 # `projects/bar` has a `Policy` with:
1709 # {all: DENY}
1710 # The accepted values at `organizations/foo` are `E1`, E2`.
1711 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001712 #
1713 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
1714 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07001715 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001716 # `organizations/foo` has a `Policy` with values:
1717 # {allowed_values: "under:organizations/O1"}
1718 # `projects/bar` has a `Policy` with:
1719 # {allowed_values: "under:projects/P3"}
1720 # {denied_values: "under:folders/F2"}
1721 # The accepted values at `organizations/foo` are `organizations/O1`,
1722 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
1723 # `projects/P3`.
1724 # The accepted values at `projects/bar` are `organizations/O1`,
1725 # `folders/F1`, `projects/P1`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001726 "suggestedValue": "A String", # 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`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001730 "allowedValues": [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001731 # is set to `ALL_VALUES_UNSPECIFIED`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001732 "A String",
1733 ],
1734 },
1735 "booleanPolicy": { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
1736 # resource.
1737 "enforced": True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
1738 # configuration is acceptable.
1739 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001740 # Suppose you have a `Constraint`
1741 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
1742 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
1743 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001744 # - If the `Policy` at this resource has enforced set to `false`, serial
1745 # port connection attempts will be allowed.
1746 # - If the `Policy` at this resource has enforced set to `true`, serial
1747 # port connection attempts will be refused.
1748 # - If the `Policy` at this resource is `RestoreDefault`, serial port
1749 # connection attempts will be allowed.
1750 # - If no `Policy` is set at this resource or anywhere higher in the
1751 # resource hierarchy, serial port connection attempts will be allowed.
1752 # - If no `Policy` is set at this resource, but one exists higher in the
1753 # resource hierarchy, the behavior is as if the`Policy` were set at
1754 # this resource.
1755 #
1756 # The following examples demonstrate the different possible layerings:
1757 #
1758 # Example 1 (nearest `Constraint` wins):
1759 # `organizations/foo` has a `Policy` with:
1760 # {enforced: false}
1761 # `projects/bar` has no `Policy` set.
1762 # The constraint at `projects/bar` and `organizations/foo` will not be
1763 # enforced.
1764 #
1765 # Example 2 (enforcement gets replaced):
1766 # `organizations/foo` has a `Policy` with:
1767 # {enforced: false}
1768 # `projects/bar` has a `Policy` with:
1769 # {enforced: true}
1770 # The constraint at `organizations/foo` is not enforced.
1771 # The constraint at `projects/bar` is enforced.
1772 #
1773 # Example 3 (RestoreDefault):
1774 # `organizations/foo` has a `Policy` with:
1775 # {enforced: true}
1776 # `projects/bar` has a `Policy` with:
1777 # {RestoreDefault: {}}
1778 # The constraint at `organizations/foo` is enforced.
1779 # The constraint at `projects/bar` is not enforced, because
1780 # `constraint_default` for the `Constraint` is `ALLOW`.
1781 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001782 "etag": "A String", # An opaque tag indicating the current version of the `Policy`, used for
1783 # concurrency control.
1784 #
1785 # When the `Policy` is returned from either a `GetPolicy` or a
1786 # `ListOrgPolicy` request, this `etag` indicates the version of the current
1787 # `Policy` to use when executing a read-modify-write loop.
1788 #
1789 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
1790 # `etag` will be unset.
1791 #
1792 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
1793 # that was returned from a `GetOrgPolicy` request as part of a
1794 # read-modify-write loop for concurrency control. Not setting the `etag`in a
1795 # `SetOrgPolicy` request will result in an unconditional write of the
1796 # `Policy`.
1797 },
1798 ],
1799 }</pre>
1800</div>
1801
1802<div class="method">
1803 <code class="details" id="listOrgPolicies_next">listOrgPolicies_next(previous_request, previous_response)</code>
1804 <pre>Retrieves the next page of results.
1805
1806Args:
1807 previous_request: The request for the previous page. (required)
1808 previous_response: The response from the request for the previous page. (required)
1809
1810Returns:
1811 A request object that you can call 'execute()' on to request the next
1812 page. Returns None if there are no more items in the collection.
1813 </pre>
1814</div>
1815
1816<div class="method">
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001817 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1818 <pre>Retrieves the next page of results.
1819
1820Args:
1821 previous_request: The request for the previous page. (required)
1822 previous_response: The response from the request for the previous page. (required)
1823
1824Returns:
1825 A request object that you can call 'execute()' on to request the next
1826 page. Returns None if there are no more items in the collection.
1827 </pre>
1828</div>
1829
1830<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001831 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001832 <pre>Sets the IAM access control policy for the specified Project. Overwrites
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001833any existing policy.
1834
1835The following constraints apply when using `setIamPolicy()`:
1836
1837+ Project does not support `allUsers` and `allAuthenticatedUsers` as
1838`members` in a `Binding` of a `Policy`.
1839
Dan O'Mearadd494642020-05-01 07:42:23 -07001840+ The owner role can be granted to a `user`, `serviceAccount`, or a group
1841that is part of an organization. For example,
1842group@myownpersonaldomain.com could be added as an owner to a project in
1843the myownpersonaldomain.com organization, but not the examplepetstore.com
1844organization.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001845
1846+ Service accounts can be made owners of a project directly
1847without any restrictions. However, to be added as an owner, a user must be
1848invited via Cloud Platform console and must accept the invitation.
1849
1850+ A user cannot be granted the owner role using `setIamPolicy()`. The user
1851must be granted the owner role using the Cloud Platform Console and must
1852explicitly accept the invitation.
1853
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001854+ You can only grant ownership of a project to a member by using the
1855GCP Console. Inviting a member will deliver an invitation email that
1856they must accept. An invitation email is not generated if you are
1857granting a role other than owner, or if both the member you are inviting
1858and the project are part of your organization.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001859
1860+ Membership changes that leave the project without any owners that have
1861accepted the Terms of Service (ToS) will be rejected.
1862
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001863+ If the project is not part of an organization, there must be at least
1864one owner who has accepted the Terms of Service (ToS) agreement in the
1865policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner
1866from the policy will fail. This restriction also applies to legacy
1867projects that no longer have owners who have accepted the ToS. Edits to
1868IAM policies will be rejected until the lack of a ToS-accepting owner is
1869rectified.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001870
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001871+ This method will replace the existing policy, and cannot be used to
1872append additional IAM settings.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001873
1874Note: Removing service accounts from policies or changing their roles
1875can render services completely inoperable. It is important to understand
1876how the service account is being used before removing or updating its
1877roles.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001878
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001879Authorization requires the Google IAM permission
1880`resourcemanager.projects.setIamPolicy` on the project
1881
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001882Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001883 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001884See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001885 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001886 The object takes the form of:
1887
1888{ # Request message for `SetIamPolicy` method.
Dan O'Mearadd494642020-05-01 07:42:23 -07001889 "policy": { # 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 -08001890 # the policy is limited to a few 10s of KB. An empty policy is a
1891 # valid policy but certain Cloud Platform services (such as Projects)
1892 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07001893 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001894 #
1895 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001896 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1897 # `members` to a single `role`. Members can be user accounts, service accounts,
1898 # Google groups, and domains (such as G Suite). A `role` is a named list of
1899 # permissions; each `role` can be an IAM predefined role or a user-created
1900 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001901 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001902 # Optionally, a `binding` can specify a `condition`, which is a logical
1903 # expression that allows access to a resource only if the expression evaluates
1904 # to `true`. A condition can add constraints based on attributes of the
1905 # request, the resource, or both.
1906 #
1907 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001908 #
1909 # {
1910 # "bindings": [
1911 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07001912 # "role": "roles/resourcemanager.organizationAdmin",
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001913 # "members": [
1914 # "user:mike@example.com",
1915 # "group:admins@example.com",
1916 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -07001917 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001918 # ]
1919 # },
1920 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07001921 # "role": "roles/resourcemanager.organizationViewer",
1922 # "members": ["user:eve@example.com"],
1923 # "condition": {
1924 # "title": "expirable access",
1925 # "description": "Does not grant access after Sep 2020",
1926 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
1927 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001928 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001929 # ],
1930 # "etag": "BwWWja0YfJA=",
1931 # "version": 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001932 # }
1933 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001934 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001935 #
1936 # bindings:
1937 # - members:
1938 # - user:mike@example.com
1939 # - group:admins@example.com
1940 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001941 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1942 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001943 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001944 # - user:eve@example.com
1945 # role: roles/resourcemanager.organizationViewer
1946 # condition:
1947 # title: expirable access
1948 # description: Does not grant access after Sep 2020
1949 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
1950 # - etag: BwWWja0YfJA=
1951 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001952 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001953 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001954 # [IAM documentation](https://cloud.google.com/iam/docs/).
1955 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
1956 # `condition` that determines how and when the `bindings` are applied. Each
1957 # of the `bindings` must contain at least one member.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001958 { # Associates `members` with a `role`.
1959 "role": "A String", # Role that is assigned to `members`.
1960 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001961 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
1962 # `members` can have the following values:
1963 #
1964 # * `allUsers`: A special identifier that represents anyone who is
1965 # on the internet; with or without a Google account.
1966 #
1967 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1968 # who is authenticated with a Google account or a service account.
1969 #
1970 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001971 # account. For example, `alice@example.com` .
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001972 #
1973 #
1974 # * `serviceAccount:{emailid}`: An email address that represents a service
1975 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1976 #
1977 # * `group:{emailid}`: An email address that represents a Google group.
1978 # For example, `admins@example.com`.
1979 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001980 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1981 # identifier) representing a user that has been recently deleted. For
1982 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1983 # recovered, this value reverts to `user:{emailid}` and the recovered user
1984 # retains the role in the binding.
1985 #
1986 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1987 # unique identifier) representing a service account that has been recently
1988 # deleted. For example,
1989 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1990 # If the service account is undeleted, this value reverts to
1991 # `serviceAccount:{emailid}` and the undeleted service account retains the
1992 # role in the binding.
1993 #
1994 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1995 # identifier) representing a Google group that has been recently
1996 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1997 # the group is recovered, this value reverts to `group:{emailid}` and the
1998 # recovered group retains the role in the binding.
1999 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002000 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002001 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002002 # users of that domain. For example, `google.com` or `example.com`.
2003 #
2004 "A String",
2005 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002006 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
2007 # NOTE: An unsatisfied condition will not allow user access via current
2008 # binding. Different bindings, including their conditions, are examined
2009 # independently.
2010 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2011 # are documented at https://github.com/google/cel-spec.
2012 #
2013 # Example (Comparison):
2014 #
2015 # title: "Summary size limit"
2016 # description: "Determines if a summary is less than 100 chars"
2017 # expression: "document.summary.size() &lt; 100"
2018 #
2019 # Example (Equality):
2020 #
2021 # title: "Requestor is owner"
2022 # description: "Determines if requestor is the document owner"
2023 # expression: "document.owner == request.auth.claims.email"
2024 #
2025 # Example (Logic):
2026 #
2027 # title: "Public documents"
2028 # description: "Determine whether the document should be publicly visible"
2029 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
2030 #
2031 # Example (Data Manipulation):
2032 #
2033 # title: "Notification string"
2034 # description: "Create a notification string with a timestamp."
2035 # expression: "'New message received at ' + string(document.create_time)"
2036 #
2037 # The exact variables and functions that may be referenced within an expression
2038 # are determined by the service that evaluates it. See the service
2039 # documentation for additional information.
2040 "description": "A String", # Optional. Description of the expression. This is a longer text which
2041 # describes the expression, e.g. when hovered over it in a UI.
2042 "expression": "A String", # Textual representation of an expression in Common Expression Language
2043 # syntax.
2044 "location": "A String", # Optional. String indicating the location of the expression for error
2045 # reporting, e.g. a file name and a position in the file.
2046 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
2047 # its purpose. This can be used e.g. in UIs which allow to enter the
2048 # expression.
2049 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002050 },
2051 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002052 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
2053 { # Specifies the audit configuration for a service.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002054 # The configuration determines which permission types are logged, and what
2055 # identities, if any, are exempted from logging.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002056 # An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002057 #
2058 # If there are AuditConfigs for both `allServices` and a specific service,
2059 # the union of the two AuditConfigs is used for that service: the log_types
2060 # specified in each AuditConfig are enabled, and the exempted_members in each
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002061 # AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002062 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002063 # Example Policy with multiple AuditConfigs:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002064 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002065 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002066 # "audit_configs": [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002067 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002068 # "service": "allServices"
2069 # "audit_log_configs": [
2070 # {
2071 # "log_type": "DATA_READ",
2072 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -07002073 # "user:jose@example.com"
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002074 # ]
2075 # },
2076 # {
2077 # "log_type": "DATA_WRITE",
2078 # },
2079 # {
2080 # "log_type": "ADMIN_READ",
2081 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002082 # ]
2083 # },
2084 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07002085 # "service": "sampleservice.googleapis.com"
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002086 # "audit_log_configs": [
2087 # {
2088 # "log_type": "DATA_READ",
2089 # },
2090 # {
2091 # "log_type": "DATA_WRITE",
2092 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -07002093 # "user:aliya@example.com"
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002094 # ]
2095 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002096 # ]
2097 # }
2098 # ]
2099 # }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002100 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002101 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
2102 # logging. It also exempts jose@example.com from DATA_READ logging, and
2103 # aliya@example.com from DATA_WRITE logging.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002104 "auditLogConfigs": [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002105 { # Provides the configuration for logging a type of permissions.
2106 # Example:
2107 #
2108 # {
2109 # "audit_log_configs": [
2110 # {
2111 # "log_type": "DATA_READ",
2112 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -07002113 # "user:jose@example.com"
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002114 # ]
2115 # },
2116 # {
2117 # "log_type": "DATA_WRITE",
2118 # }
2119 # ]
2120 # }
2121 #
2122 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
Dan O'Mearadd494642020-05-01 07:42:23 -07002123 # jose@example.com from DATA_READ logging.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002124 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of
2125 # permission.
2126 # Follows the same format of Binding.members.
2127 "A String",
2128 ],
2129 "logType": "A String", # The log type that this config enables.
2130 },
2131 ],
2132 "service": "A String", # Specifies a service that will be enabled for audit logging.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002133 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002134 # `allServices` is a special value that covers all services.
2135 },
2136 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002137 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
2138 # prevent simultaneous updates of a policy from overwriting each other.
2139 # It is strongly suggested that systems make use of the `etag` in the
2140 # read-modify-write cycle to perform policy updates in order to avoid race
2141 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
2142 # systems are expected to put that etag in the request to `setIamPolicy` to
2143 # ensure that their change will be applied to the same version of the policy.
2144 #
2145 # **Important:** If you use IAM Conditions, you must include the `etag` field
2146 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2147 # you to overwrite a version `3` policy with a version `1` policy, and all of
2148 # the conditions in the version `3` policy are lost.
2149 "version": 42, # Specifies the format of the policy.
2150 #
2151 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
2152 # are rejected.
2153 #
2154 # Any operation that affects conditional role bindings must specify version
2155 # `3`. This requirement applies to the following operations:
2156 #
2157 # * Getting a policy that includes a conditional role binding
2158 # * Adding a conditional role binding to a policy
2159 # * Changing a conditional role binding in a policy
2160 # * Removing any role binding, with or without a condition, from a policy
2161 # that includes conditions
2162 #
2163 # **Important:** If you use IAM Conditions, you must include the `etag` field
2164 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2165 # you to overwrite a version `3` policy with a version `1` policy, and all of
2166 # the conditions in the version `3` policy are lost.
2167 #
2168 # If a policy does not include any conditions, operations on that policy may
2169 # specify any valid version or leave the field unset.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002170 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002171 "updateMask": "A String", # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002172 # the fields in the mask will be modified. If no mask is provided, the
2173 # following default mask is used:
Dan O'Mearadd494642020-05-01 07:42:23 -07002174 #
2175 # `paths: "bindings, etag"`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002176 }
2177
2178 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002179 Allowed values
2180 1 - v1 error format
2181 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002182
2183Returns:
2184 An object of the form:
2185
Dan O'Mearadd494642020-05-01 07:42:23 -07002186 { # An Identity and Access Management (IAM) policy, which specifies access
2187 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002188 #
2189 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002190 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
2191 # `members` to a single `role`. Members can be user accounts, service accounts,
2192 # Google groups, and domains (such as G Suite). A `role` is a named list of
2193 # permissions; each `role` can be an IAM predefined role or a user-created
2194 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002195 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002196 # Optionally, a `binding` can specify a `condition`, which is a logical
2197 # expression that allows access to a resource only if the expression evaluates
2198 # to `true`. A condition can add constraints based on attributes of the
2199 # request, the resource, or both.
2200 #
2201 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002202 #
2203 # {
2204 # "bindings": [
2205 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07002206 # "role": "roles/resourcemanager.organizationAdmin",
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002207 # "members": [
2208 # "user:mike@example.com",
2209 # "group:admins@example.com",
2210 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -07002211 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002212 # ]
2213 # },
2214 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07002215 # "role": "roles/resourcemanager.organizationViewer",
2216 # "members": ["user:eve@example.com"],
2217 # "condition": {
2218 # "title": "expirable access",
2219 # "description": "Does not grant access after Sep 2020",
2220 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
2221 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002222 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07002223 # ],
2224 # "etag": "BwWWja0YfJA=",
2225 # "version": 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002226 # }
2227 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002228 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002229 #
2230 # bindings:
2231 # - members:
2232 # - user:mike@example.com
2233 # - group:admins@example.com
2234 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07002235 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
2236 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002237 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07002238 # - user:eve@example.com
2239 # role: roles/resourcemanager.organizationViewer
2240 # condition:
2241 # title: expirable access
2242 # description: Does not grant access after Sep 2020
2243 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
2244 # - etag: BwWWja0YfJA=
2245 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002246 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002247 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07002248 # [IAM documentation](https://cloud.google.com/iam/docs/).
2249 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
2250 # `condition` that determines how and when the `bindings` are applied. Each
2251 # of the `bindings` must contain at least one member.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002252 { # Associates `members` with a `role`.
2253 "role": "A String", # Role that is assigned to `members`.
2254 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002255 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
2256 # `members` can have the following values:
2257 #
2258 # * `allUsers`: A special identifier that represents anyone who is
2259 # on the internet; with or without a Google account.
2260 #
2261 # * `allAuthenticatedUsers`: A special identifier that represents anyone
2262 # who is authenticated with a Google account or a service account.
2263 #
2264 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07002265 # account. For example, `alice@example.com` .
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002266 #
2267 #
2268 # * `serviceAccount:{emailid}`: An email address that represents a service
2269 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
2270 #
2271 # * `group:{emailid}`: An email address that represents a Google group.
2272 # For example, `admins@example.com`.
2273 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002274 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
2275 # identifier) representing a user that has been recently deleted. For
2276 # example, `alice@example.com?uid=123456789012345678901`. If the user is
2277 # recovered, this value reverts to `user:{emailid}` and the recovered user
2278 # retains the role in the binding.
2279 #
2280 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
2281 # unique identifier) representing a service account that has been recently
2282 # deleted. For example,
2283 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
2284 # If the service account is undeleted, this value reverts to
2285 # `serviceAccount:{emailid}` and the undeleted service account retains the
2286 # role in the binding.
2287 #
2288 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
2289 # identifier) representing a Google group that has been recently
2290 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
2291 # the group is recovered, this value reverts to `group:{emailid}` and the
2292 # recovered group retains the role in the binding.
2293 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002294 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002295 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002296 # users of that domain. For example, `google.com` or `example.com`.
2297 #
2298 "A String",
2299 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002300 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
2301 # NOTE: An unsatisfied condition will not allow user access via current
2302 # binding. Different bindings, including their conditions, are examined
2303 # independently.
2304 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2305 # are documented at https://github.com/google/cel-spec.
2306 #
2307 # Example (Comparison):
2308 #
2309 # title: "Summary size limit"
2310 # description: "Determines if a summary is less than 100 chars"
2311 # expression: "document.summary.size() &lt; 100"
2312 #
2313 # Example (Equality):
2314 #
2315 # title: "Requestor is owner"
2316 # description: "Determines if requestor is the document owner"
2317 # expression: "document.owner == request.auth.claims.email"
2318 #
2319 # Example (Logic):
2320 #
2321 # title: "Public documents"
2322 # description: "Determine whether the document should be publicly visible"
2323 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
2324 #
2325 # Example (Data Manipulation):
2326 #
2327 # title: "Notification string"
2328 # description: "Create a notification string with a timestamp."
2329 # expression: "'New message received at ' + string(document.create_time)"
2330 #
2331 # The exact variables and functions that may be referenced within an expression
2332 # are determined by the service that evaluates it. See the service
2333 # documentation for additional information.
2334 "description": "A String", # Optional. Description of the expression. This is a longer text which
2335 # describes the expression, e.g. when hovered over it in a UI.
2336 "expression": "A String", # Textual representation of an expression in Common Expression Language
2337 # syntax.
2338 "location": "A String", # Optional. String indicating the location of the expression for error
2339 # reporting, e.g. a file name and a position in the file.
2340 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
2341 # its purpose. This can be used e.g. in UIs which allow to enter the
2342 # expression.
2343 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002344 },
2345 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002346 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
2347 { # Specifies the audit configuration for a service.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002348 # The configuration determines which permission types are logged, and what
2349 # identities, if any, are exempted from logging.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002350 # An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002351 #
2352 # If there are AuditConfigs for both `allServices` and a specific service,
2353 # the union of the two AuditConfigs is used for that service: the log_types
2354 # specified in each AuditConfig are enabled, and the exempted_members in each
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002355 # AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002356 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002357 # Example Policy with multiple AuditConfigs:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002358 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002359 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002360 # "audit_configs": [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002361 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002362 # "service": "allServices"
2363 # "audit_log_configs": [
2364 # {
2365 # "log_type": "DATA_READ",
2366 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -07002367 # "user:jose@example.com"
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002368 # ]
2369 # },
2370 # {
2371 # "log_type": "DATA_WRITE",
2372 # },
2373 # {
2374 # "log_type": "ADMIN_READ",
2375 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002376 # ]
2377 # },
2378 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07002379 # "service": "sampleservice.googleapis.com"
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002380 # "audit_log_configs": [
2381 # {
2382 # "log_type": "DATA_READ",
2383 # },
2384 # {
2385 # "log_type": "DATA_WRITE",
2386 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -07002387 # "user:aliya@example.com"
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002388 # ]
2389 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002390 # ]
2391 # }
2392 # ]
2393 # }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002394 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002395 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
2396 # logging. It also exempts jose@example.com from DATA_READ logging, and
2397 # aliya@example.com from DATA_WRITE logging.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002398 "auditLogConfigs": [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002399 { # Provides the configuration for logging a type of permissions.
2400 # Example:
2401 #
2402 # {
2403 # "audit_log_configs": [
2404 # {
2405 # "log_type": "DATA_READ",
2406 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -07002407 # "user:jose@example.com"
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002408 # ]
2409 # },
2410 # {
2411 # "log_type": "DATA_WRITE",
2412 # }
2413 # ]
2414 # }
2415 #
2416 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
Dan O'Mearadd494642020-05-01 07:42:23 -07002417 # jose@example.com from DATA_READ logging.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002418 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of
2419 # permission.
2420 # Follows the same format of Binding.members.
2421 "A String",
2422 ],
2423 "logType": "A String", # The log type that this config enables.
2424 },
2425 ],
2426 "service": "A String", # Specifies a service that will be enabled for audit logging.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002427 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002428 # `allServices` is a special value that covers all services.
2429 },
2430 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002431 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
2432 # prevent simultaneous updates of a policy from overwriting each other.
2433 # It is strongly suggested that systems make use of the `etag` in the
2434 # read-modify-write cycle to perform policy updates in order to avoid race
2435 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
2436 # systems are expected to put that etag in the request to `setIamPolicy` to
2437 # ensure that their change will be applied to the same version of the policy.
2438 #
2439 # **Important:** If you use IAM Conditions, you must include the `etag` field
2440 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2441 # you to overwrite a version `3` policy with a version `1` policy, and all of
2442 # the conditions in the version `3` policy are lost.
2443 "version": 42, # Specifies the format of the policy.
2444 #
2445 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
2446 # are rejected.
2447 #
2448 # Any operation that affects conditional role bindings must specify version
2449 # `3`. This requirement applies to the following operations:
2450 #
2451 # * Getting a policy that includes a conditional role binding
2452 # * Adding a conditional role binding to a policy
2453 # * Changing a conditional role binding in a policy
2454 # * Removing any role binding, with or without a condition, from a policy
2455 # that includes conditions
2456 #
2457 # **Important:** If you use IAM Conditions, you must include the `etag` field
2458 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2459 # you to overwrite a version `3` policy with a version `1` policy, and all of
2460 # the conditions in the version `3` policy are lost.
2461 #
2462 # If a policy does not include any conditions, operations on that policy may
2463 # specify any valid version or leave the field unset.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002464 }</pre>
2465</div>
2466
2467<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002468 <code class="details" id="setOrgPolicy">setOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002469 <pre>Updates the specified `Policy` on the resource. Creates a new `Policy` for
2470that `Constraint` on the resource if one does not exist.
2471
2472Not supplying an `etag` on the request `Policy` results in an unconditional
2473write of the `Policy`.
2474
2475Args:
2476 resource: string, Resource name of the resource to attach the `Policy`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002477 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002478 The object takes the form of:
2479
2480{ # The request sent to the SetOrgPolicyRequest method.
2481 "policy": { # Defines a Cloud Organization `Policy` which is used to specify `Constraints` # `Policy` to set on the resource.
2482 # for configurations of Cloud Platform resources.
2483 "updateTime": "A String", # The time stamp the `Policy` was previously updated. This is set by the
2484 # server, not specified by the caller, and represents the last time a call to
2485 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
2486 # be ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002487 "version": 42, # Version of the `Policy`. Default version is 0;
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002488 "constraint": "A String", # The name of the `Constraint` the `Policy` is configuring, for example,
2489 # `constraints/serviceuser.services`.
2490 #
2491 # Immutable after creation.
2492 "restoreDefault": { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
2493 # `Constraint` type.
2494 # `constraint_default` enforcement behavior of the specific `Constraint` at
2495 # this resource.
2496 #
2497 # Suppose that `constraint_default` is set to `ALLOW` for the
2498 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
2499 # foo.com sets a `Policy` at their Organization resource node that restricts
2500 # the allowed service activations to deny all service activations. They
2501 # could then set a `Policy` with the `policy_type` `restore_default` on
2502 # several experimental projects, restoring the `constraint_default`
2503 # enforcement of the `Constraint` for only those projects, allowing those
2504 # projects to have all services activated.
2505 },
2506 "listPolicy": { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
2507 # resource.
2508 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002509 # `ListPolicy` can define specific values and subtrees of Cloud Resource
2510 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
2511 # are allowed or denied by setting the `allowed_values` and `denied_values`
2512 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
2513 # The `under:` prefix is used to denote resource subtree values.
2514 # The `is:` prefix is used to denote specific values, and is required only
2515 # if the value contains a ":". Values prefixed with "is:" are treated the
2516 # same as values with no prefix.
2517 # Ancestry subtrees must be in one of the following formats:
Dan O'Mearadd494642020-05-01 07:42:23 -07002518 # - "projects/&lt;project-id&gt;", e.g. "projects/tokyo-rain-123"
2519 # - "folders/&lt;folder-id&gt;", e.g. "folders/1234"
2520 # - "organizations/&lt;organization-id&gt;", e.g. "organizations/1234"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002521 # The `supports_under` field of the associated `Constraint` defines whether
2522 # ancestry prefixes can be used. You can set `allowed_values` and
2523 # `denied_values` in the same `Policy` if `all_values` is
2524 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
2525 # values. If `all_values` is set to either `ALLOW` or `DENY`,
2526 # `allowed_values` and `denied_values` must be unset.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002527 "allValues": "A String", # The policy all_values state.
Dan O'Mearadd494642020-05-01 07:42:23 -07002528 "deniedValues": [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002529 # is set to `ALL_VALUES_UNSPECIFIED`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002530 "A String",
2531 ],
2532 "inheritFromParent": True or False, # Determines the inheritance behavior for this `Policy`.
2533 #
2534 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
2535 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
2536 # set to `true`, then the values from the effective `Policy` of the parent
2537 # resource are inherited, meaning the values set in this `Policy` are
2538 # added to the values inherited up the hierarchy.
2539 #
2540 # Setting `Policy` hierarchies that inherit both allowed values and denied
2541 # values isn't recommended in most circumstances to keep the configuration
2542 # simple and understandable. However, it is possible to set a `Policy` with
2543 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
2544 # In this case, the values that are allowed must be in `allowed_values` and
2545 # not present in `denied_values`.
2546 #
2547 # For example, suppose you have a `Constraint`
2548 # `constraints/serviceuser.services`, which has a `constraint_type` of
2549 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
2550 # Suppose that at the Organization level, a `Policy` is applied that
2551 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
2552 # `Policy` is applied to a project below the Organization that has
2553 # `inherit_from_parent` set to `false` and field all_values set to DENY,
2554 # then an attempt to activate any API will be denied.
2555 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002556 # The following examples demonstrate different possible layerings for
2557 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002558 #
2559 # Example 1 (no inherited values):
2560 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002561 # {allowed_values: "E1" allowed_values:"E2"}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002562 # `projects/bar` has `inherit_from_parent` `false` and values:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002563 # {allowed_values: "E3" allowed_values: "E4"}
2564 # The accepted values at `organizations/foo` are `E1`, `E2`.
2565 # The accepted values at `projects/bar` are `E3`, and `E4`.
2566 #
2567 # Example 2 (inherited values):
2568 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002569 # {allowed_values: "E1" allowed_values:"E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002570 # `projects/bar` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002571 # {value: "E3" value: "E4" inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002572 # The accepted values at `organizations/foo` are `E1`, `E2`.
2573 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
2574 #
2575 # Example 3 (inheriting both allowed and denied values):
2576 # `organizations/foo` has a `Policy` with values:
2577 # {allowed_values: "E1" allowed_values: "E2"}
2578 # `projects/bar` has a `Policy` with:
2579 # {denied_values: "E1"}
2580 # The accepted values at `organizations/foo` are `E1`, `E2`.
2581 # The value accepted at `projects/bar` is `E2`.
2582 #
2583 # Example 4 (RestoreDefault):
2584 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002585 # {allowed_values: "E1" allowed_values:"E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002586 # `projects/bar` has a `Policy` with values:
2587 # {RestoreDefault: {}}
2588 # The accepted values at `organizations/foo` are `E1`, `E2`.
2589 # The accepted values at `projects/bar` are either all or none depending on
2590 # the value of `constraint_default` (if `ALLOW`, all; if
2591 # `DENY`, none).
2592 #
2593 # Example 5 (no policy inherits parent policy):
2594 # `organizations/foo` has no `Policy` set.
2595 # `projects/bar` has no `Policy` set.
2596 # The accepted values at both levels are either all or none depending on
2597 # the value of `constraint_default` (if `ALLOW`, all; if
2598 # `DENY`, none).
2599 #
2600 # Example 6 (ListConstraint allowing all):
2601 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002602 # {allowed_values: "E1" allowed_values: "E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002603 # `projects/bar` has a `Policy` with:
2604 # {all: ALLOW}
2605 # The accepted values at `organizations/foo` are `E1`, E2`.
2606 # Any value is accepted at `projects/bar`.
2607 #
2608 # Example 7 (ListConstraint allowing none):
2609 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002610 # {allowed_values: "E1" allowed_values: "E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002611 # `projects/bar` has a `Policy` with:
2612 # {all: DENY}
2613 # The accepted values at `organizations/foo` are `E1`, E2`.
2614 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002615 #
2616 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
2617 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07002618 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002619 # `organizations/foo` has a `Policy` with values:
2620 # {allowed_values: "under:organizations/O1"}
2621 # `projects/bar` has a `Policy` with:
2622 # {allowed_values: "under:projects/P3"}
2623 # {denied_values: "under:folders/F2"}
2624 # The accepted values at `organizations/foo` are `organizations/O1`,
2625 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
2626 # `projects/P3`.
2627 # The accepted values at `projects/bar` are `organizations/O1`,
2628 # `folders/F1`, `projects/P1`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002629 "suggestedValue": "A String", # Optional. The Google Cloud Console will try to default to a configuration
2630 # that matches the value specified in this `Policy`. If `suggested_value`
2631 # is not set, it will inherit the value specified higher in the hierarchy,
2632 # unless `inherit_from_parent` is `false`.
Dan O'Mearadd494642020-05-01 07:42:23 -07002633 "allowedValues": [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002634 # is set to `ALL_VALUES_UNSPECIFIED`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002635 "A String",
2636 ],
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002637 },
2638 "booleanPolicy": { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
2639 # resource.
2640 "enforced": True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
2641 # configuration is acceptable.
2642 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002643 # Suppose you have a `Constraint`
2644 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
2645 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
2646 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002647 # - If the `Policy` at this resource has enforced set to `false`, serial
2648 # port connection attempts will be allowed.
2649 # - If the `Policy` at this resource has enforced set to `true`, serial
2650 # port connection attempts will be refused.
2651 # - If the `Policy` at this resource is `RestoreDefault`, serial port
2652 # connection attempts will be allowed.
2653 # - If no `Policy` is set at this resource or anywhere higher in the
2654 # resource hierarchy, serial port connection attempts will be allowed.
2655 # - If no `Policy` is set at this resource, but one exists higher in the
2656 # resource hierarchy, the behavior is as if the`Policy` were set at
2657 # this resource.
2658 #
2659 # The following examples demonstrate the different possible layerings:
2660 #
2661 # Example 1 (nearest `Constraint` wins):
2662 # `organizations/foo` has a `Policy` with:
2663 # {enforced: false}
2664 # `projects/bar` has no `Policy` set.
2665 # The constraint at `projects/bar` and `organizations/foo` will not be
2666 # enforced.
2667 #
2668 # Example 2 (enforcement gets replaced):
2669 # `organizations/foo` has a `Policy` with:
2670 # {enforced: false}
2671 # `projects/bar` has a `Policy` with:
2672 # {enforced: true}
2673 # The constraint at `organizations/foo` is not enforced.
2674 # The constraint at `projects/bar` is enforced.
2675 #
2676 # Example 3 (RestoreDefault):
2677 # `organizations/foo` has a `Policy` with:
2678 # {enforced: true}
2679 # `projects/bar` has a `Policy` with:
2680 # {RestoreDefault: {}}
2681 # The constraint at `organizations/foo` is enforced.
2682 # The constraint at `projects/bar` is not enforced, because
2683 # `constraint_default` for the `Constraint` is `ALLOW`.
2684 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002685 "etag": "A String", # An opaque tag indicating the current version of the `Policy`, used for
2686 # concurrency control.
2687 #
2688 # When the `Policy` is returned from either a `GetPolicy` or a
2689 # `ListOrgPolicy` request, this `etag` indicates the version of the current
2690 # `Policy` to use when executing a read-modify-write loop.
2691 #
2692 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
2693 # `etag` will be unset.
2694 #
2695 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
2696 # that was returned from a `GetOrgPolicy` request as part of a
2697 # read-modify-write loop for concurrency control. Not setting the `etag`in a
2698 # `SetOrgPolicy` request will result in an unconditional write of the
2699 # `Policy`.
2700 },
2701 }
2702
2703 x__xgafv: string, V1 error format.
2704 Allowed values
2705 1 - v1 error format
2706 2 - v2 error format
2707
2708Returns:
2709 An object of the form:
2710
2711 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
2712 # for configurations of Cloud Platform resources.
2713 "updateTime": "A String", # The time stamp the `Policy` was previously updated. This is set by the
2714 # server, not specified by the caller, and represents the last time a call to
2715 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
2716 # be ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002717 "version": 42, # Version of the `Policy`. Default version is 0;
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002718 "constraint": "A String", # The name of the `Constraint` the `Policy` is configuring, for example,
2719 # `constraints/serviceuser.services`.
2720 #
2721 # Immutable after creation.
2722 "restoreDefault": { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
2723 # `Constraint` type.
2724 # `constraint_default` enforcement behavior of the specific `Constraint` at
2725 # this resource.
2726 #
2727 # Suppose that `constraint_default` is set to `ALLOW` for the
2728 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
2729 # foo.com sets a `Policy` at their Organization resource node that restricts
2730 # the allowed service activations to deny all service activations. They
2731 # could then set a `Policy` with the `policy_type` `restore_default` on
2732 # several experimental projects, restoring the `constraint_default`
2733 # enforcement of the `Constraint` for only those projects, allowing those
2734 # projects to have all services activated.
2735 },
2736 "listPolicy": { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
2737 # resource.
2738 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002739 # `ListPolicy` can define specific values and subtrees of Cloud Resource
2740 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
2741 # are allowed or denied by setting the `allowed_values` and `denied_values`
2742 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
2743 # The `under:` prefix is used to denote resource subtree values.
2744 # The `is:` prefix is used to denote specific values, and is required only
2745 # if the value contains a ":". Values prefixed with "is:" are treated the
2746 # same as values with no prefix.
2747 # Ancestry subtrees must be in one of the following formats:
Dan O'Mearadd494642020-05-01 07:42:23 -07002748 # - "projects/&lt;project-id&gt;", e.g. "projects/tokyo-rain-123"
2749 # - "folders/&lt;folder-id&gt;", e.g. "folders/1234"
2750 # - "organizations/&lt;organization-id&gt;", e.g. "organizations/1234"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002751 # The `supports_under` field of the associated `Constraint` defines whether
2752 # ancestry prefixes can be used. You can set `allowed_values` and
2753 # `denied_values` in the same `Policy` if `all_values` is
2754 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
2755 # values. If `all_values` is set to either `ALLOW` or `DENY`,
2756 # `allowed_values` and `denied_values` must be unset.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002757 "allValues": "A String", # The policy all_values state.
Dan O'Mearadd494642020-05-01 07:42:23 -07002758 "deniedValues": [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002759 # is set to `ALL_VALUES_UNSPECIFIED`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002760 "A String",
2761 ],
2762 "inheritFromParent": True or False, # Determines the inheritance behavior for this `Policy`.
2763 #
2764 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
2765 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
2766 # set to `true`, then the values from the effective `Policy` of the parent
2767 # resource are inherited, meaning the values set in this `Policy` are
2768 # added to the values inherited up the hierarchy.
2769 #
2770 # Setting `Policy` hierarchies that inherit both allowed values and denied
2771 # values isn't recommended in most circumstances to keep the configuration
2772 # simple and understandable. However, it is possible to set a `Policy` with
2773 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
2774 # In this case, the values that are allowed must be in `allowed_values` and
2775 # not present in `denied_values`.
2776 #
2777 # For example, suppose you have a `Constraint`
2778 # `constraints/serviceuser.services`, which has a `constraint_type` of
2779 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
2780 # Suppose that at the Organization level, a `Policy` is applied that
2781 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
2782 # `Policy` is applied to a project below the Organization that has
2783 # `inherit_from_parent` set to `false` and field all_values set to DENY,
2784 # then an attempt to activate any API will be denied.
2785 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002786 # The following examples demonstrate different possible layerings for
2787 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002788 #
2789 # Example 1 (no inherited values):
2790 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002791 # {allowed_values: "E1" allowed_values:"E2"}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002792 # `projects/bar` has `inherit_from_parent` `false` and values:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002793 # {allowed_values: "E3" allowed_values: "E4"}
2794 # The accepted values at `organizations/foo` are `E1`, `E2`.
2795 # The accepted values at `projects/bar` are `E3`, and `E4`.
2796 #
2797 # Example 2 (inherited values):
2798 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002799 # {allowed_values: "E1" allowed_values:"E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002800 # `projects/bar` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002801 # {value: "E3" value: "E4" inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002802 # The accepted values at `organizations/foo` are `E1`, `E2`.
2803 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
2804 #
2805 # Example 3 (inheriting both allowed and denied values):
2806 # `organizations/foo` has a `Policy` with values:
2807 # {allowed_values: "E1" allowed_values: "E2"}
2808 # `projects/bar` has a `Policy` with:
2809 # {denied_values: "E1"}
2810 # The accepted values at `organizations/foo` are `E1`, `E2`.
2811 # The value accepted at `projects/bar` is `E2`.
2812 #
2813 # Example 4 (RestoreDefault):
2814 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002815 # {allowed_values: "E1" allowed_values:"E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002816 # `projects/bar` has a `Policy` with values:
2817 # {RestoreDefault: {}}
2818 # The accepted values at `organizations/foo` are `E1`, `E2`.
2819 # The accepted values at `projects/bar` are either all or none depending on
2820 # the value of `constraint_default` (if `ALLOW`, all; if
2821 # `DENY`, none).
2822 #
2823 # Example 5 (no policy inherits parent policy):
2824 # `organizations/foo` has no `Policy` set.
2825 # `projects/bar` has no `Policy` set.
2826 # The accepted values at both levels are either all or none depending on
2827 # the value of `constraint_default` (if `ALLOW`, all; if
2828 # `DENY`, none).
2829 #
2830 # Example 6 (ListConstraint allowing all):
2831 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002832 # {allowed_values: "E1" allowed_values: "E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002833 # `projects/bar` has a `Policy` with:
2834 # {all: ALLOW}
2835 # The accepted values at `organizations/foo` are `E1`, E2`.
2836 # Any value is accepted at `projects/bar`.
2837 #
2838 # Example 7 (ListConstraint allowing none):
2839 # `organizations/foo` has a `Policy` with values:
Dan O'Mearadd494642020-05-01 07:42:23 -07002840 # {allowed_values: "E1" allowed_values: "E2"}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002841 # `projects/bar` has a `Policy` with:
2842 # {all: DENY}
2843 # The accepted values at `organizations/foo` are `E1`, E2`.
2844 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002845 #
2846 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
2847 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07002848 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002849 # `organizations/foo` has a `Policy` with values:
2850 # {allowed_values: "under:organizations/O1"}
2851 # `projects/bar` has a `Policy` with:
2852 # {allowed_values: "under:projects/P3"}
2853 # {denied_values: "under:folders/F2"}
2854 # The accepted values at `organizations/foo` are `organizations/O1`,
2855 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
2856 # `projects/P3`.
2857 # The accepted values at `projects/bar` are `organizations/O1`,
2858 # `folders/F1`, `projects/P1`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002859 "suggestedValue": "A String", # Optional. The Google Cloud Console will try to default to a configuration
2860 # that matches the value specified in this `Policy`. If `suggested_value`
2861 # is not set, it will inherit the value specified higher in the hierarchy,
2862 # unless `inherit_from_parent` is `false`.
Dan O'Mearadd494642020-05-01 07:42:23 -07002863 "allowedValues": [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002864 # is set to `ALL_VALUES_UNSPECIFIED`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002865 "A String",
2866 ],
2867 },
2868 "booleanPolicy": { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
2869 # resource.
2870 "enforced": True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
2871 # configuration is acceptable.
2872 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002873 # Suppose you have a `Constraint`
2874 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
2875 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
2876 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002877 # - If the `Policy` at this resource has enforced set to `false`, serial
2878 # port connection attempts will be allowed.
2879 # - If the `Policy` at this resource has enforced set to `true`, serial
2880 # port connection attempts will be refused.
2881 # - If the `Policy` at this resource is `RestoreDefault`, serial port
2882 # connection attempts will be allowed.
2883 # - If no `Policy` is set at this resource or anywhere higher in the
2884 # resource hierarchy, serial port connection attempts will be allowed.
2885 # - If no `Policy` is set at this resource, but one exists higher in the
2886 # resource hierarchy, the behavior is as if the`Policy` were set at
2887 # this resource.
2888 #
2889 # The following examples demonstrate the different possible layerings:
2890 #
2891 # Example 1 (nearest `Constraint` wins):
2892 # `organizations/foo` has a `Policy` with:
2893 # {enforced: false}
2894 # `projects/bar` has no `Policy` set.
2895 # The constraint at `projects/bar` and `organizations/foo` will not be
2896 # enforced.
2897 #
2898 # Example 2 (enforcement gets replaced):
2899 # `organizations/foo` has a `Policy` with:
2900 # {enforced: false}
2901 # `projects/bar` has a `Policy` with:
2902 # {enforced: true}
2903 # The constraint at `organizations/foo` is not enforced.
2904 # The constraint at `projects/bar` is enforced.
2905 #
2906 # Example 3 (RestoreDefault):
2907 # `organizations/foo` has a `Policy` with:
2908 # {enforced: true}
2909 # `projects/bar` has a `Policy` with:
2910 # {RestoreDefault: {}}
2911 # The constraint at `organizations/foo` is enforced.
2912 # The constraint at `projects/bar` is not enforced, because
2913 # `constraint_default` for the `Constraint` is `ALLOW`.
2914 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002915 "etag": "A String", # An opaque tag indicating the current version of the `Policy`, used for
2916 # concurrency control.
2917 #
2918 # When the `Policy` is returned from either a `GetPolicy` or a
2919 # `ListOrgPolicy` request, this `etag` indicates the version of the current
2920 # `Policy` to use when executing a read-modify-write loop.
2921 #
2922 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
2923 # `etag` will be unset.
2924 #
2925 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
2926 # that was returned from a `GetOrgPolicy` request as part of a
2927 # read-modify-write loop for concurrency control. Not setting the `etag`in a
2928 # `SetOrgPolicy` request will result in an unconditional write of the
2929 # `Policy`.
2930 }</pre>
2931</div>
2932
2933<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002934 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002935 <pre>Returns permissions that a caller has on the specified Project.
2936
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002937There are no permissions required for making this API call.
2938
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002939Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002940 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002941See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002942 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002943 The object takes the form of:
2944
2945{ # Request message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002946 "permissions": [ # The set of permissions to check for the `resource`. Permissions with
2947 # wildcards (such as '*' or 'storage.*') are not allowed. For more
2948 # information see
2949 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002950 "A String",
2951 ],
2952 }
2953
2954 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002955 Allowed values
2956 1 - v1 error format
2957 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002958
2959Returns:
2960 An object of the form:
2961
2962 { # Response message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002963 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
2964 # allowed.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002965 "A String",
2966 ],
2967 }</pre>
2968</div>
2969
2970<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002971 <code class="details" id="undelete">undelete(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002972 <pre>Restores the Project identified by the specified
2973`project_id` (for example, `my-project-123`).
2974You can only use this method for a Project that has a lifecycle state of
2975DELETE_REQUESTED.
2976After deletion starts, the Project cannot be restored.
2977
2978The caller must have modify permissions for this Project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002979
2980Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002981 projectId: string, The project ID (for example, `foo-bar-123`).
2982
2983Required. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002984 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002985 The object takes the form of:
2986
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002987{ # The request sent to the UndeleteProject
2988 # method.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002989 }
2990
2991 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002992 Allowed values
2993 1 - v1 error format
2994 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002995
2996Returns:
2997 An object of the form:
2998
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002999 { # A generic empty message that you can re-use to avoid defining duplicated
3000 # empty messages in your APIs. A typical example is to use it as the request
3001 # or the response type of an API method. For instance:
3002 #
3003 # service Foo {
3004 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
3005 # }
3006 #
3007 # The JSON representation for `Empty` is empty JSON object `{}`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003008 }</pre>
3009</div>
3010
3011<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003012 <code class="details" id="update">update(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003013 <pre>Updates the attributes of the Project identified by the specified
3014`project_id` (for example, `my-project-123`).
3015
3016The caller must have modify permissions for this Project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003017
3018Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003019 projectId: string, The project ID (for example, `my-project-123`).
3020
3021Required. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003022 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003023 The object takes the form of:
3024
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003025{ # A Project is a high-level Google Cloud Platform entity. It is a
Dan O'Mearadd494642020-05-01 07:42:23 -07003026 # container for ACLs, APIs, App Engine Apps, VMs, and other
3027 # Google Cloud Platform resources.
3028 "name": "A String", # The optional user-assigned display name of the Project.
3029 # When present it must be between 4 to 30 characters.
3030 # Allowed characters are: lowercase and uppercase letters, numbers,
3031 # hyphen, single-quote, double-quote, space, and exclamation point.
3032 #
3033 # Example: &lt;code&gt;My Project&lt;/code&gt;
3034 # Read-write.
3035 "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
3036 #
3037 # Supported parent types include "organization" and "folder". Once set, the
3038 # parent cannot be cleared. The `parent` can be set on creation or using the
3039 # `UpdateProject` method; the end user must have the
3040 # `resourcemanager.projects.create` permission on the parent.
3041 #
3042 # Read-write.
3043 # Cloud Platform is a generic term for something you (a developer) may want to
3044 # interact with through one of our API's. Some examples are an App Engine app,
3045 # a Compute Engine instance, a Cloud SQL database, and so on.
3046 "type": "A String", # Required field representing the resource type this id is for.
3047 # At present, the valid types are: "organization", "folder", and "project".
3048 "id": "A String", # Required field for the type-specific id. This should correspond to the id
3049 # used in the type-specific API's.
3050 },
3051 "projectId": "A String", # The unique, user-assigned ID of the Project.
3052 # It must be 6 to 30 lowercase letters, digits, or hyphens.
3053 # It must start with a letter.
3054 # Trailing hyphens are prohibited.
3055 #
3056 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
3057 # Read-only after creation.
3058 "labels": { # The labels associated with this Project.
3059 #
3060 # Label keys must be between 1 and 63 characters long and must conform
3061 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
3062 #
3063 # Label values must be between 0 and 63 characters long and must conform
3064 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
3065 # value can be empty.
3066 #
3067 # No more than 256 labels can be associated with a given resource.
3068 #
3069 # Clients should store labels in a representation such as JSON that does not
3070 # depend on specific characters being disallowed.
3071 #
3072 # Example: &lt;code&gt;"environment" : "dev"&lt;/code&gt;
3073 # Read-write.
3074 "a_key": "A String",
3075 },
3076 "projectNumber": "A String", # The number uniquely identifying the project.
3077 #
3078 # Example: &lt;code&gt;415104041262&lt;/code&gt;
3079 # Read-only.
3080 "lifecycleState": "A String", # The Project lifecycle state.
3081 #
3082 # Read-only.
3083 "createTime": "A String", # Creation time.
3084 #
3085 # Read-only.
3086 }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003087
3088 x__xgafv: string, V1 error format.
3089 Allowed values
3090 1 - v1 error format
3091 2 - v2 error format
3092
3093Returns:
3094 An object of the form:
3095
3096 { # A Project is a high-level Google Cloud Platform entity. It is a
Dan O'Mearadd494642020-05-01 07:42:23 -07003097 # container for ACLs, APIs, App Engine Apps, VMs, and other
3098 # Google Cloud Platform resources.
3099 "name": "A String", # The optional user-assigned display name of the Project.
3100 # When present it must be between 4 to 30 characters.
3101 # Allowed characters are: lowercase and uppercase letters, numbers,
3102 # hyphen, single-quote, double-quote, space, and exclamation point.
3103 #
3104 # Example: &lt;code&gt;My Project&lt;/code&gt;
3105 # Read-write.
3106 "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
3107 #
3108 # Supported parent types include "organization" and "folder". Once set, the
3109 # parent cannot be cleared. The `parent` can be set on creation or using the
3110 # `UpdateProject` method; the end user must have the
3111 # `resourcemanager.projects.create` permission on the parent.
3112 #
3113 # Read-write.
3114 # Cloud Platform is a generic term for something you (a developer) may want to
3115 # interact with through one of our API's. Some examples are an App Engine app,
3116 # a Compute Engine instance, a Cloud SQL database, and so on.
3117 "type": "A String", # Required field representing the resource type this id is for.
3118 # At present, the valid types are: "organization", "folder", and "project".
3119 "id": "A String", # Required field for the type-specific id. This should correspond to the id
3120 # used in the type-specific API's.
3121 },
3122 "projectId": "A String", # The unique, user-assigned ID of the Project.
3123 # It must be 6 to 30 lowercase letters, digits, or hyphens.
3124 # It must start with a letter.
3125 # Trailing hyphens are prohibited.
3126 #
3127 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
3128 # Read-only after creation.
3129 "labels": { # The labels associated with this Project.
3130 #
3131 # Label keys must be between 1 and 63 characters long and must conform
3132 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
3133 #
3134 # Label values must be between 0 and 63 characters long and must conform
3135 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
3136 # value can be empty.
3137 #
3138 # No more than 256 labels can be associated with a given resource.
3139 #
3140 # Clients should store labels in a representation such as JSON that does not
3141 # depend on specific characters being disallowed.
3142 #
3143 # Example: &lt;code&gt;"environment" : "dev"&lt;/code&gt;
3144 # Read-write.
3145 "a_key": "A String",
3146 },
3147 "projectNumber": "A String", # The number uniquely identifying the project.
3148 #
3149 # Example: &lt;code&gt;415104041262&lt;/code&gt;
3150 # Read-only.
3151 "lifecycleState": "A String", # The Project lifecycle state.
3152 #
3153 # Read-only.
3154 "createTime": "A String", # Creation time.
3155 #
3156 # Read-only.
3157 }</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003158</div>
3159
3160</body></html>