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.parallelstore.v1beta; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/field_info.proto"; 23import "google/api/resource.proto"; 24import "google/longrunning/operations.proto"; 25import "google/protobuf/empty.proto"; 26import "google/protobuf/field_mask.proto"; 27import "google/protobuf/timestamp.proto"; 28 29option csharp_namespace = "Google.Cloud.Parallelstore.V1Beta"; 30option go_package = "cloud.google.com/go/parallelstore/apiv1beta/parallelstorepb;parallelstorepb"; 31option java_multiple_files = true; 32option java_outer_classname = "ParallelstoreProto"; 33option java_package = "com.google.cloud.parallelstore.v1beta"; 34option php_namespace = "Google\\Cloud\\Parallelstore\\V1beta"; 35option ruby_package = "Google::Cloud::Parallelstore::V1beta"; 36option (google.api.resource_definition) = { 37 type: "compute.googleapis.com/Network" 38 pattern: "projects/{project}/global/networks/{network}" 39}; 40option (google.api.resource_definition) = { 41 type: "compute.googleapis.com/Address" 42 pattern: "projects/{project}/regions/{region}/addresses/{address}" 43}; 44 45// Service describing handlers for resources 46// Configures and manages parallelstore resources. 47// 48// Parallelstore service. 49// 50// The `parallelstore.googleapis.com` service implements the parallelstore API 51// and defines the following resource model for managing instances: 52// * The service works with a collection of cloud projects, named: `/projects/*` 53// * Each project has a collection of available locations, named: `/locations/*` 54// * Each location has a collection of instances named `/instances/*`. 55// * Parallelstore instances are resources of the form: 56// `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 57// 58// Note that location_id must be a Google Cloud `zone`; for example: 59// * `projects/12345/locations/us-central1-c/instances/my-parallelstore-share` 60service Parallelstore { 61 option (google.api.default_host) = "parallelstore.googleapis.com"; 62 option (google.api.oauth_scopes) = 63 "https://www.googleapis.com/auth/cloud-platform"; 64 65 // Lists Instances in a given project and location. 66 rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { 67 option (google.api.http) = { 68 get: "/v1beta/{parent=projects/*/locations/*}/instances" 69 }; 70 option (google.api.method_signature) = "parent"; 71 } 72 73 // Gets details of a single Instance. 74 rpc GetInstance(GetInstanceRequest) returns (Instance) { 75 option (google.api.http) = { 76 get: "/v1beta/{name=projects/*/locations/*/instances/*}" 77 }; 78 option (google.api.method_signature) = "name"; 79 } 80 81 // Creates a Parallelstore instance in a given project and location. 82 rpc CreateInstance(CreateInstanceRequest) 83 returns (google.longrunning.Operation) { 84 option (google.api.http) = { 85 post: "/v1beta/{parent=projects/*/locations/*}/instances" 86 body: "instance" 87 }; 88 option (google.api.method_signature) = "parent,instance,instance_id"; 89 option (google.longrunning.operation_info) = { 90 response_type: "Instance" 91 metadata_type: "OperationMetadata" 92 }; 93 } 94 95 // Updates the parameters of a single Instance. 96 rpc UpdateInstance(UpdateInstanceRequest) 97 returns (google.longrunning.Operation) { 98 option (google.api.http) = { 99 patch: "/v1beta/{instance.name=projects/*/locations/*/instances/*}" 100 body: "instance" 101 }; 102 option (google.api.method_signature) = "instance,update_mask"; 103 option (google.longrunning.operation_info) = { 104 response_type: "Instance" 105 metadata_type: "OperationMetadata" 106 }; 107 } 108 109 // Deletes a single Instance. 110 rpc DeleteInstance(DeleteInstanceRequest) 111 returns (google.longrunning.Operation) { 112 option (google.api.http) = { 113 delete: "/v1beta/{name=projects/*/locations/*/instances/*}" 114 }; 115 option (google.api.method_signature) = "name"; 116 option (google.longrunning.operation_info) = { 117 response_type: "google.protobuf.Empty" 118 metadata_type: "OperationMetadata" 119 }; 120 } 121} 122 123// A Parallelstore instance. 124message Instance { 125 option (google.api.resource) = { 126 type: "parallelstore.googleapis.com/Instance" 127 pattern: "projects/{project}/locations/{location}/instances/{instance}" 128 plural: "instances" 129 singular: "instance" 130 }; 131 132 // Represents the different states of a Parallelstore instance. 133 enum State { 134 // Not set. 135 STATE_UNSPECIFIED = 0; 136 137 // The instance is being created. 138 CREATING = 1; 139 140 // The instance is available for use. 141 ACTIVE = 2; 142 143 // The instance is being deleted. 144 DELETING = 3; 145 146 // The instance is not usable. 147 FAILED = 4; 148 } 149 150 // Identifier. The resource name of the instance, in the format 151 // `projects/{project}/locations/{location}/instances/{instance_id}` 152 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 153 154 // Optional. The description of the instance. 2048 characters or less. 155 string description = 2 [(google.api.field_behavior) = OPTIONAL]; 156 157 // Output only. The instance state. 158 State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 159 160 // Output only. The time when the instance was created. 161 google.protobuf.Timestamp create_time = 4 162 [(google.api.field_behavior) = OUTPUT_ONLY]; 163 164 // Output only. The time when the instance was updated. 165 google.protobuf.Timestamp update_time = 5 166 [(google.api.field_behavior) = OUTPUT_ONLY]; 167 168 // Optional. Cloud Labels are a flexible and lightweight mechanism for 169 // organizing cloud resources into groups that reflect a customer's 170 // organizational needs and deployment strategies. Cloud Labels can be used to 171 // filter collections of resources. They can be used to control how resource 172 // metrics are aggregated. And they can be used as arguments to policy 173 // management rules (e.g. route, firewall, load balancing, etc.). 174 // 175 // * Label keys must be between 1 and 63 characters long and must conform to 176 // the following regular expression: `[a-z][a-z0-9_-]{0,62}`. 177 // * Label values must be between 0 and 63 characters long and must conform 178 // to the regular expression `[a-z0-9_-]{0,63}`. 179 // * No more than 64 labels can be associated with a given resource. 180 // 181 // See https://goo.gl/xmQnxf for more information on and examples of labels. 182 // 183 // If you plan to use labels in your own code, please note that additional 184 // characters may be allowed in the future. Therefore, you are advised to use 185 // an internal label representation, such as JSON, which doesn't rely upon 186 // specific characters being disallowed. For example, representing labels 187 // as the string: name + "_" + value would prove problematic if we were to 188 // allow "_" in a future release. 189 map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL]; 190 191 // Required. Immutable. Storage capacity of Parallelstore instance in 192 // Gibibytes (GiB). 193 int64 capacity_gib = 8 [ 194 (google.api.field_behavior) = IMMUTABLE, 195 (google.api.field_behavior) = REQUIRED 196 ]; 197 198 // Output only. The version of DAOS software running in the instance 199 string daos_version = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 200 201 // Output only. List of access_points. 202 // Contains a list of IPv4 addresses used for client side configuration. 203 repeated string access_points = 10 204 [(google.api.field_behavior) = OUTPUT_ONLY]; 205 206 // Optional. Immutable. The name of the Google Compute Engine 207 // [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the 208 // instance is connected. 209 string network = 11 [ 210 (google.api.field_behavior) = IMMUTABLE, 211 (google.api.field_behavior) = OPTIONAL, 212 (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } 213 ]; 214 215 // Optional. Immutable. Contains the id of allocated IP address range 216 // associated with the private service access connection for example, 217 // "test-default" associated with IP range 10.0.0.0/29. If no range id is 218 // provided all ranges will be considered. 219 string reserved_ip_range = 12 [ 220 (google.api.field_behavior) = IMMUTABLE, 221 (google.api.field_behavior) = OPTIONAL, 222 (google.api.resource_reference) = { type: "compute.googleapis.com/Address" } 223 ]; 224} 225 226// Message for requesting list of Instances 227message ListInstancesRequest { 228 // Required. The project and location for which to retrieve instance 229 // information, in the format `projects/{project_id}/locations/{location}`. 230 // For Parallelstore locations map to Google Cloud zones, for example 231 // **us-central1-a**. 232 // To retrieve instance information for all locations, use "-" for the 233 // `{location}` value. 234 string parent = 1 [ 235 (google.api.field_behavior) = REQUIRED, 236 (google.api.resource_reference) = { 237 child_type: "parallelstore.googleapis.com/Instance" 238 } 239 ]; 240 241 // Optional. Requested page size. Server may return fewer items than 242 // requested. If unspecified, server will pick an appropriate default. 243 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 244 245 // Optional. A token identifying a page of results the server should return. 246 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 247 248 // Optional. Filtering results 249 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 250 251 // Optional. Hint for how to order the results 252 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 253} 254 255// Message for response to listing Instances 256message ListInstancesResponse { 257 // The list of Parallelstore Instances 258 repeated Instance instances = 1; 259 260 // A token identifying a page of results the server should return. 261 string next_page_token = 2; 262 263 // Locations that could not be reached. 264 repeated string unreachable = 3; 265} 266 267// Request to get an instance's details. 268message GetInstanceRequest { 269 // Required. The instance resource name, in the format 270 // `projects/{project_id}/locations/{location}/instances/{instance_id}`. 271 string name = 1 [ 272 (google.api.field_behavior) = REQUIRED, 273 (google.api.resource_reference) = { 274 type: "parallelstore.googleapis.com/Instance" 275 } 276 ]; 277} 278 279// Request for 280// [CreateInstance][google.cloud.parallelstore.v1beta.Parallelstore.CreateInstance] 281message CreateInstanceRequest { 282 // Required. The instance's project and location, in the format 283 // `projects/{project}/locations/{location}`. 284 // Locations map to Google Cloud zones, for example **us-west1-b**. 285 string parent = 1 [ 286 (google.api.field_behavior) = REQUIRED, 287 (google.api.resource_reference) = { 288 child_type: "parallelstore.googleapis.com/Instance" 289 } 290 ]; 291 292 // Required. The logical name of the Parallelstore instance in the user 293 // project with the following restrictions: 294 // 295 // * Must contain only lowercase letters, numbers, and hyphens. 296 // * Must start with a letter. 297 // * Must be between 1-63 characters. 298 // * Must end with a number or a letter. 299 // * Must be unique within the customer project / location 300 string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; 301 302 // Required. The instance to create. 303 Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; 304 305 // Optional. An optional request ID to identify requests. Specify a unique 306 // request ID so that if you must retry your request, the server will know to 307 // ignore the request if it has already been completed. The server will 308 // guarantee that for at least 60 minutes since the first request. 309 // 310 // For example, consider a situation where you make an initial request and t 311 // he request times out. If you make the request again with the same request 312 // ID, the server can check if original operation with the same request ID 313 // was received, and if so, will ignore the second request. This prevents 314 // clients from accidentally creating duplicate commitments. 315 // 316 // The request ID must be a valid UUID with the exception that zero UUID is 317 // not supported (00000000-0000-0000-0000-000000000000). 318 string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 319} 320 321// Message for updating a Instance 322message UpdateInstanceRequest { 323 // Required. Mask of fields to update .Field mask is used to specify the 324 // fields to be overwritten in the Instance resource by the update. At least 325 // one path must be supplied in this field. The fields specified in the 326 // update_mask are relative to the resource, not the full request. 327 google.protobuf.FieldMask update_mask = 1 328 [(google.api.field_behavior) = REQUIRED]; 329 330 // Required. The instance to update 331 Instance instance = 2 [(google.api.field_behavior) = REQUIRED]; 332 333 // Optional. An optional request ID to identify requests. Specify a unique 334 // request ID so that if you must retry your request, the server will know to 335 // ignore the request if it has already been completed. The server will 336 // guarantee that for at least 60 minutes since the first request. 337 // 338 // For example, consider a situation where you make an initial request and t 339 // he request times out. If you make the request again with the same request 340 // ID, the server can check if original operation with the same request ID 341 // was received, and if so, will ignore the second request. This prevents 342 // clients from accidentally creating duplicate commitments. 343 // 344 // The request ID must be a valid UUID with the exception that zero UUID is 345 // not supported (00000000-0000-0000-0000-000000000000). 346 string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; 347} 348 349// Message for deleting a Instance 350message DeleteInstanceRequest { 351 // Required. Name of the resource 352 string name = 1 [ 353 (google.api.field_behavior) = REQUIRED, 354 (google.api.resource_reference) = { 355 type: "parallelstore.googleapis.com/Instance" 356 } 357 ]; 358 359 // Optional. An optional request ID to identify requests. Specify a unique 360 // request ID so that if you must retry your request, the server will know to 361 // ignore the request if it has already been completed. The server will 362 // guarantee that for at least 60 minutes after the first request. 363 // 364 // For example, consider a situation where you make an initial request and t 365 // he request times out. If you make the request again with the same request 366 // ID, the server can check if original operation with the same request ID 367 // was received, and if so, will ignore the second request. This prevents 368 // clients from accidentally creating duplicate commitments. 369 // 370 // The request ID must be a valid UUID with the exception that zero UUID is 371 // not supported (00000000-0000-0000-0000-000000000000). 372 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 373} 374 375// Represents the metadata of the long-running operation. 376message OperationMetadata { 377 // Output only. The time the operation was created. 378 google.protobuf.Timestamp create_time = 1 379 [(google.api.field_behavior) = OUTPUT_ONLY]; 380 381 // Output only. The time the operation finished running. 382 google.protobuf.Timestamp end_time = 2 383 [(google.api.field_behavior) = OUTPUT_ONLY]; 384 385 // Output only. Server-defined resource path for the target of the operation. 386 string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 387 388 // Output only. Name of the verb executed by the operation. 389 string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 390 391 // Output only. Human-readable status of the operation, if any. 392 string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 393 394 // Output only. Identifies whether the user has requested cancellation 395 // of the operation. Operations that have been cancelled successfully 396 // have [Operation.error][] value with a 397 // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to 398 // `Code.CANCELLED`. 399 bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 400 401 // Output only. API version used to start the operation. 402 string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 403} 404