blob: 1c5be4862dabe6ab0c42f631cd5f339d40aa00f5 [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
75<h1><a href="cloudresourcemanager_v1beta1.html">Google Cloud Resource Manager API</a> . <a href="cloudresourcemanager_v1beta1.projects.html">projects</a></h1>
76<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 Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Creates a Project resource. Initially, the Project resource is owned by its creator exclusively. The creator can later grant permission to others to read or update the Project. Several APIs are activated automatically for the Project, including Google Cloud Storage.</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000080<p class="toc_element">
81 <code><a href="#delete">delete(projectId, x__xgafv=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if the following criteria are met: + The Project does not have a billing account associated with it. + The Project has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have modify permissions for this Project.</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000083<p class="toc_element">
84 <code><a href="#get">get(projectId, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080085<p class="firstline">Retrieves the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have read permissions for this Project.</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000086<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070087 <code><a href="#getAncestry">getAncestry(projectId, body, x__xgafv=None)</a></code></p>
88<p class="firstline">Gets a list of ancestors in the resource hierarchy for the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have read permissions for this Project.</p>
89<p class="toc_element">
Takashi Matsuo06694102015-09-11 13:55:40 -070090 <code><a href="#getIamPolicy">getIamPolicy(resource, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080091<p class="firstline">Returns the IAM access control policy for the specified Project. Permission is denied if the policy or the resource does not exist.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070092<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000093 <code><a href="#list">list(pageSize=None, filter=None, pageToken=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080094<p class="firstline">Lists Projects that are visible to the user and satisfy the specified filter. This method returns Projects in an unspecified order. New Projects do not necessarily appear at the end of the list.</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">
Takashi Matsuo06694102015-09-11 13:55:40 -070099 <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Sets the IAM access control policy for the specified Project. Replaces any existing policy. The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted only to `user` and `serviceAccount`. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited via Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + There must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. + Calling this method requires enabling the App Engine Admin API. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101<p class="toc_element">
102 <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">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700105 <code><a href="#undelete">undelete(projectId, body, x__xgafv=None)</a></code></p>
106<p class="firstline">Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, the Project cannot be restored. The caller must have modify permissions for this Project.</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000107<p class="toc_element">
108 <code><a href="#update">update(projectId, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800109<p class="firstline">Updates the attributes of the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have modify permissions for this Project.</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 Parrott36e41bc2016-02-19 16:02:29 -0800113 <pre>Creates a Project resource. Initially, the Project resource is owned by its creator exclusively. The creator can later grant permission to others to read or update the Project. Several APIs are activated automatically for the Project, including Google Cloud Storage.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000114
115Args:
116 body: object, The request body. (required)
117 The object takes the form of:
118
Takashi Matsuo06694102015-09-11 13:55:40 -0700119{ # A Project is a high-level Google Cloud Platform entity. It is a container for ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud Platform resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700120 "name": "A String", # The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My Project Read-write.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800121 "parent": { # A container to reference an id for any resource type. A `resource` in Google Cloud Platform is a generic term for something you (a developer) may want to interact with through one of our API's. Some examples are an AppEngine app, a Compute Engine instance, a Cloud SQL database, and so on. # An optional reference to a parent Resource. The only supported parent type is "organization". Once set, the parent cannot be modified. Read-write.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122 "type": "A String", # Required field representing the resource type this id is for. At present, the valid types are "project" and "organization".
Takashi Matsuo06694102015-09-11 13:55:40 -0700123 "id": "A String", # Required field for the type-specific id. This should correspond to the id used in the type-specific API's.
124 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800125 "projectId": "A String", # The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123 Read-only after creation.
126 "labels": { # The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev" Read-write.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000127 "a_key": "A String",
128 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700129 "projectNumber": "A String", # The number uniquely identifying the project. Example: 415104041262 Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800130 "lifecycleState": "A String", # The Project lifecycle state. Read-only.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000131 "createTime": "A String", # Creation time. Read-only.
132}
133
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700134 useLegacyStack: boolean, A safety hatch to opt out of the new reliable project creation process.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000135 x__xgafv: string, V1 error format.
136
137Returns:
138 An object of the form:
139
Takashi Matsuo06694102015-09-11 13:55:40 -0700140 { # A Project is a high-level Google Cloud Platform entity. It is a container for ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud Platform resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700141 "name": "A String", # The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My Project Read-write.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800142 "parent": { # A container to reference an id for any resource type. A `resource` in Google Cloud Platform is a generic term for something you (a developer) may want to interact with through one of our API's. Some examples are an AppEngine app, a Compute Engine instance, a Cloud SQL database, and so on. # An optional reference to a parent Resource. The only supported parent type is "organization". Once set, the parent cannot be modified. Read-write.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700143 "type": "A String", # Required field representing the resource type this id is for. At present, the valid types are "project" and "organization".
Takashi Matsuo06694102015-09-11 13:55:40 -0700144 "id": "A String", # Required field for the type-specific id. This should correspond to the id used in the type-specific API's.
145 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800146 "projectId": "A String", # The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123 Read-only after creation.
147 "labels": { # The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev" Read-write.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000148 "a_key": "A String",
149 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700150 "projectNumber": "A String", # The number uniquely identifying the project. Example: 415104041262 Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800151 "lifecycleState": "A String", # The Project lifecycle state. Read-only.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000152 "createTime": "A String", # Creation time. Read-only.
153 }</pre>
154</div>
155
156<div class="method">
157 <code class="details" id="delete">delete(projectId, x__xgafv=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700158 <pre>Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if the following criteria are met: + The Project does not have a billing account associated with it. + The Project has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have modify permissions for this Project.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000159
160Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800161 projectId: string, The Project ID (for example, `foo-bar-123`). Required. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000162 x__xgafv: string, V1 error format.
163
164Returns:
165 An object of the form:
166
Takashi Matsuo06694102015-09-11 13:55:40 -0700167 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000168 }</pre>
169</div>
170
171<div class="method">
172 <code class="details" id="get">get(projectId, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800173 <pre>Retrieves the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have read permissions for this Project.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000174
175Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800176 projectId: string, The Project ID (for example, `my-project-123`). Required. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000177 x__xgafv: string, V1 error format.
178
179Returns:
180 An object of the form:
181
Takashi Matsuo06694102015-09-11 13:55:40 -0700182 { # A Project is a high-level Google Cloud Platform entity. It is a container for ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud Platform resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700183 "name": "A String", # The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My Project Read-write.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800184 "parent": { # A container to reference an id for any resource type. A `resource` in Google Cloud Platform is a generic term for something you (a developer) may want to interact with through one of our API's. Some examples are an AppEngine app, a Compute Engine instance, a Cloud SQL database, and so on. # An optional reference to a parent Resource. The only supported parent type is "organization". Once set, the parent cannot be modified. Read-write.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700185 "type": "A String", # Required field representing the resource type this id is for. At present, the valid types are "project" and "organization".
Takashi Matsuo06694102015-09-11 13:55:40 -0700186 "id": "A String", # Required field for the type-specific id. This should correspond to the id used in the type-specific API's.
187 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800188 "projectId": "A String", # The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123 Read-only after creation.
189 "labels": { # The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev" Read-write.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000190 "a_key": "A String",
191 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700192 "projectNumber": "A String", # The number uniquely identifying the project. Example: 415104041262 Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800193 "lifecycleState": "A String", # The Project lifecycle state. Read-only.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000194 "createTime": "A String", # Creation time. Read-only.
195 }</pre>
196</div>
197
198<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700199 <code class="details" id="getAncestry">getAncestry(projectId, body, x__xgafv=None)</code>
200 <pre>Gets a list of ancestors in the resource hierarchy for the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have read permissions for this Project.
201
202Args:
203 projectId: string, The Project ID (for example, `my-project-123`). Required. (required)
204 body: object, The request body. (required)
205 The object takes the form of:
206
207{ # The request sent to the GetAncestry method.
208 }
209
210 x__xgafv: string, V1 error format.
211
212Returns:
213 An object of the form:
214
215 { # Response from the GetAncestry method.
216 "ancestor": [ # Ancestors are ordered from bottom to top of the resource hierarchy. The first ancestor is the project itself, followed by the project's parent, etc.
217 { # Identifying information for a single ancestor of a project.
218 "resourceId": { # A container to reference an id for any resource type. A `resource` in Google Cloud Platform is a generic term for something you (a developer) may want to interact with through one of our API's. Some examples are an AppEngine app, a Compute Engine instance, a Cloud SQL database, and so on. # Resource id of the ancestor.
219 "type": "A String", # Required field representing the resource type this id is for. At present, the valid types are "project" and "organization".
220 "id": "A String", # Required field for the type-specific id. This should correspond to the id used in the type-specific API's.
221 },
222 },
223 ],
224 }</pre>
225</div>
226
227<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -0700228 <code class="details" id="getIamPolicy">getIamPolicy(resource, body, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800229 <pre>Returns the IAM access control policy for the specified Project. Permission is denied if the policy or the resource does not exist.
Takashi Matsuo06694102015-09-11 13:55:40 -0700230
231Args:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700232 resource: string, REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700233 body: object, The request body. (required)
234 The object takes the form of:
235
236{ # Request message for `GetIamPolicy` method.
237 }
238
239 x__xgafv: string, V1 error format.
240
241Returns:
242 An object of the form:
243
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700244 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
Takashi Matsuo06694102015-09-11 13:55:40 -0700245 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
246 { # Associates `members` with a `role`.
247 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800248 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700249 "A String",
250 ],
251 },
252 ],
253 "version": 42, # Version of the `Policy`. The default version is 0.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800254 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
Takashi Matsuo06694102015-09-11 13:55:40 -0700255 }</pre>
256</div>
257
258<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000259 <code class="details" id="list">list(pageSize=None, filter=None, pageToken=None, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800260 <pre>Lists Projects that are visible to the user and satisfy the specified filter. This method returns Projects in an unspecified order. New Projects do not necessarily appear at the end of the list.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000261
262Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800263 pageSize: integer, The maximum number of Projects to return in the response. The server can return fewer Projects than requested. If unspecified, server picks an appropriate default. Optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700264 filter: string, An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: + `name` + `id` + labels.key where *key* is the name of a label Some examples of using labels as filters: |Filter|Description| |------|-----------| |name:*|The project has a name.| |name:Howl|The project's name is `Howl` or `howl`.| |name:HOWL|Equivalent to above.| |NAME:howl|Equivalent to above.| |labels.color:*|The project has the label `color`.| |labels.color:red|The project's label `color` has the value `red`.| |labels.color:red label.size:big|The project's label `color` has the value `red` and its label `size` has the value `big`. Optional.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800265 pageToken: string, A pagination token returned from a previous call to ListProjects that indicates from where listing should continue. Optional.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000266 x__xgafv: string, V1 error format.
267
268Returns:
269 An object of the form:
270
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800271 { # A page of the response received from the ListProjects method. A paginated response where more pages are available has `next_page_token` set. This token can be used in a subsequent request to retrieve the next request page.
272 "nextPageToken": "A String", # Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime.
273 "projects": [ # The list of Projects that matched the list filter. This list can be paginated.
Takashi Matsuo06694102015-09-11 13:55:40 -0700274 { # A Project is a high-level Google Cloud Platform entity. It is a container for ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud Platform resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700275 "name": "A String", # The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My Project Read-write.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800276 "parent": { # A container to reference an id for any resource type. A `resource` in Google Cloud Platform is a generic term for something you (a developer) may want to interact with through one of our API's. Some examples are an AppEngine app, a Compute Engine instance, a Cloud SQL database, and so on. # An optional reference to a parent Resource. The only supported parent type is "organization". Once set, the parent cannot be modified. Read-write.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700277 "type": "A String", # Required field representing the resource type this id is for. At present, the valid types are "project" and "organization".
Takashi Matsuo06694102015-09-11 13:55:40 -0700278 "id": "A String", # Required field for the type-specific id. This should correspond to the id used in the type-specific API's.
279 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800280 "projectId": "A String", # The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123 Read-only after creation.
281 "labels": { # The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev" Read-write.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000282 "a_key": "A String",
283 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700284 "projectNumber": "A String", # The number uniquely identifying the project. Example: 415104041262 Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800285 "lifecycleState": "A String", # The Project lifecycle state. Read-only.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000286 "createTime": "A String", # Creation time. Read-only.
287 },
288 ],
289 }</pre>
290</div>
291
292<div class="method">
293 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
294 <pre>Retrieves the next page of results.
295
296Args:
297 previous_request: The request for the previous page. (required)
298 previous_response: The response from the request for the previous page. (required)
299
300Returns:
301 A request object that you can call 'execute()' on to request the next
302 page. Returns None if there are no more items in the collection.
303 </pre>
304</div>
305
306<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -0700307 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700308 <pre>Sets the IAM access control policy for the specified Project. Replaces any existing policy. The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted only to `user` and `serviceAccount`. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited via Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + There must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. + Calling this method requires enabling the App Engine Admin API. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.
Takashi Matsuo06694102015-09-11 13:55:40 -0700309
310Args:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700311 resource: string, REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700312 body: object, The request body. (required)
313 The object takes the form of:
314
315{ # Request message for `SetIamPolicy` method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700316 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). # REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
Takashi Matsuo06694102015-09-11 13:55:40 -0700317 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
318 { # Associates `members` with a `role`.
319 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800320 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700321 "A String",
322 ],
323 },
324 ],
325 "version": 42, # Version of the `Policy`. The default version is 0.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800326 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
Takashi Matsuo06694102015-09-11 13:55:40 -0700327 },
328 }
329
330 x__xgafv: string, V1 error format.
331
332Returns:
333 An object of the form:
334
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700335 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
Takashi Matsuo06694102015-09-11 13:55:40 -0700336 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
337 { # Associates `members` with a `role`.
338 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800339 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700340 "A String",
341 ],
342 },
343 ],
344 "version": 42, # Version of the `Policy`. The default version is 0.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800345 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
Takashi Matsuo06694102015-09-11 13:55:40 -0700346 }</pre>
347</div>
348
349<div class="method">
350 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800351 <pre>Returns permissions that a caller has on the specified Project.
Takashi Matsuo06694102015-09-11 13:55:40 -0700352
353Args:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700354 resource: string, REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700355 body: object, The request body. (required)
356 The object takes the form of:
357
358{ # Request message for `TestIamPermissions` method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700359 "permissions": [ # The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Takashi Matsuo06694102015-09-11 13:55:40 -0700360 "A String",
361 ],
362 }
363
364 x__xgafv: string, V1 error format.
365
366Returns:
367 An object of the form:
368
369 { # Response message for `TestIamPermissions` method.
370 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
371 "A String",
372 ],
373 }</pre>
374</div>
375
376<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700377 <code class="details" id="undelete">undelete(projectId, body, x__xgafv=None)</code>
378 <pre>Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, the Project cannot be restored. The caller must have modify permissions for this Project.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000379
380Args:
381 projectId: string, The project ID (for example, `foo-bar-123`). Required. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700382 body: object, The request body. (required)
383 The object takes the form of:
384
385{ # The request sent to the UndeleteProject method.
386 }
387
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000388 x__xgafv: string, V1 error format.
389
390Returns:
391 An object of the form:
392
Takashi Matsuo06694102015-09-11 13:55:40 -0700393 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000394 }</pre>
395</div>
396
397<div class="method">
398 <code class="details" id="update">update(projectId, body, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800399 <pre>Updates the attributes of the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have modify permissions for this Project.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000400
401Args:
402 projectId: string, The project ID (for example, `my-project-123`). Required. (required)
403 body: object, The request body. (required)
404 The object takes the form of:
405
Takashi Matsuo06694102015-09-11 13:55:40 -0700406{ # A Project is a high-level Google Cloud Platform entity. It is a container for ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud Platform resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700407 "name": "A String", # The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My Project Read-write.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800408 "parent": { # A container to reference an id for any resource type. A `resource` in Google Cloud Platform is a generic term for something you (a developer) may want to interact with through one of our API's. Some examples are an AppEngine app, a Compute Engine instance, a Cloud SQL database, and so on. # An optional reference to a parent Resource. The only supported parent type is "organization". Once set, the parent cannot be modified. Read-write.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700409 "type": "A String", # Required field representing the resource type this id is for. At present, the valid types are "project" and "organization".
Takashi Matsuo06694102015-09-11 13:55:40 -0700410 "id": "A String", # Required field for the type-specific id. This should correspond to the id used in the type-specific API's.
411 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800412 "projectId": "A String", # The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123 Read-only after creation.
413 "labels": { # The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev" Read-write.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000414 "a_key": "A String",
415 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700416 "projectNumber": "A String", # The number uniquely identifying the project. Example: 415104041262 Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800417 "lifecycleState": "A String", # The Project lifecycle state. Read-only.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000418 "createTime": "A String", # Creation time. Read-only.
419}
420
421 x__xgafv: string, V1 error format.
422
423Returns:
424 An object of the form:
425
Takashi Matsuo06694102015-09-11 13:55:40 -0700426 { # A Project is a high-level Google Cloud Platform entity. It is a container for ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud Platform resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700427 "name": "A String", # The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My Project Read-write.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800428 "parent": { # A container to reference an id for any resource type. A `resource` in Google Cloud Platform is a generic term for something you (a developer) may want to interact with through one of our API's. Some examples are an AppEngine app, a Compute Engine instance, a Cloud SQL database, and so on. # An optional reference to a parent Resource. The only supported parent type is "organization". Once set, the parent cannot be modified. Read-write.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700429 "type": "A String", # Required field representing the resource type this id is for. At present, the valid types are "project" and "organization".
Takashi Matsuo06694102015-09-11 13:55:40 -0700430 "id": "A String", # Required field for the type-specific id. This should correspond to the id used in the type-specific API's.
431 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800432 "projectId": "A String", # The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: tokyo-rain-123 Read-only after creation.
433 "labels": { # The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: "environment" : "dev" Read-write.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000434 "a_key": "A String",
435 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700436 "projectNumber": "A String", # The number uniquely identifying the project. Example: 415104041262 Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800437 "lifecycleState": "A String", # The Project lifecycle state. Read-only.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000438 "createTime": "A String", # Creation time. Read-only.
439 }</pre>
440</div>
441
442</body></html>