xref: /aosp_15_r20/external/googleapis/google/cloud/aiplatform/v1beta1/pipeline_service.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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
15syntax = "proto3";
16
17package google.cloud.aiplatform.v1beta1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/cloud/aiplatform/v1beta1/operation.proto";
24import "google/cloud/aiplatform/v1beta1/pipeline_job.proto";
25import "google/cloud/aiplatform/v1beta1/training_pipeline.proto";
26import "google/longrunning/operations.proto";
27import "google/protobuf/empty.proto";
28import "google/protobuf/field_mask.proto";
29
30option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
31option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
32option java_multiple_files = true;
33option java_outer_classname = "PipelineServiceProto";
34option java_package = "com.google.cloud.aiplatform.v1beta1";
35option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
36option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
37
38// A service for creating and managing Vertex AI's pipelines. This includes both
39// `TrainingPipeline` resources (used for AutoML and custom training) and
40// `PipelineJob` resources (used for Vertex AI Pipelines).
41service PipelineService {
42  option (google.api.default_host) = "aiplatform.googleapis.com";
43  option (google.api.oauth_scopes) =
44      "https://www.googleapis.com/auth/cloud-platform";
45
46  // Creates a TrainingPipeline. A created TrainingPipeline right away will be
47  // attempted to be run.
48  rpc CreateTrainingPipeline(CreateTrainingPipelineRequest)
49      returns (TrainingPipeline) {
50    option (google.api.http) = {
51      post: "/v1beta1/{parent=projects/*/locations/*}/trainingPipelines"
52      body: "training_pipeline"
53    };
54    option (google.api.method_signature) = "parent,training_pipeline";
55  }
56
57  // Gets a TrainingPipeline.
58  rpc GetTrainingPipeline(GetTrainingPipelineRequest)
59      returns (TrainingPipeline) {
60    option (google.api.http) = {
61      get: "/v1beta1/{name=projects/*/locations/*/trainingPipelines/*}"
62    };
63    option (google.api.method_signature) = "name";
64  }
65
66  // Lists TrainingPipelines in a Location.
67  rpc ListTrainingPipelines(ListTrainingPipelinesRequest)
68      returns (ListTrainingPipelinesResponse) {
69    option (google.api.http) = {
70      get: "/v1beta1/{parent=projects/*/locations/*}/trainingPipelines"
71    };
72    option (google.api.method_signature) = "parent";
73  }
74
75  // Deletes a TrainingPipeline.
76  rpc DeleteTrainingPipeline(DeleteTrainingPipelineRequest)
77      returns (google.longrunning.Operation) {
78    option (google.api.http) = {
79      delete: "/v1beta1/{name=projects/*/locations/*/trainingPipelines/*}"
80    };
81    option (google.api.method_signature) = "name";
82    option (google.longrunning.operation_info) = {
83      response_type: "google.protobuf.Empty"
84      metadata_type: "DeleteOperationMetadata"
85    };
86  }
87
88  // Cancels a TrainingPipeline.
89  // Starts asynchronous cancellation on the TrainingPipeline. The server
90  // makes a best effort to cancel the pipeline, but success is not
91  // guaranteed. Clients can use
92  // [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.GetTrainingPipeline]
93  // or other methods to check whether the cancellation succeeded or whether the
94  // pipeline completed despite cancellation. On successful cancellation,
95  // the TrainingPipeline is not deleted; instead it becomes a pipeline with
96  // a
97  // [TrainingPipeline.error][google.cloud.aiplatform.v1beta1.TrainingPipeline.error]
98  // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
99  // corresponding to `Code.CANCELLED`, and
100  // [TrainingPipeline.state][google.cloud.aiplatform.v1beta1.TrainingPipeline.state]
101  // is set to `CANCELLED`.
102  rpc CancelTrainingPipeline(CancelTrainingPipelineRequest)
103      returns (google.protobuf.Empty) {
104    option (google.api.http) = {
105      post: "/v1beta1/{name=projects/*/locations/*/trainingPipelines/*}:cancel"
106      body: "*"
107    };
108    option (google.api.method_signature) = "name";
109  }
110
111  // Creates a PipelineJob. A PipelineJob will run immediately when created.
112  rpc CreatePipelineJob(CreatePipelineJobRequest) returns (PipelineJob) {
113    option (google.api.http) = {
114      post: "/v1beta1/{parent=projects/*/locations/*}/pipelineJobs"
115      body: "pipeline_job"
116    };
117    option (google.api.method_signature) =
118        "parent,pipeline_job,pipeline_job_id";
119  }
120
121  // Gets a PipelineJob.
122  rpc GetPipelineJob(GetPipelineJobRequest) returns (PipelineJob) {
123    option (google.api.http) = {
124      get: "/v1beta1/{name=projects/*/locations/*/pipelineJobs/*}"
125    };
126    option (google.api.method_signature) = "name";
127  }
128
129  // Lists PipelineJobs in a Location.
130  rpc ListPipelineJobs(ListPipelineJobsRequest)
131      returns (ListPipelineJobsResponse) {
132    option (google.api.http) = {
133      get: "/v1beta1/{parent=projects/*/locations/*}/pipelineJobs"
134    };
135    option (google.api.method_signature) = "parent";
136  }
137
138  // Deletes a PipelineJob.
139  rpc DeletePipelineJob(DeletePipelineJobRequest)
140      returns (google.longrunning.Operation) {
141    option (google.api.http) = {
142      delete: "/v1beta1/{name=projects/*/locations/*/pipelineJobs/*}"
143    };
144    option (google.api.method_signature) = "name";
145    option (google.longrunning.operation_info) = {
146      response_type: "google.protobuf.Empty"
147      metadata_type: "DeleteOperationMetadata"
148    };
149  }
150
151  // Batch deletes PipelineJobs
152  // The Operation is atomic. If it fails, none of the PipelineJobs are deleted.
153  // If it succeeds, all of the PipelineJobs are deleted.
154  rpc BatchDeletePipelineJobs(BatchDeletePipelineJobsRequest)
155      returns (google.longrunning.Operation) {
156    option (google.api.http) = {
157      post: "/v1beta1/{parent=projects/*/locations/*}/pipelineJobs:batchDelete"
158      body: "*"
159    };
160    option (google.api.method_signature) = "parent,names";
161    option (google.longrunning.operation_info) = {
162      response_type: "BatchDeletePipelineJobsResponse"
163      metadata_type: "DeleteOperationMetadata"
164    };
165  }
166
167  // Cancels a PipelineJob.
168  // Starts asynchronous cancellation on the PipelineJob. The server
169  // makes a best effort to cancel the pipeline, but success is not
170  // guaranteed. Clients can use
171  // [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1beta1.PipelineService.GetPipelineJob]
172  // or other methods to check whether the cancellation succeeded or whether the
173  // pipeline completed despite cancellation. On successful cancellation,
174  // the PipelineJob is not deleted; instead it becomes a pipeline with
175  // a [PipelineJob.error][google.cloud.aiplatform.v1beta1.PipelineJob.error]
176  // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
177  // corresponding to `Code.CANCELLED`, and
178  // [PipelineJob.state][google.cloud.aiplatform.v1beta1.PipelineJob.state] is
179  // set to `CANCELLED`.
180  rpc CancelPipelineJob(CancelPipelineJobRequest)
181      returns (google.protobuf.Empty) {
182    option (google.api.http) = {
183      post: "/v1beta1/{name=projects/*/locations/*/pipelineJobs/*}:cancel"
184      body: "*"
185    };
186    option (google.api.method_signature) = "name";
187  }
188
189  // Batch cancel PipelineJobs.
190  // Firstly the server will check if all the jobs are in non-terminal states,
191  // and skip the jobs that are already terminated.
192  // If the operation failed, none of the pipeline jobs are cancelled.
193  // The server will poll the states of all the pipeline jobs periodically
194  // to check the cancellation status.
195  // This operation will return an LRO.
196  rpc BatchCancelPipelineJobs(BatchCancelPipelineJobsRequest)
197      returns (google.longrunning.Operation) {
198    option (google.api.http) = {
199      post: "/v1beta1/{parent=projects/*/locations/*}/pipelineJobs:batchCancel"
200      body: "*"
201    };
202    option (google.api.method_signature) = "parent,names";
203    option (google.longrunning.operation_info) = {
204      response_type: "BatchCancelPipelineJobsResponse"
205      metadata_type: "BatchCancelPipelineJobsOperationMetadata"
206    };
207  }
208}
209
210// Runtime operation information for
211// [PipelineService.BatchCancelPipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.BatchCancelPipelineJobs].
212message BatchCancelPipelineJobsOperationMetadata {
213  // The common part of the operation metadata.
214  GenericOperationMetadata generic_metadata = 1;
215}
216
217// Request message for
218// [PipelineService.CreateTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.CreateTrainingPipeline].
219message CreateTrainingPipelineRequest {
220  // Required. The resource name of the Location to create the TrainingPipeline
221  // in. Format: `projects/{project}/locations/{location}`
222  string parent = 1 [
223    (google.api.field_behavior) = REQUIRED,
224    (google.api.resource_reference) = {
225      type: "locations.googleapis.com/Location"
226    }
227  ];
228
229  // Required. The TrainingPipeline to create.
230  TrainingPipeline training_pipeline = 2
231      [(google.api.field_behavior) = REQUIRED];
232}
233
234// Request message for
235// [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.GetTrainingPipeline].
236message GetTrainingPipelineRequest {
237  // Required. The name of the TrainingPipeline resource.
238  // Format:
239  // `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
240  string name = 1 [
241    (google.api.field_behavior) = REQUIRED,
242    (google.api.resource_reference) = {
243      type: "aiplatform.googleapis.com/TrainingPipeline"
244    }
245  ];
246}
247
248// Request message for
249// [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1beta1.PipelineService.ListTrainingPipelines].
250message ListTrainingPipelinesRequest {
251  // Required. The resource name of the Location to list the TrainingPipelines
252  // from. Format: `projects/{project}/locations/{location}`
253  string parent = 1 [
254    (google.api.field_behavior) = REQUIRED,
255    (google.api.resource_reference) = {
256      type: "locations.googleapis.com/Location"
257    }
258  ];
259
260  // The standard list filter.
261  //
262  // Supported fields:
263  //
264  //   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
265  //   * `state` supports `=`, `!=` comparisons.
266  //   * `training_task_definition` `=`, `!=` comparisons, and `:` wildcard.
267  //   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
268  //     `create_time` must be in RFC 3339 format.
269  //   * `labels` supports general map functions that is:
270  //     `labels.key=value` - key:value equality
271  //     `labels.key:* - key existence
272  //
273  // Some examples of using the filter are:
274  //
275  //   * `state="PIPELINE_STATE_SUCCEEDED" AND display_name:"my_pipeline_*"`
276  //   * `state!="PIPELINE_STATE_FAILED" OR display_name="my_pipeline"`
277  //   * `NOT display_name="my_pipeline"`
278  //   * `create_time>"2021-05-18T00:00:00Z"`
279  //   * `training_task_definition:"*automl_text_classification*"`
280  string filter = 2;
281
282  // The standard list page size.
283  int32 page_size = 3;
284
285  // The standard list page token.
286  // Typically obtained via
287  // [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListTrainingPipelinesResponse.next_page_token]
288  // of the previous
289  // [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1beta1.PipelineService.ListTrainingPipelines]
290  // call.
291  string page_token = 4;
292
293  // Mask specifying which fields to read.
294  google.protobuf.FieldMask read_mask = 5;
295}
296
297// Response message for
298// [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1beta1.PipelineService.ListTrainingPipelines]
299message ListTrainingPipelinesResponse {
300  // List of TrainingPipelines in the requested page.
301  repeated TrainingPipeline training_pipelines = 1;
302
303  // A token to retrieve the next page of results.
304  // Pass to
305  // [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1beta1.ListTrainingPipelinesRequest.page_token]
306  // to obtain that page.
307  string next_page_token = 2;
308}
309
310// Request message for
311// [PipelineService.DeleteTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.DeleteTrainingPipeline].
312message DeleteTrainingPipelineRequest {
313  // Required. The name of the TrainingPipeline resource to be deleted.
314  // Format:
315  // `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
316  string name = 1 [
317    (google.api.field_behavior) = REQUIRED,
318    (google.api.resource_reference) = {
319      type: "aiplatform.googleapis.com/TrainingPipeline"
320    }
321  ];
322}
323
324// Request message for
325// [PipelineService.CancelTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.CancelTrainingPipeline].
326message CancelTrainingPipelineRequest {
327  // Required. The name of the TrainingPipeline to cancel.
328  // Format:
329  // `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
330  string name = 1 [
331    (google.api.field_behavior) = REQUIRED,
332    (google.api.resource_reference) = {
333      type: "aiplatform.googleapis.com/TrainingPipeline"
334    }
335  ];
336}
337
338// Request message for
339// [PipelineService.CreatePipelineJob][google.cloud.aiplatform.v1beta1.PipelineService.CreatePipelineJob].
340message CreatePipelineJobRequest {
341  // Required. The resource name of the Location to create the PipelineJob in.
342  // Format: `projects/{project}/locations/{location}`
343  string parent = 1 [
344    (google.api.field_behavior) = REQUIRED,
345    (google.api.resource_reference) = {
346      type: "locations.googleapis.com/Location"
347    }
348  ];
349
350  // Required. The PipelineJob to create.
351  PipelineJob pipeline_job = 2 [(google.api.field_behavior) = REQUIRED];
352
353  // The ID to use for the PipelineJob, which will become the final component of
354  // the PipelineJob name. If not provided, an ID will be automatically
355  // generated.
356  //
357  // This value should be less than 128 characters, and valid characters
358  // are `/[a-z][0-9]-/`.
359  string pipeline_job_id = 3;
360}
361
362// Request message for
363// [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1beta1.PipelineService.GetPipelineJob].
364message GetPipelineJobRequest {
365  // Required. The name of the PipelineJob resource.
366  // Format:
367  // `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`
368  string name = 1 [
369    (google.api.field_behavior) = REQUIRED,
370    (google.api.resource_reference) = {
371      type: "aiplatform.googleapis.com/PipelineJob"
372    }
373  ];
374}
375
376// Request message for
377// [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.ListPipelineJobs].
378message ListPipelineJobsRequest {
379  // Required. The resource name of the Location to list the PipelineJobs from.
380  // Format: `projects/{project}/locations/{location}`
381  string parent = 1 [
382    (google.api.field_behavior) = REQUIRED,
383    (google.api.resource_reference) = {
384      type: "locations.googleapis.com/Location"
385    }
386  ];
387
388  // Lists the PipelineJobs that match the filter expression. The following
389  // fields are supported:
390  //
391  // * `pipeline_name`: Supports `=` and `!=` comparisons.
392  // * `display_name`: Supports `=`, `!=` comparisons, and `:` wildcard.
393  // * `pipeline_job_user_id`: Supports `=`, `!=` comparisons, and `:` wildcard.
394  //   for example, can check if pipeline's display_name contains *step* by
395  //   doing display_name:\"*step*\"
396  // * `state`: Supports `=` and `!=` comparisons.
397  // * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
398  //   Values must be in RFC 3339 format.
399  // * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
400  //   Values must be in RFC 3339 format.
401  // * `end_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons.
402  //   Values must be in RFC 3339 format.
403  // * `labels`: Supports key-value equality and key presence.
404  // * `template_uri`: Supports `=`, `!=` comparisons, and `:` wildcard.
405  // * `template_metadata.version`: Supports `=`, `!=` comparisons, and `:`
406  //   wildcard.
407  //
408  // Filter expressions can be combined together using logical operators
409  // (`AND` & `OR`).
410  // For example: `pipeline_name="test" AND create_time>"2020-05-18T13:30:00Z"`.
411  //
412  // The syntax to define filter expression is based on
413  // https://google.aip.dev/160.
414  //
415  // Examples:
416  //
417  // * `create_time>"2021-05-18T00:00:00Z" OR
418  //   update_time>"2020-05-18T00:00:00Z"` PipelineJobs created or updated
419  //   after 2020-05-18 00:00:00 UTC.
420  // * `labels.env = "prod"`
421  //   PipelineJobs with label "env" set to "prod".
422  string filter = 2;
423
424  // The standard list page size.
425  int32 page_size = 3;
426
427  // The standard list page token.
428  // Typically obtained via
429  // [ListPipelineJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListPipelineJobsResponse.next_page_token]
430  // of the previous
431  // [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.ListPipelineJobs]
432  // call.
433  string page_token = 4;
434
435  // A comma-separated list of fields to order by. The default sort order is in
436  // ascending order. Use "desc" after a field name for descending. You can have
437  // multiple order_by fields provided e.g. "create_time desc, end_time",
438  // "end_time, start_time, update_time" For example, using "create_time desc,
439  // end_time" will order results by create time in descending order, and if
440  // there are multiple jobs having the same create time, order them by the end
441  // time in ascending order. if order_by is not specified, it will order by
442  // default order is create time in descending order. Supported fields:
443  //
444  //   * `create_time`
445  //   * `update_time`
446  //   * `end_time`
447  //   * `start_time`
448  string order_by = 6;
449
450  // Mask specifying which fields to read.
451  google.protobuf.FieldMask read_mask = 7;
452}
453
454// Response message for
455// [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.ListPipelineJobs]
456message ListPipelineJobsResponse {
457  // List of PipelineJobs in the requested page.
458  repeated PipelineJob pipeline_jobs = 1;
459
460  // A token to retrieve the next page of results.
461  // Pass to
462  // [ListPipelineJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListPipelineJobsRequest.page_token]
463  // to obtain that page.
464  string next_page_token = 2;
465}
466
467// Request message for
468// [PipelineService.DeletePipelineJob][google.cloud.aiplatform.v1beta1.PipelineService.DeletePipelineJob].
469message DeletePipelineJobRequest {
470  // Required. The name of the PipelineJob resource to be deleted.
471  // Format:
472  // `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`
473  string name = 1 [
474    (google.api.field_behavior) = REQUIRED,
475    (google.api.resource_reference) = {
476      type: "aiplatform.googleapis.com/PipelineJob"
477    }
478  ];
479}
480
481// Request message for
482// [PipelineService.BatchDeletePipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.BatchDeletePipelineJobs].
483message BatchDeletePipelineJobsRequest {
484  // Required. The name of the PipelineJobs' parent resource.
485  // Format: `projects/{project}/locations/{location}`
486  string parent = 1 [
487    (google.api.field_behavior) = REQUIRED,
488    (google.api.resource_reference) = {
489      child_type: "aiplatform.googleapis.com/PipelineJob"
490    }
491  ];
492
493  // Required. The names of the PipelineJobs to delete.
494  // A maximum of 32 PipelineJobs can be deleted in a batch.
495  // Format:
496  // `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
497  repeated string names = 2 [
498    (google.api.field_behavior) = REQUIRED,
499    (google.api.resource_reference) = {
500      type: "aiplatform.googleapis.com/PipelineJob"
501    }
502  ];
503}
504
505// Response message for
506// [PipelineService.BatchDeletePipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.BatchDeletePipelineJobs].
507message BatchDeletePipelineJobsResponse {
508  // PipelineJobs deleted.
509  repeated PipelineJob pipeline_jobs = 1;
510}
511
512// Request message for
513// [PipelineService.CancelPipelineJob][google.cloud.aiplatform.v1beta1.PipelineService.CancelPipelineJob].
514message CancelPipelineJobRequest {
515  // Required. The name of the PipelineJob to cancel.
516  // Format:
517  // `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`
518  string name = 1 [
519    (google.api.field_behavior) = REQUIRED,
520    (google.api.resource_reference) = {
521      type: "aiplatform.googleapis.com/PipelineJob"
522    }
523  ];
524}
525
526// Request message for
527// [PipelineService.BatchCancelPipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.BatchCancelPipelineJobs].
528message BatchCancelPipelineJobsRequest {
529  // Required. The name of the PipelineJobs' parent resource.
530  // Format: `projects/{project}/locations/{location}`
531  string parent = 1 [
532    (google.api.field_behavior) = REQUIRED,
533    (google.api.resource_reference) = {
534      child_type: "aiplatform.googleapis.com/PipelineJob"
535    }
536  ];
537
538  // Required. The names of the PipelineJobs to cancel.
539  // A maximum of 32 PipelineJobs can be cancelled in a batch.
540  // Format:
541  // `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`
542  repeated string names = 2 [
543    (google.api.field_behavior) = REQUIRED,
544    (google.api.resource_reference) = {
545      type: "aiplatform.googleapis.com/PipelineJob"
546    }
547  ];
548}
549
550// Response message for
551// [PipelineService.BatchCancelPipelineJobs][google.cloud.aiplatform.v1beta1.PipelineService.BatchCancelPipelineJobs].
552message BatchCancelPipelineJobsResponse {
553  // PipelineJobs cancelled.
554  repeated PipelineJob pipeline_jobs = 1;
555}
556