Google Cloud Network Security V1beta1 Client - Class Rule (0.4.1)

Reference documentation and code samples for the Google Cloud Network Security V1beta1 Client class Rule.

Specification of rules.

Generated from protobuf message google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule

Namespace

Google \ Cloud \ NetworkSecurity \ V1beta1 \ AuthorizationPolicy

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ sources array<Google\Cloud\NetworkSecurity\V1beta1\AuthorizationPolicy\Rule\Source>

Optional. List of attributes for the traffic source. All of the sources must match. A source is a match if both principals and ip_blocks match. If not set, the action specified in the 'action' field will be applied without any rule checks for the source.

↳ destinations array<Google\Cloud\NetworkSecurity\V1beta1\AuthorizationPolicy\Rule\Destination>

Optional. List of attributes for the traffic destination. All of the destinations must match. A destination is a match if a request matches all the specified hosts, ports, methods and headers. If not set, the action specified in the 'action' field will be applied without any rule checks for the destination.

getSources

Optional. List of attributes for the traffic source. All of the sources must match. A source is a match if both principals and ip_blocks match.

If not set, the action specified in the 'action' field will be applied without any rule checks for the source.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setSources

Optional. List of attributes for the traffic source. All of the sources must match. A source is a match if both principals and ip_blocks match.

If not set, the action specified in the 'action' field will be applied without any rule checks for the source.

Parameter
NameDescription
var array<Google\Cloud\NetworkSecurity\V1beta1\AuthorizationPolicy\Rule\Source>
Returns
TypeDescription
$this

getDestinations

Optional. List of attributes for the traffic destination. All of the destinations must match. A destination is a match if a request matches all the specified hosts, ports, methods and headers. If not set, the action specified in the 'action' field will be applied without any rule checks for the destination.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDestinations

Optional. List of attributes for the traffic destination. All of the destinations must match. A destination is a match if a request matches all the specified hosts, ports, methods and headers. If not set, the action specified in the 'action' field will be applied without any rule checks for the destination.

Parameter
NameDescription
var array<Google\Cloud\NetworkSecurity\V1beta1\AuthorizationPolicy\Rule\Destination>
Returns
TypeDescription
$this