java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-08-02T00:29:13.830Z") @Stability(Stable) public class CfnFirewall extends CfnResource implements IInspectable, ITaggable
Use the Firewall to provide stateful, managed, network firewall and intrusion detection and prevention filtering for your VPCs in Amazon VPC .

The firewall defines the configuration settings for an AWS Network Firewall firewall. The settings include the firewall policy, the subnets in your VPC to use for the firewall endpoints, and any tags that are attached to the firewall AWS resource.

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.*;
 CfnFirewall cfnFirewall = CfnFirewall.Builder.create(this, "MyCfnFirewall")
         .firewallName("firewallName")
         .firewallPolicyArn("firewallPolicyArn")
         .subnetMappings(List.of(SubnetMappingProperty.builder()
                 .subnetId("subnetId")
                 // the properties below are optional
                 .ipAddressType("ipAddressType")
                 .build()))
         .vpcId("vpcId")
         // the properties below are optional
         .deleteProtection(false)
         .description("description")
         .firewallPolicyChangeProtection(false)
         .subnetChangeProtection(false)
         .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

    • CfnFirewall

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

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

      @Stability(Stable) public CfnFirewall(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnFirewallProps 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.
    • getAttrEndpointIds

      @Stability(Stable) @NotNull public List<String> getAttrEndpointIds()
      The unique IDs of the firewall endpoints for all of the subnets that you attached to the firewall.

      The subnets are not listed in any particular order. For example: ["us-west-2c:vpce-111122223333", "us-west-2a:vpce-987654321098", "us-west-2b:vpce-012345678901"] .

    • getAttrFirewallArn

      @Stability(Stable) @NotNull public String getAttrFirewallArn()
      The Amazon Resource Name (ARN) of the Firewall .
    • getAttrFirewallId

      @Stability(Stable) @NotNull public String getAttrFirewallId()
      The name of the Firewall 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
    • getFirewallName

      @Stability(Stable) @NotNull public String getFirewallName()
      The descriptive name of the firewall.
    • setFirewallName

      @Stability(Stable) public void setFirewallName(@NotNull String value)
      The descriptive name of the firewall.
    • getFirewallPolicyArn

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

      @Stability(Stable) public void setFirewallPolicyArn(@NotNull String value)
      The Amazon Resource Name (ARN) of the firewall policy.
    • getSubnetMappings

      @Stability(Stable) @NotNull public Object getSubnetMappings()
      The public subnets that Network Firewall is using for the firewall.
    • setSubnetMappings

      @Stability(Stable) public void setSubnetMappings(@NotNull IResolvable value)
      The public subnets that Network Firewall is using for the firewall.
    • setSubnetMappings

      @Stability(Stable) public void setSubnetMappings(@NotNull List<Object> value)
      The public subnets that Network Firewall is using for the firewall.
    • getVpcId

      @Stability(Stable) @NotNull public String getVpcId()
      The unique identifier of the VPC where the firewall is in use.
    • setVpcId

      @Stability(Stable) public void setVpcId(@NotNull String value)
      The unique identifier of the VPC where the firewall is in use.
    • getDeleteProtection

      @Stability(Stable) @Nullable public Object getDeleteProtection()
      A flag indicating whether it is possible to delete the firewall.
    • setDeleteProtection

      @Stability(Stable) public void setDeleteProtection(@Nullable Boolean value)
      A flag indicating whether it is possible to delete the firewall.
    • setDeleteProtection

      @Stability(Stable) public void setDeleteProtection(@Nullable IResolvable value)
      A flag indicating whether it is possible to delete the firewall.
    • getDescription

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

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

      @Stability(Stable) @Nullable public Object getFirewallPolicyChangeProtection()
      A setting indicating whether the firewall is protected against a change to the firewall policy association.
    • setFirewallPolicyChangeProtection

      @Stability(Stable) public void setFirewallPolicyChangeProtection(@Nullable Boolean value)
      A setting indicating whether the firewall is protected against a change to the firewall policy association.
    • setFirewallPolicyChangeProtection

      @Stability(Stable) public void setFirewallPolicyChangeProtection(@Nullable IResolvable value)
      A setting indicating whether the firewall is protected against a change to the firewall policy association.
    • getSubnetChangeProtection

      @Stability(Stable) @Nullable public Object getSubnetChangeProtection()
      A setting indicating whether the firewall is protected against changes to the subnet associations.
    • setSubnetChangeProtection

      @Stability(Stable) public void setSubnetChangeProtection(@Nullable Boolean value)
      A setting indicating whether the firewall is protected against changes to the subnet associations.
    • setSubnetChangeProtection

      @Stability(Stable) public void setSubnetChangeProtection(@Nullable IResolvable value)
      A setting indicating whether the firewall is protected against changes to the subnet associations.
    • 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.