pydo.load_balancers.add_forwarding_rules()
Generated on 8 May 2026
from pydo version
v0.34.0
Usage
client.load_balancers.add_forwarding_rules(
lb_id="4de7ac8b-495b-4884-9a69-1050c6793cd6",
body={
"forwarding_rules": [...],
},
)Description
To add an additional forwarding rule to a load balancer instance, send a POST
request to /v2/load_balancers/{lb_id}/forwarding_rules. In the body
of the request, there should be a forwarding_rules attribute containing an
array of rules to be added.
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.
Parameters
lb_idstring requiredA unique identifier for a load balancer.
forwarding_rulesarray of objects requiredShow child properties
entry_protocolstring requiredThe protocol used for traffic to the load balancer. The possible values are:
http,https,http2,http3,tcp, orudp. If you set theentry_protocoltoudp, thetarget_protocolmust be set toudp. 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.entry_portinteger requiredExample:
443An integer representing the port on which the load balancer instance will listen.
target_protocolstring requiredThe protocol used for traffic from the load balancer to the backend Droplets. The possible values are:
http,https,http2,tcp, orudp. If you set thetarget_protocoltoudp, theentry_protocolmust be set toudp. 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.target_portinteger requiredExample:
80An integer representing the port on the backend Droplets to which the load balancer will send traffic.
certificate_idstring optionalExample:
892071a0-bb95-49bc-8021-3afd67a210bfThe ID of the TLS certificate used for SSL termination if enabled.
tls_passthroughboolean optionalExample:
FalseA boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets.
Request Sample
More Information
See /v2/load_balancers/{lb_id}/forwarding_rules in the API reference for additional detail on responses, headers, parameters, and more.