Reference documentation and code samples for the Google Cloud Recaptcha Enterprise V1 Client class FirewallPolicy.
A FirewallPolicy represents a single matching pattern and resulting actions
to take.
Generated from protobuf message google.cloud.recaptchaenterprise.v1.FirewallPolicy
Namespace
Google \ Cloud \ RecaptchaEnterprise \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Identifier. The resource name for the FirewallPolicy in the format projects/{project}/firewallpolicies/{firewallpolicy}.
↳ description
string
Optional. A description of what this policy aims to achieve, for convenience purposes. The description can at most include 256 UTF-8 characters.
↳ path
string
Optional. The path for which this policy applies, specified as a glob pattern. For more information on glob, see the manual page. A path has a max length of 200 characters.
↳ condition
string
Optional. A CEL (Common Expression Language) conditional expression that specifies if this policy applies to an incoming user request. If this condition evaluates to true and the requested path matched the path pattern, the associated actions should be executed by the caller. The condition string is checked for CEL syntax correctness on creation. For more information, see the CEL spec and its language definition. A condition has a max length of 500 characters.
Optional. The actions that the caller should take regarding user access. There should be at most one terminal action. A terminal action is any action that forces a response, such as AllowAction, BlockAction or SubstituteAction. Zero or more non-terminal actions such as SetHeader might be specified. A single policy can contain up to 16 actions.
getName
Identifier. The resource name for the FirewallPolicy in the format
projects/{project}/firewallpolicies/{firewallpolicy}.
Returns
Type
Description
string
setName
Identifier. The resource name for the FirewallPolicy in the format
projects/{project}/firewallpolicies/{firewallpolicy}.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDescription
Optional. A description of what this policy aims to achieve, for
convenience purposes. The description can at most include 256 UTF-8
characters.
Returns
Type
Description
string
setDescription
Optional. A description of what this policy aims to achieve, for
convenience purposes. The description can at most include 256 UTF-8
characters.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getPath
Optional. The path for which this policy applies, specified as a glob
pattern. For more information on glob, see the manual
page.
A path has a max length of 200 characters.
Returns
Type
Description
string
setPath
Optional. The path for which this policy applies, specified as a glob
pattern. For more information on glob, see the manual
page.
A path has a max length of 200 characters.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getCondition
Optional. A CEL (Common Expression Language) conditional expression that
specifies if this policy applies to an incoming user request. If this
condition evaluates to true and the requested path matched the path
pattern, the associated actions should be executed by the caller. The
condition string is checked for CEL syntax correctness on creation. For
more information, see the CEL spec
and its language
definition.
A condition has a max length of 500 characters.
Returns
Type
Description
string
setCondition
Optional. A CEL (Common Expression Language) conditional expression that
specifies if this policy applies to an incoming user request. If this
condition evaluates to true and the requested path matched the path
pattern, the associated actions should be executed by the caller. The
condition string is checked for CEL syntax correctness on creation. For
more information, see the CEL spec
and its language
definition.
A condition has a max length of 500 characters.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getActions
Optional. The actions that the caller should take regarding user access.
There should be at most one terminal action. A terminal action is any
action that forces a response, such as AllowAction,
BlockAction or SubstituteAction.
Zero or more non-terminal actions such as SetHeader might be
specified. A single policy can contain up to 16 actions.
Optional. The actions that the caller should take regarding user access.
There should be at most one terminal action. A terminal action is any
action that forces a response, such as AllowAction,
BlockAction or SubstituteAction.
Zero or more non-terminal actions such as SetHeader might be
specified. A single policy can contain up to 16 actions.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Google Cloud Recaptcha Enterprise V1 Client - Class FirewallPolicy (2.1.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.3 (latest)](/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallPolicy)\n- [2.1.2](/php/docs/reference/cloud-recaptcha-enterprise/2.1.2/V1.FirewallPolicy)\n- [2.0.1](/php/docs/reference/cloud-recaptcha-enterprise/2.0.1/V1.FirewallPolicy)\n- [1.17.2](/php/docs/reference/cloud-recaptcha-enterprise/1.17.2/V1.FirewallPolicy)\n- [1.16.1](/php/docs/reference/cloud-recaptcha-enterprise/1.16.1/V1.FirewallPolicy)\n- [1.15.0](/php/docs/reference/cloud-recaptcha-enterprise/1.15.0/V1.FirewallPolicy)\n- [1.14.0](/php/docs/reference/cloud-recaptcha-enterprise/1.14.0/V1.FirewallPolicy)\n- [1.13.0](/php/docs/reference/cloud-recaptcha-enterprise/1.13.0/V1.FirewallPolicy)\n- [1.12.2](/php/docs/reference/cloud-recaptcha-enterprise/1.12.2/V1.FirewallPolicy)\n- [1.8.0](/php/docs/reference/cloud-recaptcha-enterprise/1.8.0/V1.FirewallPolicy)\n- [1.7.0](/php/docs/reference/cloud-recaptcha-enterprise/1.7.0/V1.FirewallPolicy)\n- [1.6.0](/php/docs/reference/cloud-recaptcha-enterprise/1.6.0/V1.FirewallPolicy)\n- [1.5.2](/php/docs/reference/cloud-recaptcha-enterprise/1.5.2/V1.FirewallPolicy)\n- [1.4.2](/php/docs/reference/cloud-recaptcha-enterprise/1.4.2/V1.FirewallPolicy)\n- [1.3.2](/php/docs/reference/cloud-recaptcha-enterprise/1.3.2/V1.FirewallPolicy)\n- [1.2.6](/php/docs/reference/cloud-recaptcha-enterprise/1.2.6/V1.FirewallPolicy) \nReference documentation and code samples for the Google Cloud Recaptcha Enterprise V1 Client class FirewallPolicy.\n\nA FirewallPolicy represents a single matching pattern and resulting actions\nto take.\n\nGenerated from protobuf message `google.cloud.recaptchaenterprise.v1.FirewallPolicy`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ RecaptchaEnterprise \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nIdentifier. The resource name for the FirewallPolicy in the format\n`projects/{project}/firewallpolicies/{firewallpolicy}`.\n\n### setName\n\nIdentifier. The resource name for the FirewallPolicy in the format\n`projects/{project}/firewallpolicies/{firewallpolicy}`.\n\n### getDescription\n\nOptional. A description of what this policy aims to achieve, for\nconvenience purposes. The description can at most include 256 UTF-8\ncharacters.\n\n### setDescription\n\nOptional. A description of what this policy aims to achieve, for\nconvenience purposes. The description can at most include 256 UTF-8\ncharacters.\n\n### getPath\n\nOptional. The path for which this policy applies, specified as a glob\npattern. For more information on glob, see the [manual\npage](https://man7.org/linux/man-pages/man7/glob.7.html).\n\nA path has a max length of 200 characters.\n\n### setPath\n\nOptional. The path for which this policy applies, specified as a glob\npattern. For more information on glob, see the [manual\npage](https://man7.org/linux/man-pages/man7/glob.7.html).\n\nA path has a max length of 200 characters.\n\n### getCondition\n\nOptional. A CEL (Common Expression Language) conditional expression that\nspecifies if this policy applies to an incoming user request. If this\ncondition evaluates to true and the requested path matched the path\npattern, the associated actions should be executed by the caller. The\ncondition string is checked for CEL syntax correctness on creation. For\nmore information, see the [CEL spec](https://github.com/google/cel-spec)\nand its [language\ndefinition](https://github.com/google/cel-spec/blob/master/doc/langdef.md).\n\nA condition has a max length of 500 characters.\n\n### setCondition\n\nOptional. A CEL (Common Expression Language) conditional expression that\nspecifies if this policy applies to an incoming user request. If this\ncondition evaluates to true and the requested path matched the path\npattern, the associated actions should be executed by the caller. The\ncondition string is checked for CEL syntax correctness on creation. For\nmore information, see the [CEL spec](https://github.com/google/cel-spec)\nand its [language\ndefinition](https://github.com/google/cel-spec/blob/master/doc/langdef.md).\n\nA condition has a max length of 500 characters.\n\n### getActions\n\nOptional. The actions that the caller should take regarding user access.\n\nThere should be at most one terminal action. A terminal action is any\naction that forces a response, such as `AllowAction`,\n`BlockAction` or `SubstituteAction`.\nZero or more non-terminal actions such as `SetHeader` might be\nspecified. A single policy can contain up to 16 actions.\n\n### setActions\n\nOptional. The actions that the caller should take regarding user access.\n\nThere should be at most one terminal action. A terminal action is any\naction that forces a response, such as `AllowAction`,\n`BlockAction` or `SubstituteAction`.\nZero or more non-terminal actions such as `SetHeader` might be\nspecified. A single policy can contain up to 16 actions."]]