dots.v2.firewalls.byFirewall_id().rules.post()
Generated on 27 Oct 2026
from DoTs version
v1.21.0
Usage
client.v2.firewalls.byFirewall_id(firewall_id).rules.post(body: Firewall_rules, requestConfiguration?: RequestConfiguration<object>): Promise<void>Description
To add additional access rules to a firewall, send a POST request to
/v2/firewalls/{firewall_id}/rules. The body of the request may include an
inbound_rules and/or outbound_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
Path Parameters
firewall_idstring requiredExample:
bb4b2611-3d72-467b-8602-280330ecd65cA unique ID that can be used to identify and reference a firewall.
Request Body
inboundRulesarray of objects or null optionalShow child properties
protocolstring requiredThe type of traffic to be allowed. This may be one of
tcp,udp, oricmp.portsstring requiredExample:
8000The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0".
actionstring optionalThe action to be taken when traffic matches the rule. This may be one of
allowordeny. For backward compatibility, this field is optional. When not set, it defaults toallow.sourcesobject requiredAn object specifying locations from which inbound traffic will be accepted.
outboundRulesarray of objects or null optionalShow child properties
protocolstring requiredThe type of traffic to be allowed. This may be one of
tcp,udp, oricmp.portsstring requiredExample:
8000The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0".
actionstring optionalThe action to be taken when traffic matches the rule. This may be one of
allowordeny. For backward compatibility, this field is optional. When not set, it defaults toallow.destinationsobject requiredAn object specifying locations to which outbound traffic that will be allowed.
Request Sample
More Information
See /v2/firewalls/{firewall_id}/rules in the API reference for additional detail on responses, headers, parameters, and more.