migration_service.proto 12 KB

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