summaryrefslogtreecommitdiff
path: root/third_party/googleapis/google/cloud/edgecontainer/v1/service.proto
blob: 947ec4b54489f5e054872a8fceb17bcc799e5c74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.edgecontainer.v1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/edgecontainer/v1/resources.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/edgecontainer/v1;edgecontainer";
option java_multiple_files = true;
option java_outer_classname = "ServiceProto";
option java_package = "com.google.cloud.edgecontainer.v1";

// EdgeContainer API provides management of Kubernetes Clusters on Google Edge
// Cloud deployments.
service EdgeContainer {
  option (google.api.default_host) = "edgecontainer.googleapis.com";
  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";

  // Lists Clusters in a given project and location.
  rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=projects/*/locations/*}/clusters"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single Cluster.
  rpc GetCluster(GetClusterRequest) returns (Cluster) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/clusters/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Creates a new Cluster in a given project and location.
  rpc CreateCluster(CreateClusterRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{parent=projects/*/locations/*}/clusters"
      body: "cluster"
    };
    option (google.api.method_signature) = "parent,cluster,cluster_id";
    option (google.longrunning.operation_info) = {
      response_type: "Cluster"
      metadata_type: "OperationMetadata"
    };
  }

  // Updates the parameters of a single Cluster.
  rpc UpdateCluster(UpdateClusterRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      patch: "/v1/{cluster.name=projects/*/locations/*/clusters/*}"
      body: "cluster"
    };
    option (google.api.method_signature) = "cluster,update_mask";
    option (google.longrunning.operation_info) = {
      response_type: "Cluster"
      metadata_type: "OperationMetadata"
    };
  }

  // Deletes a single Cluster.
  rpc DeleteCluster(DeleteClusterRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      delete: "/v1/{name=projects/*/locations/*/clusters/*}"
    };
    option (google.api.method_signature) = "name";
    option (google.longrunning.operation_info) = {
      response_type: "google.protobuf.Empty"
      metadata_type: "OperationMetadata"
    };
  }

  // Generates an access token for a Cluster.
  rpc GenerateAccessToken(GenerateAccessTokenRequest) returns (GenerateAccessTokenResponse) {
    option (google.api.http) = {
      get: "/v1/{cluster=projects/*/locations/*/clusters/*}:generateAccessToken"
    };
    option (google.api.method_signature) = "cluster";
  }

  // Lists NodePools in a given project and location.
  rpc ListNodePools(ListNodePoolsRequest) returns (ListNodePoolsResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single NodePool.
  rpc GetNodePool(GetNodePoolRequest) returns (NodePool) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Creates a new NodePool in a given project and location.
  rpc CreateNodePool(CreateNodePoolRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools"
      body: "node_pool"
    };
    option (google.api.method_signature) = "parent,node_pool,node_pool_id";
    option (google.longrunning.operation_info) = {
      response_type: "NodePool"
      metadata_type: "OperationMetadata"
    };
  }

  // Updates the parameters of a single NodePool.
  rpc UpdateNodePool(UpdateNodePoolRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      patch: "/v1/{node_pool.name=projects/*/locations/*/clusters/*/nodePools/*}"
      body: "node_pool"
    };
    option (google.api.method_signature) = "node_pool,update_mask";
    option (google.longrunning.operation_info) = {
      response_type: "NodePool"
      metadata_type: "OperationMetadata"
    };
  }

  // Deletes a single NodePool.
  rpc DeleteNodePool(DeleteNodePoolRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      delete: "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}"
    };
    option (google.api.method_signature) = "name";
    option (google.longrunning.operation_info) = {
      response_type: "google.protobuf.Empty"
      metadata_type: "OperationMetadata"
    };
  }

  // Lists Machines in a given project and location.
  rpc ListMachines(ListMachinesRequest) returns (ListMachinesResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=projects/*/locations/*}/machines"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single Machine.
  rpc GetMachine(GetMachineRequest) returns (Machine) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/machines/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Lists VPN connections in a given project and location.
  rpc ListVpnConnections(ListVpnConnectionsRequest) returns (ListVpnConnectionsResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=projects/*/locations/*}/vpnConnections"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single VPN connection.
  rpc GetVpnConnection(GetVpnConnectionRequest) returns (VpnConnection) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/vpnConnections/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Creates a new VPN connection in a given project and location.
  rpc CreateVpnConnection(CreateVpnConnectionRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{parent=projects/*/locations/*}/vpnConnections"
      body: "vpn_connection"
    };
    option (google.api.method_signature) = "parent,vpn_connection,vpn_connection_id";
    option (google.longrunning.operation_info) = {
      response_type: "VpnConnection"
      metadata_type: "OperationMetadata"
    };
  }

  // Deletes a single VPN connection.
  rpc DeleteVpnConnection(DeleteVpnConnectionRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      delete: "/v1/{name=projects/*/locations/*/vpnConnections/*}"
    };
    option (google.api.method_signature) = "name";
    option (google.longrunning.operation_info) = {
      response_type: "google.protobuf.Empty"
      metadata_type: "OperationMetadata"
    };
  }
}

// Long-running operation metadata for Edge Container API methods.
message OperationMetadata {
  // The time the operation was created.
  google.protobuf.Timestamp create_time = 1;

  // The time the operation finished running.
  google.protobuf.Timestamp end_time = 2;

  // Server-defined resource path for the target of the operation.
  string target = 3;

  // The verb executed by the operation.
  string verb = 4;

  // Human-readable status of the operation, if any.
  string status_message = 5;

  // Identifies whether the user has requested cancellation of the operation.
  // Operations that have successfully been cancelled have [Operation.error][]
  // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
  // `Code.CANCELLED`.
  bool requested_cancellation = 6;

  // API version used to start the operation.
  string api_version = 7;
}

// Lists clusters in a location.
message ListClustersRequest {
  // Required. The parent location, which owns this collection of clusters.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "edgecontainer.googleapis.com/Cluster"
    }
  ];

  // The maximum number of resources to list.
  int32 page_size = 2;

  // A page token received from previous list request.
  // A page token received from previous list request.
  string page_token = 3;

  // Only resources matching this filter will be listed.
  string filter = 4;

  // Specifies the order in which resources will be listed.
  string order_by = 5;
}

// List of clusters in a location.
message ListClustersResponse {
  // Clusters in the location.
  repeated Cluster clusters = 1;

  // A token to retrieve next page of results.
  string next_page_token = 2;

  // Locations that could not be reached.
  repeated string unreachable = 3;
}

// Gets a cluster.
message GetClusterRequest {
  // Required. The resource name of the cluster.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "edgecontainer.googleapis.com/Cluster"
    }
  ];
}

// Creates a cluster.
message CreateClusterRequest {
  // Required. The parent location where this cluster will be created.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "edgecontainer.googleapis.com/Cluster"
    }
  ];

  // Required. A client-specified unique identifier for the cluster.
  string cluster_id = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The cluster to create.
  Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED];

  // A unique identifier for this request. Restricted to 36 ASCII characters. A
  // random UUID is recommended. This request is only idempotent if
  // `request_id` is provided.
  string request_id = 4;
}

// Updates a cluster.
message UpdateClusterRequest {
  // Field mask is used to specify the fields to be overwritten in the
  // Cluster resource by the update.
  // The fields specified in the update_mask are relative to the resource, not
  // the full request. A field will be overwritten if it is in the mask. If the
  // user does not provide a mask then all fields will be overwritten.
  google.protobuf.FieldMask update_mask = 1;

  // The updated cluster.
  Cluster cluster = 2;

  // A unique identifier for this request. Restricted to 36 ASCII characters.
  // A random UUID is recommended.
  // This request is only idempotent if `request_id` is provided.
  string request_id = 3;
}

// Deletes a cluster.
message DeleteClusterRequest {
  // Required. The resource name of the cluster.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "edgecontainer.googleapis.com/Cluster"
    }
  ];

  // A unique identifier for this request. Restricted to 36 ASCII characters. A
  // random UUID is recommended. This request is only idempotent if
  // `request_id` is provided.
  string request_id = 2;
}

// Generates an access token for a cluster.
message GenerateAccessTokenRequest {
  // Required. The resource name of the cluster.
  string cluster = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "edgecontainer.googleapis.com/Cluster"
    }
  ];
}

// An access token for a cluster.
message GenerateAccessTokenResponse {
  // Output only. Access token to authenticate to k8s api-server.
  string access_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Timestamp at which the token will expire.
  google.protobuf.Timestamp expire_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Lists node pools in a cluster.
message ListNodePoolsRequest {
  // Required. The parent cluster, which owns this collection of node pools.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "edgecontainer.googleapis.com/NodePool"
    }
  ];

  // The maximum number of resources to list.
  int32 page_size = 2;

  // A page token received from previous list request.
  string page_token = 3;

  // Only resources matching this filter will be listed.
  string filter = 4;

  // Specifies the order in which resources will be listed.
  string order_by = 5;
}

// List of node pools in a cluster.
message ListNodePoolsResponse {
  // Node pools in the cluster.
  repeated NodePool node_pools = 1;

  // A token to retrieve next page of results.
  string next_page_token = 2;

  // Locations that could not be reached.
  repeated string unreachable = 3;
}

// Gets a node pool.
message GetNodePoolRequest {
  // Required. The resource name of the node pool.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "edgecontainer.googleapis.com/NodePool"
    }
  ];
}

// Creates a node pool.
message CreateNodePoolRequest {
  // Required. The parent cluster where this node pool will be created.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "edgecontainer.googleapis.com/NodePool"
    }
  ];

  // Required. A client-specified unique identifier for the node pool.
  string node_pool_id = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The node pool to create.
  NodePool node_pool = 3 [(google.api.field_behavior) = REQUIRED];

  // A unique identifier for this request. Restricted to 36 ASCII characters. A
  // random UUID is recommended. This request is only idempotent if
  // `request_id` is provided.
  string request_id = 4;
}

// Updates a node pool.
message UpdateNodePoolRequest {
  // Field mask is used to specify the fields to be overwritten in the
  // NodePool resource by the update.
  // The fields specified in the update_mask are relative to the resource, not
  // the full request. A field will be overwritten if it is in the mask. If the
  // user does not provide a mask then all fields will be overwritten.
  google.protobuf.FieldMask update_mask = 1;

  // The updated node pool.
  NodePool node_pool = 2;

  // A unique identifier for this request. Restricted to 36 ASCII characters. A
  // random UUID is recommended. This request is only idempotent if
  // `request_id` is provided.
  string request_id = 3;
}

// Deletes a node pool.
message DeleteNodePoolRequest {
  // Required. The resource name of the node pool.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "edgecontainer.googleapis.com/NodePool"
    }
  ];

  // A unique identifier for this request. Restricted to 36 ASCII characters. A
  // random UUID is recommended. This request is only idempotent if
  // `request_id` is provided.
  string request_id = 2;
}

// Lists machines in a site.
message ListMachinesRequest {
  // Required. The parent site, which owns this collection of machines.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "edgecontainer.googleapis.com/Machine"
    }
  ];

  // The maximum number of resources to list.
  int32 page_size = 2;

  // A page token received from previous list request.
  string page_token = 3;

  // Only resources matching this filter will be listed.
  string filter = 4;

  // Specifies the order in which resources will be listed.
  string order_by = 5;
}

// List of machines in a site.
message ListMachinesResponse {
  // Machines in the site.
  repeated Machine machines = 1;

  // A token to retrieve next page of results.
  string next_page_token = 2;

  // Locations that could not be reached.
  repeated string unreachable = 3;
}

// Gets a machine.
message GetMachineRequest {
  // Required. The resource name of the machine.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "edgecontainer.googleapis.com/Machine"
    }
  ];
}

// Lists VPN connections.
message ListVpnConnectionsRequest {
  // Required. The parent location, which owns this collection of VPN connections.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "edgecontainer.googleapis.com/VpnConnection"
    }
  ];

  // The maximum number of resources to list.
  int32 page_size = 2;

  // A page token received from previous list request.
  string page_token = 3;

  // Only resources matching this filter will be listed.
  string filter = 4;

  // Specifies the order in which resources will be listed.
  string order_by = 5;
}

// List of VPN connections in a location.
message ListVpnConnectionsResponse {
  // VpnConnections in the location.
  repeated VpnConnection vpn_connections = 1;

  // A token to retrieve next page of results.
  string next_page_token = 2;

  // Locations that could not be reached.
  repeated string unreachable = 3;
}

// Gets a VPN connection.
message GetVpnConnectionRequest {
  // Required. The resource name of the vpn connection.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "edgecontainer.googleapis.com/VpnConnection"
    }
  ];
}

// Creates a VPN connection.
message CreateVpnConnectionRequest {
  // Required. The parent location where this vpn connection will be created.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "edgecontainer.googleapis.com/VpnConnection"
    }
  ];

  // Required. The VPN connection identifier.
  string vpn_connection_id = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The VPN connection to create.
  VpnConnection vpn_connection = 3 [(google.api.field_behavior) = REQUIRED];

  // A unique identifier for this request. Restricted to 36 ASCII characters. A
  // random UUID is recommended. This request is only idempotent if
  // `request_id` is provided.
  string request_id = 4;
}

// Deletes a vpn connection.
message DeleteVpnConnectionRequest {
  // Required. The resource name of the vpn connection.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "edgecontainer.googleapis.com/VpnConnection"
    }
  ];

  // A unique identifier for this request. Restricted to 36 ASCII characters. A
  // random UUID is recommended. This request is only idempotent if
  // `request_id` is provided.
  string request_id = 2;
}