CLI로 CreateCustomerGateway 사용 - Amazon Elastic Compute Cloud

CLI로 CreateCustomerGateway 사용

다음 코드 예시는 CreateCustomerGateway의 사용 방법을 보여 줍니다.

CLI
AWS CLI

고객 게이트웨이 생성

이 예시에서는 외부 인터페이스에 대해 지정된 IP 주소를 사용하여 고객 게이트웨이를 생성합니다.

명령:

aws ec2 create-customer-gateway --type ipsec.1 --public-ip 12.1.2.3 --bgp-asn 65534

결과:

{ "CustomerGateway": { "CustomerGatewayId": "cgw-0e11f167", "IpAddress": "12.1.2.3", "State": "available", "Type": "ipsec.1", "BgpAsn": "65534" } }
PowerShell
Tools for PowerShell V4

예제 1: 이 예제에서는 지정된 고객 게이트웨이를 생성합니다.

New-EC2CustomerGateway -Type ipsec.1 -PublicIp 203.0.113.12 -BgpAsn 65534

출력:

BgpAsn : 65534 CustomerGatewayId : cgw-1a2b3c4d IpAddress : 203.0.113.12 State : available Tags : {} Type : ipsec.1
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V4)CreateCustomerGateway를 참조하세요.

Tools for PowerShell V5

예제 1: 이 예제에서는 지정된 고객 게이트웨이를 생성합니다.

New-EC2CustomerGateway -Type ipsec.1 -PublicIp 203.0.113.12 -BgpAsn 65534

출력:

BgpAsn : 65534 CustomerGatewayId : cgw-1a2b3c4d IpAddress : 203.0.113.12 State : available Tags : {} Type : ipsec.1
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V5)CreateCustomerGateway를 참조하세요.

AWS SDK 개발자 가이드 및 코드 예시의 전체 목록은 AWS SDK를 사용하여 Amazon EC2 리소스 생성 섹션을 참조하세요. 이 주제에는 시작하기에 대한 정보와 이전 SDK 버전에 대한 세부 정보도 포함되어 있습니다.