Reference documentation and code samples for the Google Cloud Network Security V1 Client class AuthorizationPolicy.
AuthorizationPolicy is a resource that specifies how a server
should authorize incoming connections. This resource in itself does
not change the configuration unless it's attached to a target https
proxy or endpoint config selector resource.
Generated from protobuf messagegoogle.cloud.networksecurity.v1.AuthorizationPolicy
Namespace
Google \ Cloud \ NetworkSecurity \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Required. Name of the AuthorizationPolicy resource. It matches patternprojects/{project}/locations/{location}/authorizationPolicies/<authorization_policy>.
Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in theactionfield will be applied on every request.
getName
Required. Name of the AuthorizationPolicy resource. It matches patternprojects/{project}/locations/{location}/authorizationPolicies/<authorization_policy>.
Returns
Type
Description
string
setName
Required. Name of the AuthorizationPolicy resource. It matches patternprojects/{project}/locations/{location}/authorizationPolicies/<authorization_policy>.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDescription
Optional. Free-text description of the resource.
Returns
Type
Description
string
setDescription
Optional. Free-text description of the resource.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getCreateTime
Output only. The timestamp when the resource was created.
Required. The action to take when a rule match is found. Possible values
are "ALLOW" or "DENY".
Returns
Type
Description
int
setAction
Required. The action to take when a rule match is found. Possible values
are "ALLOW" or "DENY".
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getRules
Optional. List of rules to match. Note that at least one of the rules must match in
order for the action specified in the 'action' field to be taken. A rule is
a match if there is a matching source and destination. If left blank, the
action specified in theactionfield will be applied on every request.
Optional. List of rules to match. Note that at least one of the rules must match in
order for the action specified in the 'action' field to be taken. A rule is
a match if there is a matching source and destination. If left blank, the
action specified in theactionfield will be applied on every request.
[[["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-04 UTC."],[],[],null,["# Google Cloud Network Security V1 Client - Class AuthorizationPolicy (1.0.4)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.4 (latest)](/php/docs/reference/cloud-network-security/latest/V1.AuthorizationPolicy)\n- [1.0.3](/php/docs/reference/cloud-network-security/1.0.3/V1.AuthorizationPolicy)\n- [0.6.5](/php/docs/reference/cloud-network-security/0.6.5/V1.AuthorizationPolicy)\n- [0.5.2](/php/docs/reference/cloud-network-security/0.5.2/V1.AuthorizationPolicy)\n- [0.4.1](/php/docs/reference/cloud-network-security/0.4.1/V1.AuthorizationPolicy)\n- [0.3.7](/php/docs/reference/cloud-network-security/0.3.7/V1.AuthorizationPolicy) \nReference documentation and code samples for the Google Cloud Network Security V1 Client class AuthorizationPolicy.\n\nAuthorizationPolicy is a resource that specifies how a server\nshould authorize incoming connections. This resource in itself does\nnot change the configuration unless it's attached to a target https\nproxy or endpoint config selector resource.\n\nGenerated from protobuf message `google.cloud.networksecurity.v1.AuthorizationPolicy`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ NetworkSecurity \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nRequired. Name of the AuthorizationPolicy resource. It matches pattern\n`projects/{project}/locations/{location}/authorizationPolicies/\u003cauthorization_policy\u003e`.\n\n### setName\n\nRequired. Name of the AuthorizationPolicy resource. It matches pattern\n`projects/{project}/locations/{location}/authorizationPolicies/\u003cauthorization_policy\u003e`.\n\n### getDescription\n\nOptional. Free-text description of the resource.\n\n### setDescription\n\nOptional. Free-text description of the resource.\n\n### getCreateTime\n\nOutput only. The timestamp when the resource was created.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. The timestamp when the resource was created.\n\n### getUpdateTime\n\nOutput only. The timestamp when the resource was updated.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. The timestamp when the resource was updated.\n\n### getLabels\n\nOptional. Set of label tags associated with the AuthorizationPolicy resource.\n\n### setLabels\n\nOptional. Set of label tags associated with the AuthorizationPolicy resource.\n\n### getAction\n\nRequired. The action to take when a rule match is found. Possible values\nare \"ALLOW\" or \"DENY\".\n\n### setAction\n\nRequired. The action to take when a rule match is found. Possible values\nare \"ALLOW\" or \"DENY\".\n\n### getRules\n\nOptional. List of rules to match. Note that at least one of the rules must match in\norder for the action specified in the 'action' field to be taken. A rule is\na match if there is a matching source and destination. If left blank, the\naction specified in the `action` field will be applied on every request.\n\n### setRules\n\nOptional. List of rules to match. Note that at least one of the rules must match in\norder for the action specified in the 'action' field to be taken. A rule is\na match if there is a matching source and destination. If left blank, the\naction specified in the `action` field will be applied on every request."]]