blob: 12f3fbbc45033e93c40037aa6481c91e4a4d58aa [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 Kim65020912020-05-20 12:08:20 -0700102 <code><a href="#list">list(filter=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Lists Projects that the caller has the `resourcemanager.projects.get`</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#listAvailableOrgPolicyConstraints">listAvailableOrgPolicyConstraints(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700106<p class="firstline">Lists `Constraints` that could be applied on the specified resource.</p>
107<p class="toc_element">
108 <code><a href="#listAvailableOrgPolicyConstraints_next">listAvailableOrgPolicyConstraints_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#listOrgPolicies">listOrgPolicies(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700112<p class="firstline">Lists all the `Policies` set for a particular resource.</p>
113<p class="toc_element">
114 <code><a href="#listOrgPolicies_next">listOrgPolicies_next(previous_request, previous_response)</a></code></p>
115<p class="firstline">Retrieves the next page of results.</p>
116<p class="toc_element">
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700117 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
118<p class="firstline">Retrieves the next page of results.</p>
119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700145 &quot;etag&quot;: &quot;A String&quot;, # The current version, for concurrency control. Not sending an `etag`
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700146 # will cause the `Policy` to be cleared blindly.
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;constraint&quot;: &quot;A String&quot;, # Name of the `Constraint` of the `Policy` to clear.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700148 }
149
150 x__xgafv: string, V1 error format.
151 Allowed values
152 1 - v1 error format
153 2 - v2 error format
154
155Returns:
156 An object of the form:
157
158 { # A generic empty message that you can re-use to avoid defining duplicated
159 # empty messages in your APIs. A typical example is to use it as the request
160 # or the response type of an API method. For instance:
161 #
162 # service Foo {
163 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
164 # }
165 #
166 # The JSON representation for `Empty` is empty JSON object `{}`.
167 }</pre>
168</div>
169
170<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 <code class="details" id="create">create(body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800172 <pre>Request that a new Project be created. The result is an Operation which
Dan O'Mearadd494642020-05-01 07:42:23 -0700173can be used to track the creation process. This process usually takes a few
174seconds, but can sometimes take much longer. The tracking Operation is
175automatically deleted after a few hours, so there is no need to call
176DeleteOperation.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700177
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178Authorization requires the Google IAM permission
179`resourcemanager.projects.create` on the specified parent for the new
180project. The parent is identified by a specified ResourceId,
181which must include both an ID and a type, such as organization.
182
183This method does not associate the new project with a billing account.
184You can set or update the billing account associated with a project using
185the [`projects.updateBillingInfo`]
186(/billing/reference/rest/v1/projects/updateBillingInfo) method.
187
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700188Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700190 The object takes the form of:
191
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800192{ # A Project is a high-level Google Cloud Platform entity. It is a
Bu Sun Kim65020912020-05-20 12:08:20 -0700193 # container for ACLs, APIs, App Engine Apps, VMs, and other
194 # Google Cloud Platform resources.
195 &quot;parent&quot;: { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
196 #
197 # Supported parent types include &quot;organization&quot; and &quot;folder&quot;. Once set, the
198 # parent cannot be cleared. The `parent` can be set on creation or using the
199 # `UpdateProject` method; the end user must have the
200 # `resourcemanager.projects.create` permission on the parent.
201 #
202 # Read-write.
203 # Cloud Platform is a generic term for something you (a developer) may want to
204 # interact with through one of our API&#x27;s. Some examples are an App Engine app,
205 # a Compute Engine instance, a Cloud SQL database, and so on.
206 &quot;type&quot;: &quot;A String&quot;, # Required field representing the resource type this id is for.
207 # At present, the valid types are: &quot;organization&quot;, &quot;folder&quot;, and &quot;project&quot;.
208 &quot;id&quot;: &quot;A String&quot;, # Required field for the type-specific id. This should correspond to the id
209 # used in the type-specific API&#x27;s.
210 },
211 &quot;labels&quot;: { # The labels associated with this Project.
212 #
213 # Label keys must be between 1 and 63 characters long and must conform
214 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
215 #
216 # Label values must be between 0 and 63 characters long and must conform
217 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
218 # value can be empty.
219 #
220 # No more than 256 labels can be associated with a given resource.
221 #
222 # Clients should store labels in a representation such as JSON that does not
223 # depend on specific characters being disallowed.
224 #
225 # Example: &lt;code&gt;&quot;environment&quot; : &quot;dev&quot;&lt;/code&gt;
226 # Read-write.
227 &quot;a_key&quot;: &quot;A String&quot;,
228 },
229 &quot;createTime&quot;: &quot;A String&quot;, # Creation time.
230 #
231 # Read-only.
232 &quot;name&quot;: &quot;A String&quot;, # The optional user-assigned display name of the Project.
233 # When present it must be between 4 to 30 characters.
234 # Allowed characters are: lowercase and uppercase letters, numbers,
235 # hyphen, single-quote, double-quote, space, and exclamation point.
236 #
237 # Example: &lt;code&gt;My Project&lt;/code&gt;
238 # Read-write.
239 &quot;projectId&quot;: &quot;A String&quot;, # The unique, user-assigned ID of the Project.
240 # It must be 6 to 30 lowercase letters, digits, or hyphens.
241 # It must start with a letter.
242 # Trailing hyphens are prohibited.
243 #
244 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
245 # Read-only after creation.
246 &quot;lifecycleState&quot;: &quot;A String&quot;, # The Project lifecycle state.
247 #
248 # Read-only.
249 &quot;projectNumber&quot;: &quot;A String&quot;, # The number uniquely identifying the project.
250 #
251 # Example: &lt;code&gt;415104041262&lt;/code&gt;
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700265 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800266 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700269 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700270 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700271 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 # If `true`, the operation is completed, and either `error` or `response` is
Thomas Coffee2f245372017-03-27 10:39:26 -0700273 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700274 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Thomas Coffee2f245372017-03-27 10:39:26 -0700275 # method returns no data on success, such as `Delete`, the response is
276 # `google.protobuf.Empty`. If the original method is standard
277 # `Get`/`Create`/`Update`, the response should be the resource. For other
278 # methods, the response should have the type `XxxResponse`, where `Xxx`
279 # is the original method name. For example, if the original method name
280 # is `TakeSnapshot()`, the inferred response type is
281 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700282 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Thomas Coffee2f245372017-03-27 10:39:26 -0700283 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700284 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Thomas Coffee2f245372017-03-27 10:39:26 -0700285 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700286 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700287 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
288 # different programming environments, including REST APIs and RPC APIs. It is
289 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
290 # three pieces of data: error code, error message, and error details.
291 #
292 # You can find out more about this error model and how to work with it in the
293 # [API Design Guide](https://cloud.google.com/apis/design/errors).
294 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
295 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
296 # user-facing error message should be localized and sent in the
297 # google.rpc.Status.details field, or localized by the client.
298 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
299 # message types for APIs to use.
300 {
301 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
302 },
303 ],
304 },
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
Bu Sun Kim65020912020-05-20 12:08:20 -0700315This method changes the Project&#x27;s lifecycle state from
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800316ACTIVE
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
Bu Sun Kim65020912020-05-20 12:08:20 -0700376 # container for ACLs, APIs, App Engine Apps, VMs, and other
377 # Google Cloud Platform resources.
378 &quot;parent&quot;: { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
379 #
380 # Supported parent types include &quot;organization&quot; and &quot;folder&quot;. Once set, the
381 # parent cannot be cleared. The `parent` can be set on creation or using the
382 # `UpdateProject` method; the end user must have the
383 # `resourcemanager.projects.create` permission on the parent.
384 #
385 # Read-write.
386 # Cloud Platform is a generic term for something you (a developer) may want to
387 # interact with through one of our API&#x27;s. Some examples are an App Engine app,
388 # a Compute Engine instance, a Cloud SQL database, and so on.
389 &quot;type&quot;: &quot;A String&quot;, # Required field representing the resource type this id is for.
390 # At present, the valid types are: &quot;organization&quot;, &quot;folder&quot;, and &quot;project&quot;.
391 &quot;id&quot;: &quot;A String&quot;, # Required field for the type-specific id. This should correspond to the id
392 # used in the type-specific API&#x27;s.
393 },
394 &quot;labels&quot;: { # The labels associated with this Project.
395 #
396 # Label keys must be between 1 and 63 characters long and must conform
397 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
398 #
399 # Label values must be between 0 and 63 characters long and must conform
400 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
401 # value can be empty.
402 #
403 # No more than 256 labels can be associated with a given resource.
404 #
405 # Clients should store labels in a representation such as JSON that does not
406 # depend on specific characters being disallowed.
407 #
408 # Example: &lt;code&gt;&quot;environment&quot; : &quot;dev&quot;&lt;/code&gt;
409 # Read-write.
410 &quot;a_key&quot;: &quot;A String&quot;,
411 },
412 &quot;createTime&quot;: &quot;A String&quot;, # Creation time.
413 #
414 # Read-only.
415 &quot;name&quot;: &quot;A String&quot;, # The optional user-assigned display name of the Project.
416 # When present it must be between 4 to 30 characters.
417 # Allowed characters are: lowercase and uppercase letters, numbers,
418 # hyphen, single-quote, double-quote, space, and exclamation point.
419 #
420 # Example: &lt;code&gt;My Project&lt;/code&gt;
421 # Read-write.
422 &quot;projectId&quot;: &quot;A String&quot;, # The unique, user-assigned ID of the Project.
423 # It must be 6 to 30 lowercase letters, digits, or hyphens.
424 # It must start with a letter.
425 # Trailing hyphens are prohibited.
426 #
427 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
428 # Read-only after creation.
429 &quot;lifecycleState&quot;: &quot;A String&quot;, # The Project lifecycle state.
430 #
431 # Read-only.
432 &quot;projectNumber&quot;: &quot;A String&quot;, # The number uniquely identifying the project.
433 #
434 # Example: &lt;code&gt;415104041262&lt;/code&gt;
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 &quot;ancestor&quot;: [ # Ancestors are ordered from bottom to top of the resource hierarchy. The
468 # first ancestor is the project itself, followed by the project&#x27;s parent,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700469 # etc..
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800470 { # Identifying information for a single ancestor of a project.
Bu Sun Kim65020912020-05-20 12:08:20 -0700471 &quot;resourceId&quot;: { # A container to reference an id for any resource type. A `resource` in Google # Resource id of the ancestor.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800472 # Cloud Platform is a generic term for something you (a developer) may want to
Bu Sun Kim65020912020-05-20 12:08:20 -0700473 # interact with through one of our API&#x27;s. Some examples are an App Engine app,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800474 # a Compute Engine instance, a Cloud SQL database, and so on.
Bu Sun Kim65020912020-05-20 12:08:20 -0700475 &quot;type&quot;: &quot;A String&quot;, # Required field representing the resource type this id is for.
476 # At present, the valid types are: &quot;organization&quot;, &quot;folder&quot;, and &quot;project&quot;.
477 &quot;id&quot;: &quot;A String&quot;, # Required field for the type-specific id. This should correspond to the id
478 # used in the type-specific API&#x27;s.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800479 },
480 },
481 ],
482 }</pre>
483</div>
484
485<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700486 <code class="details" id="getEffectiveOrgPolicy">getEffectiveOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700487 <pre>Gets the effective `Policy` on a resource. This is the result of merging
488`Policies` in the resource hierarchy. The returned `Policy` will not have
489an `etag`set because it is a computed `Policy` across multiple resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700490Subtrees of Resource Manager resource hierarchy with &#x27;under:&#x27; prefix will
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700491not be expanded.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700492
493Args:
494 resource: string, The name of the resource to start computing the effective `Policy`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700495 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700496 The object takes the form of:
497
498{ # The request sent to the GetEffectiveOrgPolicy method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700499 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` to compute the effective `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700500 }
501
502 x__xgafv: string, V1 error format.
503 Allowed values
504 1 - v1 error format
505 2 - v2 error format
506
507Returns:
508 An object of the form:
509
510 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
511 # for configurations of Cloud Platform resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700512 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700513 # 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 Kim65020912020-05-20 12:08:20 -0700516 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
517 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700518 # `Constraint` type.
519 # `constraint_default` enforcement behavior of the specific `Constraint` at
520 # this resource.
521 #
522 # Suppose that `constraint_default` is set to `ALLOW` for the
523 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
524 # foo.com sets a `Policy` at their Organization resource node that restricts
525 # the allowed service activations to deny all service activations. They
526 # could then set a `Policy` with the `policy_type` `restore_default` on
527 # several experimental projects, restoring the `constraint_default`
528 # enforcement of the `Constraint` for only those projects, allowing those
529 # projects to have all services activated.
530 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700531 &quot;listPolicy&quot;: { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700532 # resource.
533 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700534 # `ListPolicy` can define specific values and subtrees of Cloud Resource
535 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
536 # are allowed or denied by setting the `allowed_values` and `denied_values`
537 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
538 # The `under:` prefix is used to denote resource subtree values.
539 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -0700540 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700541 # same as values with no prefix.
542 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
544 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
545 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700546 # The `supports_under` field of the associated `Constraint` defines whether
547 # ancestry prefixes can be used. You can set `allowed_values` and
548 # `denied_values` in the same `Policy` if `all_values` is
549 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
550 # values. If `all_values` is set to either `ALLOW` or `DENY`,
551 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700552 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700554 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700555 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700556 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
557 # that matches the value specified in this `Policy`. If `suggested_value`
558 # is not set, it will inherit the value specified higher in the hierarchy,
559 # unless `inherit_from_parent` is `false`.
560 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700561 #
562 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
563 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
564 # set to `true`, then the values from the effective `Policy` of the parent
565 # resource are inherited, meaning the values set in this `Policy` are
566 # added to the values inherited up the hierarchy.
567 #
568 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -0700569 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700570 # simple and understandable. However, it is possible to set a `Policy` with
571 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
572 # In this case, the values that are allowed must be in `allowed_values` and
573 # not present in `denied_values`.
574 #
575 # For example, suppose you have a `Constraint`
576 # `constraints/serviceuser.services`, which has a `constraint_type` of
577 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
578 # Suppose that at the Organization level, a `Policy` is applied that
579 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
580 # `Policy` is applied to a project below the Organization that has
581 # `inherit_from_parent` set to `false` and field all_values set to DENY,
582 # then an attempt to activate any API will be denied.
583 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700584 # The following examples demonstrate different possible layerings for
585 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700586 #
587 # Example 1 (no inherited values):
588 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700589 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700590 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700591 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700592 # The accepted values at `organizations/foo` are `E1`, `E2`.
593 # The accepted values at `projects/bar` are `E3`, and `E4`.
594 #
595 # Example 2 (inherited values):
596 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700597 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700598 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700599 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700600 # The accepted values at `organizations/foo` are `E1`, `E2`.
601 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
602 #
603 # Example 3 (inheriting both allowed and denied values):
604 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700605 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700606 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700607 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700608 # The accepted values at `organizations/foo` are `E1`, `E2`.
609 # The value accepted at `projects/bar` is `E2`.
610 #
611 # Example 4 (RestoreDefault):
612 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700613 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700614 # `projects/bar` has a `Policy` with values:
615 # {RestoreDefault: {}}
616 # The accepted values at `organizations/foo` are `E1`, `E2`.
617 # The accepted values at `projects/bar` are either all or none depending on
618 # the value of `constraint_default` (if `ALLOW`, all; if
619 # `DENY`, none).
620 #
621 # Example 5 (no policy inherits parent policy):
622 # `organizations/foo` has no `Policy` set.
623 # `projects/bar` has no `Policy` set.
624 # The accepted values at both levels are either all or none depending on
625 # the value of `constraint_default` (if `ALLOW`, all; if
626 # `DENY`, none).
627 #
628 # Example 6 (ListConstraint allowing all):
629 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700631 # `projects/bar` has a `Policy` with:
632 # {all: ALLOW}
633 # The accepted values at `organizations/foo` are `E1`, E2`.
634 # Any value is accepted at `projects/bar`.
635 #
636 # Example 7 (ListConstraint allowing none):
637 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700638 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700639 # `projects/bar` has a `Policy` with:
640 # {all: DENY}
641 # The accepted values at `organizations/foo` are `E1`, E2`.
642 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700643 #
644 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
645 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -0700646 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700647 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700648 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700649 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -0700650 # {allowed_values: &quot;under:projects/P3&quot;}
651 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700652 # The accepted values at `organizations/foo` are `organizations/O1`,
653 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
654 # `projects/P3`.
655 # The accepted values at `projects/bar` are `organizations/O1`,
656 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 &quot;deniedValues&quot;: [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700658 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700659 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700660 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700661 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700662 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
664 # concurrency control.
665 #
666 # When the `Policy` is returned from either a `GetPolicy` or a
667 # `ListOrgPolicy` request, this `etag` indicates the version of the current
668 # `Policy` to use when executing a read-modify-write loop.
669 #
670 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
671 # `etag` will be unset.
672 #
673 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
674 # that was returned from a `GetOrgPolicy` request as part of a
675 # read-modify-write loop for concurrency control. Not setting the `etag`in a
676 # `SetOrgPolicy` request will result in an unconditional write of the
677 # `Policy`.
678 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
679 # `constraints/serviceuser.services`.
680 #
681 # Immutable after creation.
682 &quot;booleanPolicy&quot;: { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700683 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700684 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700685 # configuration is acceptable.
686 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700687 # Suppose you have a `Constraint`
688 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
689 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
690 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700691 # - If the `Policy` at this resource has enforced set to `false`, serial
692 # port connection attempts will be allowed.
693 # - If the `Policy` at this resource has enforced set to `true`, serial
694 # port connection attempts will be refused.
695 # - If the `Policy` at this resource is `RestoreDefault`, serial port
696 # connection attempts will be allowed.
697 # - If no `Policy` is set at this resource or anywhere higher in the
698 # resource hierarchy, serial port connection attempts will be allowed.
699 # - If no `Policy` is set at this resource, but one exists higher in the
700 # resource hierarchy, the behavior is as if the`Policy` were set at
701 # this resource.
702 #
703 # The following examples demonstrate the different possible layerings:
704 #
705 # Example 1 (nearest `Constraint` wins):
706 # `organizations/foo` has a `Policy` with:
707 # {enforced: false}
708 # `projects/bar` has no `Policy` set.
709 # The constraint at `projects/bar` and `organizations/foo` will not be
710 # enforced.
711 #
712 # Example 2 (enforcement gets replaced):
713 # `organizations/foo` has a `Policy` with:
714 # {enforced: false}
715 # `projects/bar` has a `Policy` with:
716 # {enforced: true}
717 # The constraint at `organizations/foo` is not enforced.
718 # The constraint at `projects/bar` is enforced.
719 #
720 # Example 3 (RestoreDefault):
721 # `organizations/foo` has a `Policy` with:
722 # {enforced: true}
723 # `projects/bar` has a `Policy` with:
724 # {RestoreDefault: {}}
725 # The constraint at `organizations/foo` is enforced.
726 # The constraint at `projects/bar` is not enforced, because
727 # `constraint_default` for the `Constraint` is `ALLOW`.
728 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700729 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700750 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
Dan O'Mearadd494642020-05-01 07:42:23 -0700751 # `GetIamPolicy`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700752 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -0700753 #
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700760 #
761 # To learn which resources support conditions in their IAM policies, see the
762 # [IAM
763 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700764 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700765 }
766
767 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800768 Allowed values
769 1 - v1 error format
770 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700771
772Returns:
773 An object of the form:
774
Dan O'Mearadd494642020-05-01 07:42:23 -0700775 { # An Identity and Access Management (IAM) policy, which specifies access
776 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800777 #
778 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700779 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
780 # `members` to a single `role`. Members can be user accounts, service accounts,
781 # Google groups, and domains (such as G Suite). A `role` is a named list of
782 # permissions; each `role` can be an IAM predefined role or a user-created
783 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800784 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700785 # For some types of Google Cloud resources, a `binding` can also specify a
786 # `condition`, which is a logical expression that allows access to a resource
787 # only if the expression evaluates to `true`. A condition can add constraints
788 # based on attributes of the request, the resource, or both. To learn which
789 # resources support conditions in their IAM policies, see the
790 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700791 #
792 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800793 #
794 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800796 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700797 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
798 # &quot;members&quot;: [
799 # &quot;user:mike@example.com&quot;,
800 # &quot;group:admins@example.com&quot;,
801 # &quot;domain:google.com&quot;,
802 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800803 # ]
804 # },
805 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700806 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
807 # &quot;members&quot;: [
808 # &quot;user:eve@example.com&quot;
809 # ],
810 # &quot;condition&quot;: {
811 # &quot;title&quot;: &quot;expirable access&quot;,
812 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
813 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700814 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800815 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700816 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700817 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
818 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800819 # }
820 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700821 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700822 #
823 # bindings:
824 # - members:
825 # - user:mike@example.com
826 # - group:admins@example.com
827 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700828 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
829 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700830 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700831 # - user:eve@example.com
832 # role: roles/resourcemanager.organizationViewer
833 # condition:
834 # title: expirable access
835 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700836 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700837 # - etag: BwWWja0YfJA=
838 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800840 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700841 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700842 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
843 # prevent simultaneous updates of a policy from overwriting each other.
844 # It is strongly suggested that systems make use of the `etag` in the
845 # read-modify-write cycle to perform policy updates in order to avoid race
846 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
847 # systems are expected to put that etag in the request to `setIamPolicy` to
848 # ensure that their change will be applied to the same version of the policy.
849 #
850 # **Important:** If you use IAM Conditions, you must include the `etag` field
851 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
852 # you to overwrite a version `3` policy with a version `1` policy, and all of
853 # the conditions in the version `3` policy are lost.
854 &quot;version&quot;: 42, # Specifies the format of the policy.
855 #
856 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
857 # are rejected.
858 #
859 # Any operation that affects conditional role bindings must specify version
860 # `3`. This requirement applies to the following operations:
861 #
862 # * Getting a policy that includes a conditional role binding
863 # * Adding a conditional role binding to a policy
864 # * Changing a conditional role binding in a policy
865 # * Removing any role binding, with or without a condition, from a policy
866 # that includes conditions
867 #
868 # **Important:** If you use IAM Conditions, you must include the `etag` field
869 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
870 # you to overwrite a version `3` policy with a version `1` policy, and all of
871 # the conditions in the version `3` policy are lost.
872 #
873 # If a policy does not include any conditions, operations on that policy may
874 # specify any valid version or leave the field unset.
875 #
876 # To learn which resources support conditions in their IAM policies, see the
877 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
878 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
879 { # Specifies the audit configuration for a service.
880 # The configuration determines which permission types are logged, and what
881 # identities, if any, are exempted from logging.
882 # An AuditConfig must have one or more AuditLogConfigs.
883 #
884 # If there are AuditConfigs for both `allServices` and a specific service,
885 # the union of the two AuditConfigs is used for that service: the log_types
886 # specified in each AuditConfig are enabled, and the exempted_members in each
887 # AuditLogConfig are exempted.
888 #
889 # Example Policy with multiple AuditConfigs:
890 #
891 # {
892 # &quot;audit_configs&quot;: [
893 # {
894 # &quot;service&quot;: &quot;allServices&quot;
895 # &quot;audit_log_configs&quot;: [
896 # {
897 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
898 # &quot;exempted_members&quot;: [
899 # &quot;user:jose@example.com&quot;
900 # ]
901 # },
902 # {
903 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
904 # },
905 # {
906 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
907 # }
908 # ]
909 # },
910 # {
911 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
912 # &quot;audit_log_configs&quot;: [
913 # {
914 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
915 # },
916 # {
917 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
918 # &quot;exempted_members&quot;: [
919 # &quot;user:aliya@example.com&quot;
920 # ]
921 # }
922 # ]
923 # }
924 # ]
925 # }
926 #
927 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
928 # logging. It also exempts jose@example.com from DATA_READ logging, and
929 # aliya@example.com from DATA_WRITE logging.
930 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
931 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
932 # `allServices` is a special value that covers all services.
933 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
934 { # Provides the configuration for logging a type of permissions.
935 # Example:
936 #
937 # {
938 # &quot;audit_log_configs&quot;: [
939 # {
940 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
941 # &quot;exempted_members&quot;: [
942 # &quot;user:jose@example.com&quot;
943 # ]
944 # },
945 # {
946 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
947 # }
948 # ]
949 # }
950 #
951 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
952 # jose@example.com from DATA_READ logging.
953 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
954 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
955 # permission.
956 # Follows the same format of Binding.members.
957 &quot;A String&quot;,
958 ],
959 },
960 ],
961 },
962 ],
963 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700964 # `condition` that determines how and when the `bindings` are applied. Each
965 # of the `bindings` must contain at least one member.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400966 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700967 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400968 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700969 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
970 #
971 # If the condition evaluates to `true`, then this binding applies to the
972 # current request.
973 #
974 # If the condition evaluates to `false`, then this binding does not apply to
975 # the current request. However, a different role binding might grant the same
976 # role to one or more of the members in this binding.
977 #
978 # To learn which resources support conditions in their IAM policies, see the
979 # [IAM
980 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
981 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
982 # are documented at https://github.com/google/cel-spec.
983 #
984 # Example (Comparison):
985 #
986 # title: &quot;Summary size limit&quot;
987 # description: &quot;Determines if a summary is less than 100 chars&quot;
988 # expression: &quot;document.summary.size() &lt; 100&quot;
989 #
990 # Example (Equality):
991 #
992 # title: &quot;Requestor is owner&quot;
993 # description: &quot;Determines if requestor is the document owner&quot;
994 # expression: &quot;document.owner == request.auth.claims.email&quot;
995 #
996 # Example (Logic):
997 #
998 # title: &quot;Public documents&quot;
999 # description: &quot;Determine whether the document should be publicly visible&quot;
1000 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1001 #
1002 # Example (Data Manipulation):
1003 #
1004 # title: &quot;Notification string&quot;
1005 # description: &quot;Create a notification string with a timestamp.&quot;
1006 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1007 #
1008 # The exact variables and functions that may be referenced within an expression
1009 # are determined by the service that evaluates it. See the service
1010 # documentation for additional information.
1011 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1012 # its purpose. This can be used e.g. in UIs which allow to enter the
1013 # expression.
1014 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1015 # reporting, e.g. a file name and a position in the file.
1016 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1017 # describes the expression, e.g. when hovered over it in a UI.
1018 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1019 # syntax.
1020 },
1021 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001022 # `members` can have the following values:
1023 #
1024 # * `allUsers`: A special identifier that represents anyone who is
1025 # on the internet; with or without a Google account.
1026 #
1027 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1028 # who is authenticated with a Google account or a service account.
1029 #
1030 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001031 # account. For example, `alice@example.com` .
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001032 #
1033 #
1034 # * `serviceAccount:{emailid}`: An email address that represents a service
1035 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1036 #
1037 # * `group:{emailid}`: An email address that represents a Google group.
1038 # For example, `admins@example.com`.
1039 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001040 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1041 # identifier) representing a user that has been recently deleted. For
1042 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1043 # recovered, this value reverts to `user:{emailid}` and the recovered user
1044 # retains the role in the binding.
1045 #
1046 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1047 # unique identifier) representing a service account that has been recently
1048 # deleted. For example,
1049 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1050 # If the service account is undeleted, this value reverts to
1051 # `serviceAccount:{emailid}` and the undeleted service account retains the
1052 # role in the binding.
1053 #
1054 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1055 # identifier) representing a Google group that has been recently
1056 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1057 # the group is recovered, this value reverts to `group:{emailid}` and the
1058 # recovered group retains the role in the binding.
1059 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001060 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001061 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001062 # users of that domain. For example, `google.com` or `example.com`.
1063 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001064 &quot;A String&quot;,
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001065 ],
1066 },
1067 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001068 }</pre>
1069</div>
1070
1071<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001072 <code class="details" id="getOrgPolicy">getOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001073 <pre>Gets a `Policy` on a resource.
1074
1075If no `Policy` is set on the resource, a `Policy` is returned with default
1076values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
1077`etag` value can be used with `SetOrgPolicy()` to create or update a
1078`Policy` during read-modify-write.
1079
1080Args:
1081 resource: string, Name of the resource the `Policy` is set on. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001082 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001083 The object takes the form of:
1084
1085{ # The request sent to the GetOrgPolicy method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001086 &quot;constraint&quot;: &quot;A String&quot;, # Name of the `Constraint` to get the `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001087 }
1088
1089 x__xgafv: string, V1 error format.
1090 Allowed values
1091 1 - v1 error format
1092 2 - v2 error format
1093
1094Returns:
1095 An object of the form:
1096
1097 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
1098 # for configurations of Cloud Platform resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07001099 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001100 # server, not specified by the caller, and represents the last time a call to
1101 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
1102 # be ignored.
Bu Sun Kim65020912020-05-20 12:08:20 -07001103 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
1104 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001105 # `Constraint` type.
1106 # `constraint_default` enforcement behavior of the specific `Constraint` at
1107 # this resource.
1108 #
1109 # Suppose that `constraint_default` is set to `ALLOW` for the
1110 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
1111 # foo.com sets a `Policy` at their Organization resource node that restricts
1112 # the allowed service activations to deny all service activations. They
1113 # could then set a `Policy` with the `policy_type` `restore_default` on
1114 # several experimental projects, restoring the `constraint_default`
1115 # enforcement of the `Constraint` for only those projects, allowing those
1116 # projects to have all services activated.
1117 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001118 &quot;listPolicy&quot;: { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001119 # resource.
1120 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001121 # `ListPolicy` can define specific values and subtrees of Cloud Resource
1122 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
1123 # are allowed or denied by setting the `allowed_values` and `denied_values`
1124 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
1125 # The `under:` prefix is used to denote resource subtree values.
1126 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -07001127 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001128 # same as values with no prefix.
1129 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -07001130 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
1131 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
1132 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001133 # The `supports_under` field of the associated `Constraint` defines whether
1134 # ancestry prefixes can be used. You can set `allowed_values` and
1135 # `denied_values` in the same `Policy` if `all_values` is
1136 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
1137 # values. If `all_values` is set to either `ALLOW` or `DENY`,
1138 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07001139 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001140 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001141 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001142 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001143 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
1144 # that matches the value specified in this `Policy`. If `suggested_value`
1145 # is not set, it will inherit the value specified higher in the hierarchy,
1146 # unless `inherit_from_parent` is `false`.
1147 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001148 #
1149 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
1150 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
1151 # set to `true`, then the values from the effective `Policy` of the parent
1152 # resource are inherited, meaning the values set in this `Policy` are
1153 # added to the values inherited up the hierarchy.
1154 #
1155 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -07001156 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001157 # simple and understandable. However, it is possible to set a `Policy` with
1158 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
1159 # In this case, the values that are allowed must be in `allowed_values` and
1160 # not present in `denied_values`.
1161 #
1162 # For example, suppose you have a `Constraint`
1163 # `constraints/serviceuser.services`, which has a `constraint_type` of
1164 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
1165 # Suppose that at the Organization level, a `Policy` is applied that
1166 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
1167 # `Policy` is applied to a project below the Organization that has
1168 # `inherit_from_parent` set to `false` and field all_values set to DENY,
1169 # then an attempt to activate any API will be denied.
1170 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001171 # The following examples demonstrate different possible layerings for
1172 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001173 #
1174 # Example 1 (no inherited values):
1175 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001176 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001177 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001178 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001179 # The accepted values at `organizations/foo` are `E1`, `E2`.
1180 # The accepted values at `projects/bar` are `E3`, and `E4`.
1181 #
1182 # Example 2 (inherited values):
1183 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001184 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001185 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001186 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001187 # The accepted values at `organizations/foo` are `E1`, `E2`.
1188 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
1189 #
1190 # Example 3 (inheriting both allowed and denied values):
1191 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001192 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001193 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001194 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001195 # The accepted values at `organizations/foo` are `E1`, `E2`.
1196 # The value accepted at `projects/bar` is `E2`.
1197 #
1198 # Example 4 (RestoreDefault):
1199 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001200 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001201 # `projects/bar` has a `Policy` with values:
1202 # {RestoreDefault: {}}
1203 # The accepted values at `organizations/foo` are `E1`, `E2`.
1204 # The accepted values at `projects/bar` are either all or none depending on
1205 # the value of `constraint_default` (if `ALLOW`, all; if
1206 # `DENY`, none).
1207 #
1208 # Example 5 (no policy inherits parent policy):
1209 # `organizations/foo` has no `Policy` set.
1210 # `projects/bar` has no `Policy` set.
1211 # The accepted values at both levels are either all or none depending on
1212 # the value of `constraint_default` (if `ALLOW`, all; if
1213 # `DENY`, none).
1214 #
1215 # Example 6 (ListConstraint allowing all):
1216 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001217 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001218 # `projects/bar` has a `Policy` with:
1219 # {all: ALLOW}
1220 # The accepted values at `organizations/foo` are `E1`, E2`.
1221 # Any value is accepted at `projects/bar`.
1222 #
1223 # Example 7 (ListConstraint allowing none):
1224 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001225 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001226 # `projects/bar` has a `Policy` with:
1227 # {all: DENY}
1228 # The accepted values at `organizations/foo` are `E1`, E2`.
1229 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001230 #
1231 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
1232 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07001233 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001234 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001235 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001236 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001237 # {allowed_values: &quot;under:projects/P3&quot;}
1238 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001239 # The accepted values at `organizations/foo` are `organizations/O1`,
1240 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
1241 # `projects/P3`.
1242 # The accepted values at `projects/bar` are `organizations/O1`,
1243 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001244 &quot;deniedValues&quot;: [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001245 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001246 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001247 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001248 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001249 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001250 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
1251 # concurrency control.
1252 #
1253 # When the `Policy` is returned from either a `GetPolicy` or a
1254 # `ListOrgPolicy` request, this `etag` indicates the version of the current
1255 # `Policy` to use when executing a read-modify-write loop.
1256 #
1257 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
1258 # `etag` will be unset.
1259 #
1260 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
1261 # that was returned from a `GetOrgPolicy` request as part of a
1262 # read-modify-write loop for concurrency control. Not setting the `etag`in a
1263 # `SetOrgPolicy` request will result in an unconditional write of the
1264 # `Policy`.
1265 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
1266 # `constraints/serviceuser.services`.
1267 #
1268 # Immutable after creation.
1269 &quot;booleanPolicy&quot;: { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001270 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001271 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001272 # configuration is acceptable.
1273 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001274 # Suppose you have a `Constraint`
1275 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
1276 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
1277 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001278 # - If the `Policy` at this resource has enforced set to `false`, serial
1279 # port connection attempts will be allowed.
1280 # - If the `Policy` at this resource has enforced set to `true`, serial
1281 # port connection attempts will be refused.
1282 # - If the `Policy` at this resource is `RestoreDefault`, serial port
1283 # connection attempts will be allowed.
1284 # - If no `Policy` is set at this resource or anywhere higher in the
1285 # resource hierarchy, serial port connection attempts will be allowed.
1286 # - If no `Policy` is set at this resource, but one exists higher in the
1287 # resource hierarchy, the behavior is as if the`Policy` were set at
1288 # this resource.
1289 #
1290 # The following examples demonstrate the different possible layerings:
1291 #
1292 # Example 1 (nearest `Constraint` wins):
1293 # `organizations/foo` has a `Policy` with:
1294 # {enforced: false}
1295 # `projects/bar` has no `Policy` set.
1296 # The constraint at `projects/bar` and `organizations/foo` will not be
1297 # enforced.
1298 #
1299 # Example 2 (enforcement gets replaced):
1300 # `organizations/foo` has a `Policy` with:
1301 # {enforced: false}
1302 # `projects/bar` has a `Policy` with:
1303 # {enforced: true}
1304 # The constraint at `organizations/foo` is not enforced.
1305 # The constraint at `projects/bar` is enforced.
1306 #
1307 # Example 3 (RestoreDefault):
1308 # `organizations/foo` has a `Policy` with:
1309 # {enforced: true}
1310 # `projects/bar` has a `Policy` with:
1311 # {RestoreDefault: {}}
1312 # The constraint at `organizations/foo` is enforced.
1313 # The constraint at `projects/bar` is not enforced, because
1314 # `constraint_default` for the `Constraint` is `ALLOW`.
1315 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001316 }</pre>
1317</div>
1318
1319<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001320 <code class="details" id="list">list(filter=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001321 <pre>Lists Projects that the caller has the `resourcemanager.projects.get`
1322permission on and satisfy the specified filter.
1323
1324This method returns Projects in an unspecified order.
1325This method is eventually consistent with project mutations; this means
1326that a newly created project may not appear in the results or recent
1327updates to an existing project may not be reflected in the results. To
1328retrieve the latest state of a project, use the
1329GetProject method.
1330
1331NOTE: If the request filter contains a `parent.type` and `parent.id` and
1332the caller has the `resourcemanager.projects.list` permission on the
1333parent, the results will be drawn from an alternate index which provides
1334more consistent results. In future versions of this API, this List method
1335will be split into List and Search to properly capture the behavorial
1336difference.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001337
1338Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001339 filter: string, An expression for filtering the results of the request. Filter rules are
1340case insensitive. The fields eligible for filtering are:
1341
1342+ `name`
1343+ `id`
Dan O'Mearadd494642020-05-01 07:42:23 -07001344+ `labels.&lt;key&gt;` (where *key* is the name of a label)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001345+ `parent.type`
1346+ `parent.id`
1347
1348Some examples of using labels as filters:
1349
1350| Filter | Description |
1351|------------------|-----------------------------------------------------|
Bu Sun Kim65020912020-05-20 12:08:20 -07001352| name:how* | The project&#x27;s name starts with &quot;how&quot;. |
1353| name:Howl | The project&#x27;s name is `Howl` or `howl`. |
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001354| name:HOWL | Equivalent to above. |
1355| NAME:howl | Equivalent to above. |
1356| labels.color:* | The project has the label `color`. |
Bu Sun Kim65020912020-05-20 12:08:20 -07001357| labels.color:red | The project&#x27;s label `color` has the value `red`. |
1358| labels.color:red&amp;nbsp;labels.size:big |The project&#x27;s label `color` has
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001359 the value `red` and its label `size` has the value `big`. |
1360
1361If no filter is specified, the call will return projects for which the user
1362has the `resourcemanager.projects.get` permission.
1363
1364NOTE: To perform a by-parent query (eg., what projects are directly in a
1365Folder), the caller must have the `resourcemanager.projects.list`
1366permission on the parent and the filter must contain both a `parent.type`
1367and a `parent.id` restriction
Bu Sun Kim65020912020-05-20 12:08:20 -07001368(example: &quot;parent.type:folder parent.id:123&quot;). In this case an alternate
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001369search index is used which provides more consistent results.
1370
1371Optional.
Bu Sun Kim65020912020-05-20 12:08:20 -07001372 pageToken: string, A pagination token returned from a previous call to ListProjects
1373that indicates from where listing should continue.
1374
1375Optional.
1376 pageSize: integer, The maximum number of Projects to return in the response.
1377The server can return fewer Projects than requested.
1378If unspecified, server picks an appropriate default.
1379
1380Optional.
1381 x__xgafv: string, V1 error format.
1382 Allowed values
1383 1 - v1 error format
1384 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001385
1386Returns:
1387 An object of the form:
1388
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001389 { # A page of the response received from the
1390 # ListProjects
1391 # method.
1392 #
1393 # A paginated response where more pages are available has
1394 # `next_page_token` set. This token can be used in a subsequent request to
1395 # retrieve the next request page.
Bu Sun Kim65020912020-05-20 12:08:20 -07001396 &quot;projects&quot;: [ # The list of Projects that matched the list filter. This list can
1397 # be paginated.
1398 { # A Project is a high-level Google Cloud Platform entity. It is a
1399 # container for ACLs, APIs, App Engine Apps, VMs, and other
1400 # Google Cloud Platform resources.
1401 &quot;parent&quot;: { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
1402 #
1403 # Supported parent types include &quot;organization&quot; and &quot;folder&quot;. Once set, the
1404 # parent cannot be cleared. The `parent` can be set on creation or using the
1405 # `UpdateProject` method; the end user must have the
1406 # `resourcemanager.projects.create` permission on the parent.
1407 #
1408 # Read-write.
1409 # Cloud Platform is a generic term for something you (a developer) may want to
1410 # interact with through one of our API&#x27;s. Some examples are an App Engine app,
1411 # a Compute Engine instance, a Cloud SQL database, and so on.
1412 &quot;type&quot;: &quot;A String&quot;, # Required field representing the resource type this id is for.
1413 # At present, the valid types are: &quot;organization&quot;, &quot;folder&quot;, and &quot;project&quot;.
1414 &quot;id&quot;: &quot;A String&quot;, # Required field for the type-specific id. This should correspond to the id
1415 # used in the type-specific API&#x27;s.
1416 },
1417 &quot;labels&quot;: { # The labels associated with this Project.
1418 #
1419 # Label keys must be between 1 and 63 characters long and must conform
1420 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
1421 #
1422 # Label values must be between 0 and 63 characters long and must conform
1423 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
1424 # value can be empty.
1425 #
1426 # No more than 256 labels can be associated with a given resource.
1427 #
1428 # Clients should store labels in a representation such as JSON that does not
1429 # depend on specific characters being disallowed.
1430 #
1431 # Example: &lt;code&gt;&quot;environment&quot; : &quot;dev&quot;&lt;/code&gt;
1432 # Read-write.
1433 &quot;a_key&quot;: &quot;A String&quot;,
1434 },
1435 &quot;createTime&quot;: &quot;A String&quot;, # Creation time.
1436 #
1437 # Read-only.
1438 &quot;name&quot;: &quot;A String&quot;, # The optional user-assigned display name of the Project.
1439 # When present it must be between 4 to 30 characters.
1440 # Allowed characters are: lowercase and uppercase letters, numbers,
1441 # hyphen, single-quote, double-quote, space, and exclamation point.
1442 #
1443 # Example: &lt;code&gt;My Project&lt;/code&gt;
1444 # Read-write.
1445 &quot;projectId&quot;: &quot;A String&quot;, # The unique, user-assigned ID of the Project.
1446 # It must be 6 to 30 lowercase letters, digits, or hyphens.
1447 # It must start with a letter.
1448 # Trailing hyphens are prohibited.
1449 #
1450 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
1451 # Read-only after creation.
1452 &quot;lifecycleState&quot;: &quot;A String&quot;, # The Project lifecycle state.
1453 #
1454 # Read-only.
1455 &quot;projectNumber&quot;: &quot;A String&quot;, # The number uniquely identifying the project.
1456 #
1457 # Example: &lt;code&gt;415104041262&lt;/code&gt;
1458 # Read-only.
1459 },
1460 ],
1461 &quot;nextPageToken&quot;: &quot;A String&quot;, # Pagination token.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001462 #
1463 # If the result set is too large to fit in a single response, this token
1464 # is returned. It encodes the position of the current result cursor.
1465 # Feeding this value into a new list request with the `page_token` parameter
1466 # gives the next page of the results.
1467 #
1468 # When `next_page_token` is not filled in, there is no next page and
1469 # the list returned is the last page in the result set.
1470 #
1471 # Pagination tokens have a limited lifetime.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001472 }</pre>
1473</div>
1474
1475<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001476 <code class="details" id="listAvailableOrgPolicyConstraints">listAvailableOrgPolicyConstraints(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001477 <pre>Lists `Constraints` that could be applied on the specified resource.
1478
1479Args:
1480 resource: string, Name of the resource to list `Constraints` for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001481 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001482 The object takes the form of:
1483
1484{ # The request sent to the [ListAvailableOrgPolicyConstraints]
1485 # google.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001486 &quot;pageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently unsupported
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001487 # and will be ignored. The server may at any point start using this field.
Bu Sun Kim65020912020-05-20 12:08:20 -07001488 &quot;pageSize&quot;: 42, # Size of the pages to be returned. This is currently unsupported and will
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001489 # be ignored. The server may at any point start using this field to limit
1490 # page size.
1491 }
1492
1493 x__xgafv: string, V1 error format.
1494 Allowed values
1495 1 - v1 error format
1496 2 - v2 error format
1497
1498Returns:
1499 An object of the form:
1500
1501 { # The response returned from the ListAvailableOrgPolicyConstraints method.
1502 # Returns all `Constraints` that could be set at this level of the hierarchy
1503 # (contrast with the response from `ListPolicies`, which returns all policies
1504 # which are set).
Bu Sun Kim65020912020-05-20 12:08:20 -07001505 &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently not used.
1506 &quot;constraints&quot;: [ # The collection of constraints that are settable on the request resource.
1507 { # A `Constraint` describes a way in which a resource&#x27;s configuration can be
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001508 # restricted. For example, it controls which cloud services can be activated
1509 # across an organization, or whether a Compute Engine instance can have
1510 # serial port connections established. `Constraints` can be configured by the
Bu Sun Kim65020912020-05-20 12:08:20 -07001511 # organization&#x27;s policy adminstrator to fit the needs of the organzation by
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001512 # setting Policies for `Constraints` at different locations in the
Bu Sun Kim65020912020-05-20 12:08:20 -07001513 # organization&#x27;s resource hierarchy. Policies are inherited down the resource
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001514 # hierarchy from higher levels, but can also be overridden. For details about
1515 # the inheritance rules please read about
1516 # Policies.
1517 #
1518 # `Constraints` have a default behavior determined by the `constraint_default`
1519 # field, which is the enforcement behavior that is used in the absence of a
1520 # `Policy` being defined or inherited for the resource in question.
Bu Sun Kim65020912020-05-20 12:08:20 -07001521 &quot;listConstraint&quot;: { # A `Constraint` that allows or disallows a list of string values, which are # Defines this constraint as being a ListConstraint.
1522 # configured by an Organization&#x27;s policy administrator with a `Policy`.
1523 &quot;supportsUnder&quot;: True or False, # Indicates whether subtrees of Cloud Resource Manager resource hierarchy
1524 # can be used in `Policy.allowed_values` and `Policy.denied_values`. For
1525 # example, `&quot;under:folders/123&quot;` would match any resource under the
1526 # &#x27;folders/123&#x27; folder.
1527 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
1528 # that matches the value specified in this `Constraint`.
1529 },
1530 &quot;version&quot;: 42, # Version of the `Constraint`. Default version is 0;
1531 &quot;description&quot;: &quot;A String&quot;, # Detailed description of what this `Constraint` controls as well as how and
1532 # where it is enforced.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001533 #
1534 # Mutable.
Bu Sun Kim65020912020-05-20 12:08:20 -07001535 &quot;displayName&quot;: &quot;A String&quot;, # The human readable name.
1536 #
1537 # Mutable.
1538 &quot;booleanConstraint&quot;: { # A `Constraint` that is either enforced or not. # Defines this constraint as being a BooleanConstraint.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001539 #
1540 # For example a constraint `constraints/compute.disableSerialPortAccess`.
1541 # If it is enforced on a VM instance, serial port connections will not be
1542 # opened to that instance.
1543 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001544 &quot;constraintDefault&quot;: &quot;A String&quot;, # The evaluation behavior of this constraint in the absense of &#x27;Policy&#x27;.
1545 &quot;name&quot;: &quot;A String&quot;, # Immutable value, required to globally be unique. For example,
1546 # `constraints/serviceuser.services`
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001547 },
1548 ],
1549 }</pre>
1550</div>
1551
1552<div class="method">
1553 <code class="details" id="listAvailableOrgPolicyConstraints_next">listAvailableOrgPolicyConstraints_next(previous_request, previous_response)</code>
1554 <pre>Retrieves the next page of results.
1555
1556Args:
1557 previous_request: The request for the previous page. (required)
1558 previous_response: The response from the request for the previous page. (required)
1559
1560Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001561 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001562 page. Returns None if there are no more items in the collection.
1563 </pre>
1564</div>
1565
1566<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001567 <code class="details" id="listOrgPolicies">listOrgPolicies(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001568 <pre>Lists all the `Policies` set for a particular resource.
1569
1570Args:
1571 resource: string, Name of the resource to list Policies for. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001572 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001573 The object takes the form of:
1574
1575{ # The request sent to the ListOrgPolicies method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001576 &quot;pageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently unsupported
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001577 # and will be ignored. The server may at any point start using this field.
Bu Sun Kim65020912020-05-20 12:08:20 -07001578 &quot;pageSize&quot;: 42, # Size of the pages to be returned. This is currently unsupported and will
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001579 # be ignored. The server may at any point start using this field to limit
1580 # page size.
1581 }
1582
1583 x__xgafv: string, V1 error format.
1584 Allowed values
1585 1 - v1 error format
1586 2 - v2 error format
1587
1588Returns:
1589 An object of the form:
1590
1591 { # The response returned from the ListOrgPolicies method. It will be empty
1592 # if no `Policies` are set on the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001593 &quot;policies&quot;: [ # The `Policies` that are set on the resource. It will be empty if no
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001594 # `Policies` are set.
1595 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
1596 # for configurations of Cloud Platform resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07001597 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001598 # server, not specified by the caller, and represents the last time a call to
1599 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
1600 # be ignored.
Bu Sun Kim65020912020-05-20 12:08:20 -07001601 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
1602 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001603 # `Constraint` type.
1604 # `constraint_default` enforcement behavior of the specific `Constraint` at
1605 # this resource.
1606 #
1607 # Suppose that `constraint_default` is set to `ALLOW` for the
1608 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
1609 # foo.com sets a `Policy` at their Organization resource node that restricts
1610 # the allowed service activations to deny all service activations. They
1611 # could then set a `Policy` with the `policy_type` `restore_default` on
1612 # several experimental projects, restoring the `constraint_default`
1613 # enforcement of the `Constraint` for only those projects, allowing those
1614 # projects to have all services activated.
1615 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001616 &quot;listPolicy&quot;: { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001617 # resource.
1618 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001619 # `ListPolicy` can define specific values and subtrees of Cloud Resource
1620 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
1621 # are allowed or denied by setting the `allowed_values` and `denied_values`
1622 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
1623 # The `under:` prefix is used to denote resource subtree values.
1624 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -07001625 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001626 # same as values with no prefix.
1627 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -07001628 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
1629 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
1630 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001631 # The `supports_under` field of the associated `Constraint` defines whether
1632 # ancestry prefixes can be used. You can set `allowed_values` and
1633 # `denied_values` in the same `Policy` if `all_values` is
1634 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
1635 # values. If `all_values` is set to either `ALLOW` or `DENY`,
1636 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07001637 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001638 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001639 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001640 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001641 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
1642 # that matches the value specified in this `Policy`. If `suggested_value`
1643 # is not set, it will inherit the value specified higher in the hierarchy,
1644 # unless `inherit_from_parent` is `false`.
1645 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001646 #
1647 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
1648 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
1649 # set to `true`, then the values from the effective `Policy` of the parent
1650 # resource are inherited, meaning the values set in this `Policy` are
1651 # added to the values inherited up the hierarchy.
1652 #
1653 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -07001654 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001655 # simple and understandable. However, it is possible to set a `Policy` with
1656 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
1657 # In this case, the values that are allowed must be in `allowed_values` and
1658 # not present in `denied_values`.
1659 #
1660 # For example, suppose you have a `Constraint`
1661 # `constraints/serviceuser.services`, which has a `constraint_type` of
1662 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
1663 # Suppose that at the Organization level, a `Policy` is applied that
1664 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
1665 # `Policy` is applied to a project below the Organization that has
1666 # `inherit_from_parent` set to `false` and field all_values set to DENY,
1667 # then an attempt to activate any API will be denied.
1668 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001669 # The following examples demonstrate different possible layerings for
1670 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001671 #
1672 # Example 1 (no inherited values):
1673 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001674 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001675 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001676 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001677 # The accepted values at `organizations/foo` are `E1`, `E2`.
1678 # The accepted values at `projects/bar` are `E3`, and `E4`.
1679 #
1680 # Example 2 (inherited values):
1681 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001682 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001683 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001684 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001685 # The accepted values at `organizations/foo` are `E1`, `E2`.
1686 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
1687 #
1688 # Example 3 (inheriting both allowed and denied values):
1689 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001690 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001691 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001692 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001693 # The accepted values at `organizations/foo` are `E1`, `E2`.
1694 # The value accepted at `projects/bar` is `E2`.
1695 #
1696 # Example 4 (RestoreDefault):
1697 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001698 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001699 # `projects/bar` has a `Policy` with values:
1700 # {RestoreDefault: {}}
1701 # The accepted values at `organizations/foo` are `E1`, `E2`.
1702 # The accepted values at `projects/bar` are either all or none depending on
1703 # the value of `constraint_default` (if `ALLOW`, all; if
1704 # `DENY`, none).
1705 #
1706 # Example 5 (no policy inherits parent policy):
1707 # `organizations/foo` has no `Policy` set.
1708 # `projects/bar` has no `Policy` set.
1709 # The accepted values at both levels are either all or none depending on
1710 # the value of `constraint_default` (if `ALLOW`, all; if
1711 # `DENY`, none).
1712 #
1713 # Example 6 (ListConstraint allowing all):
1714 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001715 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001716 # `projects/bar` has a `Policy` with:
1717 # {all: ALLOW}
1718 # The accepted values at `organizations/foo` are `E1`, E2`.
1719 # Any value is accepted at `projects/bar`.
1720 #
1721 # Example 7 (ListConstraint allowing none):
1722 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001723 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001724 # `projects/bar` has a `Policy` with:
1725 # {all: DENY}
1726 # The accepted values at `organizations/foo` are `E1`, E2`.
1727 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001728 #
1729 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
1730 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07001731 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001732 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001733 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001734 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07001735 # {allowed_values: &quot;under:projects/P3&quot;}
1736 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001737 # The accepted values at `organizations/foo` are `organizations/O1`,
1738 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
1739 # `projects/P3`.
1740 # The accepted values at `projects/bar` are `organizations/O1`,
1741 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001742 &quot;deniedValues&quot;: [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001743 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001744 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001745 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001746 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001747 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001748 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
1749 # concurrency control.
1750 #
1751 # When the `Policy` is returned from either a `GetPolicy` or a
1752 # `ListOrgPolicy` request, this `etag` indicates the version of the current
1753 # `Policy` to use when executing a read-modify-write loop.
1754 #
1755 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
1756 # `etag` will be unset.
1757 #
1758 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
1759 # that was returned from a `GetOrgPolicy` request as part of a
1760 # read-modify-write loop for concurrency control. Not setting the `etag`in a
1761 # `SetOrgPolicy` request will result in an unconditional write of the
1762 # `Policy`.
1763 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
1764 # `constraints/serviceuser.services`.
1765 #
1766 # Immutable after creation.
1767 &quot;booleanPolicy&quot;: { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001768 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001769 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001770 # configuration is acceptable.
1771 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001772 # Suppose you have a `Constraint`
1773 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
1774 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
1775 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001776 # - If the `Policy` at this resource has enforced set to `false`, serial
1777 # port connection attempts will be allowed.
1778 # - If the `Policy` at this resource has enforced set to `true`, serial
1779 # port connection attempts will be refused.
1780 # - If the `Policy` at this resource is `RestoreDefault`, serial port
1781 # connection attempts will be allowed.
1782 # - If no `Policy` is set at this resource or anywhere higher in the
1783 # resource hierarchy, serial port connection attempts will be allowed.
1784 # - If no `Policy` is set at this resource, but one exists higher in the
1785 # resource hierarchy, the behavior is as if the`Policy` were set at
1786 # this resource.
1787 #
1788 # The following examples demonstrate the different possible layerings:
1789 #
1790 # Example 1 (nearest `Constraint` wins):
1791 # `organizations/foo` has a `Policy` with:
1792 # {enforced: false}
1793 # `projects/bar` has no `Policy` set.
1794 # The constraint at `projects/bar` and `organizations/foo` will not be
1795 # enforced.
1796 #
1797 # Example 2 (enforcement gets replaced):
1798 # `organizations/foo` has a `Policy` with:
1799 # {enforced: false}
1800 # `projects/bar` has a `Policy` with:
1801 # {enforced: true}
1802 # The constraint at `organizations/foo` is not enforced.
1803 # The constraint at `projects/bar` is enforced.
1804 #
1805 # Example 3 (RestoreDefault):
1806 # `organizations/foo` has a `Policy` with:
1807 # {enforced: true}
1808 # `projects/bar` has a `Policy` with:
1809 # {RestoreDefault: {}}
1810 # The constraint at `organizations/foo` is enforced.
1811 # The constraint at `projects/bar` is not enforced, because
1812 # `constraint_default` for the `Constraint` is `ALLOW`.
1813 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001814 },
1815 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001816 &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently not used, but
1817 # the server may at any point start supplying a valid token.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001818 }</pre>
1819</div>
1820
1821<div class="method">
1822 <code class="details" id="listOrgPolicies_next">listOrgPolicies_next(previous_request, previous_response)</code>
1823 <pre>Retrieves the next page of results.
1824
1825Args:
1826 previous_request: The request for the previous page. (required)
1827 previous_response: The response from the request for the previous page. (required)
1828
1829Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001830 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001831 page. Returns None if there are no more items in the collection.
1832 </pre>
1833</div>
1834
1835<div class="method">
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001836 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1837 <pre>Retrieves the next page of results.
1838
1839Args:
1840 previous_request: The request for the previous page. (required)
1841 previous_response: The response from the request for the previous page. (required)
1842
1843Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001844 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001845 page. Returns None if there are no more items in the collection.
1846 </pre>
1847</div>
1848
1849<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001850 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001851 <pre>Sets the IAM access control policy for the specified Project. Overwrites
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001852any existing policy.
1853
1854The following constraints apply when using `setIamPolicy()`:
1855
1856+ Project does not support `allUsers` and `allAuthenticatedUsers` as
1857`members` in a `Binding` of a `Policy`.
1858
Dan O'Mearadd494642020-05-01 07:42:23 -07001859+ The owner role can be granted to a `user`, `serviceAccount`, or a group
1860that is part of an organization. For example,
1861group@myownpersonaldomain.com could be added as an owner to a project in
1862the myownpersonaldomain.com organization, but not the examplepetstore.com
1863organization.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001864
1865+ Service accounts can be made owners of a project directly
1866without any restrictions. However, to be added as an owner, a user must be
1867invited via Cloud Platform console and must accept the invitation.
1868
1869+ A user cannot be granted the owner role using `setIamPolicy()`. The user
1870must be granted the owner role using the Cloud Platform Console and must
1871explicitly accept the invitation.
1872
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001873+ You can only grant ownership of a project to a member by using the
1874GCP Console. Inviting a member will deliver an invitation email that
1875they must accept. An invitation email is not generated if you are
1876granting a role other than owner, or if both the member you are inviting
1877and the project are part of your organization.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001878
1879+ Membership changes that leave the project without any owners that have
1880accepted the Terms of Service (ToS) will be rejected.
1881
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001882+ If the project is not part of an organization, there must be at least
1883one owner who has accepted the Terms of Service (ToS) agreement in the
1884policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner
1885from the policy will fail. This restriction also applies to legacy
1886projects that no longer have owners who have accepted the ToS. Edits to
1887IAM policies will be rejected until the lack of a ToS-accepting owner is
1888rectified.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001889
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001890+ This method will replace the existing policy, and cannot be used to
1891append additional IAM settings.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001892
1893Note: Removing service accounts from policies or changing their roles
1894can render services completely inoperable. It is important to understand
1895how the service account is being used before removing or updating its
1896roles.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001897
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001898Authorization requires the Google IAM permission
1899`resourcemanager.projects.setIamPolicy` on the project
1900
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001901Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001902 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001903See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001904 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001905 The object takes the form of:
1906
1907{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001908 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001909 # the policy is limited to a few 10s of KB. An empty policy is a
1910 # valid policy but certain Cloud Platform services (such as Projects)
1911 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07001912 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001913 #
1914 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001915 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1916 # `members` to a single `role`. Members can be user accounts, service accounts,
1917 # Google groups, and domains (such as G Suite). A `role` is a named list of
1918 # permissions; each `role` can be an IAM predefined role or a user-created
1919 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001920 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001921 # For some types of Google Cloud resources, a `binding` can also specify a
1922 # `condition`, which is a logical expression that allows access to a resource
1923 # only if the expression evaluates to `true`. A condition can add constraints
1924 # based on attributes of the request, the resource, or both. To learn which
1925 # resources support conditions in their IAM policies, see the
1926 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001927 #
1928 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001929 #
1930 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001931 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001932 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001933 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1934 # &quot;members&quot;: [
1935 # &quot;user:mike@example.com&quot;,
1936 # &quot;group:admins@example.com&quot;,
1937 # &quot;domain:google.com&quot;,
1938 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001939 # ]
1940 # },
1941 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001942 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1943 # &quot;members&quot;: [
1944 # &quot;user:eve@example.com&quot;
1945 # ],
1946 # &quot;condition&quot;: {
1947 # &quot;title&quot;: &quot;expirable access&quot;,
1948 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1949 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001950 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001951 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001952 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001953 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1954 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001955 # }
1956 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001957 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001958 #
1959 # bindings:
1960 # - members:
1961 # - user:mike@example.com
1962 # - group:admins@example.com
1963 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001964 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1965 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001966 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001967 # - user:eve@example.com
1968 # role: roles/resourcemanager.organizationViewer
1969 # condition:
1970 # title: expirable access
1971 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001972 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001973 # - etag: BwWWja0YfJA=
1974 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001975 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001976 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001977 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001978 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1979 # prevent simultaneous updates of a policy from overwriting each other.
1980 # It is strongly suggested that systems make use of the `etag` in the
1981 # read-modify-write cycle to perform policy updates in order to avoid race
1982 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1983 # systems are expected to put that etag in the request to `setIamPolicy` to
1984 # ensure that their change will be applied to the same version of the policy.
1985 #
1986 # **Important:** If you use IAM Conditions, you must include the `etag` field
1987 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1988 # you to overwrite a version `3` policy with a version `1` policy, and all of
1989 # the conditions in the version `3` policy are lost.
1990 &quot;version&quot;: 42, # Specifies the format of the policy.
1991 #
1992 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1993 # are rejected.
1994 #
1995 # Any operation that affects conditional role bindings must specify version
1996 # `3`. This requirement applies to the following operations:
1997 #
1998 # * Getting a policy that includes a conditional role binding
1999 # * Adding a conditional role binding to a policy
2000 # * Changing a conditional role binding in a policy
2001 # * Removing any role binding, with or without a condition, from a policy
2002 # that includes conditions
2003 #
2004 # **Important:** If you use IAM Conditions, you must include the `etag` field
2005 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2006 # you to overwrite a version `3` policy with a version `1` policy, and all of
2007 # the conditions in the version `3` policy are lost.
2008 #
2009 # If a policy does not include any conditions, operations on that policy may
2010 # specify any valid version or leave the field unset.
2011 #
2012 # To learn which resources support conditions in their IAM policies, see the
2013 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2014 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2015 { # Specifies the audit configuration for a service.
2016 # The configuration determines which permission types are logged, and what
2017 # identities, if any, are exempted from logging.
2018 # An AuditConfig must have one or more AuditLogConfigs.
2019 #
2020 # If there are AuditConfigs for both `allServices` and a specific service,
2021 # the union of the two AuditConfigs is used for that service: the log_types
2022 # specified in each AuditConfig are enabled, and the exempted_members in each
2023 # AuditLogConfig are exempted.
2024 #
2025 # Example Policy with multiple AuditConfigs:
2026 #
2027 # {
2028 # &quot;audit_configs&quot;: [
2029 # {
2030 # &quot;service&quot;: &quot;allServices&quot;
2031 # &quot;audit_log_configs&quot;: [
2032 # {
2033 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2034 # &quot;exempted_members&quot;: [
2035 # &quot;user:jose@example.com&quot;
2036 # ]
2037 # },
2038 # {
2039 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
2040 # },
2041 # {
2042 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
2043 # }
2044 # ]
2045 # },
2046 # {
2047 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
2048 # &quot;audit_log_configs&quot;: [
2049 # {
2050 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2051 # },
2052 # {
2053 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
2054 # &quot;exempted_members&quot;: [
2055 # &quot;user:aliya@example.com&quot;
2056 # ]
2057 # }
2058 # ]
2059 # }
2060 # ]
2061 # }
2062 #
2063 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
2064 # logging. It also exempts jose@example.com from DATA_READ logging, and
2065 # aliya@example.com from DATA_WRITE logging.
2066 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
2067 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
2068 # `allServices` is a special value that covers all services.
2069 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2070 { # Provides the configuration for logging a type of permissions.
2071 # Example:
2072 #
2073 # {
2074 # &quot;audit_log_configs&quot;: [
2075 # {
2076 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2077 # &quot;exempted_members&quot;: [
2078 # &quot;user:jose@example.com&quot;
2079 # ]
2080 # },
2081 # {
2082 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
2083 # }
2084 # ]
2085 # }
2086 #
2087 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
2088 # jose@example.com from DATA_READ logging.
2089 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
2090 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
2091 # permission.
2092 # Follows the same format of Binding.members.
2093 &quot;A String&quot;,
2094 ],
2095 },
2096 ],
2097 },
2098 ],
2099 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07002100 # `condition` that determines how and when the `bindings` are applied. Each
2101 # of the `bindings` must contain at least one member.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002102 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002103 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002104 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002105 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
2106 #
2107 # If the condition evaluates to `true`, then this binding applies to the
2108 # current request.
2109 #
2110 # If the condition evaluates to `false`, then this binding does not apply to
2111 # the current request. However, a different role binding might grant the same
2112 # role to one or more of the members in this binding.
2113 #
2114 # To learn which resources support conditions in their IAM policies, see the
2115 # [IAM
2116 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2117 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2118 # are documented at https://github.com/google/cel-spec.
2119 #
2120 # Example (Comparison):
2121 #
2122 # title: &quot;Summary size limit&quot;
2123 # description: &quot;Determines if a summary is less than 100 chars&quot;
2124 # expression: &quot;document.summary.size() &lt; 100&quot;
2125 #
2126 # Example (Equality):
2127 #
2128 # title: &quot;Requestor is owner&quot;
2129 # description: &quot;Determines if requestor is the document owner&quot;
2130 # expression: &quot;document.owner == request.auth.claims.email&quot;
2131 #
2132 # Example (Logic):
2133 #
2134 # title: &quot;Public documents&quot;
2135 # description: &quot;Determine whether the document should be publicly visible&quot;
2136 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2137 #
2138 # Example (Data Manipulation):
2139 #
2140 # title: &quot;Notification string&quot;
2141 # description: &quot;Create a notification string with a timestamp.&quot;
2142 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2143 #
2144 # The exact variables and functions that may be referenced within an expression
2145 # are determined by the service that evaluates it. See the service
2146 # documentation for additional information.
2147 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2148 # its purpose. This can be used e.g. in UIs which allow to enter the
2149 # expression.
2150 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2151 # reporting, e.g. a file name and a position in the file.
2152 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2153 # describes the expression, e.g. when hovered over it in a UI.
2154 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2155 # syntax.
2156 },
2157 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002158 # `members` can have the following values:
2159 #
2160 # * `allUsers`: A special identifier that represents anyone who is
2161 # on the internet; with or without a Google account.
2162 #
2163 # * `allAuthenticatedUsers`: A special identifier that represents anyone
2164 # who is authenticated with a Google account or a service account.
2165 #
2166 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07002167 # account. For example, `alice@example.com` .
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002168 #
2169 #
2170 # * `serviceAccount:{emailid}`: An email address that represents a service
2171 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
2172 #
2173 # * `group:{emailid}`: An email address that represents a Google group.
2174 # For example, `admins@example.com`.
2175 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002176 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
2177 # identifier) representing a user that has been recently deleted. For
2178 # example, `alice@example.com?uid=123456789012345678901`. If the user is
2179 # recovered, this value reverts to `user:{emailid}` and the recovered user
2180 # retains the role in the binding.
2181 #
2182 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
2183 # unique identifier) representing a service account that has been recently
2184 # deleted. For example,
2185 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
2186 # If the service account is undeleted, this value reverts to
2187 # `serviceAccount:{emailid}` and the undeleted service account retains the
2188 # role in the binding.
2189 #
2190 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
2191 # identifier) representing a Google group that has been recently
2192 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
2193 # the group is recovered, this value reverts to `group:{emailid}` and the
2194 # recovered group retains the role in the binding.
2195 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002196 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002197 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002198 # users of that domain. For example, `google.com` or `example.com`.
2199 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002200 &quot;A String&quot;,
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002201 ],
2202 },
2203 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002204 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002205 &quot;updateMask&quot;: &quot;A String&quot;, # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002206 # the fields in the mask will be modified. If no mask is provided, the
2207 # following default mask is used:
Dan O'Mearadd494642020-05-01 07:42:23 -07002208 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002209 # `paths: &quot;bindings, etag&quot;`
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002210 }
2211
2212 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002213 Allowed values
2214 1 - v1 error format
2215 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002216
2217Returns:
2218 An object of the form:
2219
Dan O'Mearadd494642020-05-01 07:42:23 -07002220 { # An Identity and Access Management (IAM) policy, which specifies access
2221 # controls for Google Cloud resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002222 #
2223 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002224 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
2225 # `members` to a single `role`. Members can be user accounts, service accounts,
2226 # Google groups, and domains (such as G Suite). A `role` is a named list of
2227 # permissions; each `role` can be an IAM predefined role or a user-created
2228 # custom role.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002229 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002230 # For some types of Google Cloud resources, a `binding` can also specify a
2231 # `condition`, which is a logical expression that allows access to a resource
2232 # only if the expression evaluates to `true`. A condition can add constraints
2233 # based on attributes of the request, the resource, or both. To learn which
2234 # resources support conditions in their IAM policies, see the
2235 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07002236 #
2237 # **JSON example:**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002238 #
2239 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07002240 # &quot;bindings&quot;: [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002241 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07002242 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
2243 # &quot;members&quot;: [
2244 # &quot;user:mike@example.com&quot;,
2245 # &quot;group:admins@example.com&quot;,
2246 # &quot;domain:google.com&quot;,
2247 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002248 # ]
2249 # },
2250 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07002251 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
2252 # &quot;members&quot;: [
2253 # &quot;user:eve@example.com&quot;
2254 # ],
2255 # &quot;condition&quot;: {
2256 # &quot;title&quot;: &quot;expirable access&quot;,
2257 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
2258 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002259 # }
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002260 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07002261 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002262 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
2263 # &quot;version&quot;: 3
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002264 # }
2265 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002266 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002267 #
2268 # bindings:
2269 # - members:
2270 # - user:mike@example.com
2271 # - group:admins@example.com
2272 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07002273 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
2274 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002275 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07002276 # - user:eve@example.com
2277 # role: roles/resourcemanager.organizationViewer
2278 # condition:
2279 # title: expirable access
2280 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07002281 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07002282 # - etag: BwWWja0YfJA=
2283 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002284 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002285 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07002286 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07002287 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
2288 # prevent simultaneous updates of a policy from overwriting each other.
2289 # It is strongly suggested that systems make use of the `etag` in the
2290 # read-modify-write cycle to perform policy updates in order to avoid race
2291 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
2292 # systems are expected to put that etag in the request to `setIamPolicy` to
2293 # ensure that their change will be applied to the same version of the policy.
2294 #
2295 # **Important:** If you use IAM Conditions, you must include the `etag` field
2296 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2297 # you to overwrite a version `3` policy with a version `1` policy, and all of
2298 # the conditions in the version `3` policy are lost.
2299 &quot;version&quot;: 42, # Specifies the format of the policy.
2300 #
2301 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
2302 # are rejected.
2303 #
2304 # Any operation that affects conditional role bindings must specify version
2305 # `3`. This requirement applies to the following operations:
2306 #
2307 # * Getting a policy that includes a conditional role binding
2308 # * Adding a conditional role binding to a policy
2309 # * Changing a conditional role binding in a policy
2310 # * Removing any role binding, with or without a condition, from a policy
2311 # that includes conditions
2312 #
2313 # **Important:** If you use IAM Conditions, you must include the `etag` field
2314 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2315 # you to overwrite a version `3` policy with a version `1` policy, and all of
2316 # the conditions in the version `3` policy are lost.
2317 #
2318 # If a policy does not include any conditions, operations on that policy may
2319 # specify any valid version or leave the field unset.
2320 #
2321 # To learn which resources support conditions in their IAM policies, see the
2322 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2323 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2324 { # Specifies the audit configuration for a service.
2325 # The configuration determines which permission types are logged, and what
2326 # identities, if any, are exempted from logging.
2327 # An AuditConfig must have one or more AuditLogConfigs.
2328 #
2329 # If there are AuditConfigs for both `allServices` and a specific service,
2330 # the union of the two AuditConfigs is used for that service: the log_types
2331 # specified in each AuditConfig are enabled, and the exempted_members in each
2332 # AuditLogConfig are exempted.
2333 #
2334 # Example Policy with multiple AuditConfigs:
2335 #
2336 # {
2337 # &quot;audit_configs&quot;: [
2338 # {
2339 # &quot;service&quot;: &quot;allServices&quot;
2340 # &quot;audit_log_configs&quot;: [
2341 # {
2342 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2343 # &quot;exempted_members&quot;: [
2344 # &quot;user:jose@example.com&quot;
2345 # ]
2346 # },
2347 # {
2348 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
2349 # },
2350 # {
2351 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
2352 # }
2353 # ]
2354 # },
2355 # {
2356 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
2357 # &quot;audit_log_configs&quot;: [
2358 # {
2359 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2360 # },
2361 # {
2362 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
2363 # &quot;exempted_members&quot;: [
2364 # &quot;user:aliya@example.com&quot;
2365 # ]
2366 # }
2367 # ]
2368 # }
2369 # ]
2370 # }
2371 #
2372 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
2373 # logging. It also exempts jose@example.com from DATA_READ logging, and
2374 # aliya@example.com from DATA_WRITE logging.
2375 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
2376 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
2377 # `allServices` is a special value that covers all services.
2378 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2379 { # Provides the configuration for logging a type of permissions.
2380 # Example:
2381 #
2382 # {
2383 # &quot;audit_log_configs&quot;: [
2384 # {
2385 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2386 # &quot;exempted_members&quot;: [
2387 # &quot;user:jose@example.com&quot;
2388 # ]
2389 # },
2390 # {
2391 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
2392 # }
2393 # ]
2394 # }
2395 #
2396 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
2397 # jose@example.com from DATA_READ logging.
2398 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
2399 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
2400 # permission.
2401 # Follows the same format of Binding.members.
2402 &quot;A String&quot;,
2403 ],
2404 },
2405 ],
2406 },
2407 ],
2408 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07002409 # `condition` that determines how and when the `bindings` are applied. Each
2410 # of the `bindings` must contain at least one member.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002411 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002412 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002413 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002414 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
2415 #
2416 # If the condition evaluates to `true`, then this binding applies to the
2417 # current request.
2418 #
2419 # If the condition evaluates to `false`, then this binding does not apply to
2420 # the current request. However, a different role binding might grant the same
2421 # role to one or more of the members in this binding.
2422 #
2423 # To learn which resources support conditions in their IAM policies, see the
2424 # [IAM
2425 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2426 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2427 # are documented at https://github.com/google/cel-spec.
2428 #
2429 # Example (Comparison):
2430 #
2431 # title: &quot;Summary size limit&quot;
2432 # description: &quot;Determines if a summary is less than 100 chars&quot;
2433 # expression: &quot;document.summary.size() &lt; 100&quot;
2434 #
2435 # Example (Equality):
2436 #
2437 # title: &quot;Requestor is owner&quot;
2438 # description: &quot;Determines if requestor is the document owner&quot;
2439 # expression: &quot;document.owner == request.auth.claims.email&quot;
2440 #
2441 # Example (Logic):
2442 #
2443 # title: &quot;Public documents&quot;
2444 # description: &quot;Determine whether the document should be publicly visible&quot;
2445 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2446 #
2447 # Example (Data Manipulation):
2448 #
2449 # title: &quot;Notification string&quot;
2450 # description: &quot;Create a notification string with a timestamp.&quot;
2451 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2452 #
2453 # The exact variables and functions that may be referenced within an expression
2454 # are determined by the service that evaluates it. See the service
2455 # documentation for additional information.
2456 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2457 # its purpose. This can be used e.g. in UIs which allow to enter the
2458 # expression.
2459 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2460 # reporting, e.g. a file name and a position in the file.
2461 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2462 # describes the expression, e.g. when hovered over it in a UI.
2463 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2464 # syntax.
2465 },
2466 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002467 # `members` can have the following values:
2468 #
2469 # * `allUsers`: A special identifier that represents anyone who is
2470 # on the internet; with or without a Google account.
2471 #
2472 # * `allAuthenticatedUsers`: A special identifier that represents anyone
2473 # who is authenticated with a Google account or a service account.
2474 #
2475 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07002476 # account. For example, `alice@example.com` .
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002477 #
2478 #
2479 # * `serviceAccount:{emailid}`: An email address that represents a service
2480 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
2481 #
2482 # * `group:{emailid}`: An email address that represents a Google group.
2483 # For example, `admins@example.com`.
2484 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002485 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
2486 # identifier) representing a user that has been recently deleted. For
2487 # example, `alice@example.com?uid=123456789012345678901`. If the user is
2488 # recovered, this value reverts to `user:{emailid}` and the recovered user
2489 # retains the role in the binding.
2490 #
2491 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
2492 # unique identifier) representing a service account that has been recently
2493 # deleted. For example,
2494 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
2495 # If the service account is undeleted, this value reverts to
2496 # `serviceAccount:{emailid}` and the undeleted service account retains the
2497 # role in the binding.
2498 #
2499 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
2500 # identifier) representing a Google group that has been recently
2501 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
2502 # the group is recovered, this value reverts to `group:{emailid}` and the
2503 # recovered group retains the role in the binding.
2504 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002505 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002506 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002507 # users of that domain. For example, `google.com` or `example.com`.
2508 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002509 &quot;A String&quot;,
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002510 ],
2511 },
2512 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002513 }</pre>
2514</div>
2515
2516<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002517 <code class="details" id="setOrgPolicy">setOrgPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002518 <pre>Updates the specified `Policy` on the resource. Creates a new `Policy` for
2519that `Constraint` on the resource if one does not exist.
2520
2521Not supplying an `etag` on the request `Policy` results in an unconditional
2522write of the `Policy`.
2523
2524Args:
2525 resource: string, Resource name of the resource to attach the `Policy`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002526 body: object, The request body.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002527 The object takes the form of:
2528
2529{ # The request sent to the SetOrgPolicyRequest method.
Bu Sun Kim65020912020-05-20 12:08:20 -07002530 &quot;policy&quot;: { # Defines a Cloud Organization `Policy` which is used to specify `Constraints` # `Policy` to set on the resource.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002531 # for configurations of Cloud Platform resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07002532 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002533 # server, not specified by the caller, and represents the last time a call to
2534 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
2535 # be ignored.
Bu Sun Kim65020912020-05-20 12:08:20 -07002536 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
2537 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002538 # `Constraint` type.
2539 # `constraint_default` enforcement behavior of the specific `Constraint` at
2540 # this resource.
2541 #
2542 # Suppose that `constraint_default` is set to `ALLOW` for the
2543 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
2544 # foo.com sets a `Policy` at their Organization resource node that restricts
2545 # the allowed service activations to deny all service activations. They
2546 # could then set a `Policy` with the `policy_type` `restore_default` on
2547 # several experimental projects, restoring the `constraint_default`
2548 # enforcement of the `Constraint` for only those projects, allowing those
2549 # projects to have all services activated.
2550 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002551 &quot;listPolicy&quot;: { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002552 # resource.
2553 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002554 # `ListPolicy` can define specific values and subtrees of Cloud Resource
2555 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
2556 # are allowed or denied by setting the `allowed_values` and `denied_values`
2557 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
2558 # The `under:` prefix is used to denote resource subtree values.
2559 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -07002560 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002561 # same as values with no prefix.
2562 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -07002563 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
2564 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
2565 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002566 # The `supports_under` field of the associated `Constraint` defines whether
2567 # ancestry prefixes can be used. You can set `allowed_values` and
2568 # `denied_values` in the same `Policy` if `all_values` is
2569 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
2570 # values. If `all_values` is set to either `ALLOW` or `DENY`,
2571 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07002572 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002573 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002574 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002575 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002576 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
2577 # that matches the value specified in this `Policy`. If `suggested_value`
2578 # is not set, it will inherit the value specified higher in the hierarchy,
2579 # unless `inherit_from_parent` is `false`.
2580 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002581 #
2582 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
2583 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
2584 # set to `true`, then the values from the effective `Policy` of the parent
2585 # resource are inherited, meaning the values set in this `Policy` are
2586 # added to the values inherited up the hierarchy.
2587 #
2588 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -07002589 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002590 # simple and understandable. However, it is possible to set a `Policy` with
2591 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
2592 # In this case, the values that are allowed must be in `allowed_values` and
2593 # not present in `denied_values`.
2594 #
2595 # For example, suppose you have a `Constraint`
2596 # `constraints/serviceuser.services`, which has a `constraint_type` of
2597 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
2598 # Suppose that at the Organization level, a `Policy` is applied that
2599 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
2600 # `Policy` is applied to a project below the Organization that has
2601 # `inherit_from_parent` set to `false` and field all_values set to DENY,
2602 # then an attempt to activate any API will be denied.
2603 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002604 # The following examples demonstrate different possible layerings for
2605 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002606 #
2607 # Example 1 (no inherited values):
2608 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002609 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002610 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002611 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002612 # The accepted values at `organizations/foo` are `E1`, `E2`.
2613 # The accepted values at `projects/bar` are `E3`, and `E4`.
2614 #
2615 # Example 2 (inherited values):
2616 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002617 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002618 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002619 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002620 # The accepted values at `organizations/foo` are `E1`, `E2`.
2621 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
2622 #
2623 # Example 3 (inheriting both allowed and denied values):
2624 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002625 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002626 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07002627 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002628 # The accepted values at `organizations/foo` are `E1`, `E2`.
2629 # The value accepted at `projects/bar` is `E2`.
2630 #
2631 # Example 4 (RestoreDefault):
2632 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002633 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002634 # `projects/bar` has a `Policy` with values:
2635 # {RestoreDefault: {}}
2636 # The accepted values at `organizations/foo` are `E1`, `E2`.
2637 # The accepted values at `projects/bar` are either all or none depending on
2638 # the value of `constraint_default` (if `ALLOW`, all; if
2639 # `DENY`, none).
2640 #
2641 # Example 5 (no policy inherits parent policy):
2642 # `organizations/foo` has no `Policy` set.
2643 # `projects/bar` has no `Policy` set.
2644 # The accepted values at both levels are either all or none depending on
2645 # the value of `constraint_default` (if `ALLOW`, all; if
2646 # `DENY`, none).
2647 #
2648 # Example 6 (ListConstraint allowing all):
2649 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002650 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002651 # `projects/bar` has a `Policy` with:
2652 # {all: ALLOW}
2653 # The accepted values at `organizations/foo` are `E1`, E2`.
2654 # Any value is accepted at `projects/bar`.
2655 #
2656 # Example 7 (ListConstraint allowing none):
2657 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002658 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002659 # `projects/bar` has a `Policy` with:
2660 # {all: DENY}
2661 # The accepted values at `organizations/foo` are `E1`, E2`.
2662 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002663 #
2664 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
2665 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07002666 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002667 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002668 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002669 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07002670 # {allowed_values: &quot;under:projects/P3&quot;}
2671 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002672 # The accepted values at `organizations/foo` are `organizations/O1`,
2673 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
2674 # `projects/P3`.
2675 # The accepted values at `projects/bar` are `organizations/O1`,
2676 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002677 &quot;deniedValues&quot;: [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002678 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002679 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002680 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002681 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002682 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002683 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
2684 # concurrency control.
2685 #
2686 # When the `Policy` is returned from either a `GetPolicy` or a
2687 # `ListOrgPolicy` request, this `etag` indicates the version of the current
2688 # `Policy` to use when executing a read-modify-write loop.
2689 #
2690 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
2691 # `etag` will be unset.
2692 #
2693 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
2694 # that was returned from a `GetOrgPolicy` request as part of a
2695 # read-modify-write loop for concurrency control. Not setting the `etag`in a
2696 # `SetOrgPolicy` request will result in an unconditional write of the
2697 # `Policy`.
2698 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
2699 # `constraints/serviceuser.services`.
2700 #
2701 # Immutable after creation.
2702 &quot;booleanPolicy&quot;: { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002703 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002704 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002705 # configuration is acceptable.
2706 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002707 # Suppose you have a `Constraint`
2708 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
2709 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
2710 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002711 # - If the `Policy` at this resource has enforced set to `false`, serial
2712 # port connection attempts will be allowed.
2713 # - If the `Policy` at this resource has enforced set to `true`, serial
2714 # port connection attempts will be refused.
2715 # - If the `Policy` at this resource is `RestoreDefault`, serial port
2716 # connection attempts will be allowed.
2717 # - If no `Policy` is set at this resource or anywhere higher in the
2718 # resource hierarchy, serial port connection attempts will be allowed.
2719 # - If no `Policy` is set at this resource, but one exists higher in the
2720 # resource hierarchy, the behavior is as if the`Policy` were set at
2721 # this resource.
2722 #
2723 # The following examples demonstrate the different possible layerings:
2724 #
2725 # Example 1 (nearest `Constraint` wins):
2726 # `organizations/foo` has a `Policy` with:
2727 # {enforced: false}
2728 # `projects/bar` has no `Policy` set.
2729 # The constraint at `projects/bar` and `organizations/foo` will not be
2730 # enforced.
2731 #
2732 # Example 2 (enforcement gets replaced):
2733 # `organizations/foo` has a `Policy` with:
2734 # {enforced: false}
2735 # `projects/bar` has a `Policy` with:
2736 # {enforced: true}
2737 # The constraint at `organizations/foo` is not enforced.
2738 # The constraint at `projects/bar` is enforced.
2739 #
2740 # Example 3 (RestoreDefault):
2741 # `organizations/foo` has a `Policy` with:
2742 # {enforced: true}
2743 # `projects/bar` has a `Policy` with:
2744 # {RestoreDefault: {}}
2745 # The constraint at `organizations/foo` is enforced.
2746 # The constraint at `projects/bar` is not enforced, because
2747 # `constraint_default` for the `Constraint` is `ALLOW`.
2748 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002749 },
2750 }
2751
2752 x__xgafv: string, V1 error format.
2753 Allowed values
2754 1 - v1 error format
2755 2 - v2 error format
2756
2757Returns:
2758 An object of the form:
2759
2760 { # Defines a Cloud Organization `Policy` which is used to specify `Constraints`
2761 # for configurations of Cloud Platform resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07002762 &quot;updateTime&quot;: &quot;A String&quot;, # The time stamp the `Policy` was previously updated. This is set by the
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002763 # server, not specified by the caller, and represents the last time a call to
2764 # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
2765 # be ignored.
Bu Sun Kim65020912020-05-20 12:08:20 -07002766 &quot;version&quot;: 42, # Version of the `Policy`. Default version is 0;
2767 &quot;restoreDefault&quot;: { # Ignores policies set above this resource and restores the # Restores the default behavior of the constraint; independent of
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002768 # `Constraint` type.
2769 # `constraint_default` enforcement behavior of the specific `Constraint` at
2770 # this resource.
2771 #
2772 # Suppose that `constraint_default` is set to `ALLOW` for the
2773 # `Constraint` `constraints/serviceuser.services`. Suppose that organization
2774 # foo.com sets a `Policy` at their Organization resource node that restricts
2775 # the allowed service activations to deny all service activations. They
2776 # could then set a `Policy` with the `policy_type` `restore_default` on
2777 # several experimental projects, restoring the `constraint_default`
2778 # enforcement of the `Constraint` for only those projects, allowing those
2779 # projects to have all services activated.
2780 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002781 &quot;listPolicy&quot;: { # Used in `policy_type` to specify how `list_policy` behaves at this # List of values either allowed or disallowed.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002782 # resource.
2783 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002784 # `ListPolicy` can define specific values and subtrees of Cloud Resource
2785 # Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
2786 # are allowed or denied by setting the `allowed_values` and `denied_values`
2787 # fields. This is achieved by using the `under:` and optional `is:` prefixes.
2788 # The `under:` prefix is used to denote resource subtree values.
2789 # The `is:` prefix is used to denote specific values, and is required only
Bu Sun Kim65020912020-05-20 12:08:20 -07002790 # if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002791 # same as values with no prefix.
2792 # Ancestry subtrees must be in one of the following formats:
Bu Sun Kim65020912020-05-20 12:08:20 -07002793 # - &quot;projects/&lt;project-id&gt;&quot;, e.g. &quot;projects/tokyo-rain-123&quot;
2794 # - &quot;folders/&lt;folder-id&gt;&quot;, e.g. &quot;folders/1234&quot;
2795 # - &quot;organizations/&lt;organization-id&gt;&quot;, e.g. &quot;organizations/1234&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002796 # The `supports_under` field of the associated `Constraint` defines whether
2797 # ancestry prefixes can be used. You can set `allowed_values` and
2798 # `denied_values` in the same `Policy` if `all_values` is
2799 # `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
2800 # values. If `all_values` is set to either `ALLOW` or `DENY`,
2801 # `allowed_values` and `denied_values` must be unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07002802 &quot;allowedValues&quot;: [ # List of values allowed at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002803 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002804 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002805 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002806 &quot;suggestedValue&quot;: &quot;A String&quot;, # Optional. The Google Cloud Console will try to default to a configuration
2807 # that matches the value specified in this `Policy`. If `suggested_value`
2808 # is not set, it will inherit the value specified higher in the hierarchy,
2809 # unless `inherit_from_parent` is `false`.
2810 &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this `Policy`.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002811 #
2812 # By default, a `ListPolicy` set at a resource supercedes any `Policy` set
2813 # anywhere up the resource hierarchy. However, if `inherit_from_parent` is
2814 # set to `true`, then the values from the effective `Policy` of the parent
2815 # resource are inherited, meaning the values set in this `Policy` are
2816 # added to the values inherited up the hierarchy.
2817 #
2818 # Setting `Policy` hierarchies that inherit both allowed values and denied
Bu Sun Kim65020912020-05-20 12:08:20 -07002819 # values isn&#x27;t recommended in most circumstances to keep the configuration
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002820 # simple and understandable. However, it is possible to set a `Policy` with
2821 # `allowed_values` set that inherits a `Policy` with `denied_values` set.
2822 # In this case, the values that are allowed must be in `allowed_values` and
2823 # not present in `denied_values`.
2824 #
2825 # For example, suppose you have a `Constraint`
2826 # `constraints/serviceuser.services`, which has a `constraint_type` of
2827 # `list_constraint`, and with `constraint_default` set to `ALLOW`.
2828 # Suppose that at the Organization level, a `Policy` is applied that
2829 # restricts the allowed API activations to {`E1`, `E2`}. Then, if a
2830 # `Policy` is applied to a project below the Organization that has
2831 # `inherit_from_parent` set to `false` and field all_values set to DENY,
2832 # then an attempt to activate any API will be denied.
2833 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002834 # The following examples demonstrate different possible layerings for
2835 # `projects/bar` parented by `organizations/foo`:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002836 #
2837 # Example 1 (no inherited values):
2838 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002839 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002840 # `projects/bar` has `inherit_from_parent` `false` and values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002841 # {allowed_values: &quot;E3&quot; allowed_values: &quot;E4&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002842 # The accepted values at `organizations/foo` are `E1`, `E2`.
2843 # The accepted values at `projects/bar` are `E3`, and `E4`.
2844 #
2845 # Example 2 (inherited values):
2846 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002847 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002848 # `projects/bar` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002849 # {value: &quot;E3&quot; value: &quot;E4&quot; inherit_from_parent: true}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002850 # The accepted values at `organizations/foo` are `E1`, `E2`.
2851 # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
2852 #
2853 # Example 3 (inheriting both allowed and denied values):
2854 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002855 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002856 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07002857 # {denied_values: &quot;E1&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002858 # The accepted values at `organizations/foo` are `E1`, `E2`.
2859 # The value accepted at `projects/bar` is `E2`.
2860 #
2861 # Example 4 (RestoreDefault):
2862 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002863 # {allowed_values: &quot;E1&quot; allowed_values:&quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002864 # `projects/bar` has a `Policy` with values:
2865 # {RestoreDefault: {}}
2866 # The accepted values at `organizations/foo` are `E1`, `E2`.
2867 # The accepted values at `projects/bar` are either all or none depending on
2868 # the value of `constraint_default` (if `ALLOW`, all; if
2869 # `DENY`, none).
2870 #
2871 # Example 5 (no policy inherits parent policy):
2872 # `organizations/foo` has no `Policy` set.
2873 # `projects/bar` has no `Policy` set.
2874 # The accepted values at both levels are either all or none depending on
2875 # the value of `constraint_default` (if `ALLOW`, all; if
2876 # `DENY`, none).
2877 #
2878 # Example 6 (ListConstraint allowing all):
2879 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002880 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002881 # `projects/bar` has a `Policy` with:
2882 # {all: ALLOW}
2883 # The accepted values at `organizations/foo` are `E1`, E2`.
2884 # Any value is accepted at `projects/bar`.
2885 #
2886 # Example 7 (ListConstraint allowing none):
2887 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002888 # {allowed_values: &quot;E1&quot; allowed_values: &quot;E2&quot;}
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002889 # `projects/bar` has a `Policy` with:
2890 # {all: DENY}
2891 # The accepted values at `organizations/foo` are `E1`, E2`.
2892 # No value is accepted at `projects/bar`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002893 #
2894 # Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
2895 # Given the following resource hierarchy
Dan O'Mearadd494642020-05-01 07:42:23 -07002896 # O1-&gt;{F1, F2}; F1-&gt;{P1}; F2-&gt;{P2, P3},
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002897 # `organizations/foo` has a `Policy` with values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002898 # {allowed_values: &quot;under:organizations/O1&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002899 # `projects/bar` has a `Policy` with:
Bu Sun Kim65020912020-05-20 12:08:20 -07002900 # {allowed_values: &quot;under:projects/P3&quot;}
2901 # {denied_values: &quot;under:folders/F2&quot;}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002902 # The accepted values at `organizations/foo` are `organizations/O1`,
2903 # `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
2904 # `projects/P3`.
2905 # The accepted values at `projects/bar` are `organizations/O1`,
2906 # `folders/F1`, `projects/P1`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002907 &quot;deniedValues&quot;: [ # List of values denied at this resource. Can only be set if `all_values`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002908 # is set to `ALL_VALUES_UNSPECIFIED`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002909 &quot;A String&quot;,
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002910 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002911 &quot;allValues&quot;: &quot;A String&quot;, # The policy all_values state.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002912 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002913 &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the `Policy`, used for
2914 # concurrency control.
2915 #
2916 # When the `Policy` is returned from either a `GetPolicy` or a
2917 # `ListOrgPolicy` request, this `etag` indicates the version of the current
2918 # `Policy` to use when executing a read-modify-write loop.
2919 #
2920 # When the `Policy` is returned from a `GetEffectivePolicy` request, the
2921 # `etag` will be unset.
2922 #
2923 # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
2924 # that was returned from a `GetOrgPolicy` request as part of a
2925 # read-modify-write loop for concurrency control. Not setting the `etag`in a
2926 # `SetOrgPolicy` request will result in an unconditional write of the
2927 # `Policy`.
2928 &quot;constraint&quot;: &quot;A String&quot;, # The name of the `Constraint` the `Policy` is configuring, for example,
2929 # `constraints/serviceuser.services`.
2930 #
2931 # Immutable after creation.
2932 &quot;booleanPolicy&quot;: { # Used in `policy_type` to specify how `boolean_policy` will behave at this # For boolean `Constraints`, whether to enforce the `Constraint` or not.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002933 # resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002934 &quot;enforced&quot;: True or False, # If `true`, then the `Policy` is enforced. If `false`, then any
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002935 # configuration is acceptable.
2936 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002937 # Suppose you have a `Constraint`
2938 # `constraints/compute.disableSerialPortAccess` with `constraint_default`
2939 # set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
2940 # behavior:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002941 # - If the `Policy` at this resource has enforced set to `false`, serial
2942 # port connection attempts will be allowed.
2943 # - If the `Policy` at this resource has enforced set to `true`, serial
2944 # port connection attempts will be refused.
2945 # - If the `Policy` at this resource is `RestoreDefault`, serial port
2946 # connection attempts will be allowed.
2947 # - If no `Policy` is set at this resource or anywhere higher in the
2948 # resource hierarchy, serial port connection attempts will be allowed.
2949 # - If no `Policy` is set at this resource, but one exists higher in the
2950 # resource hierarchy, the behavior is as if the`Policy` were set at
2951 # this resource.
2952 #
2953 # The following examples demonstrate the different possible layerings:
2954 #
2955 # Example 1 (nearest `Constraint` wins):
2956 # `organizations/foo` has a `Policy` with:
2957 # {enforced: false}
2958 # `projects/bar` has no `Policy` set.
2959 # The constraint at `projects/bar` and `organizations/foo` will not be
2960 # enforced.
2961 #
2962 # Example 2 (enforcement gets replaced):
2963 # `organizations/foo` has a `Policy` with:
2964 # {enforced: false}
2965 # `projects/bar` has a `Policy` with:
2966 # {enforced: true}
2967 # The constraint at `organizations/foo` is not enforced.
2968 # The constraint at `projects/bar` is enforced.
2969 #
2970 # Example 3 (RestoreDefault):
2971 # `organizations/foo` has a `Policy` with:
2972 # {enforced: true}
2973 # `projects/bar` has a `Policy` with:
2974 # {RestoreDefault: {}}
2975 # The constraint at `organizations/foo` is enforced.
2976 # The constraint at `projects/bar` is not enforced, because
2977 # `constraint_default` for the `Constraint` is `ALLOW`.
2978 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -07002979 }</pre>
2980</div>
2981
2982<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002983 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002984 <pre>Returns permissions that a caller has on the specified Project.
2985
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002986There are no permissions required for making this API call.
2987
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002988Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002989 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002990See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002991 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002992 The object takes the form of:
2993
2994{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07002995 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
2996 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002997 # information see
2998 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07002999 &quot;A String&quot;,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003000 ],
3001 }
3002
3003 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003004 Allowed values
3005 1 - v1 error format
3006 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003007
3008Returns:
3009 An object of the form:
3010
3011 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07003012 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003013 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07003014 &quot;A String&quot;,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003015 ],
3016 }</pre>
3017</div>
3018
3019<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003020 <code class="details" id="undelete">undelete(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003021 <pre>Restores the Project identified by the specified
3022`project_id` (for example, `my-project-123`).
3023You can only use this method for a Project that has a lifecycle state of
3024DELETE_REQUESTED.
3025After deletion starts, the Project cannot be restored.
3026
3027The caller must have modify permissions for this Project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003028
3029Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003030 projectId: string, The project ID (for example, `foo-bar-123`).
3031
3032Required. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003033 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003034 The object takes the form of:
3035
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003036{ # The request sent to the UndeleteProject
3037 # method.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003038 }
3039
3040 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003041 Allowed values
3042 1 - v1 error format
3043 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003044
3045Returns:
3046 An object of the form:
3047
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003048 { # A generic empty message that you can re-use to avoid defining duplicated
3049 # empty messages in your APIs. A typical example is to use it as the request
3050 # or the response type of an API method. For instance:
3051 #
3052 # service Foo {
3053 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
3054 # }
3055 #
3056 # The JSON representation for `Empty` is empty JSON object `{}`.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003057 }</pre>
3058</div>
3059
3060<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003061 <code class="details" id="update">update(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003062 <pre>Updates the attributes of the Project identified by the specified
3063`project_id` (for example, `my-project-123`).
3064
3065The caller must have modify permissions for this Project.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003066
3067Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003068 projectId: string, The project ID (for example, `my-project-123`).
3069
3070Required. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003071 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003072 The object takes the form of:
3073
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003074{ # A Project is a high-level Google Cloud Platform entity. It is a
Bu Sun Kim65020912020-05-20 12:08:20 -07003075 # container for ACLs, APIs, App Engine Apps, VMs, and other
3076 # Google Cloud Platform resources.
3077 &quot;parent&quot;: { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
3078 #
3079 # Supported parent types include &quot;organization&quot; and &quot;folder&quot;. Once set, the
3080 # parent cannot be cleared. The `parent` can be set on creation or using the
3081 # `UpdateProject` method; the end user must have the
3082 # `resourcemanager.projects.create` permission on the parent.
3083 #
3084 # Read-write.
3085 # Cloud Platform is a generic term for something you (a developer) may want to
3086 # interact with through one of our API&#x27;s. Some examples are an App Engine app,
3087 # a Compute Engine instance, a Cloud SQL database, and so on.
3088 &quot;type&quot;: &quot;A String&quot;, # Required field representing the resource type this id is for.
3089 # At present, the valid types are: &quot;organization&quot;, &quot;folder&quot;, and &quot;project&quot;.
3090 &quot;id&quot;: &quot;A String&quot;, # Required field for the type-specific id. This should correspond to the id
3091 # used in the type-specific API&#x27;s.
3092 },
3093 &quot;labels&quot;: { # The labels associated with this Project.
3094 #
3095 # Label keys must be between 1 and 63 characters long and must conform
3096 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
3097 #
3098 # Label values must be between 0 and 63 characters long and must conform
3099 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
3100 # value can be empty.
3101 #
3102 # No more than 256 labels can be associated with a given resource.
3103 #
3104 # Clients should store labels in a representation such as JSON that does not
3105 # depend on specific characters being disallowed.
3106 #
3107 # Example: &lt;code&gt;&quot;environment&quot; : &quot;dev&quot;&lt;/code&gt;
3108 # Read-write.
3109 &quot;a_key&quot;: &quot;A String&quot;,
3110 },
3111 &quot;createTime&quot;: &quot;A String&quot;, # Creation time.
3112 #
3113 # Read-only.
3114 &quot;name&quot;: &quot;A String&quot;, # The optional user-assigned display name of the Project.
3115 # When present it must be between 4 to 30 characters.
3116 # Allowed characters are: lowercase and uppercase letters, numbers,
3117 # hyphen, single-quote, double-quote, space, and exclamation point.
3118 #
3119 # Example: &lt;code&gt;My Project&lt;/code&gt;
3120 # Read-write.
3121 &quot;projectId&quot;: &quot;A String&quot;, # The unique, user-assigned ID of the Project.
3122 # It must be 6 to 30 lowercase letters, digits, or hyphens.
3123 # It must start with a letter.
3124 # Trailing hyphens are prohibited.
3125 #
3126 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
3127 # Read-only after creation.
3128 &quot;lifecycleState&quot;: &quot;A String&quot;, # The Project lifecycle state.
3129 #
3130 # Read-only.
3131 &quot;projectNumber&quot;: &quot;A String&quot;, # The number uniquely identifying the project.
3132 #
3133 # Example: &lt;code&gt;415104041262&lt;/code&gt;
3134 # Read-only.
3135}
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003136
3137 x__xgafv: string, V1 error format.
3138 Allowed values
3139 1 - v1 error format
3140 2 - v2 error format
3141
3142Returns:
3143 An object of the form:
3144
3145 { # A Project is a high-level Google Cloud Platform entity. It is a
Bu Sun Kim65020912020-05-20 12:08:20 -07003146 # container for ACLs, APIs, App Engine Apps, VMs, and other
3147 # Google Cloud Platform resources.
3148 &quot;parent&quot;: { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
3149 #
3150 # Supported parent types include &quot;organization&quot; and &quot;folder&quot;. Once set, the
3151 # parent cannot be cleared. The `parent` can be set on creation or using the
3152 # `UpdateProject` method; the end user must have the
3153 # `resourcemanager.projects.create` permission on the parent.
3154 #
3155 # Read-write.
3156 # Cloud Platform is a generic term for something you (a developer) may want to
3157 # interact with through one of our API&#x27;s. Some examples are an App Engine app,
3158 # a Compute Engine instance, a Cloud SQL database, and so on.
3159 &quot;type&quot;: &quot;A String&quot;, # Required field representing the resource type this id is for.
3160 # At present, the valid types are: &quot;organization&quot;, &quot;folder&quot;, and &quot;project&quot;.
3161 &quot;id&quot;: &quot;A String&quot;, # Required field for the type-specific id. This should correspond to the id
3162 # used in the type-specific API&#x27;s.
3163 },
3164 &quot;labels&quot;: { # The labels associated with this Project.
3165 #
3166 # Label keys must be between 1 and 63 characters long and must conform
3167 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
3168 #
3169 # Label values must be between 0 and 63 characters long and must conform
3170 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
3171 # value can be empty.
3172 #
3173 # No more than 256 labels can be associated with a given resource.
3174 #
3175 # Clients should store labels in a representation such as JSON that does not
3176 # depend on specific characters being disallowed.
3177 #
3178 # Example: &lt;code&gt;&quot;environment&quot; : &quot;dev&quot;&lt;/code&gt;
3179 # Read-write.
3180 &quot;a_key&quot;: &quot;A String&quot;,
3181 },
3182 &quot;createTime&quot;: &quot;A String&quot;, # Creation time.
3183 #
3184 # Read-only.
3185 &quot;name&quot;: &quot;A String&quot;, # The optional user-assigned display name of the Project.
3186 # When present it must be between 4 to 30 characters.
3187 # Allowed characters are: lowercase and uppercase letters, numbers,
3188 # hyphen, single-quote, double-quote, space, and exclamation point.
3189 #
3190 # Example: &lt;code&gt;My Project&lt;/code&gt;
3191 # Read-write.
3192 &quot;projectId&quot;: &quot;A String&quot;, # The unique, user-assigned ID of the Project.
3193 # It must be 6 to 30 lowercase letters, digits, or hyphens.
3194 # It must start with a letter.
3195 # Trailing hyphens are prohibited.
3196 #
3197 # Example: &lt;code&gt;tokyo-rain-123&lt;/code&gt;
3198 # Read-only after creation.
3199 &quot;lifecycleState&quot;: &quot;A String&quot;, # The Project lifecycle state.
3200 #
3201 # Read-only.
3202 &quot;projectNumber&quot;: &quot;A String&quot;, # The number uniquely identifying the project.
3203 #
3204 # Example: &lt;code&gt;415104041262&lt;/code&gt;
3205 # Read-only.
3206 }</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003207</div>
3208
3209</body></html>