Reference documentation and code samples for the Google Cloud Network Security V1 Client class RequestOperation.
Describes properties of one or more targets of a request.
Generated from protobuf message google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation
Namespace
Google \ Cloud \ NetworkSecurity \ V1 \ AuthzPolicy \ AuthzRule \ ToMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ header_set |
RequestOperation\HeaderSet
Optional. A list of headers to match against in http header. |
↳ hosts |
array<Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch>
Optional. A list of HTTP Hosts to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 10 hosts per Authorization Policy. |
↳ paths |
array<Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch>
Optional. A list of paths to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 10 paths per Authorization Policy. Note that this path match includes the query parameters. For gRPC services, this should be a fully-qualified name of the form /package.service/method. |
↳ methods |
string[]
Optional. A list of HTTP methods to match against. Each entry must be a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, OPTIONS). It only allows exact match and is always case sensitive. Limited to 10 methods per Authorization Policy. |
↳ mcp |
RequestOperation\MCP
Optional. Defines the MCP protocol attributes to match on. If the MCP payload in the request body cannot be successfully parsed, the request will be denied. This field can be set only for AuthzPolicies targeting AgentGateway resources. |
getHeaderSet
Optional. A list of headers to match against in http header.
| Returns | |
|---|---|
| Type | Description |
RequestOperation\HeaderSet|null |
|
hasHeaderSet
clearHeaderSet
setHeaderSet
Optional. A list of headers to match against in http header.
| Parameter | |
|---|---|
| Name | Description |
var |
RequestOperation\HeaderSet
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getHosts
Optional. A list of HTTP Hosts to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 10 hosts per Authorization Policy.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch> |
|
setHosts
Optional. A list of HTTP Hosts to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 10 hosts per Authorization Policy.
| Parameter | |
|---|---|
| Name | Description |
var |
array<Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPaths
Optional. A list of paths to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 10 paths per Authorization Policy.
Note that this path match includes the query parameters. For gRPC services, this should be a fully-qualified name of the form /package.service/method.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch> |
|
setPaths
Optional. A list of paths to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 10 paths per Authorization Policy.
Note that this path match includes the query parameters. For gRPC services, this should be a fully-qualified name of the form /package.service/method.
| Parameter | |
|---|---|
| Name | Description |
var |
array<Google\Cloud\NetworkSecurity\V1\AuthzPolicy\AuthzRule\StringMatch>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMethods
Optional. A list of HTTP methods to match against. Each entry must be a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, OPTIONS). It only allows exact match and is always case sensitive.
Limited to 10 methods per Authorization Policy.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<string> |
|
setMethods
Optional. A list of HTTP methods to match against. Each entry must be a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, OPTIONS). It only allows exact match and is always case sensitive.
Limited to 10 methods per Authorization Policy.
| Parameter | |
|---|---|
| Name | Description |
var |
string[]
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMcp
Optional. Defines the MCP protocol attributes to match on. If the MCP payload in the request body cannot be successfully parsed, the request will be denied. This field can be set only for AuthzPolicies targeting AgentGateway resources.
| Returns | |
|---|---|
| Type | Description |
RequestOperation\MCP|null |
|
hasMcp
clearMcp
setMcp
Optional. Defines the MCP protocol attributes to match on. If the MCP payload in the request body cannot be successfully parsed, the request will be denied. This field can be set only for AuthzPolicies targeting AgentGateway resources.
| Parameter | |
|---|---|
| Name | Description |
var |
RequestOperation\MCP
|
| Returns | |
|---|---|
| Type | Description |
$this |
|