Class AuthorizationPolicy (0.73.0)

publicfinalclass AuthorizationPolicyextendsGeneratedMessageV3implementsAuthorizationPolicyOrBuilder

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.

Protobuf type google.cloud.networksecurity.v1.AuthorizationPolicy

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

ACTION_FIELD_NUMBER

publicstaticfinalintACTION_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

publicstaticfinalintCREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

publicstaticfinalintDESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

publicstaticfinalintLABELS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

publicstaticfinalintNAME_FIELD_NUMBER
Field Value
Type Description
int

RULES_FIELD_NUMBER

publicstaticfinalintRULES_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

publicstaticfinalintUPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticAuthorizationPolicygetDefaultInstance()
Returns
Type Description
AuthorizationPolicy

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticAuthorizationPolicy.BuildernewBuilder()
Returns
Type Description
AuthorizationPolicy.Builder

newBuilder(AuthorizationPolicy prototype)

publicstaticAuthorizationPolicy.BuildernewBuilder(AuthorizationPolicyprototype)
Parameter
Name Description
prototype AuthorizationPolicy
Returns
Type Description
AuthorizationPolicy.Builder

parseDelimitedFrom(InputStream input)

publicstaticAuthorizationPolicyparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
AuthorizationPolicy
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticAuthorizationPolicyparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticAuthorizationPolicyparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
AuthorizationPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticAuthorizationPolicyparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticAuthorizationPolicyparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
AuthorizationPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticAuthorizationPolicyparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticAuthorizationPolicyparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AuthorizationPolicy
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticAuthorizationPolicyparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticAuthorizationPolicyparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
AuthorizationPolicy
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticAuthorizationPolicyparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticAuthorizationPolicyparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AuthorizationPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticAuthorizationPolicyparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<AuthorizationPolicy>parser()
Returns
Type Description
Parser<AuthorizationPolicy>

Methods

containsLabels(String key)

publicbooleancontainsLabels(Stringkey)

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAction()

publicAuthorizationPolicy.ActiongetAction()

Required. The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".

.google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AuthorizationPolicy.Action

The action.

getActionValue()

publicintgetActionValue()

Required. The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".

.google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for action.

getCreateTime()

publicTimestampgetCreateTime()

Output only. The timestamp when the resource was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

publicTimestampOrBuildergetCreateTimeOrBuilder()

Output only. The timestamp when the resource was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

publicAuthorizationPolicygetDefaultInstanceForType()
Returns
Type Description
AuthorizationPolicy

getDescription()

publicStringgetDescription()

Optional. Free-text description of the resource.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

publicByteStringgetDescriptionBytes()

Optional. Free-text description of the resource.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getLabels() (deprecated)

publicMap<String,String>getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

publicintgetLabelsCount()

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getLabelsMap()

publicMap<String,String>getLabelsMap()

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

publicStringgetLabelsOrDefault(Stringkey,StringdefaultValue)

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

publicStringgetLabelsOrThrow(Stringkey)

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getName()

publicStringgetName()

Required. Name of the AuthorizationPolicy resource. It matches pattern projects/{project}/locations/{location}/authorizationPolicies/<authorization_policy>.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

Required. Name of the AuthorizationPolicy resource. It matches pattern projects/{project}/locations/{location}/authorizationPolicies/<authorization_policy>.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

publicParser<AuthorizationPolicy>getParserForType()
Returns
Type Description
Parser<AuthorizationPolicy>
Overrides

getRules(int index)

publicAuthorizationPolicy.RulegetRules(intindex)

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 the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AuthorizationPolicy.Rule

getRulesCount()

publicintgetRulesCount()

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 the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getRulesList()

publicList<AuthorizationPolicy.Rule>getRulesList()

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 the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Rule>

getRulesOrBuilder(int index)

publicAuthorizationPolicy.RuleOrBuildergetRulesOrBuilder(intindex)

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 the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AuthorizationPolicy.RuleOrBuilder

getRulesOrBuilderList()

publicList<?extendsAuthorizationPolicy.RuleOrBuilder>getRulesOrBuilderList()

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 the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.networksecurity.v1.AuthorizationPolicy.RuleOrBuilder>

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getUpdateTime()

publicTimestampgetUpdateTime()

Output only. The timestamp when the resource was updated.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

publicTimestampOrBuildergetUpdateTimeOrBuilder()

Output only. The timestamp when the resource was updated.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

publicbooleanhasCreateTime()

Output only. The timestamp when the resource was created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

publicbooleanhasUpdateTime()

Output only. The timestamp when the resource was updated.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicAuthorizationPolicy.BuildernewBuilderForType()
Returns
Type Description
AuthorizationPolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedAuthorizationPolicy.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AuthorizationPolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicAuthorizationPolicy.BuildertoBuilder()
Returns
Type Description
AuthorizationPolicy.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.