Reference documentation and code samples for the Google Cloud Network Security V1beta1 Client class Destination.
Specification of traffic destination attributes.
Generated from protobuf message google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
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\V1beta1\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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getPorts
Required. List of destination ports to match. At least one port should match.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setPorts
Required. List of destination ports to match. At least one port should match.
Parameter | |
---|---|
Name | Description |
var |
int[]
|
Returns | |
---|---|
Type | Description |
$this |
getMethods
Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Type | Description |
Google\Cloud\NetworkSecurity\V1beta1\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 | |
---|---|
Name | Description |
var |
Google\Cloud\NetworkSecurity\V1beta1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch
|
Returns | |
---|---|
Type | Description |
$this |