create_customer_gateway
async
¶
create_customer_gateway(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 | |