Class FirewallPolicyV2
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<FirewallPolicyV2.Builder,FirewallPolicyV2>
The object that defines a Next Generation policy. This, along with the FirewallPolicyV2Response, define the policy.
A Next Generation policy defines how the firewall engine and IPS engine inspect and control your VPC network traffic. You define the policy as a firewall section and an IPS section, each a collection of rule groups, along with policy-wide settings such as the policy mode and default actions. For more information, see Next Generation policies in the Network Firewall Developer Guide.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic FirewallPolicyV2.Builderbuilder()final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final PolicyDefaultActionThe action that the firewall engine takes on traffic that doesn't match any firewall engine rule at a hook.final StringThe action that the firewall engine takes on traffic that doesn't match any firewall engine rule at a hook.final List<FirewallRuleGroupEntry> The firewall section of the policy—the rule groups that the firewall engine evaluates.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the FirewallRuleGroupEntries property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the IpsRuleGroupEntries property.final List<IpsRuleGroupEntry> The IPS section of the policy—the rule groups that the IPS engine evaluates.final PolicyModeIndicates whether the policy's engines enforce their verdicts or only report them.final StringIndicates whether the policy's engines enforce their verdicts or only report them.final PolicyVariablesContains variables that you can use to override default Suricata settings in your Next Generation policy.The settings that enable resolved IP validation for the Next Generation policy.static Class<? extends FirewallPolicyV2.Builder> final StatefulEngineOptionsV2Additional options governing how the engines handle stateful traffic, such as the stream exception policy and flow timeouts.final StringThe Amazon Resource Name (ARN) of the TLS inspection configuration to use to decrypt traffic for inspection.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
hasFirewallRuleGroupEntries
public final boolean hasFirewallRuleGroupEntries()For responses, this returns true if the service returned a value for the FirewallRuleGroupEntries property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
firewallRuleGroupEntries
The firewall section of the policy—the rule groups that the firewall engine evaluates. Each entry references an existing firewall engine rule group or embeds a rule group directly in the policy, and each entry has a unique priority that sets its evaluation order within the section.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasFirewallRuleGroupEntries()method.- Returns:
- The firewall section of the policy—the rule groups that the firewall engine evaluates. Each entry references an existing firewall engine rule group or embeds a rule group directly in the policy, and each entry has a unique priority that sets its evaluation order within the section.
-
hasIpsRuleGroupEntries
public final boolean hasIpsRuleGroupEntries()For responses, this returns true if the service returned a value for the IpsRuleGroupEntries property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
ipsRuleGroupEntries
The IPS section of the policy—the rule groups that the IPS engine evaluates. Each entry references an existing IPS engine rule group or embeds a rule group directly in the policy. IPS section entries don't use a priority.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasIpsRuleGroupEntries()method.- Returns:
- The IPS section of the policy—the rule groups that the IPS engine evaluates. Each entry references an existing IPS engine rule group or embeds a rule group directly in the policy. IPS section entries don't use a priority.
-
policyMode
Indicates whether the policy's engines enforce their verdicts or only report them. In
ENFORCEmode, the firewall engine and IPS engine apply their verdicts to traffic. InMONITORmode, the engines evaluate traffic and generate logs and metrics, but don't block traffic, so you can observe how a policy would behave before you enforce it. For more information, see Next Generation policies in the Network Firewall Developer Guide.If the service returns an enum value that is not available in the current SDK version,
policyModewill returnPolicyMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frompolicyModeAsString().- Returns:
- Indicates whether the policy's engines enforce their verdicts or only report them. In
ENFORCEmode, the firewall engine and IPS engine apply their verdicts to traffic. InMONITORmode, the engines evaluate traffic and generate logs and metrics, but don't block traffic, so you can observe how a policy would behave before you enforce it. For more information, see Next Generation policies in the Network Firewall Developer Guide. - See Also:
-
policyModeAsString
Indicates whether the policy's engines enforce their verdicts or only report them. In
ENFORCEmode, the firewall engine and IPS engine apply their verdicts to traffic. InMONITORmode, the engines evaluate traffic and generate logs and metrics, but don't block traffic, so you can observe how a policy would behave before you enforce it. For more information, see Next Generation policies in the Network Firewall Developer Guide.If the service returns an enum value that is not available in the current SDK version,
policyModewill returnPolicyMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frompolicyModeAsString().- Returns:
- Indicates whether the policy's engines enforce their verdicts or only report them. In
ENFORCEmode, the firewall engine and IPS engine apply their verdicts to traffic. InMONITORmode, the engines evaluate traffic and generate logs and metrics, but don't block traffic, so you can observe how a policy would behave before you enforce it. For more information, see Next Generation policies in the Network Firewall Developer Guide. - See Also:
-
firewallDefaultAction
The action that the firewall engine takes on traffic that doesn't match any firewall engine rule at a hook. The firewall engine is drop by default. You can set the default action to one of the following:
-
DROP- Block the traffic. -
ACCEPT- Allow the traffic. -
REJECT- Block the traffic and send a TCP reset packet back to the client. -
ALERT- Allow the traffic and generate an alert log for the traffic that reaches the default action at every hook. This is distinct from setting the policy mode toMONITOR.
For more information, see Next Generation policies in the Network Firewall Developer Guide.
If the service returns an enum value that is not available in the current SDK version,
firewallDefaultActionwill returnPolicyDefaultAction.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromfirewallDefaultActionAsString().- Returns:
- The action that the firewall engine takes on traffic that doesn't match any firewall engine rule at a
hook. The firewall engine is drop by default. You can set the default action to one of the following:
-
DROP- Block the traffic. -
ACCEPT- Allow the traffic. -
REJECT- Block the traffic and send a TCP reset packet back to the client. -
ALERT- Allow the traffic and generate an alert log for the traffic that reaches the default action at every hook. This is distinct from setting the policy mode toMONITOR.
For more information, see Next Generation policies in the Network Firewall Developer Guide.
-
- See Also:
-
-
firewallDefaultActionAsString
The action that the firewall engine takes on traffic that doesn't match any firewall engine rule at a hook. The firewall engine is drop by default. You can set the default action to one of the following:
-
DROP- Block the traffic. -
ACCEPT- Allow the traffic. -
REJECT- Block the traffic and send a TCP reset packet back to the client. -
ALERT- Allow the traffic and generate an alert log for the traffic that reaches the default action at every hook. This is distinct from setting the policy mode toMONITOR.
For more information, see Next Generation policies in the Network Firewall Developer Guide.
If the service returns an enum value that is not available in the current SDK version,
firewallDefaultActionwill returnPolicyDefaultAction.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromfirewallDefaultActionAsString().- Returns:
- The action that the firewall engine takes on traffic that doesn't match any firewall engine rule at a
hook. The firewall engine is drop by default. You can set the default action to one of the following:
-
DROP- Block the traffic. -
ACCEPT- Allow the traffic. -
REJECT- Block the traffic and send a TCP reset packet back to the client. -
ALERT- Allow the traffic and generate an alert log for the traffic that reaches the default action at every hook. This is distinct from setting the policy mode toMONITOR.
For more information, see Next Generation policies in the Network Firewall Developer Guide.
-
- See Also:
-
-
statefulEngineOptions
Additional options governing how the engines handle stateful traffic, such as the stream exception policy and flow timeouts.
- Returns:
- Additional options governing how the engines handle stateful traffic, such as the stream exception policy and flow timeouts.
-
tlsInspectionConfigurationArn
The Amazon Resource Name (ARN) of the TLS inspection configuration to use to decrypt traffic for inspection. Next Generation policies support session holding only. For more information, see Inspecting SSL/TLS traffic with TLS inspection configurations in the Network Firewall Developer Guide.
- Returns:
- The Amazon Resource Name (ARN) of the TLS inspection configuration to use to decrypt traffic for inspection. Next Generation policies support session holding only. For more information, see Inspecting SSL/TLS traffic with TLS inspection configurations in the Network Firewall Developer Guide.
-
policyVariables
Contains variables that you can use to override default Suricata settings in your Next Generation policy.
- Returns:
- Contains variables that you can use to override default Suricata settings in your Next Generation policy.
-
route53ResolvedIPValidation
The settings that enable resolved IP validation for the Next Generation policy. Resolved IP validation verifies that a connection's destination IP address is one that the Amazon Route 53 Resolver returned in a DNS response for a domain. A VPC that's associated with the Route 53 Resolver DNS Firewall rule group that you specify must send the response. This checks how the destination IP address was obtained, instead of relying only on the domain that the client asserts in its TLS Server Name Indication (SNI) or HTTP
Hostheader. For more information, see Route53ResolvedIPValidation.- Returns:
- The settings that enable resolved IP validation for the Next Generation policy. Resolved IP validation
verifies that a connection's destination IP address is one that the Amazon Route 53 Resolver returned in
a DNS response for a domain. A VPC that's associated with the Route 53 Resolver DNS Firewall rule group
that you specify must send the response. This checks how the destination IP address was obtained, instead
of relying only on the domain that the client asserts in its TLS Server Name Indication (SNI) or HTTP
Hostheader. For more information, see Route53ResolvedIPValidation.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<FirewallPolicyV2.Builder,FirewallPolicyV2> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-