Google Cloud Network Security V1 Client - Class Destination (0.4.1)

Reference documentation and code samples for the Google Cloud Network Security V1 Client class Destination.

Specification of traffic destination attributes.

Generated from protobuf message google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination

Namespace

Google \ Cloud \ NetworkSecurity \ V1 \ AuthorizationPolicy \ Rule

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ hosts array

Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".

↳ ports array

Required. List of destination ports to match. At least one port should match.

↳ methods array

Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.

↳ http_header_match Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch

Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.

getHosts

Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setHosts

Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getPorts

Required. List of destination ports to match. At least one port should match.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setPorts

Required. List of destination ports to match. At least one port should match.

Parameter
NameDescription
var int[]
Returns
TypeDescription
$this

getMethods

Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setMethods

Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getHttpHeaderMatch

Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.

Returns
TypeDescription
Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch|null

hasHttpHeaderMatch

clearHttpHeaderMatch

setHttpHeaderMatch

Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.

Parameter
NameDescription
var Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch
Returns
TypeDescription
$this