From ecf3eb11ea33aa7eb77ea71a960db305a5dc76a0 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Thu, 10 Aug 2023 01:21:21 -0700 Subject: [PATCH] feat: add fields related to load balancers to API PiperOrigin-RevId: 555407973 --- .../v1/connectivity_test.proto | 35 +++++++++- google/cloud/networkmanagement/v1/trace.proto | 70 +++++++++++++++++++ .../v1beta1/connectivity_test.proto | 32 +++++++++ .../networkmanagement/v1beta1/trace.proto | 54 +++++++++++++- 4 files changed, 187 insertions(+), 4 deletions(-) diff --git a/google/cloud/networkmanagement/v1/connectivity_test.proto b/google/cloud/networkmanagement/v1/connectivity_test.proto index 06d489127e..7bbdef65d3 100644 --- a/google/cloud/networkmanagement/v1/connectivity_test.proto +++ b/google/cloud/networkmanagement/v1/connectivity_test.proto @@ -143,6 +143,25 @@ message Endpoint { NON_GCP_NETWORK = 2; } + // Type of the target of a forwarding rule. + enum ForwardingRuleTarget { + // Forwarding rule target is unknown. + FORWARDING_RULE_TARGET_UNSPECIFIED = 0; + + // Compute Engine instance for protocol forwarding. + INSTANCE = 1; + + // Load Balancer. The specific type can be found from [load_balancer_type] + // [google.cloud.networkmanagement.v1.Endpoint.load_balancer_type]. + LOAD_BALANCER = 2; + + // Classic Cloud VPN Gateway. + VPN_GATEWAY = 3; + + // Forwarding Rule is a Private Service Connect endpoint. + PSC = 4; + } + // Wrapper for Cloud Function attributes. message CloudFunctionEndpoint { // A [Cloud Function](https://cloud.google.com/functions) name. @@ -168,7 +187,8 @@ message Endpoint { // The IP address of the endpoint, which can be an external or internal IP. // An IPv6 address is only allowed when the test's destination is a - // [global load balancer VIP](/load-balancing/docs/load-balancing-overview). + // [global load balancer + // VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview). string ip_address = 1; // The IP protocol port of the endpoint. @@ -186,6 +206,19 @@ message Endpoint { // projects/{project}/regions/{region}/forwardingRules/{id} string forwarding_rule = 13; + // Output only. Specifies the type of the target of the forwarding rule. + optional ForwardingRuleTarget forwarding_rule_target = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the load balancer the forwarding rule points to. Empty + // for forwarding rules not related to load balancers. + optional string load_balancer_id = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of the load balancer the forwarding rule points to. + optional LoadBalancerType load_balancer_type = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // A cluster URI for [Google Kubernetes Engine // master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). string gke_master_cluster = 7; diff --git a/google/cloud/networkmanagement/v1/trace.proto b/google/cloud/networkmanagement/v1/trace.proto index 4e804b7503..df6b495b37 100644 --- a/google/cloud/networkmanagement/v1/trace.proto +++ b/google/cloud/networkmanagement/v1/trace.proto @@ -498,6 +498,9 @@ message LoadBalancerInfo { // Target Pool as the load balancer's backend. TARGET_POOL = 2; + + // Target Instance as the load balancer's backend. + TARGET_INSTANCE = 3; } // Type of the load balancer. @@ -644,6 +647,9 @@ message EndpointInfo { // URI of the network where this packet is sent to. string destination_network_uri = 7; + + // URI of the source telemetry agent this packet originates from. + string source_agent_uri = 8; } // Details of the final state "deliver" and associated resource. @@ -667,6 +673,21 @@ message DeliverInfo { // Target is a Cloud SQL instance. CLOUD_SQL_INSTANCE = 5; + + // Target is a published service that uses [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). + PSC_PUBLISHED_SERVICE = 6; + + // Target is all Google APIs that use [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + PSC_GOOGLE_API = 7; + + // Target is a VPC-SC that uses [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + PSC_VPC_SC = 8; + + // Target is a serverless network endpoint group. + SERVERLESS_NEG = 9; } // Target type where the packet is delivered to. @@ -700,6 +721,9 @@ message ForwardInfo { // Forwarded to a Cloud SQL instance. CLOUD_SQL_INSTANCE = 6; + + // Forwarded to a VPC network in another project. + ANOTHER_PROJECT = 7; } // Target type where this packet is forwarded to. @@ -896,6 +920,13 @@ message DropInfo { // Packet could be dropped because the VPC connector is not in a running // state. VPC_CONNECTOR_NOT_RUNNING = 24; + + // Packet could be dropped because it was sent from a different region + // to a regional forwarding without global access. + FORWARDING_RULE_REGION_MISMATCH = 25; + + // Privte Service Connect (PSC) connection is not in accepted state. + PSC_CONNECTION_NOT_ACCEPTED = 26; } // Cause that the packet is dropped. @@ -999,3 +1030,42 @@ message VpcConnectorInfo { // Location in which the VPC connector is deployed. string location = 3; } + +// Type of a load balancer. For more information, see [Summary of Google Cloud +// load +// balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). +enum LoadBalancerType { + // Forwarding rule points to a different target than a load balancer or a + // load balancer type is unknown. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Global external HTTP(S) load balancer. + HTTPS_ADVANCED_LOAD_BALANCER = 1; + + // Global external HTTP(S) load balancer (classic) + HTTPS_LOAD_BALANCER = 2; + + // Regional external HTTP(S) load balancer. + REGIONAL_HTTPS_LOAD_BALANCER = 3; + + // Internal HTTP(S) load balancer. + INTERNAL_HTTPS_LOAD_BALANCER = 4; + + // External SSL proxy load balancer. + SSL_PROXY_LOAD_BALANCER = 5; + + // External TCP proxy load balancer. + TCP_PROXY_LOAD_BALANCER = 6; + + // Internal regional TCP proxy load balancer. + INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; + + // External TCP/UDP Network load balancer. + NETWORK_LOAD_BALANCER = 8; + + // Target-pool based external TCP/UDP Network load balancer. + LEGACY_NETWORK_LOAD_BALANCER = 9; + + // Internal TCP/UDP load balancer. + TCP_UDP_INTERNAL_LOAD_BALANCER = 10; +} diff --git a/google/cloud/networkmanagement/v1beta1/connectivity_test.proto b/google/cloud/networkmanagement/v1beta1/connectivity_test.proto index 99be1f3369..b565eb3459 100644 --- a/google/cloud/networkmanagement/v1beta1/connectivity_test.proto +++ b/google/cloud/networkmanagement/v1beta1/connectivity_test.proto @@ -143,6 +143,25 @@ message Endpoint { NON_GCP_NETWORK = 2; } + // Type of the target of a forwarding rule. + enum ForwardingRuleTarget { + // Forwarding rule target is unknown. + FORWARDING_RULE_TARGET_UNSPECIFIED = 0; + + // Compute Engine instance for protocol forwarding. + INSTANCE = 1; + + // Load Balancer. The specific type can be found from [load_balancer_type] + // [google.cloud.networkmanagement.v1beta1.Endpoint.load_balancer_type]. + LOAD_BALANCER = 2; + + // Classic Cloud VPN Gateway. + VPN_GATEWAY = 3; + + // Forwarding Rule is a Private Service Connect endpoint. + PSC = 4; + } + // Wrapper for Cloud Function attributes. message CloudFunctionEndpoint { // A [Cloud Function](https://cloud.google.com/functions) name. @@ -187,6 +206,19 @@ message Endpoint { // projects/{project}/regions/{region}/forwardingRules/{id} string forwarding_rule = 13; + // Output only. Specifies the type of the target of the forwarding rule. + optional ForwardingRuleTarget forwarding_rule_target = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the load balancer the forwarding rule points to. Empty + // for forwarding rules not related to load balancers. + optional string load_balancer_id = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of the load balancer the forwarding rule points to. + optional LoadBalancerType load_balancer_type = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // A cluster URI for [Google Kubernetes Engine // master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). string gke_master_cluster = 7; diff --git a/google/cloud/networkmanagement/v1beta1/trace.proto b/google/cloud/networkmanagement/v1beta1/trace.proto index ae84e0a935..4d35855cbd 100644 --- a/google/cloud/networkmanagement/v1beta1/trace.proto +++ b/google/cloud/networkmanagement/v1beta1/trace.proto @@ -498,6 +498,9 @@ message LoadBalancerInfo { // Target Pool as the load balancer's backend. TARGET_POOL = 2; + + // Target Instance as the load balancer's backend. + TARGET_INSTANCE = 3; } // Type of the load balancer. @@ -671,17 +674,20 @@ message DeliverInfo { // Target is a Cloud SQL instance. CLOUD_SQL_INSTANCE = 5; - // Target is a published service using [Private Service + // Target is a published service that uses [Private Service // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). PSC_PUBLISHED_SERVICE = 6; - // Target is all Google APIs using [Private Service + // Target is all Google APIs that use [Private Service // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). PSC_GOOGLE_API = 7; - // Target is VPC-SC using [Private Service + // Target is a VPC-SC that uses [Private Service // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). PSC_VPC_SC = 8; + + // Target is a serverless network endpoint group. + SERVERLESS_NEG = 9; } // Target type where the packet is delivered to. @@ -715,6 +721,9 @@ message ForwardInfo { // Forwarded to a Cloud SQL instance. CLOUD_SQL_INSTANCE = 6; + + // Forwarded to a VPC network in another project. + ANOTHER_PROJECT = 7; } // Target type where this packet is forwarded to. @@ -1021,3 +1030,42 @@ message VpcConnectorInfo { // Location in which the VPC connector is deployed. string location = 3; } + +// Type of a load balancer. For more information, see [Summary of Google Cloud +// load +// balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). +enum LoadBalancerType { + // Forwarding rule points to a different target than a load balancer or a + // load balancer type is unknown. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Global external HTTP(S) load balancer. + HTTPS_ADVANCED_LOAD_BALANCER = 1; + + // Global external HTTP(S) load balancer (classic) + HTTPS_LOAD_BALANCER = 2; + + // Regional external HTTP(S) load balancer. + REGIONAL_HTTPS_LOAD_BALANCER = 3; + + // Internal HTTP(S) load balancer. + INTERNAL_HTTPS_LOAD_BALANCER = 4; + + // External SSL proxy load balancer. + SSL_PROXY_LOAD_BALANCER = 5; + + // External TCP proxy load balancer. + TCP_PROXY_LOAD_BALANCER = 6; + + // Internal regional TCP proxy load balancer. + INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; + + // External TCP/UDP Network load balancer. + NETWORK_LOAD_BALANCER = 8; + + // Target-pool based external TCP/UDP Network load balancer. + LEGACY_NETWORK_LOAD_BALANCER = 9; + + // Internal TCP/UDP load balancer. + TCP_UDP_INTERNAL_LOAD_BALANCER = 10; +}