blob: 4db39939932cdc48737a10d0bb3da1e28e445841 [file] [log] [blame]
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001<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_v1beta1.html">Cloud Resource Manager API</a> . <a href="cloudresourcemanager_v1beta1.projects.html">projects</a></h1>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000076<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070078 <code><a href="#create">create(body, useLegacyStack=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080079<p class="firstline">Creates a Project resource.</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000080<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070081 <code><a href="#delete">delete(projectId, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080082<p class="firstline">Marks the Project identified by the specified</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000083<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070084 <code><a href="#get">get(projectId, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080085<p class="firstline">Retrieves the Project identified by the specified</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000086<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#getAncestry">getAncestry(projectId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080088<p class="firstline">Gets a list of ancestors in the resource hierarchy for the Project</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070089<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080091<p class="firstline">Returns the IAM access control policy for the specified Project.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070092<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070093 <code><a href="#list">list(pageSize=None, pageToken=None, x__xgafv=None, filter=None)</a></code></p>
94<p class="firstline">Lists Projects that the caller has the `resourcemanager.projects.get`</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000095<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070099 <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Sets the IAM access control policy for the specified Project. Overwrites</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -0700102 <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103<p class="firstline">Returns permissions that a caller has on the specified Project.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700104<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700105 <code><a href="#undelete">undelete(projectId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800106<p class="firstline">Restores the Project identified by the specified</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000107<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -0700108 <code><a href="#update">update(projectId, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800109<p class="firstline">Updates the attributes of the Project identified by the specified</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000110<h3>Method Details</h3>
111<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112 <code class="details" id="create">create(body, useLegacyStack=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800113 <pre>Creates a Project resource.
114
115Initially, the Project resource is owned by its creator exclusively.
116The creator can later grant permission to others to read or update the
117Project.
118
119Several APIs are activated automatically for the Project, including
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120Google Cloud Storage. The parent is identified by a specified
121ResourceId, which must include both an ID and a type, such as
122project, folder, or organization.
123
124This method does not associate the new project with a billing account.
125You can set or update the billing account associated with a project using
126the [`projects.updateBillingInfo`]
127(/billing/reference/rest/v1/projects/updateBillingInfo) method.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000128
129Args:
130 body: object, The request body. (required)
131 The object takes the form of:
132
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800133{ # A Project is a high-level Google Cloud Platform entity. It is a
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400134 # container for ACLs, APIs, App Engine Apps, VMs, and other
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800135 # Google Cloud Platform resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136 "name": "A String", # The optional user-assigned display name of the Project.
137 # When present it must be between 4 to 30 characters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800138 # Allowed characters are: lowercase and uppercase letters, numbers,
139 # hyphen, single-quote, double-quote, space, and exclamation point.
140 #
141 # Example: <code>My Project</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800142 # Read-write.
143 "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
144 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145 # Supported parent types include "organization" and "folder". Once set, the
146 # parent cannot be cleared. The `parent` can be set on creation or using the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800147 # `UpdateProject` method; the end user must have the
148 # `resourcemanager.projects.create` permission on the parent.
149 #
150 # Read-write.
151 # Cloud Platform is a generic term for something you (a developer) may want to
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400152 # interact with through one of our API's. Some examples are an App Engine app,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800153 # a Compute Engine instance, a Cloud SQL database, and so on.
154 "type": "A String", # Required field representing the resource type this id is for.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700155 # At present, the valid types are "project", "folder", and "organization".
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800156 "id": "A String", # Required field for the type-specific id. This should correspond to the id
157 # used in the type-specific API's.
Takashi Matsuo06694102015-09-11 13:55:40 -0700158 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800159 "projectId": "A String", # The unique, user-assigned ID of the Project.
160 # It must be 6 to 30 lowercase letters, digits, or hyphens.
161 # It must start with a letter.
162 # Trailing hyphens are prohibited.
163 #
164 # Example: <code>tokyo-rain-123</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800165 # Read-only after creation.
166 "labels": { # The labels associated with this Project.
167 #
168 # Label keys must be between 1 and 63 characters long and must conform
169 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
170 #
171 # Label values must be between 0 and 63 characters long and must conform
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
173 # value can be empty.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800174 #
175 # No more than 256 labels can be associated with a given resource.
176 #
177 # Clients should store labels in a representation such as JSON that does not
178 # depend on specific characters being disallowed.
179 #
180 # Example: <code>"environment" : "dev"</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800181 # Read-write.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000182 "a_key": "A String",
183 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700184 "createTime": "A String", # Creation time.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800185 #
186 # Read-only.
187 "lifecycleState": "A String", # The Project lifecycle state.
188 #
189 # Read-only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700190 "projectNumber": "A String", # The number uniquely identifying the project.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800191 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700192 # Example: <code>415104041262</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800193 # Read-only.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000194}
195
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700196 useLegacyStack: boolean, A safety hatch to opt out of the new reliable project creation process.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000197 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800198 Allowed values
199 1 - v1 error format
200 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000201
202Returns:
203 An object of the form:
204
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800205 { # A Project is a high-level Google Cloud Platform entity. It is a
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400206 # container for ACLs, APIs, App Engine Apps, VMs, and other
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800207 # Google Cloud Platform resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700208 "name": "A String", # The optional user-assigned display name of the Project.
209 # When present it must be between 4 to 30 characters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800210 # Allowed characters are: lowercase and uppercase letters, numbers,
211 # hyphen, single-quote, double-quote, space, and exclamation point.
212 #
213 # Example: <code>My Project</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800214 # Read-write.
215 "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
216 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217 # Supported parent types include "organization" and "folder". Once set, the
218 # parent cannot be cleared. The `parent` can be set on creation or using the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800219 # `UpdateProject` method; the end user must have the
220 # `resourcemanager.projects.create` permission on the parent.
221 #
222 # Read-write.
223 # Cloud Platform is a generic term for something you (a developer) may want to
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400224 # interact with through one of our API's. Some examples are an App Engine app,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800225 # a Compute Engine instance, a Cloud SQL database, and so on.
226 "type": "A String", # Required field representing the resource type this id is for.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227 # At present, the valid types are "project", "folder", and "organization".
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800228 "id": "A String", # Required field for the type-specific id. This should correspond to the id
229 # used in the type-specific API's.
Takashi Matsuo06694102015-09-11 13:55:40 -0700230 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800231 "projectId": "A String", # The unique, user-assigned ID of the Project.
232 # It must be 6 to 30 lowercase letters, digits, or hyphens.
233 # It must start with a letter.
234 # Trailing hyphens are prohibited.
235 #
236 # Example: <code>tokyo-rain-123</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800237 # Read-only after creation.
238 "labels": { # The labels associated with this Project.
239 #
240 # Label keys must be between 1 and 63 characters long and must conform
241 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
242 #
243 # Label values must be between 0 and 63 characters long and must conform
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700244 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
245 # value can be empty.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800246 #
247 # No more than 256 labels can be associated with a given resource.
248 #
249 # Clients should store labels in a representation such as JSON that does not
250 # depend on specific characters being disallowed.
251 #
252 # Example: <code>"environment" : "dev"</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800253 # Read-write.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000254 "a_key": "A String",
255 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700256 "createTime": "A String", # Creation time.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800257 #
258 # Read-only.
259 "lifecycleState": "A String", # The Project lifecycle state.
260 #
261 # Read-only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700262 "projectNumber": "A String", # The number uniquely identifying the project.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800263 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 # Example: <code>415104041262</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800265 # Read-only.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000266 }</pre>
267</div>
268
269<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700270 <code class="details" id="delete">delete(projectId, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800271 <pre>Marks the Project identified by the specified
272`project_id` (for example, `my-project-123`) for deletion.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273This method will only affect the Project if it has a lifecycle state of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800274ACTIVE.
275
276This method changes the Project's lifecycle state from
277ACTIVE
278to DELETE_REQUESTED.
279The deletion starts at an unspecified time, at which point the project is
280no longer accessible.
281
282Until the deletion completes, you can check the lifecycle state
283checked by retrieving the Project with GetProject,
284and the Project remains visible to ListProjects.
285However, you cannot update the project.
286
287After the deletion completes, the Project is not retrievable by
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288the GetProject
289and ListProjects
290methods.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800291
292The caller must have modify permissions for this Project.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000293
294Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800295 projectId: string, The Project ID (for example, `foo-bar-123`).
296
297Required. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000298 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800299 Allowed values
300 1 - v1 error format
301 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000302
303Returns:
304 An object of the form:
305
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800306 { # A generic empty message that you can re-use to avoid defining duplicated
307 # empty messages in your APIs. A typical example is to use it as the request
308 # or the response type of an API method. For instance:
309 #
310 # service Foo {
311 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
312 # }
313 #
314 # The JSON representation for `Empty` is empty JSON object `{}`.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000315 }</pre>
316</div>
317
318<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700319 <code class="details" id="get">get(projectId, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800320 <pre>Retrieves the Project identified by the specified
321`project_id` (for example, `my-project-123`).
322
323The caller must have read permissions for this Project.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000324
325Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800326 projectId: string, The Project ID (for example, `my-project-123`).
327
328Required. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000329 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800330 Allowed values
331 1 - v1 error format
332 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000333
334Returns:
335 An object of the form:
336
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800337 { # A Project is a high-level Google Cloud Platform entity. It is a
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400338 # container for ACLs, APIs, App Engine Apps, VMs, and other
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800339 # Google Cloud Platform resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700340 "name": "A String", # The optional user-assigned display name of the Project.
341 # When present it must be between 4 to 30 characters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800342 # Allowed characters are: lowercase and uppercase letters, numbers,
343 # hyphen, single-quote, double-quote, space, and exclamation point.
344 #
345 # Example: <code>My Project</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800346 # Read-write.
347 "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
348 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 # Supported parent types include "organization" and "folder". Once set, the
350 # parent cannot be cleared. The `parent` can be set on creation or using the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800351 # `UpdateProject` method; the end user must have the
352 # `resourcemanager.projects.create` permission on the parent.
353 #
354 # Read-write.
355 # Cloud Platform is a generic term for something you (a developer) may want to
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400356 # interact with through one of our API's. Some examples are an App Engine app,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800357 # a Compute Engine instance, a Cloud SQL database, and so on.
358 "type": "A String", # Required field representing the resource type this id is for.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700359 # At present, the valid types are "project", "folder", and "organization".
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800360 "id": "A String", # Required field for the type-specific id. This should correspond to the id
361 # used in the type-specific API's.
Takashi Matsuo06694102015-09-11 13:55:40 -0700362 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800363 "projectId": "A String", # The unique, user-assigned ID of the Project.
364 # It must be 6 to 30 lowercase letters, digits, or hyphens.
365 # It must start with a letter.
366 # Trailing hyphens are prohibited.
367 #
368 # Example: <code>tokyo-rain-123</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800369 # Read-only after creation.
370 "labels": { # The labels associated with this Project.
371 #
372 # Label keys must be between 1 and 63 characters long and must conform
373 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
374 #
375 # Label values must be between 0 and 63 characters long and must conform
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700376 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
377 # value can be empty.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800378 #
379 # No more than 256 labels can be associated with a given resource.
380 #
381 # Clients should store labels in a representation such as JSON that does not
382 # depend on specific characters being disallowed.
383 #
384 # Example: <code>"environment" : "dev"</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800385 # Read-write.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000386 "a_key": "A String",
387 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 "createTime": "A String", # Creation time.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800389 #
390 # Read-only.
391 "lifecycleState": "A String", # The Project lifecycle state.
392 #
393 # Read-only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 "projectNumber": "A String", # The number uniquely identifying the project.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800395 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700396 # Example: <code>415104041262</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800397 # Read-only.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000398 }</pre>
399</div>
400
401<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700402 <code class="details" id="getAncestry">getAncestry(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800403 <pre>Gets a list of ancestors in the resource hierarchy for the Project
404identified by the specified `project_id` (for example, `my-project-123`).
405
406The caller must have read permissions for this Project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700407
408Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800409 projectId: string, The Project ID (for example, `my-project-123`).
410
411Required. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700412 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700413 The object takes the form of:
414
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800415{ # The request sent to the
416 # GetAncestry
417 # method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700418 }
419
420 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800421 Allowed values
422 1 - v1 error format
423 2 - v2 error format
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700424
425Returns:
426 An object of the form:
427
428 { # Response from the GetAncestry method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800429 "ancestor": [ # Ancestors are ordered from bottom to top of the resource hierarchy. The
430 # first ancestor is the project itself, followed by the project's parent,
431 # etc.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700432 { # Identifying information for a single ancestor of a project.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800433 "resourceId": { # A container to reference an id for any resource type. A `resource` in Google # Resource id of the ancestor.
434 # Cloud Platform is a generic term for something you (a developer) may want to
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400435 # interact with through one of our API's. Some examples are an App Engine app,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800436 # a Compute Engine instance, a Cloud SQL database, and so on.
437 "type": "A String", # Required field representing the resource type this id is for.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438 # At present, the valid types are "project", "folder", and "organization".
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800439 "id": "A String", # Required field for the type-specific id. This should correspond to the id
440 # used in the type-specific API's.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700441 },
442 },
443 ],
444 }</pre>
445</div>
446
447<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800449 <pre>Returns the IAM access control policy for the specified Project.
450Permission is denied if the policy or the resource does not exist.
Takashi Matsuo06694102015-09-11 13:55:40 -0700451
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700452For additional information about resource structure and identification,
453see [Resource Names](/apis/design/resource_names).
454
Takashi Matsuo06694102015-09-11 13:55:40 -0700455Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800456 resource: string, REQUIRED: The resource for which the policy is being requested.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400457See the operation documentation for the appropriate value for this field. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700458 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700459 The object takes the form of:
460
461{ # Request message for `GetIamPolicy` method.
462 }
463
464 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800465 Allowed values
466 1 - v1 error format
467 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700468
469Returns:
470 An object of the form:
471
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800472 { # Defines an Identity and Access Management (IAM) policy. It is used to
473 # specify access control policies for Cloud Platform resources.
474 #
475 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700476 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800477 # `members` to a `role`, where the members can be user accounts, Google groups,
478 # Google domains, and service accounts. A `role` is a named list of permissions
479 # defined by IAM.
480 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700481 # **JSON Example**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800482 #
483 # {
484 # "bindings": [
485 # {
486 # "role": "roles/owner",
487 # "members": [
488 # "user:mike@example.com",
489 # "group:admins@example.com",
490 # "domain:google.com",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700491 # "serviceAccount:my-other-app@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800492 # ]
493 # },
494 # {
495 # "role": "roles/viewer",
496 # "members": ["user:sean@example.com"]
497 # }
498 # ]
499 # }
500 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700501 # **YAML Example**
502 #
503 # bindings:
504 # - members:
505 # - user:mike@example.com
506 # - group:admins@example.com
507 # - domain:google.com
508 # - serviceAccount:my-other-app@appspot.gserviceaccount.com
509 # role: roles/owner
510 # - members:
511 # - user:sean@example.com
512 # role: roles/viewer
513 #
514 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800515 # For a description of IAM and its features, see the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700516 # [IAM developer's guide](https://cloud.google.com/iam/docs).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800517 "bindings": [ # Associates a list of `members` to a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800518 # `bindings` with no members will result in an error.
Takashi Matsuo06694102015-09-11 13:55:40 -0700519 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800520 "role": "A String", # Role that is assigned to `members`.
521 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700522 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
523 # NOTE: An unsatisfied condition will not allow user access via current
524 # binding. Different bindings, including their conditions, are examined
525 # independently.
526 #
527 # title: "User account presence"
528 # description: "Determines whether the request has a user account"
529 # expression: "size(request.user) > 0"
530 "description": "A String", # An optional description of the expression. This is a longer text which
531 # describes the expression, e.g. when hovered over it in a UI.
532 "expression": "A String", # Textual representation of an expression in
533 # Common Expression Language syntax.
534 #
535 # The application context of the containing message determines which
536 # well-known feature set of CEL is supported.
537 "location": "A String", # An optional string indicating the location of the expression for error
538 # reporting, e.g. a file name and a position in the file.
539 "title": "A String", # An optional title for the expression, i.e. a short string describing
540 # its purpose. This can be used e.g. in UIs which allow to enter the
541 # expression.
542 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800543 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
544 # `members` can have the following values:
545 #
546 # * `allUsers`: A special identifier that represents anyone who is
547 # on the internet; with or without a Google account.
548 #
549 # * `allAuthenticatedUsers`: A special identifier that represents anyone
550 # who is authenticated with a Google account or a service account.
551 #
552 # * `user:{emailid}`: An email address that represents a specific Google
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553 # account. For example, `alice@gmail.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800554 #
555 #
556 # * `serviceAccount:{emailid}`: An email address that represents a service
557 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
558 #
559 # * `group:{emailid}`: An email address that represents a Google group.
560 # For example, `admins@example.com`.
561 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400562 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800564 # users of that domain. For example, `google.com` or `example.com`.
565 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700566 "A String",
567 ],
568 },
569 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400570 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
571 { # Specifies the audit configuration for a service.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700572 # The configuration determines which permission types are logged, and what
573 # identities, if any, are exempted from logging.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400574 # An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400575 #
576 # If there are AuditConfigs for both `allServices` and a specific service,
577 # the union of the two AuditConfigs is used for that service: the log_types
578 # specified in each AuditConfig are enabled, and the exempted_members in each
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700579 # AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400580 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400581 # Example Policy with multiple AuditConfigs:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400582 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400583 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400584 # "audit_configs": [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400585 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400586 # "service": "allServices"
587 # "audit_log_configs": [
588 # {
589 # "log_type": "DATA_READ",
590 # "exempted_members": [
591 # "user:foo@gmail.com"
592 # ]
593 # },
594 # {
595 # "log_type": "DATA_WRITE",
596 # },
597 # {
598 # "log_type": "ADMIN_READ",
599 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400600 # ]
601 # },
602 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400603 # "service": "fooservice.googleapis.com"
604 # "audit_log_configs": [
605 # {
606 # "log_type": "DATA_READ",
607 # },
608 # {
609 # "log_type": "DATA_WRITE",
610 # "exempted_members": [
611 # "user:bar@gmail.com"
612 # ]
613 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400614 # ]
615 # }
616 # ]
617 # }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400618 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400619 # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
620 # logging. It also exempts foo@gmail.com from DATA_READ logging, and
621 # bar@gmail.com from DATA_WRITE logging.
622 "auditLogConfigs": [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400623 { # Provides the configuration for logging a type of permissions.
624 # Example:
625 #
626 # {
627 # "audit_log_configs": [
628 # {
629 # "log_type": "DATA_READ",
630 # "exempted_members": [
631 # "user:foo@gmail.com"
632 # ]
633 # },
634 # {
635 # "log_type": "DATA_WRITE",
636 # }
637 # ]
638 # }
639 #
640 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
641 # foo@gmail.com from DATA_READ logging.
642 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of
643 # permission.
644 # Follows the same format of Binding.members.
645 "A String",
646 ],
647 "logType": "A String", # The log type that this config enables.
648 },
649 ],
650 "service": "A String", # Specifies a service that will be enabled for audit logging.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700651 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400652 # `allServices` is a special value that covers all services.
653 },
654 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400655 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
656 # prevent simultaneous updates of a policy from overwriting each other.
657 # It is strongly suggested that systems make use of the `etag` in the
658 # read-modify-write cycle to perform policy updates in order to avoid race
659 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
660 # systems are expected to put that etag in the request to `setIamPolicy` to
661 # ensure that their change will be applied to the same version of the policy.
662 #
663 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
664 # policy is overwritten blindly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700665 "version": 42, # Deprecated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700666 }</pre>
667</div>
668
669<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670 <code class="details" id="list">list(pageSize=None, pageToken=None, x__xgafv=None, filter=None)</code>
671 <pre>Lists Projects that the caller has the `resourcemanager.projects.get`
672permission on and satisfy the specified filter.
673
674This method returns Projects in an unspecified order.
675This method is eventually consistent with project mutations; this means
676that a newly created project may not appear in the results or recent
677updates to an existing project may not be reflected in the results. To
678retrieve the latest state of a project, use the
679GetProject method.
680
681NOTE: If the request filter contains a `parent.type` and `parent.id` and
682the caller has the `resourcemanager.projects.list` permission on the
683parent, the results will be drawn from an alternate index which provides
684more consistent results. In future versions of this API, this List method
685will be split into List and Search to properly capture the behavorial
686difference.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000687
688Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800689 pageSize: integer, The maximum number of Projects to return in the response.
690The server can return fewer Projects than requested.
691If unspecified, server picks an appropriate default.
692
693Optional.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800694 pageToken: string, A pagination token returned from a previous call to ListProjects
695that indicates from where listing should continue.
696
697Optional.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000698 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800699 Allowed values
700 1 - v1 error format
701 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700702 filter: string, An expression for filtering the results of the request. Filter rules are
703case insensitive. The fields eligible for filtering are:
704
705+ `name`
706+ `id`
707+ `labels.<key>` (where *key* is the name of a label)
708+ `parent.type`
709+ `parent.id`
710
711Some examples of using labels as filters:
712
713| Filter | Description |
714|------------------|-----------------------------------------------------|
715| name:how* | The project's name starts with "how". |
716| name:Howl | The project's name is `Howl` or `howl`. |
717| name:HOWL | Equivalent to above. |
718| NAME:howl | Equivalent to above. |
719| labels.color:* | The project has the label `color`. |
720| labels.color:red | The project's label `color` has the value `red`. |
721| labels.color:red&nbsp;labels.size:big |The project's label `color` has
722 the value `red` and its label `size` has the value `big`. |
723
724If no filter is specified, the call will return projects for which the user
725has the `resourcemanager.projects.get` permission.
726
727NOTE: To perform a by-parent query (eg., what projects are directly in a
728Folder), the caller must have the `resourcemanager.projects.list`
729permission on the parent and the filter must contain both a `parent.type`
730and a `parent.id` restriction
731(example: "parent.type:folder parent.id:123"). In this case an alternate
732search index is used which provides more consistent results.
733
734Optional.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000735
736Returns:
737 An object of the form:
738
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800739 { # A page of the response received from the
740 # ListProjects
741 # method.
742 #
743 # A paginated response where more pages are available has
744 # `next_page_token` set. This token can be used in a subsequent request to
745 # retrieve the next request page.
746 "nextPageToken": "A String", # Pagination token.
747 #
748 # If the result set is too large to fit in a single response, this token
749 # is returned. It encodes the position of the current result cursor.
750 # Feeding this value into a new list request with the `page_token` parameter
751 # gives the next page of the results.
752 #
753 # When `next_page_token` is not filled in, there is no next page and
754 # the list returned is the last page in the result set.
755 #
756 # Pagination tokens have a limited lifetime.
757 "projects": [ # The list of Projects that matched the list filter. This list can
758 # be paginated.
759 { # A Project is a high-level Google Cloud Platform entity. It is a
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400760 # container for ACLs, APIs, App Engine Apps, VMs, and other
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800761 # Google Cloud Platform resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700762 "name": "A String", # The optional user-assigned display name of the Project.
763 # When present it must be between 4 to 30 characters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800764 # Allowed characters are: lowercase and uppercase letters, numbers,
765 # hyphen, single-quote, double-quote, space, and exclamation point.
766 #
767 # Example: <code>My Project</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800768 # Read-write.
769 "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
770 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700771 # Supported parent types include "organization" and "folder". Once set, the
772 # parent cannot be cleared. The `parent` can be set on creation or using the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800773 # `UpdateProject` method; the end user must have the
774 # `resourcemanager.projects.create` permission on the parent.
775 #
776 # Read-write.
777 # Cloud Platform is a generic term for something you (a developer) may want to
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400778 # interact with through one of our API's. Some examples are an App Engine app,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800779 # a Compute Engine instance, a Cloud SQL database, and so on.
780 "type": "A String", # Required field representing the resource type this id is for.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700781 # At present, the valid types are "project", "folder", and "organization".
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800782 "id": "A String", # Required field for the type-specific id. This should correspond to the id
783 # used in the type-specific API's.
Takashi Matsuo06694102015-09-11 13:55:40 -0700784 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800785 "projectId": "A String", # The unique, user-assigned ID of the Project.
786 # It must be 6 to 30 lowercase letters, digits, or hyphens.
787 # It must start with a letter.
788 # Trailing hyphens are prohibited.
789 #
790 # Example: <code>tokyo-rain-123</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800791 # Read-only after creation.
792 "labels": { # The labels associated with this Project.
793 #
794 # Label keys must be between 1 and 63 characters long and must conform
795 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
796 #
797 # Label values must be between 0 and 63 characters long and must conform
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700798 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
799 # value can be empty.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800800 #
801 # No more than 256 labels can be associated with a given resource.
802 #
803 # Clients should store labels in a representation such as JSON that does not
804 # depend on specific characters being disallowed.
805 #
806 # Example: <code>"environment" : "dev"</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800807 # Read-write.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000808 "a_key": "A String",
809 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700810 "createTime": "A String", # Creation time.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800811 #
812 # Read-only.
813 "lifecycleState": "A String", # The Project lifecycle state.
814 #
815 # Read-only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700816 "projectNumber": "A String", # The number uniquely identifying the project.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800817 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700818 # Example: <code>415104041262</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800819 # Read-only.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000820 },
821 ],
822 }</pre>
823</div>
824
825<div class="method">
826 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
827 <pre>Retrieves the next page of results.
828
829Args:
830 previous_request: The request for the previous page. (required)
831 previous_response: The response from the request for the previous page. (required)
832
833Returns:
834 A request object that you can call 'execute()' on to request the next
835 page. Returns None if there are no more items in the collection.
836 </pre>
837</div>
838
839<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700840 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700841 <pre>Sets the IAM access control policy for the specified Project. Overwrites
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800842any existing policy.
843
844The following constraints apply when using `setIamPolicy()`:
845
846+ Project does not support `allUsers` and `allAuthenticatedUsers` as
847`members` in a `Binding` of a `Policy`.
848
849+ The owner role can be granted only to `user` and `serviceAccount`.
850
851+ Service accounts can be made owners of a project directly
852without any restrictions. However, to be added as an owner, a user must be
853invited via Cloud Platform console and must accept the invitation.
854
855+ A user cannot be granted the owner role using `setIamPolicy()`. The user
856must be granted the owner role using the Cloud Platform Console and must
857explicitly accept the invitation.
858
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700859+ Invitations to grant the owner role cannot be sent using
860`setIamPolicy()`; they must be sent only using the Cloud Platform Console.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800861
862+ Membership changes that leave the project without any owners that have
863accepted the Terms of Service (ToS) will be rejected.
864
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700865+ If the project is not part of an organization, there must be at least
866one owner who has accepted the Terms of Service (ToS) agreement in the
867policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner
868from the policy will fail. This restriction also applies to legacy
869projects that no longer have owners who have accepted the ToS. Edits to
870IAM policies will be rejected until the lack of a ToS-accepting owner is
871rectified.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800872
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700873+ This method will replace the existing policy, and cannot be used to
874append additional IAM settings.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800875
876Note: Removing service accounts from policies or changing their roles
877can render services completely inoperable. It is important to understand
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700878how the service account is being used before removing or updating its
879roles.
Takashi Matsuo06694102015-09-11 13:55:40 -0700880
881Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800882 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400883See the operation documentation for the appropriate value for this field. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700884 body: object, The request body. (required)
885 The object takes the form of:
886
887{ # Request message for `SetIamPolicy` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800888 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to # REQUIRED: The complete policy to be applied to the `resource`. The size of
889 # the policy is limited to a few 10s of KB. An empty policy is a
890 # valid policy but certain Cloud Platform services (such as Projects)
891 # might reject them.
892 # specify access control policies for Cloud Platform resources.
893 #
894 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700895 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800896 # `members` to a `role`, where the members can be user accounts, Google groups,
897 # Google domains, and service accounts. A `role` is a named list of permissions
898 # defined by IAM.
899 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700900 # **JSON Example**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800901 #
902 # {
903 # "bindings": [
904 # {
905 # "role": "roles/owner",
906 # "members": [
907 # "user:mike@example.com",
908 # "group:admins@example.com",
909 # "domain:google.com",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700910 # "serviceAccount:my-other-app@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800911 # ]
912 # },
913 # {
914 # "role": "roles/viewer",
915 # "members": ["user:sean@example.com"]
916 # }
917 # ]
918 # }
919 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700920 # **YAML Example**
921 #
922 # bindings:
923 # - members:
924 # - user:mike@example.com
925 # - group:admins@example.com
926 # - domain:google.com
927 # - serviceAccount:my-other-app@appspot.gserviceaccount.com
928 # role: roles/owner
929 # - members:
930 # - user:sean@example.com
931 # role: roles/viewer
932 #
933 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800934 # For a description of IAM and its features, see the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700935 # [IAM developer's guide](https://cloud.google.com/iam/docs).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800936 "bindings": [ # Associates a list of `members` to a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800937 # `bindings` with no members will result in an error.
Takashi Matsuo06694102015-09-11 13:55:40 -0700938 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800939 "role": "A String", # Role that is assigned to `members`.
940 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700941 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
942 # NOTE: An unsatisfied condition will not allow user access via current
943 # binding. Different bindings, including their conditions, are examined
944 # independently.
945 #
946 # title: "User account presence"
947 # description: "Determines whether the request has a user account"
948 # expression: "size(request.user) > 0"
949 "description": "A String", # An optional description of the expression. This is a longer text which
950 # describes the expression, e.g. when hovered over it in a UI.
951 "expression": "A String", # Textual representation of an expression in
952 # Common Expression Language syntax.
953 #
954 # The application context of the containing message determines which
955 # well-known feature set of CEL is supported.
956 "location": "A String", # An optional string indicating the location of the expression for error
957 # reporting, e.g. a file name and a position in the file.
958 "title": "A String", # An optional title for the expression, i.e. a short string describing
959 # its purpose. This can be used e.g. in UIs which allow to enter the
960 # expression.
961 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800962 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
963 # `members` can have the following values:
964 #
965 # * `allUsers`: A special identifier that represents anyone who is
966 # on the internet; with or without a Google account.
967 #
968 # * `allAuthenticatedUsers`: A special identifier that represents anyone
969 # who is authenticated with a Google account or a service account.
970 #
971 # * `user:{emailid}`: An email address that represents a specific Google
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700972 # account. For example, `alice@gmail.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800973 #
974 #
975 # * `serviceAccount:{emailid}`: An email address that represents a service
976 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
977 #
978 # * `group:{emailid}`: An email address that represents a Google group.
979 # For example, `admins@example.com`.
980 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400981 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700982 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800983 # users of that domain. For example, `google.com` or `example.com`.
984 #
Takashi Matsuo06694102015-09-11 13:55:40 -0700985 "A String",
986 ],
987 },
988 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400989 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
990 { # Specifies the audit configuration for a service.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700991 # The configuration determines which permission types are logged, and what
992 # identities, if any, are exempted from logging.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400993 # An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400994 #
995 # If there are AuditConfigs for both `allServices` and a specific service,
996 # the union of the two AuditConfigs is used for that service: the log_types
997 # specified in each AuditConfig are enabled, and the exempted_members in each
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700998 # AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400999 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001000 # Example Policy with multiple AuditConfigs:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001001 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001002 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001003 # "audit_configs": [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001004 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001005 # "service": "allServices"
1006 # "audit_log_configs": [
1007 # {
1008 # "log_type": "DATA_READ",
1009 # "exempted_members": [
1010 # "user:foo@gmail.com"
1011 # ]
1012 # },
1013 # {
1014 # "log_type": "DATA_WRITE",
1015 # },
1016 # {
1017 # "log_type": "ADMIN_READ",
1018 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001019 # ]
1020 # },
1021 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001022 # "service": "fooservice.googleapis.com"
1023 # "audit_log_configs": [
1024 # {
1025 # "log_type": "DATA_READ",
1026 # },
1027 # {
1028 # "log_type": "DATA_WRITE",
1029 # "exempted_members": [
1030 # "user:bar@gmail.com"
1031 # ]
1032 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001033 # ]
1034 # }
1035 # ]
1036 # }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001037 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001038 # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1039 # logging. It also exempts foo@gmail.com from DATA_READ logging, and
1040 # bar@gmail.com from DATA_WRITE logging.
1041 "auditLogConfigs": [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001042 { # Provides the configuration for logging a type of permissions.
1043 # Example:
1044 #
1045 # {
1046 # "audit_log_configs": [
1047 # {
1048 # "log_type": "DATA_READ",
1049 # "exempted_members": [
1050 # "user:foo@gmail.com"
1051 # ]
1052 # },
1053 # {
1054 # "log_type": "DATA_WRITE",
1055 # }
1056 # ]
1057 # }
1058 #
1059 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
1060 # foo@gmail.com from DATA_READ logging.
1061 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of
1062 # permission.
1063 # Follows the same format of Binding.members.
1064 "A String",
1065 ],
1066 "logType": "A String", # The log type that this config enables.
1067 },
1068 ],
1069 "service": "A String", # Specifies a service that will be enabled for audit logging.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001070 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001071 # `allServices` is a special value that covers all services.
1072 },
1073 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001074 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
1075 # prevent simultaneous updates of a policy from overwriting each other.
1076 # It is strongly suggested that systems make use of the `etag` in the
1077 # read-modify-write cycle to perform policy updates in order to avoid race
1078 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1079 # systems are expected to put that etag in the request to `setIamPolicy` to
1080 # ensure that their change will be applied to the same version of the policy.
1081 #
1082 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
1083 # policy is overwritten blindly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001084 "version": 42, # Deprecated.
Takashi Matsuo06694102015-09-11 13:55:40 -07001085 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001086 "updateMask": "A String", # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001087 # the fields in the mask will be modified. If no mask is provided, the
1088 # following default mask is used:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001089 # paths: "bindings, etag"
1090 # This field is only used by Cloud IAM.
Takashi Matsuo06694102015-09-11 13:55:40 -07001091 }
1092
1093 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001094 Allowed values
1095 1 - v1 error format
1096 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -07001097
1098Returns:
1099 An object of the form:
1100
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001101 { # Defines an Identity and Access Management (IAM) policy. It is used to
1102 # specify access control policies for Cloud Platform resources.
1103 #
1104 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001105 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001106 # `members` to a `role`, where the members can be user accounts, Google groups,
1107 # Google domains, and service accounts. A `role` is a named list of permissions
1108 # defined by IAM.
1109 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001110 # **JSON Example**
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001111 #
1112 # {
1113 # "bindings": [
1114 # {
1115 # "role": "roles/owner",
1116 # "members": [
1117 # "user:mike@example.com",
1118 # "group:admins@example.com",
1119 # "domain:google.com",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001120 # "serviceAccount:my-other-app@appspot.gserviceaccount.com"
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001121 # ]
1122 # },
1123 # {
1124 # "role": "roles/viewer",
1125 # "members": ["user:sean@example.com"]
1126 # }
1127 # ]
1128 # }
1129 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001130 # **YAML Example**
1131 #
1132 # bindings:
1133 # - members:
1134 # - user:mike@example.com
1135 # - group:admins@example.com
1136 # - domain:google.com
1137 # - serviceAccount:my-other-app@appspot.gserviceaccount.com
1138 # role: roles/owner
1139 # - members:
1140 # - user:sean@example.com
1141 # role: roles/viewer
1142 #
1143 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001144 # For a description of IAM and its features, see the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001145 # [IAM developer's guide](https://cloud.google.com/iam/docs).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001146 "bindings": [ # Associates a list of `members` to a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001147 # `bindings` with no members will result in an error.
Takashi Matsuo06694102015-09-11 13:55:40 -07001148 { # Associates `members` with a `role`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001149 "role": "A String", # Role that is assigned to `members`.
1150 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001151 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
1152 # NOTE: An unsatisfied condition will not allow user access via current
1153 # binding. Different bindings, including their conditions, are examined
1154 # independently.
1155 #
1156 # title: "User account presence"
1157 # description: "Determines whether the request has a user account"
1158 # expression: "size(request.user) > 0"
1159 "description": "A String", # An optional description of the expression. This is a longer text which
1160 # describes the expression, e.g. when hovered over it in a UI.
1161 "expression": "A String", # Textual representation of an expression in
1162 # Common Expression Language syntax.
1163 #
1164 # The application context of the containing message determines which
1165 # well-known feature set of CEL is supported.
1166 "location": "A String", # An optional string indicating the location of the expression for error
1167 # reporting, e.g. a file name and a position in the file.
1168 "title": "A String", # An optional title for the expression, i.e. a short string describing
1169 # its purpose. This can be used e.g. in UIs which allow to enter the
1170 # expression.
1171 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001172 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
1173 # `members` can have the following values:
1174 #
1175 # * `allUsers`: A special identifier that represents anyone who is
1176 # on the internet; with or without a Google account.
1177 #
1178 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1179 # who is authenticated with a Google account or a service account.
1180 #
1181 # * `user:{emailid}`: An email address that represents a specific Google
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001182 # account. For example, `alice@gmail.com` .
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001183 #
1184 #
1185 # * `serviceAccount:{emailid}`: An email address that represents a service
1186 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1187 #
1188 # * `group:{emailid}`: An email address that represents a Google group.
1189 # For example, `admins@example.com`.
1190 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001191 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001192 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001193 # users of that domain. For example, `google.com` or `example.com`.
1194 #
Takashi Matsuo06694102015-09-11 13:55:40 -07001195 "A String",
1196 ],
1197 },
1198 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001199 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1200 { # Specifies the audit configuration for a service.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001201 # The configuration determines which permission types are logged, and what
1202 # identities, if any, are exempted from logging.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001203 # An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001204 #
1205 # If there are AuditConfigs for both `allServices` and a specific service,
1206 # the union of the two AuditConfigs is used for that service: the log_types
1207 # specified in each AuditConfig are enabled, and the exempted_members in each
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001208 # AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001209 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001210 # Example Policy with multiple AuditConfigs:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001211 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001212 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001213 # "audit_configs": [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001214 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001215 # "service": "allServices"
1216 # "audit_log_configs": [
1217 # {
1218 # "log_type": "DATA_READ",
1219 # "exempted_members": [
1220 # "user:foo@gmail.com"
1221 # ]
1222 # },
1223 # {
1224 # "log_type": "DATA_WRITE",
1225 # },
1226 # {
1227 # "log_type": "ADMIN_READ",
1228 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001229 # ]
1230 # },
1231 # {
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001232 # "service": "fooservice.googleapis.com"
1233 # "audit_log_configs": [
1234 # {
1235 # "log_type": "DATA_READ",
1236 # },
1237 # {
1238 # "log_type": "DATA_WRITE",
1239 # "exempted_members": [
1240 # "user:bar@gmail.com"
1241 # ]
1242 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001243 # ]
1244 # }
1245 # ]
1246 # }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001247 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001248 # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1249 # logging. It also exempts foo@gmail.com from DATA_READ logging, and
1250 # bar@gmail.com from DATA_WRITE logging.
1251 "auditLogConfigs": [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001252 { # Provides the configuration for logging a type of permissions.
1253 # Example:
1254 #
1255 # {
1256 # "audit_log_configs": [
1257 # {
1258 # "log_type": "DATA_READ",
1259 # "exempted_members": [
1260 # "user:foo@gmail.com"
1261 # ]
1262 # },
1263 # {
1264 # "log_type": "DATA_WRITE",
1265 # }
1266 # ]
1267 # }
1268 #
1269 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
1270 # foo@gmail.com from DATA_READ logging.
1271 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of
1272 # permission.
1273 # Follows the same format of Binding.members.
1274 "A String",
1275 ],
1276 "logType": "A String", # The log type that this config enables.
1277 },
1278 ],
1279 "service": "A String", # Specifies a service that will be enabled for audit logging.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001280 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001281 # `allServices` is a special value that covers all services.
1282 },
1283 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001284 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
1285 # prevent simultaneous updates of a policy from overwriting each other.
1286 # It is strongly suggested that systems make use of the `etag` in the
1287 # read-modify-write cycle to perform policy updates in order to avoid race
1288 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1289 # systems are expected to put that etag in the request to `setIamPolicy` to
1290 # ensure that their change will be applied to the same version of the policy.
1291 #
1292 # If no `etag` is provided in the call to `setIamPolicy`, then the existing
1293 # policy is overwritten blindly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001294 "version": 42, # Deprecated.
Takashi Matsuo06694102015-09-11 13:55:40 -07001295 }</pre>
1296</div>
1297
1298<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -07001299 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001300 <pre>Returns permissions that a caller has on the specified Project.
Takashi Matsuo06694102015-09-11 13:55:40 -07001301
1302Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001303 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001304See the operation documentation for the appropriate value for this field. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001305 body: object, The request body. (required)
1306 The object takes the form of:
1307
1308{ # Request message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001309 "permissions": [ # The set of permissions to check for the `resource`. Permissions with
1310 # wildcards (such as '*' or 'storage.*') are not allowed. For more
1311 # information see
1312 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Takashi Matsuo06694102015-09-11 13:55:40 -07001313 "A String",
1314 ],
1315 }
1316
1317 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001318 Allowed values
1319 1 - v1 error format
1320 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -07001321
1322Returns:
1323 An object of the form:
1324
1325 { # Response message for `TestIamPermissions` method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001326 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
1327 # allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -07001328 "A String",
1329 ],
1330 }</pre>
1331</div>
1332
1333<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001334 <code class="details" id="undelete">undelete(projectId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001335 <pre>Restores the Project identified by the specified
1336`project_id` (for example, `my-project-123`).
1337You can only use this method for a Project that has a lifecycle state of
1338DELETE_REQUESTED.
1339After deletion starts, the Project cannot be restored.
1340
1341The caller must have modify permissions for this Project.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001342
1343Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001344 projectId: string, The project ID (for example, `foo-bar-123`).
1345
1346Required. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001347 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001348 The object takes the form of:
1349
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001350{ # The request sent to the UndeleteProject
1351 # method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001352 }
1353
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001354 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001355 Allowed values
1356 1 - v1 error format
1357 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001358
1359Returns:
1360 An object of the form:
1361
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001362 { # A generic empty message that you can re-use to avoid defining duplicated
1363 # empty messages in your APIs. A typical example is to use it as the request
1364 # or the response type of an API method. For instance:
1365 #
1366 # service Foo {
1367 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1368 # }
1369 #
1370 # The JSON representation for `Empty` is empty JSON object `{}`.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001371 }</pre>
1372</div>
1373
1374<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -07001375 <code class="details" id="update">update(projectId, body, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001376 <pre>Updates the attributes of the Project identified by the specified
1377`project_id` (for example, `my-project-123`).
1378
1379The caller must have modify permissions for this Project.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001380
1381Args:
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001382 projectId: string, The project ID (for example, `my-project-123`).
1383
1384Required. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001385 body: object, The request body. (required)
1386 The object takes the form of:
1387
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001388{ # A Project is a high-level Google Cloud Platform entity. It is a
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001389 # container for ACLs, APIs, App Engine Apps, VMs, and other
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001390 # Google Cloud Platform resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001391 "name": "A String", # The optional user-assigned display name of the Project.
1392 # When present it must be between 4 to 30 characters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001393 # Allowed characters are: lowercase and uppercase letters, numbers,
1394 # hyphen, single-quote, double-quote, space, and exclamation point.
1395 #
1396 # Example: <code>My Project</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001397 # Read-write.
1398 "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
1399 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001400 # Supported parent types include "organization" and "folder". Once set, the
1401 # parent cannot be cleared. The `parent` can be set on creation or using the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001402 # `UpdateProject` method; the end user must have the
1403 # `resourcemanager.projects.create` permission on the parent.
1404 #
1405 # Read-write.
1406 # Cloud Platform is a generic term for something you (a developer) may want to
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001407 # interact with through one of our API's. Some examples are an App Engine app,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001408 # a Compute Engine instance, a Cloud SQL database, and so on.
1409 "type": "A String", # Required field representing the resource type this id is for.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001410 # At present, the valid types are "project", "folder", and "organization".
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001411 "id": "A String", # Required field for the type-specific id. This should correspond to the id
1412 # used in the type-specific API's.
Takashi Matsuo06694102015-09-11 13:55:40 -07001413 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001414 "projectId": "A String", # The unique, user-assigned ID of the Project.
1415 # It must be 6 to 30 lowercase letters, digits, or hyphens.
1416 # It must start with a letter.
1417 # Trailing hyphens are prohibited.
1418 #
1419 # Example: <code>tokyo-rain-123</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001420 # Read-only after creation.
1421 "labels": { # The labels associated with this Project.
1422 #
1423 # Label keys must be between 1 and 63 characters long and must conform
1424 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
1425 #
1426 # Label values must be between 0 and 63 characters long and must conform
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001427 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
1428 # value can be empty.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001429 #
1430 # No more than 256 labels can be associated with a given resource.
1431 #
1432 # Clients should store labels in a representation such as JSON that does not
1433 # depend on specific characters being disallowed.
1434 #
1435 # Example: <code>"environment" : "dev"</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001436 # Read-write.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001437 "a_key": "A String",
1438 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001439 "createTime": "A String", # Creation time.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001440 #
1441 # Read-only.
1442 "lifecycleState": "A String", # The Project lifecycle state.
1443 #
1444 # Read-only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001445 "projectNumber": "A String", # The number uniquely identifying the project.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001446 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001447 # Example: <code>415104041262</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001448 # Read-only.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001449}
1450
1451 x__xgafv: string, V1 error format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001452 Allowed values
1453 1 - v1 error format
1454 2 - v2 error format
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001455
1456Returns:
1457 An object of the form:
1458
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001459 { # A Project is a high-level Google Cloud Platform entity. It is a
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001460 # container for ACLs, APIs, App Engine Apps, VMs, and other
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001461 # Google Cloud Platform resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001462 "name": "A String", # The optional user-assigned display name of the Project.
1463 # When present it must be between 4 to 30 characters.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001464 # Allowed characters are: lowercase and uppercase letters, numbers,
1465 # hyphen, single-quote, double-quote, space, and exclamation point.
1466 #
1467 # Example: <code>My Project</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001468 # Read-write.
1469 "parent": { # A container to reference an id for any resource type. A `resource` in Google # An optional reference to a parent Resource.
1470 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001471 # Supported parent types include "organization" and "folder". Once set, the
1472 # parent cannot be cleared. The `parent` can be set on creation or using the
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001473 # `UpdateProject` method; the end user must have the
1474 # `resourcemanager.projects.create` permission on the parent.
1475 #
1476 # Read-write.
1477 # Cloud Platform is a generic term for something you (a developer) may want to
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001478 # interact with through one of our API's. Some examples are an App Engine app,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001479 # a Compute Engine instance, a Cloud SQL database, and so on.
1480 "type": "A String", # Required field representing the resource type this id is for.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001481 # At present, the valid types are "project", "folder", and "organization".
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001482 "id": "A String", # Required field for the type-specific id. This should correspond to the id
1483 # used in the type-specific API's.
Takashi Matsuo06694102015-09-11 13:55:40 -07001484 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001485 "projectId": "A String", # The unique, user-assigned ID of the Project.
1486 # It must be 6 to 30 lowercase letters, digits, or hyphens.
1487 # It must start with a letter.
1488 # Trailing hyphens are prohibited.
1489 #
1490 # Example: <code>tokyo-rain-123</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001491 # Read-only after creation.
1492 "labels": { # The labels associated with this Project.
1493 #
1494 # Label keys must be between 1 and 63 characters long and must conform
1495 # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
1496 #
1497 # Label values must be between 0 and 63 characters long and must conform
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001498 # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. A label
1499 # value can be empty.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001500 #
1501 # No more than 256 labels can be associated with a given resource.
1502 #
1503 # Clients should store labels in a representation such as JSON that does not
1504 # depend on specific characters being disallowed.
1505 #
1506 # Example: <code>"environment" : "dev"</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001507 # Read-write.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001508 "a_key": "A String",
1509 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001510 "createTime": "A String", # Creation time.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001511 #
1512 # Read-only.
1513 "lifecycleState": "A String", # The Project lifecycle state.
1514 #
1515 # Read-only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001516 "projectNumber": "A String", # The number uniquely identifying the project.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001517 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001518 # Example: <code>415104041262</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001519 # Read-only.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001520 }</pre>
1521</div>
1522
1523</body></html>