Skip to content

Commit 6276461

Browse files
Google APIscopybara-github
authored andcommitted
feat: add DeploymentResourcePool in aiplatform v1beta1 deployment_resource_pool.proto
feat: add DeploymentResourcePoolService in aiplatform v1beta1 deployment_resource_pool_service.proto feat: add SHARED_RESOURCES to DeploymentResourcesType in aiplatform v1beta1 model.proto PiperOrigin-RevId: 463147866
1 parent fbe2cfc commit 6276461

6 files changed

Lines changed: 284 additions & 4 deletions

File tree

google/cloud/aiplatform/v1beta1/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ proto_library(
3535
"dataset_service.proto",
3636
"deployed_index_ref.proto",
3737
"deployed_model_ref.proto",
38+
"deployment_resource_pool.proto",
39+
"deployment_resource_pool_service.proto",
3840
"encryption_spec.proto",
3941
"endpoint.proto",
4042
"endpoint_service.proto",

google/cloud/aiplatform/v1beta1/aiplatform_v1beta1.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: Vertex AI API
55

66
apis:
77
- name: google.cloud.aiplatform.v1beta1.DatasetService
8+
- name: google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService
89
- name: google.cloud.aiplatform.v1beta1.EndpointService
910
- name: google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService
1011
- name: google.cloud.aiplatform.v1beta1.FeaturestoreService
@@ -33,6 +34,7 @@ types:
3334
- name: google.cloud.aiplatform.v1beta1.CheckTrialEarlyStoppingStateMetatdata
3435
- name: google.cloud.aiplatform.v1beta1.CheckTrialEarlyStoppingStateResponse
3536
- name: google.cloud.aiplatform.v1beta1.CreateDatasetOperationMetadata
37+
- name: google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata
3638
- name: google.cloud.aiplatform.v1beta1.CreateEndpointOperationMetadata
3739
- name: google.cloud.aiplatform.v1beta1.CreateEntityTypeOperationMetadata
3840
- name: google.cloud.aiplatform.v1beta1.CreateFeatureOperationMetadata
@@ -73,6 +75,7 @@ types:
7375
- name: google.cloud.aiplatform.v1beta1.UndeployIndexResponse
7476
- name: google.cloud.aiplatform.v1beta1.UndeployModelOperationMetadata
7577
- name: google.cloud.aiplatform.v1beta1.UndeployModelResponse
78+
- name: google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata
7679
- name: google.cloud.aiplatform.v1beta1.UpdateExplanationDatasetOperationMetadata
7780
- name: google.cloud.aiplatform.v1beta1.UpdateExplanationDatasetResponse
7881
- name: google.cloud.aiplatform.v1beta1.UpdateFeaturestoreOperationMetadata
@@ -124,6 +127,8 @@ backend:
124127
rules:
125128
- selector: 'google.cloud.aiplatform.v1beta1.DatasetService.*'
126129
deadline: 60.0
130+
- selector: 'google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.*'
131+
deadline: 30.0
127132
- selector: 'google.cloud.aiplatform.v1beta1.EndpointService.*'
128133
deadline: 60.0
129134
- selector: google.cloud.aiplatform.v1beta1.FeaturestoreOnlineServingService.ReadFeatureValues
@@ -517,6 +522,10 @@ authentication:
517522
oauth:
518523
canonical_scopes: |-
519524
https://www.googleapis.com/auth/cloud-platform
525+
- selector: 'google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService.*'
526+
oauth:
527+
canonical_scopes: |-
528+
https://www.googleapis.com/auth/cloud-platform
520529
- selector: 'google.cloud.aiplatform.v1beta1.EndpointService.*'
521530
oauth:
522531
canonical_scopes: |-
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
15+
syntax = "proto3";
16+
17+
package google.cloud.aiplatform.v1beta1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
import "google/cloud/aiplatform/v1beta1/machine_resources.proto";
22+
import "google/protobuf/timestamp.proto";
23+
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 = "DeploymentResourcePoolProto";
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+
32+
// A description of resources that can be shared by multiple DeployedModels,
33+
// whose underlying specification consists of a DedicatedResources.
34+
message DeploymentResourcePool {
35+
option (google.api.resource) = {
36+
type: "aiplatform.googleapis.com/DeploymentResourcePool"
37+
pattern: "projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}"
38+
};
39+
40+
// Output only. The resource name of the DeploymentResourcePool.
41+
// Format:
42+
// projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
43+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
44+
45+
// Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
46+
DedicatedResources dedicated_resources = 2 [(google.api.field_behavior) = REQUIRED];
47+
48+
// Output only. Timestamp when this DeploymentResourcePool was created.
49+
google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
50+
}
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
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+
15+
syntax = "proto3";
16+
17+
package google.cloud.aiplatform.v1beta1;
18+
19+
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
21+
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
23+
import "google/cloud/aiplatform/v1beta1/deployed_model_ref.proto";
24+
import "google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto";
25+
import "google/cloud/aiplatform/v1beta1/endpoint.proto";
26+
import "google/cloud/aiplatform/v1beta1/operation.proto";
27+
import "google/longrunning/operations.proto";
28+
29+
option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
30+
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
31+
option java_multiple_files = true;
32+
option java_outer_classname = "DeploymentResourcePoolServiceProto";
33+
option java_package = "com.google.cloud.aiplatform.v1beta1";
34+
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
35+
option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
36+
37+
// A service that manages the DeploymentResourcePool resource.
38+
service DeploymentResourcePoolService {
39+
option (google.api.default_host) = "aiplatform.googleapis.com";
40+
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
41+
42+
// Create a DeploymentResourcePool.
43+
rpc CreateDeploymentResourcePool(CreateDeploymentResourcePoolRequest) returns (google.longrunning.Operation) {
44+
option (google.api.http) = {
45+
post: "/v1beta1/{parent=projects/*/locations/*}/deploymentResourcePools"
46+
body: "*"
47+
};
48+
option (google.api.method_signature) = "parent,deployment_resource_pool,deployment_resource_pool_id";
49+
option (google.longrunning.operation_info) = {
50+
response_type: "DeploymentResourcePool"
51+
metadata_type: "CreateDeploymentResourcePoolOperationMetadata"
52+
};
53+
}
54+
55+
// Get a DeploymentResourcePool.
56+
rpc GetDeploymentResourcePool(GetDeploymentResourcePoolRequest) returns (DeploymentResourcePool) {
57+
option (google.api.http) = {
58+
get: "/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*}"
59+
};
60+
option (google.api.method_signature) = "name";
61+
}
62+
63+
// List DeploymentResourcePools in a location.
64+
rpc ListDeploymentResourcePools(ListDeploymentResourcePoolsRequest) returns (ListDeploymentResourcePoolsResponse) {
65+
option (google.api.http) = {
66+
get: "/v1beta1/{parent=projects/*/locations/*}/deploymentResourcePools"
67+
};
68+
option (google.api.method_signature) = "parent";
69+
}
70+
71+
// Delete a DeploymentResourcePool.
72+
rpc DeleteDeploymentResourcePool(DeleteDeploymentResourcePoolRequest) returns (google.longrunning.Operation) {
73+
option (google.api.http) = {
74+
delete: "/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*}"
75+
};
76+
option (google.api.method_signature) = "name";
77+
option (google.longrunning.operation_info) = {
78+
response_type: "google.protobuf.Empty"
79+
metadata_type: "DeleteOperationMetadata"
80+
};
81+
}
82+
83+
// List DeployedModels that have been deployed on this DeploymentResourcePool.
84+
rpc QueryDeployedModels(QueryDeployedModelsRequest) returns (QueryDeployedModelsResponse) {
85+
option (google.api.http) = {
86+
get: "/v1beta1/{deployment_resource_pool=projects/*/locations/*/deploymentResourcePools/*}:queryDeployedModels"
87+
};
88+
option (google.api.method_signature) = "deployment_resource_pool";
89+
}
90+
}
91+
92+
// Request message for CreateDeploymentResourcePool method.
93+
message CreateDeploymentResourcePoolRequest {
94+
// Required. The parent location resource where this DeploymentResourcePool will be
95+
// created. Format: projects/{project}/locations/{location}
96+
string parent = 1 [
97+
(google.api.field_behavior) = REQUIRED,
98+
(google.api.resource_reference) = {
99+
type: "locations.googleapis.com/Location"
100+
}
101+
];
102+
103+
// Required. The DeploymentResourcePool to create.
104+
DeploymentResourcePool deployment_resource_pool = 2 [(google.api.field_behavior) = REQUIRED];
105+
106+
// Required. The ID to use for the DeploymentResourcePool, which
107+
// will become the final component of the DeploymentResourcePool's resource
108+
// name.
109+
//
110+
// The maximum length is 63 characters, and valid characters
111+
// are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
112+
string deployment_resource_pool_id = 3 [(google.api.field_behavior) = REQUIRED];
113+
}
114+
115+
// Runtime operation information for CreateDeploymentResourcePool method.
116+
message CreateDeploymentResourcePoolOperationMetadata {
117+
// The operation generic information.
118+
GenericOperationMetadata generic_metadata = 1;
119+
}
120+
121+
// Request message for GetDeploymentResourcePool method.
122+
message GetDeploymentResourcePoolRequest {
123+
// Required. The name of the DeploymentResourcePool to retrieve.
124+
// Format:
125+
// projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
126+
string name = 1 [
127+
(google.api.field_behavior) = REQUIRED,
128+
(google.api.resource_reference) = {
129+
type: "aiplatform.googleapis.com/DeploymentResourcePool"
130+
}
131+
];
132+
}
133+
134+
// Request message for ListDeploymentResourcePools method.
135+
message ListDeploymentResourcePoolsRequest {
136+
// Required. The parent Location which owns this collection of DeploymentResourcePools.
137+
// Format: projects/{project}/locations/{location}
138+
string parent = 1 [
139+
(google.api.field_behavior) = REQUIRED,
140+
(google.api.resource_reference) = {
141+
child_type: "locations.googleapis.com/Location"
142+
}
143+
];
144+
145+
// The maximum number of DeploymentResourcePools to return. The service may
146+
// return fewer than this value.
147+
int32 page_size = 2;
148+
149+
// A page token, received from a previous `ListDeploymentResourcePools` call.
150+
// Provide this to retrieve the subsequent page.
151+
//
152+
// When paginating, all other parameters provided to
153+
// `ListDeploymentResourcePools` must match the call that provided the page
154+
// token.
155+
string page_token = 3;
156+
}
157+
158+
// Response message for ListDeploymentResourcePools method.
159+
message ListDeploymentResourcePoolsResponse {
160+
// The DeploymentResourcePools from the specified location.
161+
repeated DeploymentResourcePool deployment_resource_pools = 1;
162+
163+
// A token, which can be sent as `page_token` to retrieve the next page.
164+
// If this field is omitted, there are no subsequent pages.
165+
string next_page_token = 2;
166+
}
167+
168+
// Runtime operation information for UpdateDeploymentResourcePool method.
169+
message UpdateDeploymentResourcePoolOperationMetadata {
170+
// The operation generic information.
171+
GenericOperationMetadata generic_metadata = 1;
172+
}
173+
174+
// Request message for DeleteDeploymentResourcePool method.
175+
message DeleteDeploymentResourcePoolRequest {
176+
// Required. The name of the DeploymentResourcePool to delete.
177+
// Format:
178+
// projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
179+
string name = 1 [
180+
(google.api.field_behavior) = REQUIRED,
181+
(google.api.resource_reference) = {
182+
type: "aiplatform.googleapis.com/DeploymentResourcePool"
183+
}
184+
];
185+
}
186+
187+
// Request message for QueryDeployedModels method.
188+
message QueryDeployedModelsRequest {
189+
// Required. The name of the target DeploymentResourcePool to query.
190+
// Format:
191+
// projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
192+
string deployment_resource_pool = 1 [(google.api.field_behavior) = REQUIRED];
193+
194+
// The maximum number of DeployedModels to return. The service may return
195+
// fewer than this value.
196+
int32 page_size = 2;
197+
198+
// A page token, received from a previous `QueryDeployedModels` call.
199+
// Provide this to retrieve the subsequent page.
200+
//
201+
// When paginating, all other parameters provided to
202+
// `QueryDeployedModels` must match the call that provided the page
203+
// token.
204+
string page_token = 3;
205+
}
206+
207+
// Response message for QueryDeployedModels method.
208+
message QueryDeployedModelsResponse {
209+
// DEPRECATED Use deployed_model_refs instead.
210+
repeated DeployedModel deployed_models = 1 [deprecated = true];
211+
212+
// A token, which can be sent as `page_token` to retrieve the next page.
213+
// If this field is omitted, there are no subsequent pages.
214+
string next_page_token = 2;
215+
216+
// References to the DeployedModels that share the specified
217+
// deploymentResourcePool.
218+
repeated DeployedModelRef deployed_model_refs = 3;
219+
}

google/cloud/aiplatform/v1beta1/endpoint.proto

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ option java_outer_classname = "EndpointProto";
3131
option java_package = "com.google.cloud.aiplatform.v1beta1";
3232
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
3333
option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
34-
option (google.api.resource_definition) = {
35-
type: "aiplatform.googleapis.com/DeploymentResourcePool"
36-
pattern: "projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}"
37-
};
3834

3935
// Models are deployed into it, and afterwards Endpoint is called to obtain
4036
// predictions and explanations.

google/cloud/aiplatform/v1beta1/model.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ message Model {
9898
// Resources that to large degree are decided by Vertex AI, and require
9999
// only a modest additional configuration.
100100
AUTOMATIC_RESOURCES = 2;
101+
102+
// Resources that can be shared by multiple [DeployedModels][google.cloud.aiplatform.v1beta1.DeployedModel].
103+
// A pre-configured [DeploymentResourcePool][google.cloud.aiplatform.v1beta1.DeploymentResourcePool] is required.
104+
SHARED_RESOURCES = 3;
101105
}
102106

103107
// The resource name of the Model.

0 commit comments

Comments
 (0)