pub struct NetworkProtectRule {
pub comment: Option<String>,
pub ip_protocol: NetworkProtectRuleIpProtocol,
pub source_prefix_list_id: String,
pub destination_ip_address: String,
pub source_ports: Box<NetworkProtectRuleSourcePorts>,
pub destination_ports: Box<NetworkProtectRuleDestinationPorts>,
pub action: NetworkProtectRuleAction,
}Expand description
NetworkProtectRule : One ordered firewall rule. All match fields are optional, but at least one must be provided. The action is required. Rules have no public ID; replacing the list preserves timestamps only when logical fields, comment, and position are unchanged.
Fields§
§comment: Option<String>Optional rule metadata of 1 to 100 Unicode code points. It does not participate in traffic matching. Omit it to leave a rule without a comment; replacing rules with an item that omits it clears the stored comment. Omitting rules on PATCH preserves existing comments. Empty strings and null are rejected.
ip_protocol: NetworkProtectRuleIpProtocol§source_prefix_list_id: StringMatch traffic whose source appears in this prefix list.
destination_ip_address: StringMatch traffic sent to this address; omit for any destination. An address outside a Network using this Rule Set never matches and still consumes one of the 64 rules. The API does not enforce containment in a network prefix; attached Rule Sets require a compatible IP family.
source_ports: Box<NetworkProtectRuleSourcePorts>§destination_ports: Box<NetworkProtectRuleDestinationPorts>§action: NetworkProtectRuleActionImplementations§
Source§impl NetworkProtectRule
impl NetworkProtectRule
Sourcepub fn new(
action: NetworkProtectRuleAction,
ip_protocol: NetworkProtectRuleIpProtocol,
source_prefix_list_id: String,
destination_ip_address: String,
source_ports: NetworkProtectRuleSourcePorts,
destination_ports: NetworkProtectRuleDestinationPorts,
) -> NetworkProtectRule
pub fn new( action: NetworkProtectRuleAction, ip_protocol: NetworkProtectRuleIpProtocol, source_prefix_list_id: String, destination_ip_address: String, source_ports: NetworkProtectRuleSourcePorts, destination_ports: NetworkProtectRuleDestinationPorts, ) -> NetworkProtectRule
One ordered firewall rule. All match fields are optional, but at least one must be provided. The action is required. Rules have no public ID; replacing the list preserves timestamps only when logical fields, comment, and position are unchanged.