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