target.apidocs.com.google.api.services.compute.model.FirewallPolicyRule.html Maven / Gradle / Ivy
The newest version!
FirewallPolicyRule (Compute Engine API v1-rev20250320-2.0.0)
com.google.api.services.compute.model
Class FirewallPolicyRule
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.compute.model.FirewallPolicyRule
-
public final class FirewallPolicyRule
extends com.google.api.client.json.GenericJson
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).
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
FirewallPolicyRule()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
FirewallPolicyRule
clone()
String
getAction()
The Action to perform when the client connection triggers the rule.
String
getDescription()
An optional description for this resource.
String
getDirection()
The direction in which this rule applies.
Boolean
getDisabled()
Denotes whether the firewall policy rule is disabled.
Boolean
getEnableLogging()
Denotes whether to enable logging for a particular rule.
String
getKind()
[Output only] Type of the resource.
FirewallPolicyRuleMatcher
getMatch()
A match condition that incoming traffic is evaluated against.
Integer
getPriority()
An integer indicating the priority of a rule in the list.
String
getRuleName()
An optional name for the rule.
Integer
getRuleTupleCount()
[Output Only] Calculation of the complexity of a single firewall policy rule.
String
getSecurityProfileGroup()
A fully-qualified URL of a SecurityProfile resource instance.
List<String>
getTargetResources()
A list of network resource URLs to which this rule applies.
List<FirewallPolicyRuleSecureTag>
getTargetSecureTags()
A list of secure tags that controls which instances the firewall rule applies to.
List<String>
getTargetServiceAccounts()
A list of service accounts indicating the sets of instances that are applied with this rule.
Boolean
getTlsInspect()
Boolean flag indicating if the traffic should be TLS decrypted.
FirewallPolicyRule
set(String fieldName,
Object value)
FirewallPolicyRule
setAction(String action)
The Action to perform when the client connection triggers the rule.
FirewallPolicyRule
setDescription(String description)
An optional description for this resource.
FirewallPolicyRule
setDirection(String direction)
The direction in which this rule applies.
FirewallPolicyRule
setDisabled(Boolean disabled)
Denotes whether the firewall policy rule is disabled.
FirewallPolicyRule
setEnableLogging(Boolean enableLogging)
Denotes whether to enable logging for a particular rule.
FirewallPolicyRule
setKind(String kind)
[Output only] Type of the resource.
FirewallPolicyRule
setMatch(FirewallPolicyRuleMatcher match)
A match condition that incoming traffic is evaluated against.
FirewallPolicyRule
setPriority(Integer priority)
An integer indicating the priority of a rule in the list.
FirewallPolicyRule
setRuleName(String ruleName)
An optional name for the rule.
FirewallPolicyRule
setRuleTupleCount(Integer ruleTupleCount)
[Output Only] Calculation of the complexity of a single firewall policy rule.
FirewallPolicyRule
setSecurityProfileGroup(String securityProfileGroup)
A fully-qualified URL of a SecurityProfile resource instance.
FirewallPolicyRule
setTargetResources(List<String> targetResources)
A list of network resource URLs to which this rule applies.
FirewallPolicyRule
setTargetSecureTags(List<FirewallPolicyRuleSecureTag> targetSecureTags)
A list of secure tags that controls which instances the firewall rule applies to.
FirewallPolicyRule
setTargetServiceAccounts(List<String> targetServiceAccounts)
A list of service accounts indicating the sets of instances that are applied with this rule.
FirewallPolicyRule
setTlsInspect(Boolean tlsInspect)
Boolean flag indicating if the traffic should be TLS decrypted.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getAction
public String getAction()
The Action to perform when the client connection triggers the rule. Valid actions for firewall
rules are: "allow", "deny", "apply_security_profile_group" and "goto_next". Valid actions for
packet mirroring rules are: "mirror", "do_not_mirror" and "goto_next".
- Returns:
- value or
null for none
-
setAction
public FirewallPolicyRule setAction(String action)
The Action to perform when the client connection triggers the rule. Valid actions for firewall
rules are: "allow", "deny", "apply_security_profile_group" and "goto_next". Valid actions for
packet mirroring rules are: "mirror", "do_not_mirror" and "goto_next".
- Parameters:
action - action or null for none
-
getDescription
public String getDescription()
An optional description for this resource.
- Returns:
- value or
null for none
-
setDescription
public FirewallPolicyRule setDescription(String description)
An optional description for this resource.
- Parameters:
description - description or null for none
-
getDirection
public String getDirection()
The direction in which this rule applies.
- Returns:
- value or
null for none
-
setDirection
public FirewallPolicyRule setDirection(String direction)
The direction in which this rule applies.
- Parameters:
direction - direction or null for none
-
getDisabled
public Boolean getDisabled()
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy
rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the
firewall policy rule will be enabled.
- Returns:
- value or
null for none
-
setDisabled
public FirewallPolicyRule setDisabled(Boolean disabled)
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy
rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the
firewall policy rule will be enabled.
- Parameters:
disabled - disabled or null for none
-
getEnableLogging
public Boolean getEnableLogging()
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be
exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery
or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
- Returns:
- value or
null for none
-
setEnableLogging
public FirewallPolicyRule setEnableLogging(Boolean enableLogging)
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be
exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery
or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
- Parameters:
enableLogging - enableLogging or null for none
-
getKind
public String getKind()
[Output only] Type of the resource. Returns compute#firewallPolicyRule for firewall rules and
compute#packetMirroringRule for packet mirroring rules.
- Returns:
- value or
null for none
-
setKind
public FirewallPolicyRule setKind(String kind)
[Output only] Type of the resource. Returns compute#firewallPolicyRule for firewall rules and
compute#packetMirroringRule for packet mirroring rules.
- Parameters:
kind - kind or null for none
-
getMatch
public FirewallPolicyRuleMatcher getMatch()
A match condition that incoming traffic is evaluated against. If it evaluates to true, the
corresponding 'action' is enforced.
- Returns:
- value or
null for none
-
setMatch
public FirewallPolicyRule setMatch(FirewallPolicyRuleMatcher match)
A match condition that incoming traffic is evaluated against. If it evaluates to true, the
corresponding 'action' is enforced.
- Parameters:
match - match or null for none
-
getPriority
public Integer 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.
- Returns:
- value or
null for none
-
setPriority
public FirewallPolicyRule setPriority(Integer priority)
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.
- Parameters:
priority - priority or null for none
-
getRuleName
public String getRuleName()
An optional name for the rule. This field is not a unique identifier and can be updated.
- Returns:
- value or
null for none
-
setRuleName
public FirewallPolicyRule setRuleName(String ruleName)
An optional name for the rule. This field is not a unique identifier and can be updated.
- Parameters:
ruleName - ruleName or null for none
-
getRuleTupleCount
public Integer getRuleTupleCount()
[Output Only] Calculation of the complexity of a single firewall policy rule.
- Returns:
- value or
null for none
-
setRuleTupleCount
public FirewallPolicyRule setRuleTupleCount(Integer ruleTupleCount)
[Output Only] Calculation of the complexity of a single firewall policy rule.
- Parameters:
ruleTupleCount - ruleTupleCount or null for none
-
getSecurityProfileGroup
public String getSecurityProfileGroup()
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.
googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-
profile-group Must be specified if action is one of 'apply_security_profile_group' or 'mirror'.
Cannot be specified for other actions.
- Returns:
- value or
null for none
-
setSecurityProfileGroup
public FirewallPolicyRule setSecurityProfileGroup(String securityProfileGroup)
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.
googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-
profile-group Must be specified if action is one of 'apply_security_profile_group' or 'mirror'.
Cannot be specified for other actions.
- Parameters:
securityProfileGroup - securityProfileGroup or null for none
-
getTargetResources
public List<String> getTargetResources()
A list of network resource URLs to which this rule applies. This field allows you to control
which network's VMs get this rule. If this field is left blank, all VMs within the organization
will receive the rule.
- Returns:
- value or
null for none
-
setTargetResources
public FirewallPolicyRule setTargetResources(List<String> targetResources)
A list of network resource URLs to which this rule applies. This field allows you to control
which network's VMs get this rule. If this field is left blank, all VMs within the organization
will receive the rule.
- Parameters:
targetResources - targetResources or null for none
-
getTargetSecureTags
public List<FirewallPolicyRuleSecureTag> getTargetSecureTags()
A list of secure tags that controls which instances the firewall rule applies to. If
targetSecureTag are specified, then the firewall rule applies only to instances in the VPC
network that have one of those EFFECTIVE secure tags, if all the target_secure_tag are in
INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same
time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are
specified, the firewall rule applies to all instances on the specified network. Maximum number
of target label tags allowed is 256.
- Returns:
- value or
null for none
-
setTargetSecureTags
public FirewallPolicyRule setTargetSecureTags(List<FirewallPolicyRuleSecureTag> targetSecureTags)
A list of secure tags that controls which instances the firewall rule applies to. If
targetSecureTag are specified, then the firewall rule applies only to instances in the VPC
network that have one of those EFFECTIVE secure tags, if all the target_secure_tag are in
INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same
time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are
specified, the firewall rule applies to all instances on the specified network. Maximum number
of target label tags allowed is 256.
- Parameters:
targetSecureTags - targetSecureTags or null for none
-
getTargetServiceAccounts
public List<String> getTargetServiceAccounts()
A list of service accounts indicating the sets of instances that are applied with this rule.
- Returns:
- value or
null for none
-
setTargetServiceAccounts
public FirewallPolicyRule setTargetServiceAccounts(List<String> targetServiceAccounts)
A list of service accounts indicating the sets of instances that are applied with this rule.
- Parameters:
targetServiceAccounts - targetServiceAccounts or null for none
-
getTlsInspect
public Boolean getTlsInspect()
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action =
'apply_security_profile_group' and cannot be set for other actions.
- Returns:
- value or
null for none
-
setTlsInspect
public FirewallPolicyRule setTlsInspect(Boolean tlsInspect)
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action =
'apply_security_profile_group' and cannot be set for other actions.
- Parameters:
tlsInspect - tlsInspect or null for none
-
set
public FirewallPolicyRule set(String fieldName,
Object value)
- Overrides:
set in class com.google.api.client.json.GenericJson
-
clone
public FirewallPolicyRule clone()
- Overrides:
clone in class com.google.api.client.json.GenericJson
Copyright © 2011–2025 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy