deployment_resource_pool_service.proto 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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/deployed_model_ref.proto";
  21. import "google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto";
  22. import "google/cloud/aiplatform/v1beta1/endpoint.proto";
  23. import "google/cloud/aiplatform/v1beta1/operation.proto";
  24. import "google/longrunning/operations.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 = "DeploymentResourcePoolServiceProto";
  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 that manages the DeploymentResourcePool resource.
  33. service DeploymentResourcePoolService {
  34. option (google.api.default_host) = "aiplatform.googleapis.com";
  35. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  36. // Create a DeploymentResourcePool.
  37. rpc CreateDeploymentResourcePool(CreateDeploymentResourcePoolRequest) returns (google.longrunning.Operation) {
  38. option (google.api.http) = {
  39. post: "/v1beta1/{parent=projects/*/locations/*}/deploymentResourcePools"
  40. body: "*"
  41. };
  42. option (google.api.method_signature) = "parent,deployment_resource_pool,deployment_resource_pool_id";
  43. option (google.longrunning.operation_info) = {
  44. response_type: "DeploymentResourcePool"
  45. metadata_type: "CreateDeploymentResourcePoolOperationMetadata"
  46. };
  47. }
  48. // Get a DeploymentResourcePool.
  49. rpc GetDeploymentResourcePool(GetDeploymentResourcePoolRequest) returns (DeploymentResourcePool) {
  50. option (google.api.http) = {
  51. get: "/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*}"
  52. };
  53. option (google.api.method_signature) = "name";
  54. }
  55. // List DeploymentResourcePools in a location.
  56. rpc ListDeploymentResourcePools(ListDeploymentResourcePoolsRequest) returns (ListDeploymentResourcePoolsResponse) {
  57. option (google.api.http) = {
  58. get: "/v1beta1/{parent=projects/*/locations/*}/deploymentResourcePools"
  59. };
  60. option (google.api.method_signature) = "parent";
  61. }
  62. // Delete a DeploymentResourcePool.
  63. rpc DeleteDeploymentResourcePool(DeleteDeploymentResourcePoolRequest) returns (google.longrunning.Operation) {
  64. option (google.api.http) = {
  65. delete: "/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*}"
  66. };
  67. option (google.api.method_signature) = "name";
  68. option (google.longrunning.operation_info) = {
  69. response_type: "google.protobuf.Empty"
  70. metadata_type: "DeleteOperationMetadata"
  71. };
  72. }
  73. // List DeployedModels that have been deployed on this DeploymentResourcePool.
  74. rpc QueryDeployedModels(QueryDeployedModelsRequest) returns (QueryDeployedModelsResponse) {
  75. option (google.api.http) = {
  76. get: "/v1beta1/{deployment_resource_pool=projects/*/locations/*/deploymentResourcePools/*}:queryDeployedModels"
  77. };
  78. option (google.api.method_signature) = "deployment_resource_pool";
  79. }
  80. }
  81. // Request message for CreateDeploymentResourcePool method.
  82. message CreateDeploymentResourcePoolRequest {
  83. // Required. The parent location resource where this DeploymentResourcePool will be
  84. // created. Format: `projects/{project}/locations/{location}`
  85. string parent = 1 [
  86. (google.api.field_behavior) = REQUIRED,
  87. (google.api.resource_reference) = {
  88. type: "locations.googleapis.com/Location"
  89. }
  90. ];
  91. // Required. The DeploymentResourcePool to create.
  92. DeploymentResourcePool deployment_resource_pool = 2 [(google.api.field_behavior) = REQUIRED];
  93. // Required. The ID to use for the DeploymentResourcePool, which
  94. // will become the final component of the DeploymentResourcePool's resource
  95. // name.
  96. //
  97. // The maximum length is 63 characters, and valid characters
  98. // are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
  99. string deployment_resource_pool_id = 3 [(google.api.field_behavior) = REQUIRED];
  100. }
  101. // Runtime operation information for CreateDeploymentResourcePool method.
  102. message CreateDeploymentResourcePoolOperationMetadata {
  103. // The operation generic information.
  104. GenericOperationMetadata generic_metadata = 1;
  105. }
  106. // Request message for GetDeploymentResourcePool method.
  107. message GetDeploymentResourcePoolRequest {
  108. // Required. The name of the DeploymentResourcePool to retrieve.
  109. // Format:
  110. // `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
  111. string name = 1 [
  112. (google.api.field_behavior) = REQUIRED,
  113. (google.api.resource_reference) = {
  114. type: "aiplatform.googleapis.com/DeploymentResourcePool"
  115. }
  116. ];
  117. }
  118. // Request message for ListDeploymentResourcePools method.
  119. message ListDeploymentResourcePoolsRequest {
  120. // Required. The parent Location which owns this collection of DeploymentResourcePools.
  121. // Format: `projects/{project}/locations/{location}`
  122. string parent = 1 [
  123. (google.api.field_behavior) = REQUIRED,
  124. (google.api.resource_reference) = {
  125. child_type: "locations.googleapis.com/Location"
  126. }
  127. ];
  128. // The maximum number of DeploymentResourcePools to return. The service may
  129. // return fewer than this value.
  130. int32 page_size = 2;
  131. // A page token, received from a previous `ListDeploymentResourcePools` call.
  132. // Provide this to retrieve the subsequent page.
  133. //
  134. // When paginating, all other parameters provided to
  135. // `ListDeploymentResourcePools` must match the call that provided the page
  136. // token.
  137. string page_token = 3;
  138. }
  139. // Response message for ListDeploymentResourcePools method.
  140. message ListDeploymentResourcePoolsResponse {
  141. // The DeploymentResourcePools from the specified location.
  142. repeated DeploymentResourcePool deployment_resource_pools = 1;
  143. // A token, which can be sent as `page_token` to retrieve the next page.
  144. // If this field is omitted, there are no subsequent pages.
  145. string next_page_token = 2;
  146. }
  147. // Runtime operation information for UpdateDeploymentResourcePool method.
  148. message UpdateDeploymentResourcePoolOperationMetadata {
  149. // The operation generic information.
  150. GenericOperationMetadata generic_metadata = 1;
  151. }
  152. // Request message for DeleteDeploymentResourcePool method.
  153. message DeleteDeploymentResourcePoolRequest {
  154. // Required. The name of the DeploymentResourcePool to delete.
  155. // Format:
  156. // `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
  157. string name = 1 [
  158. (google.api.field_behavior) = REQUIRED,
  159. (google.api.resource_reference) = {
  160. type: "aiplatform.googleapis.com/DeploymentResourcePool"
  161. }
  162. ];
  163. }
  164. // Request message for QueryDeployedModels method.
  165. message QueryDeployedModelsRequest {
  166. // Required. The name of the target DeploymentResourcePool to query.
  167. // Format:
  168. // `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
  169. string deployment_resource_pool = 1 [(google.api.field_behavior) = REQUIRED];
  170. // The maximum number of DeployedModels to return. The service may return
  171. // fewer than this value.
  172. int32 page_size = 2;
  173. // A page token, received from a previous `QueryDeployedModels` call.
  174. // Provide this to retrieve the subsequent page.
  175. //
  176. // When paginating, all other parameters provided to
  177. // `QueryDeployedModels` must match the call that provided the page
  178. // token.
  179. string page_token = 3;
  180. }
  181. // Response message for QueryDeployedModels method.
  182. message QueryDeployedModelsResponse {
  183. // DEPRECATED Use deployed_model_refs instead.
  184. repeated DeployedModel deployed_models = 1 [deprecated = true];
  185. // A token, which can be sent as `page_token` to retrieve the next page.
  186. // If this field is omitted, there are no subsequent pages.
  187. string next_page_token = 2;
  188. // References to the DeployedModels that share the specified
  189. // deploymentResourcePool.
  190. repeated DeployedModelRef deployed_model_refs = 3;
  191. // The total number of DeployedModels on this DeploymentResourcePool.
  192. int32 total_deployed_model_count = 4;
  193. // The total number of Endpoints that have DeployedModels on this
  194. // DeploymentResourcePool.
  195. int32 total_endpoint_count = 5;
  196. }