Creates an Network Firewall Firewall and accompanying FirewallStatus for a VPC¶
Description¶
Creates an Network Firewall Firewall and accompanying FirewallStatus for a VPC.
The firewall defines the configuration settings for an Network Firewall firewall. The settings that you can define at creation include the firewall policy, the subnets in your VPC to use for the firewall endpoints, and any tags that are attached to the firewall Amazon Web Services resource.
After you create a firewall, you can provide additional settings, like the logging configuration.
To update the settings for a firewall, you use the operations that apply to the settings themselves, for example update_logging_configuration, associate_subnets, and update_firewall_delete_protection.
To manage a firewall's tags, use the standard Amazon Web Services resource tagging operations, list_tags_for_resource, tag_resource, and untag_resource.
To retrieve information about firewalls, use list_firewalls and describe_firewall.
To generate a report on the last 30 days of traffic monitored by a firewall, use start_analysis_report.
Usage¶
networkfirewall_create_firewall(FirewallName, FirewallPolicyArn, VpcId,
SubnetMappings, DeleteProtection, SubnetChangeProtection,
FirewallPolicyChangeProtection, Description, Tags,
EncryptionConfiguration, EnabledAnalysisTypes, TransitGatewayId,
AvailabilityZoneMappings, AvailabilityZoneChangeProtection,
NatGatewayMappings, ProxySettings, NoSourcePreservation, VpcEndpoint)
Arguments¶
-
FirewallName[required] The descriptive name of the firewall. You can't change the name of a firewall after you create it.
-
FirewallPolicyArn[required] The Amazon Resource Name (ARN) of the FirewallPolicy that you want to use for the firewall.
-
VpcIdThe unique identifier of the VPC where Network Firewall should create the firewall.
You can't change this setting after you create the firewall.
-
SubnetMappingsThe public subnets to use for your Network Firewall firewalls. Each subnet must belong to a different Availability Zone in the VPC. Network Firewall creates a firewall endpoint in each subnet.
-
DeleteProtectionA flag indicating whether it is possible to delete the firewall. A setting of
TRUEindicates 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 toTRUE. -
SubnetChangeProtectionA setting indicating whether the firewall is protected against changes to the subnet associations. 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. -
FirewallPolicyChangeProtectionA setting indicating whether the firewall is protected against a change to the firewall policy association. 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. -
DescriptionA description of the firewall.
-
TagsThe key:value pairs to associate with the resource.
-
EncryptionConfigurationA complex type that contains settings for encryption of your firewall resources.
-
EnabledAnalysisTypesAn optional setting indicating the specific traffic analysis types to enable on the firewall.
-
TransitGatewayIdRequired when creating a transit gateway-attached firewall. The unique identifier of the transit gateway to attach to this firewall. You can provide either a transit gateway from your account or one that has been shared with you through Resource Access Manager.
After creating the firewall, you cannot change the transit gateway association. To use a different transit gateway, you must create a new firewall.
For information about creating firewalls, see
create_firewall. For specific guidance about transit gateway-attached firewalls, see Considerations for transit gateway-attached firewalls in the Network Firewall Developer Guide. -
AvailabilityZoneMappingsRequired. The Availability Zones where you want to create firewall endpoints for a transit gateway-attached firewall. You must specify at least one Availability Zone. Consider enabling the firewall in every Availability Zone where you have workloads to maintain Availability Zone isolation.
You can modify Availability Zones later using
associate_availability_zonesordisassociate_availability_zones, but this may briefly disrupt traffic. TheAvailabilityZoneChangeProtectionsetting controls whether you can make these modifications. -
AvailabilityZoneChangeProtectionOptional. A setting indicating whether the firewall is protected against changes to its Availability Zone configuration. When set to
TRUE, you cannot add or remove Availability Zones without first disabling this protection usingupdate_availability_zone_change_protection.Default value:
FALSE -
NatGatewayMappingsThe NAT gateways that the firewall uses to proxy traffic when
NoSourcePreservationisTRUE. Network Firewall attaches the firewall to each NAT gateway that you specify, so that egress traffic is proxied through the NAT gateway. -
ProxySettingsThe listener configuration for a proxy mode firewall, used when
NoSourcePreservationisTRUE. This specifies the ports and protocols on which the firewall's proxy listens for traffic. -
NoSourcePreservationOptional. Indicates whether the firewall operates in proxy mode, in which the source IP address of the traffic is not preserved. When set to
TRUE, the firewall proxies traffic through a NAT gateway and the traffic reaching the destination uses the NAT gateway's IP address as the source.When you set this to
TRUE, you must specifyNatGatewayMappingsandVpcEndpointinstead of a top-levelVpcIdandSubnetMappings.You can't change this setting after you create the firewall.
Default value:
FALSE -
VpcEndpointThe VPC and subnets for the firewall endpoint, used when
NoSourcePreservationisTRUE. Network Firewall creates the firewall endpoint in the subnets that you specify here.For proxy mode firewalls, provide the firewall's VPC and endpoint subnets through this parameter instead of the top-level
VpcIdandSubnetMappings.
Value¶
A list with the following syntax:
list(
Firewall = list(
FirewallName = "string",
FirewallArn = "string",
FirewallPolicyArn = "string",
VpcId = "string",
SubnetMappings = list(
list(
SubnetId = "string",
IPAddressType = "DUALSTACK"|"IPV4"|"IPV6"
)
),
DeleteProtection = TRUE|FALSE,
SubnetChangeProtection = TRUE|FALSE,
FirewallPolicyChangeProtection = TRUE|FALSE,
Description = "string",
FirewallId = "string",
Tags = list(
list(
Key = "string",
Value = "string"
)
),
EncryptionConfiguration = list(
KeyId = "string",
Type = "CUSTOMER_KMS"|"AWS_OWNED_KMS_KEY"
),
NumberOfAssociations = 123,
EnabledAnalysisTypes = list(
"TLS_SNI"|"HTTP_HOST"
),
TransitGatewayId = "string",
TransitGatewayOwnerAccountId = "string",
AvailabilityZoneMappings = list(
list(
AvailabilityZone = "string"
)
),
AvailabilityZoneChangeProtection = TRUE|FALSE,
NatGatewayMappings = list(
list(
NatGatewayId = "string"
)
),
ProxySettings = list(
ListenerProperties = list(
list(
Port = 123,
Type = "HTTP"|"HTTPS"
)
)
),
NoSourcePreservation = TRUE|FALSE,
VpcEndpoint = list(
VpcId = "string",
SubnetMappings = list(
list(
SubnetId = "string",
IPAddressType = "DUALSTACK"|"IPV4"|"IPV6"
)
)
)
),
FirewallStatus = list(
Status = "PROVISIONING"|"DELETING"|"READY"|"FAILED",
ConfigurationSyncStateSummary = "PENDING"|"IN_SYNC"|"CAPACITY_CONSTRAINED",
SyncStates = list(
list(
Attachment = list(
SubnetId = "string",
EndpointId = "string",
Status = "CREATING"|"DELETING"|"FAILED"|"ERROR"|"SCALING"|"READY",
StatusMessage = "string",
DnsName = "string"
),
Config = list(
list(
SyncStatus = "PENDING"|"IN_SYNC"|"CAPACITY_CONSTRAINED"|"NOT_SUBSCRIBED"|"DEPRECATED",
UpdateToken = "string"
)
),
NatGatewayAttachments = list(
list(
NatGatewayId = "string",
Status = "CREATING"|"READY"|"UPDATING"|"FAILED"|"DELETING",
StatusMessage = "string",
DnsName = "string"
)
)
)
),
CapacityUsageSummary = list(
CIDRs = list(
AvailableCIDRCount = 123,
UtilizedCIDRCount = 123,
IPSetReferences = list(
list(
ResolvedCIDRCount = 123
)
)
)
),
TransitGatewayAttachmentSyncState = list(
AttachmentId = "string",
TransitGatewayAttachmentStatus = "CREATING"|"DELETING"|"DELETED"|"FAILED"|"ERROR"|"READY"|"PENDING_ACCEPTANCE"|"REJECTING"|"REJECTED",
StatusMessage = "string"
)
)
)
Request syntax¶
svc$create_firewall(
FirewallName = "string",
FirewallPolicyArn = "string",
VpcId = "string",
SubnetMappings = list(
list(
SubnetId = "string",
IPAddressType = "DUALSTACK"|"IPV4"|"IPV6"
)
),
DeleteProtection = TRUE|FALSE,
SubnetChangeProtection = TRUE|FALSE,
FirewallPolicyChangeProtection = TRUE|FALSE,
Description = "string",
Tags = list(
list(
Key = "string",
Value = "string"
)
),
EncryptionConfiguration = list(
KeyId = "string",
Type = "CUSTOMER_KMS"|"AWS_OWNED_KMS_KEY"
),
EnabledAnalysisTypes = list(
"TLS_SNI"|"HTTP_HOST"
),
TransitGatewayId = "string",
AvailabilityZoneMappings = list(
list(
AvailabilityZone = "string"
)
),
AvailabilityZoneChangeProtection = TRUE|FALSE,
NatGatewayMappings = list(
list(
NatGatewayId = "string"
)
),
ProxySettings = list(
ListenerProperties = list(
list(
Port = 123,
Type = "HTTP"|"HTTPS"
)
)
),
NoSourcePreservation = TRUE|FALSE,
VpcEndpoint = list(
VpcId = "string",
SubnetMappings = list(
list(
SubnetId = "string",
IPAddressType = "DUALSTACK"|"IPV4"|"IPV6"
)
)
)
)