public sealed class FirewallPolicyRuleMatcherLayer4Config : IMessage<FirewallPolicyRuleMatcherLayer4Config>, IEquatable<FirewallPolicyRuleMatcherLayer4Config>, IDeepCloneable<FirewallPolicyRuleMatcherLayer4Config>, IBufferMessage, IMessage
The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-08 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eFirewallPolicyRuleMatcherLayer4Config\u003c/code\u003e class within the \u003ccode\u003eGoogle.Cloud.Compute.V1\u003c/code\u003e namespace, covering versions from 1.0.0 up to the latest 3.6.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eFirewallPolicyRuleMatcherLayer4Config\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, which enhance its functionality.\u003c/p\u003e\n"],["\u003cp\u003eThe class has two constructors: a default constructor and a constructor that accepts another \u003ccode\u003eFirewallPolicyRuleMatcherLayer4Config\u003c/code\u003e object for copying.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eFirewallPolicyRuleMatcherLayer4Config\u003c/code\u003e class include \u003ccode\u003eHasIpProtocol\u003c/code\u003e (a boolean), \u003ccode\u003eIpProtocol\u003c/code\u003e (a string specifying the IP protocol), and \u003ccode\u003ePorts\u003c/code\u003e (a list of ports represented as strings).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eIpProtocol\u003c/code\u003e property is required when creating a firewall rule and can be a known protocol string or an IP protocol number, while the \u003ccode\u003ePorts\u003c/code\u003e property is optional and is only applicable for UDP or TCP protocols, allowing for single ports or ranges.\u003c/p\u003e\n"]]],[],null,[]]