Note: The following fields are mutually exclusive: allowed, denied. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: allowed, denied. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: allowed, denied. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: denied, allowed. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: denied, allowed. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: denied, allowed. If a field in that set is populated, all other fields in the set will automatically be cleared.
#destination_ip_ranges
defdestination_ip_ranges()->::Array<::String>
Returns
(::Array<::String>) — 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.
value (::Array<::String>) — 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.
Returns
(::Array<::String>) — 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.
(::Array<::String>) — Name of the network protocol service, such as FTP, that is exposed by the
open port. Follows the naming convention available at:
https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.
#exposed_services=
defexposed_services=(value)->::Array<::String>
Parameter
value (::Array<::String>) — Name of the network protocol service, such as FTP, that is exposed by the
open port. Follows the naming convention available at:
https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.
Returns
(::Array<::String>) — Name of the network protocol service, such as FTP, that is exposed by the
open port. Follows the naming convention available at:
https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.
#source_ip_ranges
defsource_ip_ranges()->::Array<::String>
Returns
(::Array<::String>) — 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.
#source_ip_ranges=
defsource_ip_ranges=(value)->::Array<::String>
Parameter
value (::Array<::String>) — 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.
Returns
(::Array<::String>) — 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.
[[["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-09 UTC."],[],[],null,["# Security Command Center V2 API - Class Google::Cloud::SecurityCenter::V2::IpRules (v1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-IpRules)\n- [1.2.0](/ruby/docs/reference/google-cloud-security_center-v2/1.2.0/Google-Cloud-SecurityCenter-V2-IpRules)\n- [1.1.1](/ruby/docs/reference/google-cloud-security_center-v2/1.1.1/Google-Cloud-SecurityCenter-V2-IpRules)\n- [1.0.0](/ruby/docs/reference/google-cloud-security_center-v2/1.0.0/Google-Cloud-SecurityCenter-V2-IpRules)\n- [0.6.0](/ruby/docs/reference/google-cloud-security_center-v2/0.6.0/Google-Cloud-SecurityCenter-V2-IpRules)\n- [0.5.0](/ruby/docs/reference/google-cloud-security_center-v2/0.5.0/Google-Cloud-SecurityCenter-V2-IpRules)\n- [0.4.1](/ruby/docs/reference/google-cloud-security_center-v2/0.4.1/Google-Cloud-SecurityCenter-V2-IpRules)\n- [0.3.0](/ruby/docs/reference/google-cloud-security_center-v2/0.3.0/Google-Cloud-SecurityCenter-V2-IpRules)\n- [0.2.0](/ruby/docs/reference/google-cloud-security_center-v2/0.2.0/Google-Cloud-SecurityCenter-V2-IpRules)\n- [0.1.0](/ruby/docs/reference/google-cloud-security_center-v2/0.1.0/Google-Cloud-SecurityCenter-V2-IpRules) \nReference documentation and code samples for the Security Command Center V2 API class Google::Cloud::SecurityCenter::V2::IpRules.\n\nIP rules associated with the finding. \n\nInherits\n--------\n\n- [Object](./Google-Cloud-SecurityCenter-V2-Kubernetes-Object) \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #allowed\n\n def allowed() -\u003e ::Google::Cloud::SecurityCenter::V2::Allowed\n\n**Returns**\n\n- ([::Google::Cloud::SecurityCenter::V2::Allowed](./Google-Cloud-SecurityCenter-V2-Allowed)) --- Tuple with allowed rules.\n\n\n Note: The following fields are mutually exclusive: `allowed`, `denied`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #allowed=\n\n def allowed=(value) -\u003e ::Google::Cloud::SecurityCenter::V2::Allowed\n\n**Parameter**\n\n- **value** ([::Google::Cloud::SecurityCenter::V2::Allowed](./Google-Cloud-SecurityCenter-V2-Allowed)) --- Tuple with allowed rules.\n\n\nNote: The following fields are mutually exclusive: `allowed`, `denied`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::SecurityCenter::V2::Allowed](./Google-Cloud-SecurityCenter-V2-Allowed)) --- Tuple with allowed rules.\n\n\n Note: The following fields are mutually exclusive: `allowed`, `denied`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #denied\n\n def denied() -\u003e ::Google::Cloud::SecurityCenter::V2::Denied\n\n**Returns**\n\n- ([::Google::Cloud::SecurityCenter::V2::Denied](./Google-Cloud-SecurityCenter-V2-Denied)) --- Tuple with denied rules.\n\n\n Note: The following fields are mutually exclusive: `denied`, `allowed`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #denied=\n\n def denied=(value) -\u003e ::Google::Cloud::SecurityCenter::V2::Denied\n\n**Parameter**\n\n- **value** ([::Google::Cloud::SecurityCenter::V2::Denied](./Google-Cloud-SecurityCenter-V2-Denied)) --- Tuple with denied rules.\n\n\nNote: The following fields are mutually exclusive: `denied`, `allowed`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::SecurityCenter::V2::Denied](./Google-Cloud-SecurityCenter-V2-Denied)) --- Tuple with denied rules.\n\n\n Note: The following fields are mutually exclusive: `denied`, `allowed`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #destination_ip_ranges\n\n def destination_ip_ranges() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- 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.\n\n### #destination_ip_ranges=\n\n def destination_ip_ranges=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- 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. \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- 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.\n\n### #direction\n\n def direction() -\u003e ::Google::Cloud::SecurityCenter::V2::IpRules::Direction\n\n**Returns**\n\n- ([::Google::Cloud::SecurityCenter::V2::IpRules::Direction](./Google-Cloud-SecurityCenter-V2-IpRules-Direction)) --- The direction that the rule is applicable to, one of ingress or egress.\n\n### #direction=\n\n def direction=(value) -\u003e ::Google::Cloud::SecurityCenter::V2::IpRules::Direction\n\n**Parameter**\n\n- **value** ([::Google::Cloud::SecurityCenter::V2::IpRules::Direction](./Google-Cloud-SecurityCenter-V2-IpRules-Direction)) --- The direction that the rule is applicable to, one of ingress or egress. \n**Returns**\n\n- ([::Google::Cloud::SecurityCenter::V2::IpRules::Direction](./Google-Cloud-SecurityCenter-V2-IpRules-Direction)) --- The direction that the rule is applicable to, one of ingress or egress.\n\n### #exposed_services\n\n def exposed_services() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.\n\n### #exposed_services=\n\n def exposed_services=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml. \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.\n\n### #source_ip_ranges\n\n def source_ip_ranges() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- 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.\n\n### #source_ip_ranges=\n\n def source_ip_ranges=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- 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. \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- 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."]]