Class CfnFirewallPolicy

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.networkfirewall.CfnFirewallPolicy
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-09-02T11:25:36.379Z") @Stability(Stable) public class CfnFirewallPolicy extends CfnResource implements IInspectable, ITaggable
Use the firewall policy to define the stateless and stateful network traffic filtering behavior for your firewall.

You can use one firewall policy for multiple firewalls.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.networkfirewall.*;
 CfnFirewallPolicy cfnFirewallPolicy = CfnFirewallPolicy.Builder.create(this, "MyCfnFirewallPolicy")
         .firewallPolicy(FirewallPolicyProperty.builder()
                 .statelessDefaultActions(List.of("statelessDefaultActions"))
                 .statelessFragmentDefaultActions(List.of("statelessFragmentDefaultActions"))
                 // the properties below are optional
                 .policyVariables(PolicyVariablesProperty.builder()
                         .ruleVariables(Map.of(
                                 "ruleVariablesKey", Map.of(
                                         "definition", List.of("definition"))))
                         .build())
                 .statefulDefaultActions(List.of("statefulDefaultActions"))
                 .statefulEngineOptions(StatefulEngineOptionsProperty.builder()
                         .flowTimeouts(FlowTimeoutsProperty.builder()
                                 .tcpIdleTimeoutSeconds(123)
                                 .build())
                         .ruleOrder("ruleOrder")
                         .streamExceptionPolicy("streamExceptionPolicy")
                         .build())
                 .statefulRuleGroupReferences(List.of(StatefulRuleGroupReferenceProperty.builder()
                         .resourceArn("resourceArn")
                         // the properties below are optional
                         .deepThreatInspection(false)
                         .override(StatefulRuleGroupOverrideProperty.builder()
                                 .action("action")
                                 .build())
                         .priority(123)
                         .build()))
                 .statelessCustomActions(List.of(CustomActionProperty.builder()
                         .actionDefinition(ActionDefinitionProperty.builder()
                                 .publishMetricAction(PublishMetricActionProperty.builder()
                                         .dimensions(List.of(DimensionProperty.builder()
                                                 .value("value")
                                                 .build()))
                                         .build())
                                 .build())
                         .actionName("actionName")
                         .build()))
                 .statelessRuleGroupReferences(List.of(StatelessRuleGroupReferenceProperty.builder()
                         .priority(123)
                         .resourceArn("resourceArn")
                         .build()))
                 .tlsInspectionConfigurationArn("tlsInspectionConfigurationArn")
                 .build())
         .firewallPolicyName("firewallPolicyName")
         // the properties below are optional
         .description("description")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnFirewallPolicy

      protected CfnFirewallPolicy(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnFirewallPolicy

      protected CfnFirewallPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnFirewallPolicy

      @Stability(Stable) public CfnFirewallPolicy(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnFirewallPolicyProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrFirewallPolicyArn

      @Stability(Stable) @NotNull public String getAttrFirewallPolicyArn()
      The Amazon Resource Name (ARN) of the firewall policy.
    • getAttrFirewallPolicyId

      @Stability(Stable) @NotNull public String getAttrFirewallPolicyId()
      The unique ID of the firewall policy resource.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getFirewallPolicy

      @Stability(Stable) @NotNull public Object getFirewallPolicy()
      The traffic filtering behavior of a firewall policy, defined in a collection of stateless and stateful rule groups and other settings.
    • setFirewallPolicy

      @Stability(Stable) public void setFirewallPolicy(@NotNull IResolvable value)
      The traffic filtering behavior of a firewall policy, defined in a collection of stateless and stateful rule groups and other settings.
    • setFirewallPolicy

      @Stability(Stable) public void setFirewallPolicy(@NotNull CfnFirewallPolicy.FirewallPolicyProperty value)
      The traffic filtering behavior of a firewall policy, defined in a collection of stateless and stateful rule groups and other settings.
    • getFirewallPolicyName

      @Stability(Stable) @NotNull public String getFirewallPolicyName()
      The descriptive name of the firewall policy.
    • setFirewallPolicyName

      @Stability(Stable) public void setFirewallPolicyName(@NotNull String value)
      The descriptive name of the firewall policy.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description of the firewall policy.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description of the firewall policy.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      An array of key-value pairs to apply to this resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to this resource.