@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:38.881Z") public class CfnFirewall extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnFirewall.Builder
A fluent builder for
CfnFirewall . |
static interface |
CfnFirewall.SubnetMappingProperty
The ID for a subnet that you want to associate with the firewall.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnFirewall(Construct scope,
java.lang.String id,
CfnFirewallProps props)
Create a new `AWS::NetworkFirewall::Firewall`.
|
protected |
CfnFirewall(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnFirewall(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getAttrEndpointIds()
The unique IDs of the firewall endpoints for all of the subnets that you attached to the firewall.
|
java.lang.String |
getAttrFirewallArn()
The Amazon Resource Name (ARN) of the `Firewall` .
|
java.lang.String |
getAttrFirewallId()
The name of the `Firewall` resource.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getDeleteProtection()
A flag indicating whether it is possible to delete the firewall.
|
java.lang.String |
getDescription()
A description of the firewall.
|
java.lang.String |
getFirewallName()
The descriptive name of the firewall.
|
java.lang.String |
getFirewallPolicyArn()
The Amazon Resource Name (ARN) of the firewall policy.
|
java.lang.Object |
getFirewallPolicyChangeProtection()
A setting indicating whether the firewall is protected against a change to the firewall policy association.
|
java.lang.Object |
getSubnetChangeProtection()
A setting indicating whether the firewall is protected against changes to the subnet associations.
|
java.lang.Object |
getSubnetMappings()
The public subnets that Network Firewall is using for the firewall.
|
TagManager |
getTags()
An array of key-value pairs to apply to this resource.
|
java.lang.String |
getVpcId()
The unique identifier of the VPC where the firewall is in use.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setDeleteProtection(java.lang.Boolean value)
A flag indicating whether it is possible to delete the firewall.
|
void |
setDeleteProtection(IResolvable value)
A flag indicating whether it is possible to delete the firewall.
|
void |
setDescription(java.lang.String value)
A description of the firewall.
|
void |
setFirewallName(java.lang.String value)
The descriptive name of the firewall.
|
void |
setFirewallPolicyArn(java.lang.String value)
The Amazon Resource Name (ARN) of the firewall policy.
|
void |
setFirewallPolicyChangeProtection(java.lang.Boolean value)
A setting indicating whether the firewall is protected against a change to the firewall policy association.
|
void |
setFirewallPolicyChangeProtection(IResolvable value)
A setting indicating whether the firewall is protected against a change to the firewall policy association.
|
void |
setSubnetChangeProtection(java.lang.Boolean value)
A setting indicating whether the firewall is protected against changes to the subnet associations.
|
void |
setSubnetChangeProtection(IResolvable value)
A setting indicating whether the firewall is protected against changes to the subnet associations.
|
void |
setSubnetMappings(IResolvable value)
The public subnets that Network Firewall is using for the firewall.
|
void |
setSubnetMappings(java.util.List<java.lang.Object> value)
The public subnets that Network Firewall is using for the firewall.
|
void |
setVpcId(java.lang.String value)
The unique identifier of the VPC where the firewall is in use.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnFirewall(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnFirewall(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnFirewall(Construct scope, java.lang.String id, CfnFirewallProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.util.List<java.lang.String> getAttrEndpointIds()
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"]
.
public java.lang.String getAttrFirewallArn()
public java.lang.String getAttrFirewallId()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
For more information, see Tag .
public java.lang.String getFirewallName()
You can't change the name of a firewall after you create it.
public void setFirewallName(java.lang.String value)
You can't change the name of a firewall after you create it.
public java.lang.String getFirewallPolicyArn()
The relationship of firewall to firewall policy is many to one. Each firewall requires one firewall policy association, and you can use the same firewall policy for multiple firewalls.
public void setFirewallPolicyArn(java.lang.String value)
The relationship of firewall to firewall policy is many to one. Each firewall requires one firewall policy association, and you can use the same firewall policy for multiple firewalls.
public java.lang.Object getSubnetMappings()
Each subnet must belong to a different Availability Zone.
public void setSubnetMappings(IResolvable value)
Each subnet must belong to a different Availability Zone.
public void setSubnetMappings(java.util.List<java.lang.Object> value)
Each subnet must belong to a different Availability Zone.
public java.lang.String getVpcId()
You can't change the VPC of a firewall after you create the firewall.
public void setVpcId(java.lang.String value)
You can't change the VPC of a firewall after you create the firewall.
public java.lang.Object getDeleteProtection()
A setting of TRUE
indicates that the firewall is protected against deletion. Use this setting to protect against accidentally deleting a firewall that is in use. When you create a firewall, the operation initializes this flag to TRUE
.
public void setDeleteProtection(java.lang.Boolean value)
A setting of TRUE
indicates that the firewall is protected against deletion. Use this setting to protect against accidentally deleting a firewall that is in use. When you create a firewall, the operation initializes this flag to TRUE
.
public void setDeleteProtection(IResolvable value)
A setting of TRUE
indicates that the firewall is protected against deletion. Use this setting to protect against accidentally deleting a firewall that is in use. When you create a firewall, the operation initializes this flag to TRUE
.
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.Object getFirewallPolicyChangeProtection()
Use this setting to protect against accidentally modifying the firewall policy for a firewall that is in use. When you create a firewall, the operation initializes this setting to TRUE
.
public void setFirewallPolicyChangeProtection(java.lang.Boolean value)
Use this setting to protect against accidentally modifying the firewall policy for a firewall that is in use. When you create a firewall, the operation initializes this setting to TRUE
.
public void setFirewallPolicyChangeProtection(IResolvable value)
Use this setting to protect against accidentally modifying the firewall policy for a firewall that is in use. When you create a firewall, the operation initializes this setting to TRUE
.
public java.lang.Object getSubnetChangeProtection()
Use this setting to protect against accidentally modifying the subnet associations for a firewall that is in use. When you create a firewall, the operation initializes this setting to TRUE
.
public void setSubnetChangeProtection(java.lang.Boolean value)
Use this setting to protect against accidentally modifying the subnet associations for a firewall that is in use. When you create a firewall, the operation initializes this setting to TRUE
.
public void setSubnetChangeProtection(IResolvable value)
Use this setting to protect against accidentally modifying the subnet associations for a firewall that is in use. When you create a firewall, the operation initializes this setting to TRUE
.