migration_service.proto 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  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/migratable_resource.proto";
  21. import "google/cloud/aiplatform/v1beta1/operation.proto";
  22. import "google/longrunning/operations.proto";
  23. import "google/rpc/status.proto";
  24. option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
  25. option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
  26. option java_multiple_files = true;
  27. option java_outer_classname = "MigrationServiceProto";
  28. option java_package = "com.google.cloud.aiplatform.v1beta1";
  29. option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
  30. option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
  31. // A service that migrates resources from automl.googleapis.com,
  32. // datalabeling.googleapis.com and ml.googleapis.com to Vertex AI.
  33. service MigrationService {
  34. option (google.api.default_host) = "aiplatform.googleapis.com";
  35. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  36. // Searches all of the resources in automl.googleapis.com,
  37. // datalabeling.googleapis.com and ml.googleapis.com that can be migrated to
  38. // Vertex AI's given location.
  39. rpc SearchMigratableResources(SearchMigratableResourcesRequest) returns (SearchMigratableResourcesResponse) {
  40. option (google.api.http) = {
  41. post: "/v1beta1/{parent=projects/*/locations/*}/migratableResources:search"
  42. body: "*"
  43. };
  44. option (google.api.method_signature) = "parent";
  45. }
  46. // Batch migrates resources from ml.googleapis.com, automl.googleapis.com,
  47. // and datalabeling.googleapis.com to Vertex AI.
  48. rpc BatchMigrateResources(BatchMigrateResourcesRequest) returns (google.longrunning.Operation) {
  49. option (google.api.http) = {
  50. post: "/v1beta1/{parent=projects/*/locations/*}/migratableResources:batchMigrate"
  51. body: "*"
  52. };
  53. option (google.api.method_signature) = "parent,migrate_resource_requests";
  54. option (google.longrunning.operation_info) = {
  55. response_type: "BatchMigrateResourcesResponse"
  56. metadata_type: "BatchMigrateResourcesOperationMetadata"
  57. };
  58. }
  59. }
  60. // Request message for [MigrationService.SearchMigratableResources][google.cloud.aiplatform.v1beta1.MigrationService.SearchMigratableResources].
  61. message SearchMigratableResourcesRequest {
  62. // Required. The location that the migratable resources should be searched from.
  63. // It's the Vertex AI location that the resources can be migrated to, not
  64. // the resources' original location.
  65. // Format:
  66. // `projects/{project}/locations/{location}`
  67. string parent = 1 [
  68. (google.api.field_behavior) = REQUIRED,
  69. (google.api.resource_reference) = {
  70. type: "locations.googleapis.com/Location"
  71. }
  72. ];
  73. // The standard page size.
  74. // The default and maximum value is 100.
  75. int32 page_size = 2;
  76. // The standard page token.
  77. string page_token = 3;
  78. // A filter for your search. You can use the following types of filters:
  79. //
  80. // * Resource type filters. The following strings filter for a specific type
  81. // of [MigratableResource][google.cloud.aiplatform.v1beta1.MigratableResource]:
  82. // * `ml_engine_model_version:*`
  83. // * `automl_model:*`
  84. // * `automl_dataset:*`
  85. // * `data_labeling_dataset:*`
  86. // * "Migrated or not" filters. The following strings filter for resources
  87. // that either have or have not already been migrated:
  88. // * `last_migrate_time:*` filters for migrated resources.
  89. // * `NOT last_migrate_time:*` filters for not yet migrated resources.
  90. string filter = 4;
  91. }
  92. // Response message for [MigrationService.SearchMigratableResources][google.cloud.aiplatform.v1beta1.MigrationService.SearchMigratableResources].
  93. message SearchMigratableResourcesResponse {
  94. // All migratable resources that can be migrated to the
  95. // location specified in the request.
  96. repeated MigratableResource migratable_resources = 1;
  97. // The standard next-page token.
  98. // The migratable_resources may not fill page_size in
  99. // SearchMigratableResourcesRequest even when there are subsequent pages.
  100. string next_page_token = 2;
  101. }
  102. // Request message for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1beta1.MigrationService.BatchMigrateResources].
  103. message BatchMigrateResourcesRequest {
  104. // Required. The location of the migrated resource will live in.
  105. // Format: `projects/{project}/locations/{location}`
  106. string parent = 1 [
  107. (google.api.field_behavior) = REQUIRED,
  108. (google.api.resource_reference) = {
  109. type: "locations.googleapis.com/Location"
  110. }
  111. ];
  112. // Required. The request messages specifying the resources to migrate.
  113. // They must be in the same location as the destination.
  114. // Up to 50 resources can be migrated in one batch.
  115. repeated MigrateResourceRequest migrate_resource_requests = 2 [(google.api.field_behavior) = REQUIRED];
  116. }
  117. // Config of migrating one resource from automl.googleapis.com,
  118. // datalabeling.googleapis.com and ml.googleapis.com to Vertex AI.
  119. message MigrateResourceRequest {
  120. // Config for migrating version in ml.googleapis.com to Vertex AI's Model.
  121. message MigrateMlEngineModelVersionConfig {
  122. // Required. The ml.googleapis.com endpoint that this model version should be migrated
  123. // from.
  124. // Example values:
  125. //
  126. // * ml.googleapis.com
  127. //
  128. // * us-centrall-ml.googleapis.com
  129. //
  130. // * europe-west4-ml.googleapis.com
  131. //
  132. // * asia-east1-ml.googleapis.com
  133. string endpoint = 1 [(google.api.field_behavior) = REQUIRED];
  134. // Required. Full resource name of ml engine model version.
  135. // Format: `projects/{project}/models/{model}/versions/{version}`.
  136. string model_version = 2 [
  137. (google.api.field_behavior) = REQUIRED,
  138. (google.api.resource_reference) = {
  139. type: "ml.googleapis.com/Version"
  140. }
  141. ];
  142. // Required. Display name of the model in Vertex AI.
  143. // System will pick a display name if unspecified.
  144. string model_display_name = 3 [(google.api.field_behavior) = REQUIRED];
  145. }
  146. // Config for migrating Model in automl.googleapis.com to Vertex AI's Model.
  147. message MigrateAutomlModelConfig {
  148. // Required. Full resource name of automl Model.
  149. // Format:
  150. // `projects/{project}/locations/{location}/models/{model}`.
  151. string model = 1 [
  152. (google.api.field_behavior) = REQUIRED,
  153. (google.api.resource_reference) = {
  154. type: "automl.googleapis.com/Model"
  155. }
  156. ];
  157. // Optional. Display name of the model in Vertex AI.
  158. // System will pick a display name if unspecified.
  159. string model_display_name = 2 [(google.api.field_behavior) = OPTIONAL];
  160. }
  161. // Config for migrating Dataset in automl.googleapis.com to Vertex AI's
  162. // Dataset.
  163. message MigrateAutomlDatasetConfig {
  164. // Required. Full resource name of automl Dataset.
  165. // Format:
  166. // `projects/{project}/locations/{location}/datasets/{dataset}`.
  167. string dataset = 1 [
  168. (google.api.field_behavior) = REQUIRED,
  169. (google.api.resource_reference) = {
  170. type: "automl.googleapis.com/Dataset"
  171. }
  172. ];
  173. // Required. Display name of the Dataset in Vertex AI.
  174. // System will pick a display name if unspecified.
  175. string dataset_display_name = 2 [(google.api.field_behavior) = REQUIRED];
  176. }
  177. // Config for migrating Dataset in datalabeling.googleapis.com to Vertex
  178. // AI's Dataset.
  179. message MigrateDataLabelingDatasetConfig {
  180. // Config for migrating AnnotatedDataset in datalabeling.googleapis.com to
  181. // Vertex AI's SavedQuery.
  182. message MigrateDataLabelingAnnotatedDatasetConfig {
  183. // Required. Full resource name of data labeling AnnotatedDataset.
  184. // Format:
  185. // `projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}`.
  186. string annotated_dataset = 1 [
  187. (google.api.field_behavior) = REQUIRED,
  188. (google.api.resource_reference) = {
  189. type: "datalabeling.googleapis.com/AnnotatedDataset"
  190. }
  191. ];
  192. }
  193. // Required. Full resource name of data labeling Dataset.
  194. // Format:
  195. // `projects/{project}/datasets/{dataset}`.
  196. string dataset = 1 [
  197. (google.api.field_behavior) = REQUIRED,
  198. (google.api.resource_reference) = {
  199. type: "datalabeling.googleapis.com/Dataset"
  200. }
  201. ];
  202. // Optional. Display name of the Dataset in Vertex AI.
  203. // System will pick a display name if unspecified.
  204. string dataset_display_name = 2 [(google.api.field_behavior) = OPTIONAL];
  205. // Optional. Configs for migrating AnnotatedDataset in datalabeling.googleapis.com to
  206. // Vertex AI's SavedQuery. The specified AnnotatedDatasets have to belong
  207. // to the datalabeling Dataset.
  208. repeated MigrateDataLabelingAnnotatedDatasetConfig migrate_data_labeling_annotated_dataset_configs = 3 [(google.api.field_behavior) = OPTIONAL];
  209. }
  210. oneof request {
  211. // Config for migrating Version in ml.googleapis.com to Vertex AI's Model.
  212. MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1;
  213. // Config for migrating Model in automl.googleapis.com to Vertex AI's
  214. // Model.
  215. MigrateAutomlModelConfig migrate_automl_model_config = 2;
  216. // Config for migrating Dataset in automl.googleapis.com to Vertex AI's
  217. // Dataset.
  218. MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3;
  219. // Config for migrating Dataset in datalabeling.googleapis.com to
  220. // Vertex AI's Dataset.
  221. MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4;
  222. }
  223. }
  224. // Response message for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1beta1.MigrationService.BatchMigrateResources].
  225. message BatchMigrateResourcesResponse {
  226. // Successfully migrated resources.
  227. repeated MigrateResourceResponse migrate_resource_responses = 1;
  228. }
  229. // Describes a successfully migrated resource.
  230. message MigrateResourceResponse {
  231. // After migration, the resource name in Vertex AI.
  232. oneof migrated_resource {
  233. // Migrated Dataset's resource name.
  234. string dataset = 1 [(google.api.resource_reference) = {
  235. type: "aiplatform.googleapis.com/Dataset"
  236. }];
  237. // Migrated Model's resource name.
  238. string model = 2 [(google.api.resource_reference) = {
  239. type: "aiplatform.googleapis.com/Model"
  240. }];
  241. }
  242. // Before migration, the identifier in ml.googleapis.com,
  243. // automl.googleapis.com or datalabeling.googleapis.com.
  244. MigratableResource migratable_resource = 3;
  245. }
  246. // Runtime operation information for [MigrationService.BatchMigrateResources][google.cloud.aiplatform.v1beta1.MigrationService.BatchMigrateResources].
  247. message BatchMigrateResourcesOperationMetadata {
  248. // Represents a partial result in batch migration operation for one
  249. // [MigrateResourceRequest][google.cloud.aiplatform.v1beta1.MigrateResourceRequest].
  250. message PartialResult {
  251. // If the resource's migration is ongoing, none of the result will be set.
  252. // If the resource's migration is finished, either error or one of the
  253. // migrated resource name will be filled.
  254. oneof result {
  255. // The error result of the migration request in case of failure.
  256. google.rpc.Status error = 2;
  257. // Migrated model resource name.
  258. string model = 3 [(google.api.resource_reference) = {
  259. type: "aiplatform.googleapis.com/Model"
  260. }];
  261. // Migrated dataset resource name.
  262. string dataset = 4 [(google.api.resource_reference) = {
  263. type: "aiplatform.googleapis.com/Dataset"
  264. }];
  265. }
  266. // It's the same as the value in
  267. // [MigrateResourceRequest.migrate_resource_requests][].
  268. MigrateResourceRequest request = 1;
  269. }
  270. // The common part of the operation metadata.
  271. GenericOperationMetadata generic_metadata = 1;
  272. // Partial results that reflect the latest migration operation progress.
  273. repeated PartialResult partial_results = 2;
  274. }