# Security Command Center V2 API - Class Google::Cloud::SecurityCenter::V2::IpRules (v1.8.0)

1.8.0 (latest) 1.7.1 1.6.0 1.5.1 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.6.0 0.5.0 0.4.1 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Security Command Center V2 API class Google::Cloud::SecurityCenter::V2::IpRules.

IP rules associated with the finding.

## Inherits

- [Object](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-Kubernetes-Object)

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #allowed

    def allowed() -> ::Google::Cloud::SecurityCenter::V2::Allowed

**Returns**

- ([::Google::Cloud::SecurityCenter::V2::Allowed](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-Allowed)) --- Tuple with allowed rules.


  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.

### #allowed=

    def allowed=(value) -> ::Google::Cloud::SecurityCenter::V2::Allowed

**Parameter**

- **value** ([::Google::Cloud::SecurityCenter::V2::Allowed](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-Allowed)) --- Tuple with allowed rules.


  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.
**Returns**

- ([::Google::Cloud::SecurityCenter::V2::Allowed](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-Allowed)) --- Tuple with allowed rules.


  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.

### #denied

    def denied() -> ::Google::Cloud::SecurityCenter::V2::Denied

**Returns**

- ([::Google::Cloud::SecurityCenter::V2::Denied](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-Denied)) --- Tuple with denied rules.


  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.

### #denied=

    def denied=(value) -> ::Google::Cloud::SecurityCenter::V2::Denied

**Parameter**

- **value** ([::Google::Cloud::SecurityCenter::V2::Denied](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-Denied)) --- Tuple with denied rules.


  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.
**Returns**

- ([::Google::Cloud::SecurityCenter::V2::Denied](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-Denied)) --- Tuple with denied rules.


  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

    def destination_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.

### #destination_ip_ranges=

    def destination_ip_ranges=(value) -> ::Array<::String>

**Parameter**

- **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.

### #direction

    def direction() -> ::Google::Cloud::SecurityCenter::V2::IpRules::Direction

**Returns**

- ([::Google::Cloud::SecurityCenter::V2::IpRules::Direction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-IpRules-Direction)) --- The direction that the rule is applicable to, one of ingress or egress.

### #direction=

    def direction=(value) -> ::Google::Cloud::SecurityCenter::V2::IpRules::Direction

**Parameter**

- **value** ([::Google::Cloud::SecurityCenter::V2::IpRules::Direction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-IpRules-Direction)) --- The direction that the rule is applicable to, one of ingress or egress.
**Returns**

- ([::Google::Cloud::SecurityCenter::V2::IpRules::Direction](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Cloud-SecurityCenter-V2-IpRules-Direction)) --- The direction that the rule is applicable to, one of ingress or egress.

### #exposed_services

    def exposed_services() -> ::Array<::String>

**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.

### #exposed_services=

    def exposed_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

    def source_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=

    def source_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.