create_firewall
async
¶
create_firewall(
firewall_name: ResourceName,
firewall_policy_arn: ResourceArn,
*,
config_overrides: Optional[AsyncNetworkFirewallClientConfig] = None,
vpc_id: Optional[VpcId] = None,
subnet_mappings: Optional[SubnetMappings] = None,
delete_protection: Optional[Boolean] = None,
subnet_change_protection: Optional[Boolean] = None,
firewall_policy_change_protection: Optional[Boolean] = None,
description: Optional[Description] = None,
tags: Optional[TagList] = None,
encryption_configuration: Optional[EncryptionConfiguration] = None,
enabled_analysis_types: Optional[EnabledAnalysisTypes] = None,
transit_gateway_id: Optional[TransitGatewayId] = None,
availability_zone_mappings: Optional[AvailabilityZoneMappings] = None,
availability_zone_change_protection: Optional[Boolean] = None,
nat_gateway_mappings: Optional[NatGatewayMappingsList] = None,
proxy_settings: Optional[ProxySettings] = None,
no_source_preservation: Optional[Boolean] = None,
vpc_endpoint: Optional[VpcEndpoint] = None,
) -> CreateFirewallResponse
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 UpdateLoggingConfiguration, AssociateSubnets, and UpdateFirewallDeleteProtection.
To manage a firewall's tags, use the standard Amazon Web Services resource tagging operations, ListTagsForResource, TagResource, and UntagResource.
To retrieve information about firewalls, use ListFirewalls and DescribeFirewall.
To generate a report on the last 30 days of traffic monitored by a firewall, use StartAnalysisReport.
Parameters:
-
firewall_name(ResourceName) –The descriptive name of the firewall. You can't change the name of a firewall after you create it.
-
firewall_policy_arn(ResourceArn) –The Amazon Resource Name (ARN) of the FirewallPolicy that you want to use for the firewall.
-
vpc_id(Optional[VpcId], default:None) –The unique identifier of the VPC where Network Firewall should create the firewall.
You can't change this setting after you create the firewall.
-
subnet_mappings(Optional[SubnetMappings], default:None) –The 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.
-
delete_protection(Optional[Boolean], default:None) –A 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. -
subnet_change_protection(Optional[Boolean], default:None) –A 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. -
firewall_policy_change_protection(Optional[Boolean], default:None) –A 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. -
description(Optional[Description], default:None) –A description of the firewall.
-
tags(Optional[TagList], default:None) –The key:value pairs to associate with the resource.
-
encryption_configuration(Optional[EncryptionConfiguration], default:None) –A complex type that contains settings for encryption of your firewall resources.
-
enabled_analysis_types(Optional[EnabledAnalysisTypes], default:None) –An optional setting indicating the specific traffic analysis types to enable on the firewall.
-
transit_gateway_id(Optional[TransitGatewayId], default:None) –Required 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 CreateFirewall. For specific guidance about transit gateway-attached firewalls, see Considerations for transit gateway-attached firewalls in the Network Firewall Developer Guide.
-
availability_zone_mappings(Optional[AvailabilityZoneMappings], default:None) –Required. 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 AssociateAvailabilityZones or DisassociateAvailabilityZones, but this may briefly disrupt traffic. The
AvailabilityZoneChangeProtectionsetting controls whether you can make these modifications. -
availability_zone_change_protection(Optional[Boolean], default:None) –Optional. 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 using UpdateAvailabilityZoneChangeProtection.Default value:
FALSE -
nat_gateway_mappings(Optional[NatGatewayMappingsList], default:None) –The 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. -
proxy_settings(Optional[ProxySettings], default:None) –The 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. -
no_source_preservation(Optional[Boolean], default:None) –Optional. 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 -
vpc_endpoint(Optional[VpcEndpoint], default:None) –The 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.
Raises:
-
InsufficientCapacityException–Amazon Web Services doesn't currently have enough available capacity to fulfill your request. Try your request later.
-
InternalServerError–Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request.
-
InvalidOperationException–The operation failed because it's not valid. For example, you might have tried to delete a rule group or firewall policy that's in use.
-
InvalidRequestException–The operation failed because of a problem with your request. Examples include:
-
You specified an unsupported parameter name or value.
-
You tried to update a property with a value that isn't among the available types.
-
Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.
-
-
LimitExceededException–Unable to perform the operation because doing so would violate a limit setting.
-
ThrottlingException–Unable to process the request due to throttling limitations.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_network_firewall/_services/async_network_firewall.py
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 | |