• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.v1;
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/v1/operation.proto";
24import "google/cloud/aiplatform/v1/persistent_resource.proto";
25import "google/longrunning/operations.proto";
26import "google/protobuf/empty.proto";
27import "google/protobuf/field_mask.proto";
28
29option csharp_namespace = "Google.Cloud.AIPlatform.V1";
30option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb";
31option java_multiple_files = true;
32option java_outer_classname = "PersistentResourceServiceProto";
33option java_package = "com.google.cloud.aiplatform.v1";
34option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
35option ruby_package = "Google::Cloud::AIPlatform::V1";
36
37// A service for managing Vertex AI's machine learning PersistentResource.
38service PersistentResourceService {
39  option (google.api.default_host) = "aiplatform.googleapis.com";
40  option (google.api.oauth_scopes) =
41      "https://www.googleapis.com/auth/cloud-platform";
42
43  // Creates a PersistentResource.
44  rpc CreatePersistentResource(CreatePersistentResourceRequest)
45      returns (google.longrunning.Operation) {
46    option (google.api.http) = {
47      post: "/v1/{parent=projects/*/locations/*}/persistentResources"
48      body: "persistent_resource"
49    };
50    option (google.api.method_signature) =
51        "parent,persistent_resource,persistent_resource_id";
52    option (google.longrunning.operation_info) = {
53      response_type: "PersistentResource"
54      metadata_type: "CreatePersistentResourceOperationMetadata"
55    };
56  }
57
58  // Gets a PersistentResource.
59  rpc GetPersistentResource(GetPersistentResourceRequest)
60      returns (PersistentResource) {
61    option (google.api.http) = {
62      get: "/v1/{name=projects/*/locations/*/persistentResources/*}"
63    };
64    option (google.api.method_signature) = "name";
65  }
66
67  // Lists PersistentResources in a Location.
68  rpc ListPersistentResources(ListPersistentResourcesRequest)
69      returns (ListPersistentResourcesResponse) {
70    option (google.api.http) = {
71      get: "/v1/{parent=projects/*/locations/*}/persistentResources"
72    };
73    option (google.api.method_signature) = "parent";
74  }
75
76  // Deletes a PersistentResource.
77  rpc DeletePersistentResource(DeletePersistentResourceRequest)
78      returns (google.longrunning.Operation) {
79    option (google.api.http) = {
80      delete: "/v1/{name=projects/*/locations/*/persistentResources/*}"
81    };
82    option (google.api.method_signature) = "name";
83    option (google.longrunning.operation_info) = {
84      response_type: "google.protobuf.Empty"
85      metadata_type: "DeleteOperationMetadata"
86    };
87  }
88
89  // Updates a PersistentResource.
90  rpc UpdatePersistentResource(UpdatePersistentResourceRequest)
91      returns (google.longrunning.Operation) {
92    option (google.api.http) = {
93      patch: "/v1/{persistent_resource.name=projects/*/locations/*/persistentResources/*}"
94      body: "persistent_resource"
95    };
96    option (google.api.method_signature) = "persistent_resource,update_mask";
97    option (google.longrunning.operation_info) = {
98      response_type: "PersistentResource"
99      metadata_type: "UpdatePersistentResourceOperationMetadata"
100    };
101  }
102
103  // Reboots a PersistentResource.
104  rpc RebootPersistentResource(RebootPersistentResourceRequest)
105      returns (google.longrunning.Operation) {
106    option (google.api.http) = {
107      post: "/v1/{name=projects/*/locations/*/persistentResources/*}:reboot"
108      body: "*"
109    };
110    option (google.api.method_signature) = "name";
111    option (google.longrunning.operation_info) = {
112      response_type: "PersistentResource"
113      metadata_type: "RebootPersistentResourceOperationMetadata"
114    };
115  }
116}
117
118// Request message for
119// [PersistentResourceService.CreatePersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.CreatePersistentResource].
120message CreatePersistentResourceRequest {
121  // Required. The resource name of the Location to create the
122  // PersistentResource in. Format: `projects/{project}/locations/{location}`
123  string parent = 1 [
124    (google.api.field_behavior) = REQUIRED,
125    (google.api.resource_reference) = {
126      type: "locations.googleapis.com/Location"
127    }
128  ];
129
130  // Required. The PersistentResource to create.
131  PersistentResource persistent_resource = 2
132      [(google.api.field_behavior) = REQUIRED];
133
134  // Required. The ID to use for the PersistentResource, which become the final
135  // component of the PersistentResource's resource name.
136  //
137  // The maximum length is 63 characters, and valid characters
138  // are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
139  string persistent_resource_id = 3 [(google.api.field_behavior) = REQUIRED];
140}
141
142// Details of operations that perform create PersistentResource.
143message CreatePersistentResourceOperationMetadata {
144  // Operation metadata for PersistentResource.
145  GenericOperationMetadata generic_metadata = 1;
146
147  // Progress Message for Create LRO
148  string progress_message = 2;
149}
150
151// Details of operations that perform update PersistentResource.
152message UpdatePersistentResourceOperationMetadata {
153  // Operation metadata for PersistentResource.
154  GenericOperationMetadata generic_metadata = 1;
155
156  // Progress Message for Update LRO
157  string progress_message = 2;
158}
159
160// Details of operations that perform reboot PersistentResource.
161message RebootPersistentResourceOperationMetadata {
162  // Operation metadata for PersistentResource.
163  GenericOperationMetadata generic_metadata = 1;
164
165  // Progress Message for Reboot LRO
166  string progress_message = 2;
167}
168
169// Request message for
170// [PersistentResourceService.GetPersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.GetPersistentResource].
171message GetPersistentResourceRequest {
172  // Required. The name of the PersistentResource resource.
173  // Format:
174  // `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
175  string name = 1 [
176    (google.api.field_behavior) = REQUIRED,
177    (google.api.resource_reference) = {
178      type: "aiplatform.googleapis.com/PersistentResource"
179    }
180  ];
181}
182
183// Request message for [PersistentResourceService.ListPersistentResource][].
184message ListPersistentResourcesRequest {
185  // Required. The resource name of the Location to list the PersistentResources
186  // from. Format: `projects/{project}/locations/{location}`
187  string parent = 1 [
188    (google.api.field_behavior) = REQUIRED,
189    (google.api.resource_reference) = {
190      type: "locations.googleapis.com/Location"
191    }
192  ];
193
194  // Optional. The standard list page size.
195  int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
196
197  // Optional. The standard list page token.
198  // Typically obtained via
199  // [ListPersistentResourceResponse.next_page_token][] of the previous
200  // [PersistentResourceService.ListPersistentResource][] call.
201  string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
202}
203
204// Response message for
205// [PersistentResourceService.ListPersistentResources][google.cloud.aiplatform.v1.PersistentResourceService.ListPersistentResources]
206message ListPersistentResourcesResponse {
207  repeated PersistentResource persistent_resources = 1;
208
209  // A token to retrieve next page of results.
210  // Pass to
211  // [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token]
212  // to obtain that page.
213  string next_page_token = 2;
214}
215
216// Request message for
217// [PersistentResourceService.DeletePersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.DeletePersistentResource].
218message DeletePersistentResourceRequest {
219  // Required. The name of the PersistentResource to be deleted.
220  // Format:
221  // `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
222  string name = 1 [
223    (google.api.field_behavior) = REQUIRED,
224    (google.api.resource_reference) = {
225      type: "aiplatform.googleapis.com/PersistentResource"
226    }
227  ];
228}
229
230// Request message for UpdatePersistentResource method.
231message UpdatePersistentResourceRequest {
232  // Required. The PersistentResource to update.
233  //
234  // The PersistentResource's `name` field is used to identify the
235  // PersistentResource to update. Format:
236  // `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
237  PersistentResource persistent_resource = 1
238      [(google.api.field_behavior) = REQUIRED];
239
240  // Required. Specify the fields to be overwritten in the PersistentResource by
241  // the update method.
242  google.protobuf.FieldMask update_mask = 2
243      [(google.api.field_behavior) = REQUIRED];
244}
245
246// Request message for
247// [PersistentResourceService.RebootPersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.RebootPersistentResource].
248message RebootPersistentResourceRequest {
249  // Required. The name of the PersistentResource resource.
250  // Format:
251  // `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
252  string name = 1 [
253    (google.api.field_behavior) = REQUIRED,
254    (google.api.resource_reference) = {
255      type: "aiplatform.googleapis.com/PersistentResource"
256    }
257  ];
258}
259