create_customer_gateway
¶
create_customer_gateway(
*,
config_overrides: Optional[EC2ClientConfig] = None,
bgp_asn: Optional[Integer] = None,
public_ip: Optional[String] = None,
certificate_arn: Optional[String] = None,
type: Optional[GatewayType] = None,
tag_specifications: Optional[TagSpecificationList] = None,
device_name: Optional[String] = None,
ip_address: Optional[String] = None,
bgp_asn_extended: Optional[Long] = None,
dry_run: Optional[Boolean] = None,
) -> CreateCustomerGatewayResult
Provides information to Amazon Web Services about your customer gateway device. The customer gateway device is the appliance at your end of the VPN connection. You must provide the IP address of the customer gateway device’s external interface. The IP address must be static and can be behind a device performing network address translation (NAT).
For devices that use Border Gateway Protocol (BGP), you can also provide the device's BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network. If you don't have an ASN already, you can use a private ASN. For more information, see Customer gateway options for your Site-to-Site VPN connection in the Amazon Web Services Site-to-Site VPN User Guide.
To create more than one customer gateway with the same VPN type, IP address, and BGP ASN, specify a unique device name for each customer gateway. An identical request returns information about the existing customer gateway; it doesn't create a new customer gateway.
Parameters:
-
bgp_asn(Optional[Integer], default:None) –For customer gateway devices that support BGP, specify the device's ASN. You must specify either
BgpAsnorBgpAsnExtendedwhen creating the customer gateway. If the ASN is larger than2,147,483,647, you must useBgpAsnExtended.Default: 65000
Valid values:
1to2,147,483,647 -
public_ip(Optional[String], default:None) –This member has been deprecated. The Internet-routable IP address for the customer gateway's outside interface. The address must be static.
-
certificate_arn(Optional[String], default:None) –The Amazon Resource Name (ARN) for the customer gateway certificate.
-
type(Optional[GatewayType], default:None) –The type of VPN connection that this customer gateway supports (
ipsec.1). -
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the customer gateway.
-
device_name(Optional[String], default:None) –A name for the customer gateway device.
Length Constraints: Up to 255 characters.
-
ip_address(Optional[String], default:None) –The IP address for the customer gateway device's outside interface. The address must be static. If
OutsideIpAddressTypein your VPN connection options is set toPrivateIpv4, you can use an RFC6598 or RFC1918 private IPv4 address. IfOutsideIpAddressTypeis set toIpv6, you can use an IPv6 address. -
bgp_asn_extended(Optional[Long], default:None) –For customer gateway devices that support BGP, specify the device's ASN. You must specify either
BgpAsnorBgpAsnExtendedwhen creating the customer gateway. If the ASN is larger than2,147,483,647, you must useBgpAsnExtended.Valid values:
2,147,483,648to4,294,967,295 -
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a customer gateway This example creates a customer gateway with the specified IP address for its outside interface.
Source code in docs_src/capo_ec2/_services/ec2.py
7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 | |