From f9382d1a87f13dcf5804b484bebe7aebcb2e0886 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Thu, 25 Aug 2022 15:46:40 -0700 Subject: [PATCH] feat: Add the edgecontainer v1 api PiperOrigin-RevId: 470102134 --- google/cloud/edgecontainer/v1/BUILD.bazel | 380 +++++++++++ .../v1/edgecontainer_grpc_service_config.json | 36 ++ .../edgecontainer/v1/edgecontainer_v1.yaml | 67 ++ google/cloud/edgecontainer/v1/resources.proto | 449 +++++++++++++ google/cloud/edgecontainer/v1/service.proto | 593 ++++++++++++++++++ 5 files changed, 1525 insertions(+) create mode 100644 google/cloud/edgecontainer/v1/BUILD.bazel create mode 100644 google/cloud/edgecontainer/v1/edgecontainer_grpc_service_config.json create mode 100644 google/cloud/edgecontainer/v1/edgecontainer_v1.yaml create mode 100644 google/cloud/edgecontainer/v1/resources.proto create mode 100644 google/cloud/edgecontainer/v1/service.proto diff --git a/google/cloud/edgecontainer/v1/BUILD.bazel b/google/cloud/edgecontainer/v1/BUILD.bazel new file mode 100644 index 0000000000..65a9527866 --- /dev/null +++ b/google/cloud/edgecontainer/v1/BUILD.bazel @@ -0,0 +1,380 @@ +# This file was automatically generated by BuildFileGenerator +# https://github.com/googleapis/rules_gapic/tree/master/bazel + +# Most of the manual changes to this file will be overwritten. +# It's **only** allowed to change the following rule attribute values: +# - names of *_gapic_assembly_* rules +# - certain parameters of *_gapic_library rules, including but not limited to: +# * extra_protoc_parameters +# * extra_protoc_file_parameters +# The complete list of preserved parameters can be found in the source code. + +# This is an API workspace, having public visibility by default makes perfect sense. +package(default_visibility = ["//visibility:public"]) + +############################################################################## +# Common +############################################################################## +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") + +proto_library( + name = "edgecontainer_proto", + srcs = [ + "resources.proto", + "service.proto", + ], + deps = [ + "//google/api:annotations_proto", + "//google/api:client_proto", + "//google/api:field_behavior_proto", + "//google/api:resource_proto", + "//google/longrunning:operations_proto", + "//google/rpc:status_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +proto_library_with_info( + name = "edgecontainer_proto_with_info", + deps = [ + ":edgecontainer_proto", + "//google/cloud:common_resources_proto", + ], +) + +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + +java_proto_library( + name = "edgecontainer_java_proto", + deps = [":edgecontainer_proto"], +) + +java_grpc_library( + name = "edgecontainer_java_grpc", + srcs = [":edgecontainer_proto"], + deps = [":edgecontainer_java_proto"], +) + +java_gapic_library( + name = "edgecontainer_java_gapic", + srcs = [":edgecontainer_proto_with_info"], + gapic_yaml = None, + grpc_service_config = "edgecontainer_grpc_service_config.json", + service_yaml = None, + test_deps = [ + ":edgecontainer_java_grpc", + ], + transport = "grpc+rest", + deps = [ + ":edgecontainer_java_proto", + "//google/api:api_java_proto", + ], +) + +java_gapic_test( + name = "edgecontainer_java_gapic_test_suite", + test_classes = [ + "com.google.cloud.edgecontainer.v1.EdgeContainerClientHttpJsonTest", + "com.google.cloud.edgecontainer.v1.EdgeContainerClientTest", + ], + runtime_deps = [":edgecontainer_java_gapic_test"], +) + +# Open Source Packages +java_gapic_assembly_gradle_pkg( + name = "google-cloud-edgecontainer-v1-java", + include_samples = True, + transport = "grpc+rest", + deps = [ + ":edgecontainer_java_gapic", + ":edgecontainer_java_grpc", + ":edgecontainer_java_proto", + ":edgecontainer_proto", + ], +) + +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + +go_proto_library( + name = "edgecontainer_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "google.golang.org/genproto/googleapis/cloud/edgecontainer/v1", + protos = [":edgecontainer_proto"], + deps = [ + "//google/api:annotations_go_proto", + "//google/longrunning:longrunning_go_proto", + "//google/rpc:status_go_proto", + ], +) + +go_gapic_library( + name = "edgecontainer_go_gapic", + srcs = [":edgecontainer_proto_with_info"], + grpc_service_config = "edgecontainer_grpc_service_config.json", + importpath = "cloud.google.com/go/edgecontainer/apiv1;edgecontainer", + metadata = True, + service_yaml = None, + transport = "grpc+rest", + deps = [ + ":edgecontainer_go_proto", + "//google/longrunning:longrunning_go_proto", + "@com_google_cloud_go//longrunning:go_default_library", + "@com_google_cloud_go//longrunning/autogen:go_default_library", + ], +) + +go_test( + name = "edgecontainer_go_gapic_test", + srcs = [":edgecontainer_go_gapic_srcjar_test"], + embed = [":edgecontainer_go_gapic"], + importpath = "cloud.google.com/go/edgecontainer/apiv1", +) + +# Open Source Packages +go_gapic_assembly_pkg( + name = "gapi-cloud-edgecontainer-v1-go", + deps = [ + ":edgecontainer_go_gapic", + ":edgecontainer_go_gapic_srcjar-metadata.srcjar", + ":edgecontainer_go_gapic_srcjar-test.srcjar", + ":edgecontainer_go_proto", + ], +) + +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_test", +) + +py_gapic_library( + name = "edgecontainer_py_gapic", + srcs = [":edgecontainer_proto"], + grpc_service_config = "edgecontainer_grpc_service_config.json", + service_yaml = None, + deps = [ + ], +) + +py_test( + name = "edgecontainer_py_gapic_test", + srcs = [ + "edgecontainer_py_gapic_pytest.py", + "edgecontainer_py_gapic_test.py", + ], + legacy_create_init = False, + deps = [":edgecontainer_py_gapic"], +) + +# Open Source Packages +py_gapic_assembly_pkg( + name = "edgecontainer-v1-py", + deps = [ + ":edgecontainer_py_gapic", + ], +) + +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + +php_proto_library( + name = "edgecontainer_php_proto", + deps = [":edgecontainer_proto"], +) + +php_grpc_library( + name = "edgecontainer_php_grpc", + srcs = [":edgecontainer_proto"], + deps = [":edgecontainer_php_proto"], +) + +php_gapic_library( + name = "edgecontainer_php_gapic", + srcs = [":edgecontainer_proto_with_info"], + grpc_service_config = "edgecontainer_grpc_service_config.json", + service_yaml = None, + deps = [ + ":edgecontainer_php_grpc", + ":edgecontainer_php_proto", + ], +) + +# Open Source Packages +php_gapic_assembly_pkg( + name = "google-cloud-edgecontainer-v1-php", + deps = [ + ":edgecontainer_php_gapic", + ":edgecontainer_php_grpc", + ":edgecontainer_php_proto", + ], +) + +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + +nodejs_gapic_library( + name = "edgecontainer_nodejs_gapic", + package_name = "@google-cloud/edgecontainer", + src = ":edgecontainer_proto_with_info", + extra_protoc_parameters = ["metadata"], + grpc_service_config = "edgecontainer_grpc_service_config.json", + package = "google.cloud.edgecontainer.v1", + service_yaml = None, + deps = [], +) + +nodejs_gapic_assembly_pkg( + name = "edgecontainer-v1-nodejs", + deps = [ + ":edgecontainer_nodejs_gapic", + ":edgecontainer_proto", + ], +) + +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_cloud_gapic_library", + "ruby_gapic_assembly_pkg", + "ruby_grpc_library", + "ruby_proto_library", +) + +ruby_proto_library( + name = "edgecontainer_ruby_proto", + deps = [":edgecontainer_proto"], +) + +ruby_grpc_library( + name = "edgecontainer_ruby_grpc", + srcs = [":edgecontainer_proto"], + deps = [":edgecontainer_ruby_proto"], +) + +ruby_cloud_gapic_library( + name = "edgecontainer_ruby_gapic", + srcs = [":edgecontainer_proto_with_info"], + extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-edgecontainer-v1"], + grpc_service_config = "edgecontainer_grpc_service_config.json", + service_yaml = None, + deps = [ + ":edgecontainer_ruby_grpc", + ":edgecontainer_ruby_proto", + ], +) + +# Open Source Packages +ruby_gapic_assembly_pkg( + name = "google-cloud-edgecontainer-v1-ruby", + deps = [ + ":edgecontainer_ruby_gapic", + ":edgecontainer_ruby_grpc", + ":edgecontainer_ruby_proto", + ], +) + +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + +csharp_proto_library( + name = "edgecontainer_csharp_proto", + deps = [":edgecontainer_proto"], +) + +csharp_grpc_library( + name = "edgecontainer_csharp_grpc", + srcs = [":edgecontainer_proto"], + deps = [":edgecontainer_csharp_proto"], +) + +csharp_gapic_library( + name = "edgecontainer_csharp_gapic", + srcs = [":edgecontainer_proto_with_info"], + common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", + grpc_service_config = "edgecontainer_grpc_service_config.json", + service_yaml = None, + deps = [ + ":edgecontainer_csharp_grpc", + ":edgecontainer_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-edgecontainer-v1-csharp", + deps = [ + ":edgecontainer_csharp_gapic", + ":edgecontainer_csharp_grpc", + ":edgecontainer_csharp_proto", + ], +) + +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "edgecontainer_cc_proto", + deps = [":edgecontainer_proto"], +) + +cc_grpc_library( + name = "edgecontainer_cc_grpc", + srcs = [":edgecontainer_proto"], + grpc_only = True, + deps = [":edgecontainer_cc_proto"], +) diff --git a/google/cloud/edgecontainer/v1/edgecontainer_grpc_service_config.json b/google/cloud/edgecontainer/v1/edgecontainer_grpc_service_config.json new file mode 100644 index 0000000000..6a702f359f --- /dev/null +++ b/google/cloud/edgecontainer/v1/edgecontainer_grpc_service_config.json @@ -0,0 +1,36 @@ +{ + "methodConfig": [{ + "name": [ + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "ListClusters" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "GetCluster" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "ListNodePools" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "GetNodePool" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "ListVpnConnections" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "GetVpnConnection" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "ListMachines" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "GetMachine" } + ], + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "1s", + "maxBackoff": "10s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": ["UNAVAILABLE"] + } + }, + { + "name": [ + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "CreateCluster" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "UpdateCluster" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "DeleteCluster" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "CreateNodePool" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "UpdateNodePool" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "DeleteNodePool" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "CreateVpnConnection" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "DeleteVpnConnection" }, + { "service": "google.cloud.edgecontainer.v1.EdgeContainer", "method": "GenerateAccessToken" } + ], + "timeout": "60s" + }] +} \ No newline at end of file diff --git a/google/cloud/edgecontainer/v1/edgecontainer_v1.yaml b/google/cloud/edgecontainer/v1/edgecontainer_v1.yaml new file mode 100644 index 0000000000..1a98c93ba0 --- /dev/null +++ b/google/cloud/edgecontainer/v1/edgecontainer_v1.yaml @@ -0,0 +1,67 @@ +type: google.api.Service +config_version: 3 +name: edgecontainer.googleapis.com +title: Distributed Cloud Edge Container API + +apis: +- name: google.cloud.edgecontainer.v1.EdgeContainer +- name: google.cloud.location.Locations +- name: google.longrunning.Operations + +types: +- name: google.cloud.edgecontainer.v1.LocationMetadata +- name: google.cloud.edgecontainer.v1.OperationMetadata + +documentation: + rules: + - selector: google.cloud.location.Locations.GetLocation + description: Gets information about a location. + + - selector: google.cloud.location.Locations.ListLocations + description: Lists information about the supported locations for this service. + +backend: + rules: + - selector: 'google.cloud.edgecontainer.v1.EdgeContainer.*' + deadline: 60.0 + - selector: google.cloud.location.Locations.GetLocation + deadline: 60.0 + - selector: google.cloud.location.Locations.ListLocations + deadline: 60.0 + - selector: 'google.longrunning.Operations.*' + deadline: 60.0 + +http: + rules: + - selector: google.cloud.location.Locations.GetLocation + get: '/v1/{name=projects/*/locations/*}' + - selector: google.cloud.location.Locations.ListLocations + get: '/v1/{name=projects/*}/locations' + - selector: google.longrunning.Operations.CancelOperation + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel' + body: '*' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.GetOperation + get: '/v1/{name=projects/*/locations/*/operations/*}' + - selector: google.longrunning.Operations.ListOperations + get: '/v1/{name=projects/*/locations/*}/operations' + +authentication: + rules: + - selector: 'google.cloud.edgecontainer.v1.EdgeContainer.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.location.Locations.GetLocation + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.location.Locations.ListLocations + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/edgecontainer/v1/resources.proto b/google/cloud/edgecontainer/v1/resources.proto new file mode 100644 index 0000000000..74560de25d --- /dev/null +++ b/google/cloud/edgecontainer/v1/resources.proto @@ -0,0 +1,449 @@ +// 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/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/edgecontainer/v1;edgecontainer"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.cloud.edgecontainer.v1"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" +}; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" +}; + +// Represents the accessibility state of a customer-managed KMS key used for +// CMEK integration. +enum KmsKeyState { + // Unspecified. + KMS_KEY_STATE_UNSPECIFIED = 0; + + // The key is available for use, and dependent resources should be accessible. + KMS_KEY_STATE_KEY_AVAILABLE = 1; + + // The key is unavailable for an unspecified reason. Dependent resources may + // be inaccessible. + KMS_KEY_STATE_KEY_UNAVAILABLE = 2; +} + +// A Google Distributed Cloud Edge Kubernetes cluster. +message Cluster { + option (google.api.resource) = { + type: "edgecontainer.googleapis.com/Cluster" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}" + }; + + // Required. The resource name of the cluster. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgecontainer.googleapis.com/Cluster" + } + ]; + + // Output only. The time when the cluster was created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the cluster was last updated. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels associated with this resource. + map labels = 4; + + // Optional. Fleet configuration. + Fleet fleet = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Cluster-wide networking configuration. + ClusterNetworking networking = 7 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. RBAC policy that will be applied and managed by GEC. + Authorization authorization = 9 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The default maximum number of pods per node used if a maximum value is not + // specified explicitly for a node pool in this cluster. If unspecified, the + // Kubernetes default value will be used. + int32 default_max_pods_per_node = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP address of the Kubernetes API server. + string endpoint = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The PEM-encoded public certificate of the cluster's CA. + string cluster_ca_certificate = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Cluster-wide maintenance policy configuration. + MaintenancePolicy maintenance_policy = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The control plane release version + string control_plane_version = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The lowest release version among all worker nodes. This field can be empty + // if the cluster does not have any worker nodes. + string node_version = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Cluster-wide networking configuration. +message ClusterNetworking { + // Required. All pods in the cluster are assigned an RFC1918 IPv4 address from these + // blocks. Only a single block is supported. This field cannot be changed + // after creation. + repeated string cluster_ipv4_cidr_blocks = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. All services in the cluster are assigned an RFC1918 IPv4 address from these + // blocks. Only a single block is supported. This field cannot be changed + // after creation. + repeated string services_ipv4_cidr_blocks = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Fleet related configuration. +// +// Fleets are a Google Cloud concept for logically organizing clusters, +// letting you use and manage multi-cluster capabilities and apply +// consistent policies across your systems. +message Fleet { + // Required. The name of the Fleet host project where this cluster will be registered. + // + // Project names are formatted as + // `projects/`. + string project = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The name of the managed Hub Membership resource associated to this cluster. + // + // Membership names are formatted as + // `projects//locations/global/membership/`. + string membership = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A user principal for an RBAC policy. +message ClusterUser { + // Required. An active Google username. + string username = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// RBAC policy that will be applied and managed by GEC. +message Authorization { + // Required. User that will be granted the cluster-admin role on the cluster, providing + // full access to the cluster. Currently, this is a singular field, but will + // be expanded to allow multiple admins in the future. + ClusterUser admin_users = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A set of Kubernetes nodes in a cluster with common configuration and +// specification. +message NodePool { + option (google.api.resource) = { + type: "edgecontainer.googleapis.com/NodePool" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}" + }; + + // Configuration for CMEK support for edge machine local disk encryption. + message LocalDiskEncryption { + // Immutable. The Cloud KMS CryptoKey e.g. + // projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey} + // to use for protecting node local disks. If not specified, a + // Google-managed key will be used instead. + string kms_key = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; + + // Output only. The Cloud KMS CryptoKeyVersion currently in use for protecting node local + // disks. Only applicable if kms_key is set. + string kms_key_active_version = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + } + ]; + + // Output only. Availability of the Cloud KMS CryptoKey. If not `KEY_AVAILABLE`, then + // nodes may go offline as they cannot access their local data. This can be + // caused by a lack of permissions to use the key, or if the key is disabled + // or deleted. + KmsKeyState kms_key_state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error status returned by Cloud KMS when using this key. This field may be + // populated only if `kms_key_state` is not `KMS_KEY_STATE_KEY_AVAILABLE`. + // If populated, this field contains the error status reported by Cloud KMS. + google.rpc.Status kms_status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // 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" + } + ]; + + // Output only. The time when the node pool was created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the node pool was last updated. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels associated with this resource. + map labels = 4; + + // Name of the Google Distributed Cloud Edge zone where this node pool will be + // created. For example: `us-central1-edge-customer-a`. + string node_location = 8; + + // Required. The number of nodes in the pool. + int32 node_count = 6 [(google.api.field_behavior) = REQUIRED]; + + // Only machines matching this filter will be allowed to join the node pool. + // The filtering language accepts strings like "name=", and is + // documented in more detail in [AIP-160](https://google.aip.dev/160). + string machine_filter = 7; + + // Optional. Local disk encryption options. This field is only used when enabling CMEK + // support. + LocalDiskEncryption local_disk_encryption = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The lowest release version among all worker nodes. + string node_version = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A Google Distributed Cloud Edge machine capable of acting as a Kubernetes +// node. +message Machine { + option (google.api.resource) = { + type: "edgecontainer.googleapis.com/Machine" + pattern: "projects/{project}/locations/{location}/machines/{machine}" + }; + + // Required. The resource name of the machine. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgecontainer.googleapis.com/Machine" + } + ]; + + // Output only. The time when the node pool was created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the node pool was last updated. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels associated with this resource. + map labels = 4; + + // Canonical resource name of the node that this machine is responsible for + // hosting e.g. + // projects/{project}/locations/{location}/clusters/{cluster_id}/nodePools/{pool_id}/{node}, + // Or empty if the machine is not assigned to assume the role of a node. + string hosted_node = 5; + + // The Google Distributed Cloud Edge zone of this machine. + string zone = 6; + + // Output only. The software version of the machine. + string version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A VPN connection . +message VpnConnection { + option (google.api.resource) = { + type: "edgecontainer.googleapis.com/VpnConnection" + pattern: "projects/{project}/locations/{location}/vpnConnections/{vpn_connection}" + }; + + // Project detail of the VPC network. + message VpcProject { + // The project of the VPC to connect to. If not specified, it is the same as + // the cluster project. + string project_id = 1; + + // The service account in the VPC project configured by user. It is used to + // create/delete Cloud Router and Cloud HA VPNs for VPN connection. If this + // SA is changed during/after a VPN connection is created, you need to + // remove the Cloud Router and Cloud VPN resources in |project_id|. Must be + // set if |project_id| is set. + string service_account = 2; + } + + // The created connection details. + message Details { + // The Cloud Router info. + message CloudRouter { + // The created Cloud Router name. + string name = 1; + } + + // The Cloud VPN info. + message CloudVpn { + // The created Cloud VPN gateway name. + string gateway = 1; + } + + // The current connection state. + enum State { + // Unknown. + STATE_UNSPECIFIED = 0; + + // Connected. + STATE_CONNECTED = 1; + + // Still connecting. + STATE_CONNECTING = 2; + + // Error occurred. + STATE_ERROR = 3; + } + + // The state of this connection. + State state = 1; + + // The error message. This is only populated when state=ERROR. + string error = 2; + + // The Cloud Router info. + CloudRouter cloud_router = 3; + + // Each connection has multiple Cloud VPN gateways. + repeated CloudVpn cloud_vpns = 4; + } + + // Routing mode. + enum BgpRoutingMode { + // Unknown. + BGP_ROUTING_MODE_UNSPECIFIED = 0; + + // Regional mode. + REGIONAL = 1; + + // Global mode. + GLOBAL = 2; + } + + // Required. The resource name of VPN connection + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgecontainer.googleapis.com/VpnConnection" + } + ]; + + // Output only. The time when the VPN connection was created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the VPN connection was last updated. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels associated with this resource. + map labels = 4; + + // NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the + // customer needs to configure NAT such that only one external IP maps to the + // GMEC Anthos cluster. This is empty if NAT is not used. + string nat_gateway_ip = 5; + + // Dynamic routing mode of the VPC network, `regional` or `global`. + BgpRoutingMode bgp_routing_mode = 6 [deprecated = true]; + + // The canonical Cluster name to connect to. It is in the form of + // projects/{project}/locations/{location}/clusters/{cluster}. + string cluster = 7 [(google.api.resource_reference) = { + type: "edgecontainer.googleapis.com/Cluster" + }]; + + // The network ID of VPC to connect to. + string vpc = 8; + + // Project detail of the VPC network. Required if VPC is in a different + // project than the cluster project. + VpcProject vpc_project = 11; + + // Whether this VPN connection has HA enabled on cluster side. If enabled, + // when creating VPN connection we will attempt to use 2 ANG floating IPs. + bool enable_high_availability = 9; + + // Output only. The created connection details. + Details details = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Metadata for a given [google.cloud.location.Location][google.cloud.location.Location]. +message LocationMetadata { + // The set of available Google Distributed Cloud Edge zones in the location. + // The map is keyed by the lowercase ID of each zone. + map available_zones = 1; +} + +// A Google Distributed Cloud Edge zone where edge machines are located. +message ZoneMetadata { + // Quota for resources in this zone. + repeated Quota quota = 1; +} + +// Represents quota for Edge Container resources. +message Quota { + // Name of the quota metric. + string metric = 1; + + // Quota limit for this metric. + double limit = 2; + + // Current usage of this metric. + double usage = 3; +} + +// Maintenance policy configuration. +message MaintenancePolicy { + // Specifies the maintenance window in which maintenance may be performed. + MaintenanceWindow window = 1; +} + +// Maintenance window configuration +message MaintenanceWindow { + // Configuration of a recurring maintenance window. + RecurringTimeWindow recurring_window = 1; +} + +// Represents an arbitrary window of time that recurs. +message RecurringTimeWindow { + // The window of the first recurrence. + TimeWindow window = 1; + + // An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how + // this window recurs. They go on for the span of time between the start and + // end time. + string recurrence = 2; +} + +// Represents an arbitrary window of time. +message TimeWindow { + // The time that the window first starts. + google.protobuf.Timestamp start_time = 1; + + // The time that the window ends. The end time must take place after the + // start time. + google.protobuf.Timestamp end_time = 2; +} diff --git a/google/cloud/edgecontainer/v1/service.proto b/google/cloud/edgecontainer/v1/service.proto new file mode 100644 index 0000000000..947ec4b544 --- /dev/null +++ b/google/cloud/edgecontainer/v1/service.proto @@ -0,0 +1,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; +}