If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.
↳ destination_ip_ranges
array
If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.
If source IP ranges are specified, the firewall rule applies only to
traffic that has a source IP address in these ranges. These ranges must be
expressed in CIDR format. Only supports IPv4.
If source IP ranges are specified, the firewall rule applies only to
traffic that has a source IP address in these ranges. These ranges must be
expressed in CIDR format. Only supports IPv4.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getDestinationIpRanges
If destination IP ranges are specified, the firewall rule applies only to
traffic that has a destination IP address in these ranges. These ranges
must be expressed in CIDR format. Only supports IPv4.
If destination IP ranges are specified, the firewall rule applies only to
traffic that has a destination IP address in these ranges. These ranges
must be expressed in CIDR format. Only supports IPv4.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Security Command Center V2 Client - Class IpRules (2.2.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.1 (latest)](/php/docs/reference/cloud-security-center/latest/V2.IpRules)\n- [2.2.0](/php/docs/reference/cloud-security-center/2.2.0/V2.IpRules)\n- [2.1.1](/php/docs/reference/cloud-security-center/2.1.1/V2.IpRules)\n- [2.0.4](/php/docs/reference/cloud-security-center/2.0.4/V2.IpRules)\n- [1.32.0](/php/docs/reference/cloud-security-center/1.32.0/V2.IpRules)\n- [1.31.0](/php/docs/reference/cloud-security-center/1.31.0/V2.IpRules)\n- [1.30.0](/php/docs/reference/cloud-security-center/1.30.0/V2.IpRules)\n- [1.29.0](/php/docs/reference/cloud-security-center/1.29.0/V2.IpRules)\n- [1.28.2](/php/docs/reference/cloud-security-center/1.28.2/V2.IpRules)\n- [1.21.0](/php/docs/reference/cloud-security-center/1.21.0/V2.IpRules)\n- [1.20.2](/php/docs/reference/cloud-security-center/1.20.2/V2.IpRules)\n- [1.19.1](/php/docs/reference/cloud-security-center/1.19.1/V2.IpRules)\n- [1.18.0](/php/docs/reference/cloud-security-center/1.18.0/V2.IpRules)\n- [1.17.0](/php/docs/reference/cloud-security-center/1.17.0/V2.IpRules)\n- [1.16.0](/php/docs/reference/cloud-security-center/1.16.0/V2.IpRules)\n- [1.15.1](/php/docs/reference/cloud-security-center/1.15.1/V2.IpRules)\n- [1.14.2](/php/docs/reference/cloud-security-center/1.14.2/V2.IpRules)\n- [1.13.1](/php/docs/reference/cloud-security-center/1.13.1/V2.IpRules) \nReference documentation and code samples for the Google Cloud Security Command Center V2 Client class IpRules.\n\nIP rules associated with the finding.\n\nGenerated from protobuf message `google.cloud.securitycenter.v2.IpRules`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ SecurityCenter \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getDirection\n\nThe direction that the rule is applicable to, one of ingress or egress.\n\n### setDirection\n\nThe direction that the rule is applicable to, one of ingress or egress.\n\n### getAllowed\n\nTuple with allowed rules.\n\n### hasAllowed\n\n### setAllowed\n\nTuple with allowed rules.\n\n### getDenied\n\nTuple with denied rules.\n\n### hasDenied\n\n### setDenied\n\nTuple with denied rules.\n\n### getSourceIpRanges\n\nIf source IP ranges are specified, the firewall rule applies only to\ntraffic that has a source IP address in these ranges. These ranges must be\nexpressed in CIDR format. Only supports IPv4.\n\n### setSourceIpRanges\n\nIf source IP ranges are specified, the firewall rule applies only to\ntraffic that has a source IP address in these ranges. These ranges must be\nexpressed in CIDR format. Only supports IPv4.\n\n### getDestinationIpRanges\n\nIf destination IP ranges are specified, the firewall rule applies only to\ntraffic that has a destination IP address in these ranges. These ranges\nmust be expressed in CIDR format. Only supports IPv4.\n\n### setDestinationIpRanges\n\nIf destination IP ranges are specified, the firewall rule applies only to\ntraffic that has a destination IP address in these ranges. These ranges\nmust be expressed in CIDR format. Only supports IPv4.\n\n### getExposedServices\n\nName of the network protocol service, such as FTP, that is exposed by the\nopen port. Follows the naming convention available at:\n\u003chttps://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml\u003e.\n\n### setExposedServices\n\nName of the network protocol service, such as FTP, that is exposed by the\nopen port. Follows the naming convention available at:\n\u003chttps://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml\u003e.\n\n### getRules"]]