projects.proto 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.resourcemanager.v3;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/iam/v1/iam_policy.proto";
  21. import "google/iam/v1/policy.proto";
  22. import "google/longrunning/operations.proto";
  23. import "google/protobuf/field_mask.proto";
  24. import "google/protobuf/timestamp.proto";
  25. option csharp_namespace = "Google.Cloud.ResourceManager.V3";
  26. option go_package = "google.golang.org/genproto/googleapis/cloud/resourcemanager/v3;resourcemanager";
  27. option java_multiple_files = true;
  28. option java_outer_classname = "ProjectsProto";
  29. option java_package = "com.google.cloud.resourcemanager.v3";
  30. option php_namespace = "Google\\Cloud\\ResourceManager\\V3";
  31. option ruby_package = "Google::Cloud::ResourceManager::V3";
  32. // Manages Google Cloud Projects.
  33. service Projects {
  34. option (google.api.default_host) = "cloudresourcemanager.googleapis.com";
  35. option (google.api.oauth_scopes) =
  36. "https://www.googleapis.com/auth/cloud-platform,"
  37. "https://www.googleapis.com/auth/cloud-platform.read-only";
  38. // Retrieves the project identified by the specified `name` (for example,
  39. // `projects/415104041262`).
  40. //
  41. // The caller must have `resourcemanager.projects.get` permission
  42. // for this project.
  43. rpc GetProject(GetProjectRequest) returns (Project) {
  44. option (google.api.http) = {
  45. get: "/v3/{name=projects/*}"
  46. };
  47. option (google.api.method_signature) = "name";
  48. }
  49. // Lists projects that are direct children of the specified folder or
  50. // organization resource. `list()` provides a strongly consistent view of the
  51. // projects underneath the specified parent resource. `list()` returns
  52. // projects sorted based upon the (ascending) lexical ordering of their
  53. // `display_name`. The caller must have `resourcemanager.projects.list`
  54. // permission on the identified parent.
  55. rpc ListProjects(ListProjectsRequest) returns (ListProjectsResponse) {
  56. option (google.api.http) = {
  57. get: "/v3/projects"
  58. };
  59. option (google.api.method_signature) = "parent";
  60. }
  61. // Search for projects that the caller has both `resourcemanager.projects.get`
  62. // permission on, and also satisfy the specified query.
  63. //
  64. // This method returns projects in an unspecified order.
  65. //
  66. // This method is eventually consistent with project mutations; this means
  67. // that a newly created project may not appear in the results or recent
  68. // updates to an existing project may not be reflected in the results. To
  69. // retrieve the latest state of a project, use the
  70. // [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject] method.
  71. rpc SearchProjects(SearchProjectsRequest) returns (SearchProjectsResponse) {
  72. option (google.api.http) = {
  73. get: "/v3/projects:search"
  74. };
  75. option (google.api.method_signature) = "query";
  76. }
  77. // Request that a new project be created. The result is an `Operation` which
  78. // can be used to track the creation process. This process usually takes a few
  79. // seconds, but can sometimes take much longer. The tracking `Operation` is
  80. // automatically deleted after a few hours, so there is no need to call
  81. // `DeleteOperation`.
  82. rpc CreateProject(CreateProjectRequest) returns (google.longrunning.Operation) {
  83. option (google.api.http) = {
  84. post: "/v3/projects"
  85. body: "project"
  86. };
  87. option (google.api.method_signature) = "project";
  88. option (google.longrunning.operation_info) = {
  89. response_type: "Project"
  90. metadata_type: "CreateProjectMetadata"
  91. };
  92. }
  93. // Updates the `display_name` and labels of the project identified by the
  94. // specified `name` (for example, `projects/415104041262`). Deleting all
  95. // labels requires an update mask for labels field.
  96. //
  97. // The caller must have `resourcemanager.projects.update` permission for this
  98. // project.
  99. rpc UpdateProject(UpdateProjectRequest) returns (google.longrunning.Operation) {
  100. option (google.api.http) = {
  101. patch: "/v3/{project.name=projects/*}"
  102. body: "project"
  103. };
  104. option (google.api.method_signature) = "project,update_mask";
  105. option (google.longrunning.operation_info) = {
  106. response_type: "Project"
  107. metadata_type: "UpdateProjectMetadata"
  108. };
  109. }
  110. // Move a project to another place in your resource hierarchy, under a new
  111. // resource parent.
  112. //
  113. // Returns an operation which can be used to track the process of the project
  114. // move workflow.
  115. // Upon success, the `Operation.response` field will be populated with the
  116. // moved project.
  117. //
  118. // The caller must have `resourcemanager.projects.update` permission on the
  119. // project and have `resourcemanager.projects.move` permission on the
  120. // project's current and proposed new parent.
  121. //
  122. //
  123. rpc MoveProject(MoveProjectRequest) returns (google.longrunning.Operation) {
  124. option (google.api.http) = {
  125. post: "/v3/{name=projects/*}:move"
  126. body: "*"
  127. };
  128. option (google.api.method_signature) = "name, destination_parent";
  129. option (google.longrunning.operation_info) = {
  130. response_type: "Project"
  131. metadata_type: "MoveProjectMetadata"
  132. };
  133. }
  134. // Marks the project identified by the specified
  135. // `name` (for example, `projects/415104041262`) for deletion.
  136. //
  137. // This method will only affect the project if it has a lifecycle state of
  138. // [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE].
  139. //
  140. // This method changes the Project's lifecycle state from
  141. // [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE]
  142. // to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED].
  143. // The deletion starts at an unspecified time,
  144. // at which point the Project is no longer accessible.
  145. //
  146. // Until the deletion completes, you can check the lifecycle state
  147. // checked by retrieving the project with [GetProject]
  148. // [google.cloud.resourcemanager.v3.Projects.GetProject],
  149. // and the project remains visible to [ListProjects]
  150. // [google.cloud.resourcemanager.v3.Projects.ListProjects].
  151. // However, you cannot update the project.
  152. //
  153. // After the deletion completes, the project is not retrievable by
  154. // the [GetProject]
  155. // [google.cloud.resourcemanager.v3.Projects.GetProject],
  156. // [ListProjects]
  157. // [google.cloud.resourcemanager.v3.Projects.ListProjects], and
  158. // [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects]
  159. // methods.
  160. //
  161. // This method behaves idempotently, such that deleting a `DELETE_REQUESTED`
  162. // project will not cause an error, but also won't do anything.
  163. //
  164. // The caller must have `resourcemanager.projects.delete` permissions for this
  165. // project.
  166. rpc DeleteProject(DeleteProjectRequest) returns (google.longrunning.Operation) {
  167. option (google.api.http) = {
  168. delete: "/v3/{name=projects/*}"
  169. };
  170. option (google.api.method_signature) = "name";
  171. option (google.longrunning.operation_info) = {
  172. response_type: "Project"
  173. metadata_type: "DeleteProjectMetadata"
  174. };
  175. }
  176. // Restores the project identified by the specified
  177. // `name` (for example, `projects/415104041262`).
  178. // You can only use this method for a project that has a lifecycle state of
  179. // [DELETE_REQUESTED]
  180. // [Projects.State.DELETE_REQUESTED].
  181. // After deletion starts, the project cannot be restored.
  182. //
  183. // The caller must have `resourcemanager.projects.undelete` permission for
  184. // this project.
  185. rpc UndeleteProject(UndeleteProjectRequest) returns (google.longrunning.Operation) {
  186. option (google.api.http) = {
  187. post: "/v3/{name=projects/*}:undelete"
  188. body: "*"
  189. };
  190. option (google.api.method_signature) = "name";
  191. option (google.longrunning.operation_info) = {
  192. response_type: "Project"
  193. metadata_type: "UndeleteProjectMetadata"
  194. };
  195. }
  196. // Returns the IAM access control policy for the specified project.
  197. // Permission is denied if the policy or the resource do not exist.
  198. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
  199. option (google.api.http) = {
  200. post: "/v3/{resource=projects/*}:getIamPolicy"
  201. body: "*"
  202. };
  203. option (google.api.method_signature) = "resource";
  204. }
  205. // Sets the IAM access control policy for the specified project.
  206. //
  207. // CAUTION: This method will replace the existing policy, and cannot be used
  208. // to append additional IAM settings.
  209. //
  210. // Note: Removing service accounts from policies or changing their roles can
  211. // render services completely inoperable. It is important to understand how
  212. // the service account is being used before removing or updating its roles.
  213. //
  214. // The following constraints apply when using `setIamPolicy()`:
  215. //
  216. // + Project does not support `allUsers` and `allAuthenticatedUsers` as
  217. // `members` in a `Binding` of a `Policy`.
  218. //
  219. // + The owner role can be granted to a `user`, `serviceAccount`, or a group
  220. // that is part of an organization. For example,
  221. // group@myownpersonaldomain.com could be added as an owner to a project in
  222. // the myownpersonaldomain.com organization, but not the examplepetstore.com
  223. // organization.
  224. //
  225. // + Service accounts can be made owners of a project directly
  226. // without any restrictions. However, to be added as an owner, a user must be
  227. // invited using the Cloud Platform console and must accept the invitation.
  228. //
  229. // + A user cannot be granted the owner role using `setIamPolicy()`. The user
  230. // must be granted the owner role using the Cloud Platform Console and must
  231. // explicitly accept the invitation.
  232. //
  233. // + Invitations to grant the owner role cannot be sent using
  234. // `setIamPolicy()`;
  235. // they must be sent only using the Cloud Platform Console.
  236. //
  237. // + Membership changes that leave the project without any owners that have
  238. // accepted the Terms of Service (ToS) will be rejected.
  239. //
  240. // + If the project is not part of an organization, there must be at least
  241. // one owner who has accepted the Terms of Service (ToS) agreement in the
  242. // policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner
  243. // from the policy will fail. This restriction also applies to legacy
  244. // projects that no longer have owners who have accepted the ToS. Edits to
  245. // IAM policies will be rejected until the lack of a ToS-accepting owner is
  246. // rectified.
  247. //
  248. // + Calling this method requires enabling the App Engine Admin API.
  249. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
  250. option (google.api.http) = {
  251. post: "/v3/{resource=projects/*}:setIamPolicy"
  252. body: "*"
  253. };
  254. option (google.api.method_signature) = "resource, policy";
  255. }
  256. // Returns permissions that a caller has on the specified project.
  257. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
  258. option (google.api.http) = {
  259. post: "/v3/{resource=projects/*}:testIamPermissions"
  260. body: "*"
  261. };
  262. option (google.api.method_signature) = "resource, permissions";
  263. }
  264. }
  265. // A project is a high-level Google Cloud entity. It is a
  266. // container for ACLs, APIs, App Engine Apps, VMs, and other
  267. // Google Cloud Platform resources.
  268. message Project {
  269. option (google.api.resource) = {
  270. type: "cloudresourcemanager.googleapis.com/Project"
  271. pattern: "projects/{project}"
  272. style: DECLARATIVE_FRIENDLY
  273. };
  274. // Project lifecycle states.
  275. enum State {
  276. // Unspecified state. This is only used/useful for distinguishing
  277. // unset values.
  278. STATE_UNSPECIFIED = 0;
  279. // The normal and active state.
  280. ACTIVE = 1;
  281. // The project has been marked for deletion by the user
  282. // (by invoking
  283. // [DeleteProject][google.cloud.resourcemanager.v3.Projects.DeleteProject])
  284. // or by the system (Google Cloud Platform).
  285. // This can generally be reversed by invoking [UndeleteProject]
  286. // [google.cloud.resourcemanager.v3.Projects.UndeleteProject].
  287. DELETE_REQUESTED = 2;
  288. }
  289. // Output only. The unique resource name of the project. It is an int64 generated number
  290. // prefixed by "projects/".
  291. //
  292. // Example: `projects/415104041262`
  293. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  294. // Optional. A reference to a parent Resource. eg., `organizations/123` or
  295. // `folders/876`.
  296. string parent = 2 [(google.api.field_behavior) = OPTIONAL];
  297. // Immutable. The unique, user-assigned id of the project.
  298. // It must be 6 to 30 lowercase ASCII letters, digits, or hyphens.
  299. // It must start with a letter.
  300. // Trailing hyphens are prohibited.
  301. //
  302. // Example: `tokyo-rain-123`
  303. string project_id = 3 [(google.api.field_behavior) = IMMUTABLE];
  304. // Output only. The project lifecycle state.
  305. State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  306. // Optional. A user-assigned display name of the project.
  307. // When present it must be between 4 to 30 characters.
  308. // Allowed characters are: lowercase and uppercase letters, numbers,
  309. // hyphen, single-quote, double-quote, space, and exclamation point.
  310. //
  311. // Example: `My Project`
  312. string display_name = 5 [(google.api.field_behavior) = OPTIONAL];
  313. // Output only. Creation time.
  314. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  315. // Output only. The most recent time this resource was modified.
  316. google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  317. // Output only. The time at which this resource was requested for deletion.
  318. google.protobuf.Timestamp delete_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  319. // Output only. A checksum computed by the server based on the current value of the Project
  320. // resource. This may be sent on update and delete requests to ensure the
  321. // client has an up-to-date value before proceeding.
  322. string etag = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  323. // Optional. The labels associated with this project.
  324. //
  325. // Label keys must be between 1 and 63 characters long and must conform
  326. // to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?.
  327. //
  328. // Label values must be between 0 and 63 characters long and must conform
  329. // to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?.
  330. //
  331. // No more than 256 labels can be associated with a given resource.
  332. //
  333. // Clients should store labels in a representation such as JSON that does not
  334. // depend on specific characters being disallowed.
  335. //
  336. // Example: `"myBusinessDimension" : "businessValue"`
  337. map<string, string> labels = 10 [(google.api.field_behavior) = OPTIONAL];
  338. }
  339. // The request sent to the
  340. // [GetProject][google.cloud.resourcemanager.v3.Projects.GetProject]
  341. // method.
  342. message GetProjectRequest {
  343. // Required. The name of the project (for example, `projects/415104041262`).
  344. string name = 1 [
  345. (google.api.field_behavior) = REQUIRED,
  346. (google.api.resource_reference) = {
  347. type: "cloudresourcemanager.googleapis.com/Project"
  348. }
  349. ];
  350. }
  351. // The request sent to the
  352. // [ListProjects][google.cloud.resourcemanager.v3.Projects.ListProjects]
  353. // method.
  354. message ListProjectsRequest {
  355. // Required. The name of the parent resource to list projects under.
  356. //
  357. // For example, setting this field to 'folders/1234' would list all projects
  358. // directly under that folder.
  359. string parent = 1 [
  360. (google.api.field_behavior) = REQUIRED,
  361. (google.api.resource_reference) = {
  362. child_type: "*"
  363. }
  364. ];
  365. // Optional. A pagination token returned from a previous call to [ListProjects]
  366. // [google.cloud.resourcemanager.v3.Projects.ListProjects]
  367. // that indicates from where listing should continue.
  368. string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
  369. // Optional. The maximum number of projects to return in the response.
  370. // The server can return fewer projects than requested.
  371. // If unspecified, server picks an appropriate default.
  372. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
  373. // Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be
  374. // returned. Normally only `ACTIVE` projects are returned.
  375. bool show_deleted = 4 [(google.api.field_behavior) = OPTIONAL];
  376. }
  377. // A page of the response received from the
  378. // [ListProjects][google.cloud.resourcemanager.v3.Projects.ListProjects]
  379. // method.
  380. //
  381. // A paginated response where more pages are available has
  382. // `next_page_token` set. This token can be used in a subsequent request to
  383. // retrieve the next request page.
  384. //
  385. // NOTE: A response may contain fewer elements than the request `page_size` and
  386. // still have a `next_page_token`.
  387. message ListProjectsResponse {
  388. // The list of Projects under the parent. This list can be paginated.
  389. repeated Project projects = 1;
  390. // Pagination token.
  391. //
  392. // If the result set is too large to fit in a single response, this token
  393. // is returned. It encodes the position of the current result cursor.
  394. // Feeding this value into a new list request with the `page_token` parameter
  395. // gives the next page of the results.
  396. //
  397. // When `next_page_token` is not filled in, there is no next page and
  398. // the list returned is the last page in the result set.
  399. //
  400. // Pagination tokens have a limited lifetime.
  401. string next_page_token = 2;
  402. }
  403. // The request sent to the
  404. // [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects]
  405. // method.
  406. message SearchProjectsRequest {
  407. // Optional. A query string for searching for projects that the caller has
  408. // `resourcemanager.projects.get` permission to. If multiple fields are
  409. // included in the query, the it will return results that match any of the
  410. // fields. Some eligible fields are:
  411. //
  412. // | Field | Description |
  413. // |-------------------------|----------------------------------------------|
  414. // | displayName, name | Filters by displayName. |
  415. // | parent | Project's parent. (for example: folders/123,
  416. // organizations/*) Prefer parent field over parent.type and parent.id. |
  417. // | parent.type | Parent's type: `folder` or `organization`. |
  418. // | parent.id | Parent's id number (for example: 123) |
  419. // | id, projectId | Filters by projectId. |
  420. // | state, lifecycleState | Filters by state. |
  421. // | labels | Filters by label name or value. |
  422. // | labels.<key> (where *key* is the name of a label) | Filters by label
  423. // name. |
  424. //
  425. // Search expressions are case insensitive.
  426. //
  427. // Some examples queries:
  428. //
  429. // | Query | Description |
  430. // |------------------|-----------------------------------------------------|
  431. // | name:how* | The project's name starts with "how". |
  432. // | name:Howl | The project's name is `Howl` or `howl`. |
  433. // | name:HOWL | Equivalent to above. |
  434. // | NAME:howl | Equivalent to above. |
  435. // | labels.color:* | The project has the label `color`. |
  436. // | labels.color:red | The project's label `color` has the value `red`. |
  437. // | labels.color:red&nbsp;labels.size:big | The project's label `color` has
  438. // the value `red` and its label `size` has the value `big`. |
  439. //
  440. // If no query is specified, the call will return projects for which the user
  441. // has the `resourcemanager.projects.get` permission.
  442. string query = 1 [(google.api.field_behavior) = OPTIONAL];
  443. // Optional. A pagination token returned from a previous call to [ListProjects]
  444. // [google.cloud.resourcemanager.v3.Projects.ListProjects]
  445. // that indicates from where listing should continue.
  446. string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
  447. // Optional. The maximum number of projects to return in the response.
  448. // The server can return fewer projects than requested.
  449. // If unspecified, server picks an appropriate default.
  450. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
  451. }
  452. // A page of the response received from the
  453. // [SearchProjects][google.cloud.resourcemanager.v3.Projects.SearchProjects]
  454. // method.
  455. //
  456. // A paginated response where more pages are available has
  457. // `next_page_token` set. This token can be used in a subsequent request to
  458. // retrieve the next request page.
  459. message SearchProjectsResponse {
  460. // The list of Projects that matched the list filter query. This list can
  461. // be paginated.
  462. repeated Project projects = 1;
  463. // Pagination token.
  464. //
  465. // If the result set is too large to fit in a single response, this token
  466. // is returned. It encodes the position of the current result cursor.
  467. // Feeding this value into a new list request with the `page_token` parameter
  468. // gives the next page of the results.
  469. //
  470. // When `next_page_token` is not filled in, there is no next page and
  471. // the list returned is the last page in the result set.
  472. //
  473. // Pagination tokens have a limited lifetime.
  474. string next_page_token = 2;
  475. }
  476. // The request sent to the
  477. // [CreateProject][google.cloud.resourcemanager.v3.Projects.CreateProject]
  478. // method.
  479. message CreateProjectRequest {
  480. // Required. The Project to create.
  481. //
  482. // Project ID is required. If the requested ID is unavailable, the request
  483. // fails.
  484. //
  485. // If the `parent` field is set, the `resourcemanager.projects.create`
  486. // permission is checked on the parent resource. If no parent is set and
  487. // the authorization credentials belong to an Organziation, the parent
  488. // will be set to that Organization.
  489. Project project = 1 [(google.api.field_behavior) = REQUIRED];
  490. }
  491. // A status object which is used as the `metadata` field for the Operation
  492. // returned by CreateProject. It provides insight for when significant phases of
  493. // Project creation have completed.
  494. message CreateProjectMetadata {
  495. // Creation time of the project creation workflow.
  496. google.protobuf.Timestamp create_time = 1;
  497. // True if the project can be retrieved using `GetProject`. No other
  498. // operations on the project are guaranteed to work until the project creation
  499. // is complete.
  500. bool gettable = 2;
  501. // True if the project creation process is complete.
  502. bool ready = 3;
  503. }
  504. // The request sent to the
  505. // [UpdateProject][google.cloud.resourcemanager.v3.Projects.UpdateProject]
  506. // method.
  507. //
  508. // Only the `display_name` and `labels` fields can be change. Use the
  509. // [MoveProject][google.cloud.resourcemanager.v3.Projects.MoveProject] method to
  510. // change the `parent` field.
  511. message UpdateProjectRequest {
  512. // Required. The new definition of the project.
  513. Project project = 1 [(google.api.field_behavior) = REQUIRED];
  514. // Optional. An update mask to selectively update fields.
  515. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL];
  516. }
  517. // A status object which is used as the `metadata` field for the Operation
  518. // returned by UpdateProject.
  519. message UpdateProjectMetadata {
  520. }
  521. // The request sent to
  522. // [MoveProject][google.cloud.resourcemanager.v3.Projects.MoveProject]
  523. // method.
  524. message MoveProjectRequest {
  525. // Required. The name of the project to move.
  526. string name = 1 [
  527. (google.api.field_behavior) = REQUIRED,
  528. (google.api.resource_reference) = {
  529. type: "cloudresourcemanager.googleapis.com/Project"
  530. }
  531. ];
  532. // Required. The new parent to move the Project under.
  533. string destination_parent = 2 [
  534. (google.api.field_behavior) = REQUIRED,
  535. (google.api.resource_reference) = {
  536. child_type: "*"
  537. }
  538. ];
  539. }
  540. // A status object which is used as the `metadata` field for the Operation
  541. // returned by MoveProject.
  542. message MoveProjectMetadata {
  543. }
  544. // [DeleteProject][google.cloud.resourcemanager.v3.Projects.DeleteProject]
  545. // method.
  546. message DeleteProjectRequest {
  547. // Required. The name of the Project (for example, `projects/415104041262`).
  548. string name = 1 [
  549. (google.api.field_behavior) = REQUIRED,
  550. (google.api.resource_reference) = {
  551. type: "cloudresourcemanager.googleapis.com/Project"
  552. }
  553. ];
  554. }
  555. // A status object which is used as the `metadata` field for the Operation
  556. // returned by `DeleteProject`.
  557. message DeleteProjectMetadata {
  558. }
  559. // The request sent to the [UndeleteProject]
  560. // [google.cloud.resourcemanager.v3.Projects.UndeleteProject]
  561. // method.
  562. message UndeleteProjectRequest {
  563. // Required. The name of the project (for example, `projects/415104041262`).
  564. //
  565. // Required.
  566. string name = 1 [
  567. (google.api.field_behavior) = REQUIRED,
  568. (google.api.resource_reference) = {
  569. type: "cloudresourcemanager.googleapis.com/Project"
  570. }
  571. ];
  572. }
  573. // A status object which is used as the `metadata` field for the Operation
  574. // returned by `UndeleteProject`.
  575. message UndeleteProjectMetadata {
  576. }