Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.
Utilizzare CreateCustomerGateway con una CLI
I seguenti esempi di codice mostrano come usare CreateCustomerGateway.
- CLI
-
- AWS CLI
-
Come creare un gateway del cliente
Quanto segue create-customer-gateway L'esempio crea un gateway per i clienti con l'indirizzo IP specificato per la relativa interfaccia esterna.
aws ec2 create-customer-gateway \
--type ipsec.1 \
--public-ip 12.1.2.3 \
--bgp-asn 65534
Output:
{
"CustomerGateway": {
"CustomerGatewayId": "cgw-0e11f167",
"IpAddress": "12.1.2.3",
"State": "available",
"Type": "ipsec.1",
"BgpAsn": "65534"
}
}
Per ulteriori informazioni, vedere AWS Site-to-Site Dispositivi gateway per clienti VPN nel AWS Site-to-Site Guida per l'utente della VPN.
- PowerShell
-
- Utensili per PowerShell V4
-
Esempio 1: questo esempio crea il gateway del cliente specificato.
New-EC2CustomerGateway -Type ipsec.1 -PublicIp 203.0.113.12 -BgpAsn 65534
Output:
BgpAsn : 65534
CustomerGatewayId : cgw-1a2b3c4d
IpAddress : 203.0.113.12
State : available
Tags : {}
Type : ipsec.1
- Utensili per PowerShell V5
-
Esempio 1: questo esempio crea il gateway del cliente specificato.
New-EC2CustomerGateway -Type ipsec.1 -PublicIp 203.0.113.12 -BgpAsn 65534
Output:
BgpAsn : 65534
CustomerGatewayId : cgw-1a2b3c4d
IpAddress : 203.0.113.12
State : available
Tags : {}
Type : ipsec.1
Per un elenco completo di AWS Guide per sviluppatori SDK ed esempi di codice, consulta Crea EC2 risorse Amazon utilizzando un AWS SDK. Questo argomento include anche informazioni su come iniziare e dettagli sulle versioni precedenti dell'SDK.