Skip to content
  • Auto
  • Light
  • Dark

Remove

Remove Forwarding Rules from a Load Balancer
gpu_droplets.load_balancers.forwarding_rules.remove(strlb_id, ForwardingRuleRemoveParams**kwargs)
delete/v2/load_balancers/{lb_id}/forwarding_rules

To remove forwarding rules from a load balancer instance, send a DELETE request to /v2/load_balancers/$LOAD_BALANCER_ID/forwarding_rules. In the body of the request, there should be a forwarding_rules attribute containing an array of rules to be removed.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

ParametersExpand Collapse
lb_id: str
forwarding_rules: Iterable[ForwardingRuleParam]
entry_port: int

An integer representing the port on which the load balancer instance will listen.

entry_protocol: Literal["http", "https", "http2", 3 more]

The protocol used for traffic to the load balancer. The possible values are: http, https, http2, http3, tcp, or udp. If you set the entry_protocol to udp, the target_protocol must be set to udp. When using UDP, the load balancer requires that you set up a health check with a port that uses TCP, HTTP, or HTTPS to work properly.

Accepts one of the following:
"http"
"https"
"http2"
"http3"
"tcp"
"udp"
target_port: int

An integer representing the port on the backend Droplets to which the load balancer will send traffic.

target_protocol: Literal["http", "https", "http2", 2 more]

The protocol used for traffic from the load balancer to the backend Droplets. The possible values are: http, https, http2, tcp, or udp. If you set the target_protocol to udp, the entry_protocol must be set to udp. When using UDP, the load balancer requires that you set up a health check with a port that uses TCP, HTTP, or HTTPS to work properly.

Accepts one of the following:
"http"
"https"
"http2"
"tcp"
"udp"
certificate_id: Optional[str]

The ID of the TLS certificate used for SSL termination if enabled.

tls_passthrough: Optional[bool]

A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets.

Remove Forwarding Rules from a Load Balancer
from gradient import Gradient

client = Gradient()
client.gpu_droplets.load_balancers.forwarding_rules.remove(
    lb_id="4de7ac8b-495b-4884-9a69-1050c6793cd6",
    forwarding_rules=[{
        "entry_port": 443,
        "entry_protocol": "https",
        "target_port": 80,
        "target_protocol": "http",
    }],
)
Returns Examples