Package com.google.cloud.compute.v1
Class SecurityPolicyRule.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SecurityPolicyRule.Builder>
com.google.cloud.compute.v1.SecurityPolicyRule.Builder
- All Implemented Interfaces:
SecurityPolicyRuleOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- SecurityPolicyRule
public static final class SecurityPolicyRule.Builder
extends com.google.protobuf.GeneratedMessage.Builder<SecurityPolicyRule.Builder>
implements SecurityPolicyRuleOrBuilder
Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).Protobuf type
google.cloud.compute.v1.SecurityPolicyRule-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The Action to perform when the rule is matched.An optional description of this resource.Optional, additional actions that are performed on headers.Output only.A match condition that incoming traffic is evaluated against.A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies.Preconfigured WAF configuration to be applied for the rule.If set to true, the specified action is not enforced.An integer indicating the priority of a rule in the list.Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare".Parameters defining the redirect action.The Action to perform when the rule is matched.com.google.protobuf.ByteStringThe Action to perform when the rule is matched.An optional description of this resource.com.google.protobuf.ByteStringAn optional description of this resource.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional, additional actions that are performed on headers.Optional, additional actions that are performed on headers.Optional, additional actions that are performed on headers.getKind()Output only.com.google.protobuf.ByteStringOutput only.getMatch()A match condition that incoming traffic is evaluated against.A match condition that incoming traffic is evaluated against.A match condition that incoming traffic is evaluated against.A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies.A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies.A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies.Preconfigured WAF configuration to be applied for the rule.Preconfigured WAF configuration to be applied for the rule.Preconfigured WAF configuration to be applied for the rule.booleanIf set to true, the specified action is not enforced.intAn integer indicating the priority of a rule in the list.Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare".Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare".Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare".Parameters defining the redirect action.Parameters defining the redirect action.Parameters defining the redirect action.booleanThe Action to perform when the rule is matched.booleanAn optional description of this resource.booleanOptional, additional actions that are performed on headers.booleanhasKind()Output only.booleanhasMatch()A match condition that incoming traffic is evaluated against.booleanA match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies.booleanPreconfigured WAF configuration to be applied for the rule.booleanIf set to true, the specified action is not enforced.booleanAn integer indicating the priority of a rule in the list.booleanMust be specified if the action is "rate_based_ban" or "throttle" or "fairshare".booleanParameters defining the redirect action.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(SecurityPolicyRule other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional, additional actions that are performed on headers.A match condition that incoming traffic is evaluated against.A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies.Preconfigured WAF configuration to be applied for the rule.Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare".Parameters defining the redirect action.The Action to perform when the rule is matched.setActionBytes(com.google.protobuf.ByteString value) The Action to perform when the rule is matched.setDescription(String value) An optional description of this resource.setDescriptionBytes(com.google.protobuf.ByteString value) An optional description of this resource.Optional, additional actions that are performed on headers.setHeaderAction(SecurityPolicyRuleHttpHeaderAction.Builder builderForValue) Optional, additional actions that are performed on headers.Output only.setKindBytes(com.google.protobuf.ByteString value) Output only.A match condition that incoming traffic is evaluated against.setMatch(SecurityPolicyRuleMatcher.Builder builderForValue) A match condition that incoming traffic is evaluated against.A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies.setNetworkMatch(SecurityPolicyRuleNetworkMatcher.Builder builderForValue) A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies.Preconfigured WAF configuration to be applied for the rule.Preconfigured WAF configuration to be applied for the rule.setPreview(boolean value) If set to true, the specified action is not enforced.setPriority(int value) An integer indicating the priority of a rule in the list.Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare".setRateLimitOptions(SecurityPolicyRuleRateLimitOptions.Builder builderForValue) Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare".Parameters defining the redirect action.setRedirectOptions(SecurityPolicyRuleRedirectOptions.Builder builderForValue) Parameters defining the redirect action.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<SecurityPolicyRule.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<SecurityPolicyRule.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<SecurityPolicyRule.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SecurityPolicyRule.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<SecurityPolicyRule.Builder>
-
mergeFrom
public SecurityPolicyRule.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SecurityPolicyRule.Builder>- Throws:
IOException
-
hasAction
public boolean hasAction()The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for `STATUS` are 403, 404, and 502. - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. - fairshare (preview only): when traffic reaches the threshold limit, requests from the clients matching this rule begin to be rate-limited using the Fair Share algorithm. This action is only allowed in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
optional string action = 187661878;- Specified by:
hasActionin interfaceSecurityPolicyRuleOrBuilder- Returns:
- Whether the action field is set.
-
getAction
The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for `STATUS` are 403, 404, and 502. - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. - fairshare (preview only): when traffic reaches the threshold limit, requests from the clients matching this rule begin to be rate-limited using the Fair Share algorithm. This action is only allowed in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
optional string action = 187661878;- Specified by:
getActionin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The action.
-
getActionBytes
public com.google.protobuf.ByteString getActionBytes()The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for `STATUS` are 403, 404, and 502. - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. - fairshare (preview only): when traffic reaches the threshold limit, requests from the clients matching this rule begin to be rate-limited using the Fair Share algorithm. This action is only allowed in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
optional string action = 187661878;- Specified by:
getActionBytesin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The bytes for action.
-
setAction
The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for `STATUS` are 403, 404, and 502. - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. - fairshare (preview only): when traffic reaches the threshold limit, requests from the clients matching this rule begin to be rate-limited using the Fair Share algorithm. This action is only allowed in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
optional string action = 187661878;- Parameters:
value- The action to set.- Returns:
- This builder for chaining.
-
clearAction
The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for `STATUS` are 403, 404, and 502. - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. - fairshare (preview only): when traffic reaches the threshold limit, requests from the clients matching this rule begin to be rate-limited using the Fair Share algorithm. This action is only allowed in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
optional string action = 187661878;- Returns:
- This builder for chaining.
-
setActionBytes
The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for `STATUS` are 403, 404, and 502. - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. - fairshare (preview only): when traffic reaches the threshold limit, requests from the clients matching this rule begin to be rate-limited using the Fair Share algorithm. This action is only allowed in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
optional string action = 187661878;- Parameters:
value- The bytes for action to set.- Returns:
- This builder for chaining.
-
hasDescription
public boolean hasDescription()An optional description of this resource. Provide this property when you create the resource.
optional string description = 422937596;- Specified by:
hasDescriptionin interfaceSecurityPolicyRuleOrBuilder- Returns:
- Whether the description field is set.
-
getDescription
An optional description of this resource. Provide this property when you create the resource.
optional string description = 422937596;- Specified by:
getDescriptionin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()An optional description of this resource. Provide this property when you create the resource.
optional string description = 422937596;- Specified by:
getDescriptionBytesin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The bytes for description.
-
setDescription
An optional description of this resource. Provide this property when you create the resource.
optional string description = 422937596;- Parameters:
value- The description to set.- Returns:
- This builder for chaining.
-
clearDescription
An optional description of this resource. Provide this property when you create the resource.
optional string description = 422937596;- Returns:
- This builder for chaining.
-
setDescriptionBytes
An optional description of this resource. Provide this property when you create the resource.
optional string description = 422937596;- Parameters:
value- The bytes for description to set.- Returns:
- This builder for chaining.
-
hasHeaderAction
public boolean hasHeaderAction()Optional, additional actions that are performed on headers. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352;- Specified by:
hasHeaderActionin interfaceSecurityPolicyRuleOrBuilder- Returns:
- Whether the headerAction field is set.
-
getHeaderAction
Optional, additional actions that are performed on headers. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352;- Specified by:
getHeaderActionin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The headerAction.
-
setHeaderAction
Optional, additional actions that are performed on headers. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352; -
setHeaderAction
public SecurityPolicyRule.Builder setHeaderAction(SecurityPolicyRuleHttpHeaderAction.Builder builderForValue) Optional, additional actions that are performed on headers. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352; -
mergeHeaderAction
Optional, additional actions that are performed on headers. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352; -
clearHeaderAction
Optional, additional actions that are performed on headers. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352; -
getHeaderActionBuilder
Optional, additional actions that are performed on headers. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352; -
getHeaderActionOrBuilder
Optional, additional actions that are performed on headers. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352;- Specified by:
getHeaderActionOrBuilderin interfaceSecurityPolicyRuleOrBuilder
-
hasKind
public boolean hasKind()Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
optional string kind = 3292052;- Specified by:
hasKindin interfaceSecurityPolicyRuleOrBuilder- Returns:
- Whether the kind field is set.
-
getKind
Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
optional string kind = 3292052;- Specified by:
getKindin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The kind.
-
getKindBytes
public com.google.protobuf.ByteString getKindBytes()Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
optional string kind = 3292052;- Specified by:
getKindBytesin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The bytes for kind.
-
setKind
Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
optional string kind = 3292052;- Parameters:
value- The kind to set.- Returns:
- This builder for chaining.
-
clearKind
Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
optional string kind = 3292052;- Returns:
- This builder for chaining.
-
setKindBytes
Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
optional string kind = 3292052;- Parameters:
value- The bytes for kind to set.- Returns:
- This builder for chaining.
-
hasMatch
public boolean hasMatch()A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;- Specified by:
hasMatchin interfaceSecurityPolicyRuleOrBuilder- Returns:
- Whether the match field is set.
-
getMatch
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;- Specified by:
getMatchin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The match.
-
setMatch
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165; -
setMatch
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165; -
mergeMatch
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165; -
clearMatch
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165; -
getMatchBuilder
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165; -
getMatchOrBuilder
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;- Specified by:
getMatchOrBuilderin interfaceSecurityPolicyRuleOrBuilder
-
hasNetworkMatch
public boolean hasNetworkMatch()A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For strings specifying '*' is also equivalent to match all. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764;- Specified by:
hasNetworkMatchin interfaceSecurityPolicyRuleOrBuilder- Returns:
- Whether the networkMatch field is set.
-
getNetworkMatch
A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For strings specifying '*' is also equivalent to match all. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764;- Specified by:
getNetworkMatchin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The networkMatch.
-
setNetworkMatch
A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For strings specifying '*' is also equivalent to match all. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764; -
setNetworkMatch
public SecurityPolicyRule.Builder setNetworkMatch(SecurityPolicyRuleNetworkMatcher.Builder builderForValue) A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For strings specifying '*' is also equivalent to match all. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764; -
mergeNetworkMatch
A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For strings specifying '*' is also equivalent to match all. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764; -
clearNetworkMatch
A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For strings specifying '*' is also equivalent to match all. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764; -
getNetworkMatchBuilder
A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For strings specifying '*' is also equivalent to match all. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764; -
getNetworkMatchOrBuilder
A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For strings specifying '*' is also equivalent to match all. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764;- Specified by:
getNetworkMatchOrBuilderin interfaceSecurityPolicyRuleOrBuilder
-
hasPreconfiguredWafConfig
public boolean hasPreconfiguredWafConfig()Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027;- Specified by:
hasPreconfiguredWafConfigin interfaceSecurityPolicyRuleOrBuilder- Returns:
- Whether the preconfiguredWafConfig field is set.
-
getPreconfiguredWafConfig
Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027;- Specified by:
getPreconfiguredWafConfigin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The preconfiguredWafConfig.
-
setPreconfiguredWafConfig
public SecurityPolicyRule.Builder setPreconfiguredWafConfig(SecurityPolicyRulePreconfiguredWafConfig value) Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027; -
setPreconfiguredWafConfig
public SecurityPolicyRule.Builder setPreconfiguredWafConfig(SecurityPolicyRulePreconfiguredWafConfig.Builder builderForValue) Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027; -
mergePreconfiguredWafConfig
public SecurityPolicyRule.Builder mergePreconfiguredWafConfig(SecurityPolicyRulePreconfiguredWafConfig value) Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027; -
clearPreconfiguredWafConfig
Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027; -
getPreconfiguredWafConfigBuilder
Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027; -
getPreconfiguredWafConfigOrBuilder
Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect.
optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027;- Specified by:
getPreconfiguredWafConfigOrBuilderin interfaceSecurityPolicyRuleOrBuilder
-
hasPreview
public boolean hasPreview()If set to true, the specified action is not enforced.
optional bool preview = 218686408;- Specified by:
hasPreviewin interfaceSecurityPolicyRuleOrBuilder- Returns:
- Whether the preview field is set.
-
getPreview
public boolean getPreview()If set to true, the specified action is not enforced.
optional bool preview = 218686408;- Specified by:
getPreviewin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The preview.
-
setPreview
If set to true, the specified action is not enforced.
optional bool preview = 218686408;- Parameters:
value- The preview to set.- Returns:
- This builder for chaining.
-
clearPreview
If set to true, the specified action is not enforced.
optional bool preview = 218686408;- Returns:
- This builder for chaining.
-
hasPriority
public boolean hasPriority()An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
optional int32 priority = 445151652;- Specified by:
hasPriorityin interfaceSecurityPolicyRuleOrBuilder- Returns:
- Whether the priority field is set.
-
getPriority
public int getPriority()An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
optional int32 priority = 445151652;- Specified by:
getPriorityin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The priority.
-
setPriority
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
optional int32 priority = 445151652;- Parameters:
value- The priority to set.- Returns:
- This builder for chaining.
-
clearPriority
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
optional int32 priority = 445151652;- Returns:
- This builder for chaining.
-
hasRateLimitOptions
public boolean hasRateLimitOptions()Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare". Cannot be specified for any other actions.
optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315;- Specified by:
hasRateLimitOptionsin interfaceSecurityPolicyRuleOrBuilder- Returns:
- Whether the rateLimitOptions field is set.
-
getRateLimitOptions
Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare". Cannot be specified for any other actions.
optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315;- Specified by:
getRateLimitOptionsin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The rateLimitOptions.
-
setRateLimitOptions
Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare". Cannot be specified for any other actions.
optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315; -
setRateLimitOptions
public SecurityPolicyRule.Builder setRateLimitOptions(SecurityPolicyRuleRateLimitOptions.Builder builderForValue) Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare". Cannot be specified for any other actions.
optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315; -
mergeRateLimitOptions
Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare". Cannot be specified for any other actions.
optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315; -
clearRateLimitOptions
Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare". Cannot be specified for any other actions.
optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315; -
getRateLimitOptionsBuilder
Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare". Cannot be specified for any other actions.
optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315; -
getRateLimitOptionsOrBuilder
Must be specified if the action is "rate_based_ban" or "throttle" or "fairshare". Cannot be specified for any other actions.
optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315;- Specified by:
getRateLimitOptionsOrBuilderin interfaceSecurityPolicyRuleOrBuilder
-
hasRedirectOptions
public boolean hasRedirectOptions()Parameters defining the redirect action. Cannot be specified for any other actions. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307;- Specified by:
hasRedirectOptionsin interfaceSecurityPolicyRuleOrBuilder- Returns:
- Whether the redirectOptions field is set.
-
getRedirectOptions
Parameters defining the redirect action. Cannot be specified for any other actions. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307;- Specified by:
getRedirectOptionsin interfaceSecurityPolicyRuleOrBuilder- Returns:
- The redirectOptions.
-
setRedirectOptions
Parameters defining the redirect action. Cannot be specified for any other actions. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307; -
setRedirectOptions
public SecurityPolicyRule.Builder setRedirectOptions(SecurityPolicyRuleRedirectOptions.Builder builderForValue) Parameters defining the redirect action. Cannot be specified for any other actions. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307; -
mergeRedirectOptions
Parameters defining the redirect action. Cannot be specified for any other actions. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307; -
clearRedirectOptions
Parameters defining the redirect action. Cannot be specified for any other actions. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307; -
getRedirectOptionsBuilder
Parameters defining the redirect action. Cannot be specified for any other actions. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307; -
getRedirectOptionsOrBuilder
Parameters defining the redirect action. Cannot be specified for any other actions. This field is only supported in Global Security Policies of type CLOUD_ARMOR.
optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307;- Specified by:
getRedirectOptionsOrBuilderin interfaceSecurityPolicyRuleOrBuilder
-