'GCP create load balancer via api

I want to create a load balancer (TCP) via a REST API or Python SDK for GCP.

I haven't found any solutions so far.

Example from UI :

enter image description here



Solution 1:[1]

From the API's perspective, there is no "Load Balancer API", just the various compute components that make up a load balancer, such as forwarding rules and url maps.

More details on the APIs for those individual components here: https://cloud.google.com/load-balancing/docs/apis

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dustin Ingram