pipeline_service.proto 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. // Copyright 2022 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.aiplatform.v1beta1;
  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/cloud/aiplatform/v1beta1/pipeline_job.proto";
  21. import "google/cloud/aiplatform/v1beta1/training_pipeline.proto";
  22. import "google/longrunning/operations.proto";
  23. import "google/protobuf/empty.proto";
  24. import "google/protobuf/field_mask.proto";
  25. option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
  26. option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
  27. option java_multiple_files = true;
  28. option java_outer_classname = "PipelineServiceProto";
  29. option java_package = "com.google.cloud.aiplatform.v1beta1";
  30. option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
  31. option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
  32. // A service for creating and managing Vertex AI's pipelines. This includes both
  33. // `TrainingPipeline` resources (used for AutoML and custom training) and
  34. // `PipelineJob` resources (used for Vertex AI Pipelines).
  35. service PipelineService {
  36. option (google.api.default_host) = "aiplatform.googleapis.com";
  37. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  38. // Creates a TrainingPipeline. A created TrainingPipeline right away will be
  39. // attempted to be run.
  40. rpc CreateTrainingPipeline(CreateTrainingPipelineRequest) returns (TrainingPipeline) {
  41. option (google.api.http) = {
  42. post: "/v1beta1/{parent=projects/*/locations/*}/trainingPipelines"
  43. body: "training_pipeline"
  44. };
  45. option (google.api.method_signature) = "parent,training_pipeline";
  46. }
  47. // Gets a TrainingPipeline.
  48. rpc GetTrainingPipeline(GetTrainingPipelineRequest) returns (TrainingPipeline) {
  49. option (google.api.http) = {
  50. get: "/v1beta1/{name=projects/*/locations/*/trainingPipelines/*}"
  51. };
  52. option (google.api.method_signature) = "name";
  53. }
  54. // Lists TrainingPipelines in a Location.
  55. rpc ListTrainingPipelines(ListTrainingPipelinesRequest) returns (ListTrainingPipelinesResponse) {
  56. option (google.api.http) = {
  57. get: "/v1beta1/{parent=projects/*/locations/*}/trainingPipelines"
  58. };
  59. option (google.api.method_signature) = "parent";
  60. }
  61. // Deletes a TrainingPipeline.
  62. rpc DeleteTrainingPipeline(DeleteTrainingPipelineRequest) returns (google.longrunning.Operation) {
  63. option (google.api.http) = {
  64. delete: "/v1beta1/{name=projects/*/locations/*/trainingPipelines/*}"
  65. };
  66. option (google.api.method_signature) = "name";
  67. option (google.longrunning.operation_info) = {
  68. response_type: "google.protobuf.Empty"
  69. metadata_type: "DeleteOperationMetadata"
  70. };
  71. }
  72. // Cancels a TrainingPipeline.
  73. // Starts asynchronous cancellation on the TrainingPipeline. The server
  74. // makes a best effort to cancel the pipeline, but success is not
  75. // guaranteed. Clients can use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.GetTrainingPipeline] or
  76. // other methods to check whether the cancellation succeeded or whether the
  77. // pipeline completed despite cancellation. On successful cancellation,
  78. // the TrainingPipeline is not deleted; instead it becomes a pipeline with
  79. // a [TrainingPipeline.error][google.cloud.aiplatform.v1beta1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
  80. // corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1beta1.TrainingPipeline.state] is set to
  81. // `CANCELLED`.
  82. rpc CancelTrainingPipeline(CancelTrainingPipelineRequest) returns (google.protobuf.Empty) {
  83. option (google.api.http) = {
  84. post: "/v1beta1/{name=projects/*/locations/*/trainingPipelines/*}:cancel"
  85. body: "*"
  86. };
  87. option (google.api.method_signature) = "name";
  88. }
  89. // Creates a PipelineJob. A PipelineJob will run immediately when created.
  90. rpc CreatePipelineJob(CreatePipelineJobRequest) returns (PipelineJob) {
  91. option (google.api.http) = {
  92. post: "/v1beta1/{parent=projects/*/locations/*}/pipelineJobs"
  93. body: "pipeline_job"
  94. };
  95. option (google.api.method_signature) = "parent,pipeline_job,pipeline_job_id";
  96. }
  97. // Gets a PipelineJob.
  98. rpc GetPipelineJob(GetPipelineJobRequest) returns (PipelineJob) {
  99. option (google.api.http) = {
  100. get: "/v1beta1/{name=projects/*/locations/*/pipelineJobs/*}"
  101. };
  102. option (google.api.method_signature) = "name";
  103. }
  104. // Lists PipelineJobs in a Location.
  105. rpc ListPipelineJobs(ListPipelineJobsRequest) returns (ListPipelineJobsResponse) {
  106. option (google.api.http) = {
  107. get: "/v1beta1/{parent=projects/*/locations/*}/pipelineJobs"
  108. };
  109. option (google.api.method_signature) = "parent";
  110. }
  111. // Deletes a PipelineJob.
  112. rpc DeletePipelineJob(DeletePipelineJobRequest) returns (google.longrunning.Operation) {
  113. option (google.api.http) = {
  114. delete: "/v1beta1/{name=projects/*/locations/*/pipelineJobs/*}"
  115. };
  116. option (google.api.method_signature) = "name";
  117. option (google.longrunning.operation_info) = {
  118. response_type: "google.protobuf.Empty"
  119. metadata_type: "DeleteOperationMetadata"
  120. };
  121. }
  122. // Cancels a PipelineJob.
  123. // Starts asynchronous cancellation on the PipelineJob. The server
  124. // makes a best effort to cancel the pipeline, but success is not
  125. // guaranteed. Clients can use [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1beta1.PipelineService.GetPipelineJob] or
  126. // other methods to check whether the cancellation succeeded or whether the
  127. // pipeline completed despite cancellation. On successful cancellation,
  128. // the PipelineJob is not deleted; instead it becomes a pipeline with
  129. // a [PipelineJob.error][google.cloud.aiplatform.v1beta1.PipelineJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
  130. // corresponding to `Code.CANCELLED`, and [PipelineJob.state][google.cloud.aiplatform.v1beta1.PipelineJob.state] is set to
  131. // `CANCELLED`.
  132. rpc CancelPipelineJob(CancelPipelineJobRequest) returns (google.protobuf.Empty) {
  133. option (google.api.http) = {
  134. post: "/v1beta1/{name=projects/*/locations/*/pipelineJobs/*}:cancel"
  135. body: "*"
  136. };
  137. option (google.api.method_signature) = "name";
  138. }
  139. }
  140. // Request message for [PipelineService.CreateTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.CreateTrainingPipeline].
  141. message CreateTrainingPipelineRequest {
  142. // Required. The resource name of the Location to create the TrainingPipeline in.
  143. // Format: `projects/{project}/locations/{location}`
  144. string parent = 1 [
  145. (google.api.field_behavior) = REQUIRED,
  146. (google.api.resource_reference) = {
  147. type: "locations.googleapis.com/Location"
  148. }
  149. ];
  150. // Required. The TrainingPipeline to create.
  151. TrainingPipeline training_pipeline = 2 [(google.api.field_behavior) = REQUIRED];
  152. }
  153. // Request message for [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.GetTrainingPipeline].
  154. message GetTrainingPipelineRequest {
  155. // Required. The name of the TrainingPipeline resource.
  156. // Format:
  157. // `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
  158. string name = 1 [
  159. (google.api.field_behavior) = REQUIRED,
  160. (google.api.resource_reference) = {
  161. type: "aiplatform.googleapis.com/TrainingPipeline"
  162. }
  163. ];
  164. }
  165. // Request message for [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1beta1.PipelineService.ListTrainingPipelines].
  166. message ListTrainingPipelinesRequest {
  167. // Required. The resource name of the Location to list the TrainingPipelines from.
  168. // Format: `projects/{project}/locations/{location}`
  169. string parent = 1 [
  170. (google.api.field_behavior) = REQUIRED,
  171. (google.api.resource_reference) = {
  172. type: "locations.googleapis.com/Location"
  173. }
  174. ];
  175. // The standard list filter.
  176. //
  177. // Supported fields:
  178. //
  179. // * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
  180. // * `state` supports `=`, `!=` comparisons.
  181. // * `training_task_definition` `=`, `!=` comparisons, and `:` wildcard.
  182. // * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
  183. // `create_time` must be in RFC 3339 format.
  184. // * `labels` supports general map functions that is:
  185. // `labels.key=value` - key:value equality
  186. // `labels.key:* - key existence
  187. //
  188. // Some examples of using the filter are:
  189. //
  190. // * `state="PIPELINE_STATE_SUCCEEDED" AND display_name:"my_pipeline_*"`
  191. // * `state!="PIPELINE_STATE_FAILED" OR display_name="my_pipeline"`
  192. // * `NOT display_name="my_pipeline"`
  193. // * `create_time>"2021-05-18T00:00:00Z"`
  194. // * `training_task_definition:"*automl_text_classification*"`
  195. string filter = 2;
  196. // The standard list page size.
  197. int32 page_size = 3;
  198. // The standard list page token.
  199. // Typically obtained via
  200. // [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListTrainingPipelinesResponse.next_page_token] of the previous
  201. // [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1beta1.PipelineService.ListTrainingPipelines] call.
  202. string page_token = 4;
  203. // Mask specifying which fields to read.
  204. google.protobuf.FieldMask read_mask = 5;
  205. }
  206. // Response message for [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1beta1.PipelineService.ListTrainingPipelines]
  207. message ListTrainingPipelinesResponse {
  208. // List of TrainingPipelines in the requested page.
  209. repeated TrainingPipeline training_pipelines = 1;
  210. // A token to retrieve the next page of results.
  211. // Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1beta1.ListTrainingPipelinesRequest.page_token] to obtain that page.
  212. string next_page_token = 2;
  213. }
  214. // Request message for [PipelineService.DeleteTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.DeleteTrainingPipeline].
  215. message DeleteTrainingPipelineRequest {
  216. // Required. The name of the TrainingPipeline resource to be deleted.
  217. // Format:
  218. // `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
  219. string name = 1 [
  220. (google.api.field_behavior) = REQUIRED,
  221. (google.api.resource_reference) = {
  222. type: "aiplatform.googleapis.com/TrainingPipeline"
  223. }
  224. ];
  225. }
  226. // Request message for [PipelineService.CancelTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.CancelTrainingPipeline].
  227. message CancelTrainingPipelineRequest {
  228. // Required. The name of the TrainingPipeline to cancel.
  229. // Format:
  230. // `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
  231. string name = 1 [
  232. (google.api.field_behavior) = REQUIRED,
  233. (google.api.resource_reference) = {
  234. type: "aiplatform.googleapis.com/TrainingPipeline"
  235. }
  236. ];
  237. }
  238. // Request message for [PipelineService.CreatePipelineJob][google.cloud.aiplatform.v1beta1.PipelineService.CreatePipelineJob].
  239. message CreatePipelineJobRequest {
  240. // Required. The resource name of the Location to create the PipelineJob in.
  241. // Format: `projects/{project}/locations/{location}`
  242. string parent = 1 [
  243. (google.api.field_behavior) = REQUIRED,
  244. (google.api.resource_reference) = {
  245. type: "locations.googleapis.com/Location"
  246. }
  247. ];
  248. // Required. The PipelineJob to create.
  249. PipelineJob pipeline_job = 2 [(google.api.field_behavior) = REQUIRED];
  250. // The ID to use for the PipelineJob, which will become the final component of
  251. // the PipelineJob name. If not provided, an ID will be automatically
  252. // generated.
  253. //
  254. // This value should be less than 128 characters, and valid characters
  255. // are /[a-z][0-9]-/.
  256. string pipeline_job_id = 3;
  257. }
  258. // Request message for [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1beta1.PipelineService.GetPipelineJob].
  259. message GetPipelineJobRequest {
  260. // Required. The name of the PipelineJob resource.
  261. // Format:
  262. // `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`
  263. string name = 1 [
  264. (google.api.field_behavior) = REQUIRED,
  265. (google.api.resource_reference) = {
  266. type: "aiplatform.googleapis.com/PipelineJob"
  267. }
  268. ];
  269. }
  270. // Request message for [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.ListPipelineJobs].
  271. message ListPipelineJobsRequest {
  272. // Required. The resource name of the Location to list the PipelineJobs from.
  273. // Format: `projects/{project}/locations/{location}`
  274. string parent = 1 [
  275. (google.api.field_behavior) = REQUIRED,
  276. (google.api.resource_reference) = {
  277. type: "locations.googleapis.com/Location"
  278. }
  279. ];
  280. // Lists the PipelineJobs that match the filter expression. The following
  281. // fields are supported:
  282. //
  283. // * `pipeline_name`: Supports `=` and `!=` comparisons.
  284. // * `display_name`: Supports `=`, `!=` comparisons, and `:` wildcard.
  285. // * `pipeline_job_user_id`: Supports `=`, `!=` comparisons, and `:` wildcard.
  286. // for example, can check if pipeline's display_name contains *step* by
  287. // doing display_name:\"*step*\"
  288. // * `state`: Supports `=` and `!=` comparisons.
  289. // * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
  290. // Values must be in RFC 3339 format.
  291. // * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
  292. // Values must be in RFC 3339 format.
  293. // * `end_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
  294. // Values must be in RFC 3339 format.
  295. // * `labels`: Supports key-value equality and key presence.
  296. // * `template_uri`: Supports `=`, `!=` comparisons, and `:` wildcard.
  297. // * `template_metadata.version`: Supports `=`, `!=` comparisons, and `:`
  298. // wildcard.
  299. //
  300. // Filter expressions can be combined together using logical operators
  301. // (`AND` & `OR`).
  302. // For example: `pipeline_name="test" AND create_time>"2020-05-18T13:30:00Z"`.
  303. //
  304. // The syntax to define filter expression is based on
  305. // https://google.aip.dev/160.
  306. //
  307. // Examples:
  308. //
  309. // * `create_time>"2021-05-18T00:00:00Z" OR
  310. // update_time>"2020-05-18T00:00:00Z"` PipelineJobs created or updated
  311. // after 2020-05-18 00:00:00 UTC.
  312. // * `labels.env = "prod"`
  313. // PipelineJobs with label "env" set to "prod".
  314. string filter = 2;
  315. // The standard list page size.
  316. int32 page_size = 3;
  317. // The standard list page token.
  318. // Typically obtained via
  319. // [ListPipelineJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListPipelineJobsResponse.next_page_token] of the previous
  320. // [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.ListPipelineJobs] call.
  321. string page_token = 4;
  322. // A comma-separated list of fields to order by. The default sort order is in
  323. // ascending order. Use "desc" after a field name for descending. You can have
  324. // multiple order_by fields provided e.g. "create_time desc, end_time",
  325. // "end_time, start_time, update_time" For example, using "create_time desc,
  326. // end_time" will order results by create time in descending order, and if
  327. // there are multiple jobs having the same create time, order them by the end
  328. // time in ascending order. if order_by is not specified, it will order by
  329. // default order is create time in descending order. Supported fields:
  330. //
  331. // * `create_time`
  332. // * `update_time`
  333. // * `end_time`
  334. // * `start_time`
  335. string order_by = 6;
  336. // Mask specifying which fields to read.
  337. google.protobuf.FieldMask read_mask = 7;
  338. }
  339. // Response message for [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.ListPipelineJobs]
  340. message ListPipelineJobsResponse {
  341. // List of PipelineJobs in the requested page.
  342. repeated PipelineJob pipeline_jobs = 1;
  343. // A token to retrieve the next page of results.
  344. // Pass to [ListPipelineJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListPipelineJobsRequest.page_token] to obtain that page.
  345. string next_page_token = 2;
  346. }
  347. // Request message for [PipelineService.DeletePipelineJob][google.cloud.aiplatform.v1beta1.PipelineService.DeletePipelineJob].
  348. message DeletePipelineJobRequest {
  349. // Required. The name of the PipelineJob resource to be deleted.
  350. // Format:
  351. // `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`
  352. string name = 1 [
  353. (google.api.field_behavior) = REQUIRED,
  354. (google.api.resource_reference) = {
  355. type: "aiplatform.googleapis.com/PipelineJob"
  356. }
  357. ];
  358. }
  359. // Request message for [PipelineService.CancelPipelineJob][google.cloud.aiplatform.v1beta1.PipelineService.CancelPipelineJob].
  360. message CancelPipelineJobRequest {
  361. // Required. The name of the PipelineJob to cancel.
  362. // Format:
  363. // `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`
  364. string name = 1 [
  365. (google.api.field_behavior) = REQUIRED,
  366. (google.api.resource_reference) = {
  367. type: "aiplatform.googleapis.com/PipelineJob"
  368. }
  369. ];
  370. }