Google Cloud Security Command Center V2 Client - Class IpRules (2.2.1)

Reference documentation and code samples for the Google Cloud Security Command Center V2 Client class IpRules.

IP rules associated with the finding.

Generated from protobuf message google.cloud.securitycenter.v2.IpRules

Namespace

Google \ Cloud \ SecurityCenter \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ direction int

The direction that the rule is applicable to, one of ingress or egress.

↳ allowed Allowed

Tuple with allowed rules.

↳ denied Denied

Tuple with denied rules.

↳ source_ip_ranges array

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.

↳ exposed_services array

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.

getDirection

The direction that the rule is applicable to, one of ingress or egress.

Returns
Type Description
int

setDirection

The direction that the rule is applicable to, one of ingress or egress.

Parameter
Name Description
var int
Returns
Type Description
$this

getAllowed

Tuple with allowed rules.

Returns
Type Description
Allowed|null

hasAllowed

setAllowed

Tuple with allowed rules.

Parameter
Name Description
var Allowed
Returns
Type Description
$this

getDenied

Tuple with denied rules.

Returns
Type Description
Denied|null

hasDenied

setDenied

Tuple with denied rules.

Parameter
Name Description
var Denied
Returns
Type Description
$this

getSourceIpRanges

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
Type Description
Google\Protobuf\Internal\RepeatedField

setSourceIpRanges

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.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setDestinationIpRanges

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.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getExposedServices

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
Type Description
Google\Protobuf\Internal\RepeatedField

setExposedServices

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.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getRules

Returns
Type Description
string