VPC 환경에서 이용 가능합니다.
NAT Gateway 인스턴스를 생성합니다.
구문
createNatGatewayInstance 구문은 다음과 같습니다.
./ncloud vpc createNatGatewayInstance \
--vpcNo <vpc-no> \
--zoneCode <zone-code> \
[--natGatewayName <nat-gateway-name>] \
[--natGatewayDescription <nat-gateway-description>] \
[--subnetNo <subnet-no>] \
[--publicIpInstanceNo <public-ip-instance-no>] \
[--privateIp <private-ip>] \
[--regionCode <KR|KRS>] \
[--output <json|xml>]
옵션
createNatGatewayInstance 실행 시 지정할 수 있는 옵션을 설명합니다.
필수 옵션
createNatGatewayInstance의 필수 옵션입니다.
| 옵션 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
--vpcNo |
String | Required | VPC 번호
|
--zoneCode |
String | Required | 존 코드
|
선택 옵션
createNatGatewayInstance의 선택 옵션입니다. 지정하지 않은 옵션에는 기본값이 적용됩니다.
| 옵션 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
--natGatewayName |
String | Optional | NAT Gateway 이름
|
--natGatewayDescription |
String | Optional | 생성하려는 NAT Gateway에 대한 설명 (Byte)
|
--subnetNo |
String | Optional | Subnet 번호
|
--publicIpInstanceNo |
String | Optional | 공인 IP Instance 번호
|
--privateIp |
String | Optional | 사설 IP 주소
|
공통 옵션
vpc 명령에서 공통으로 사용하는 옵션에 대한 정보는 VPC 옵션을 참조해 주십시오.
예시
NAT Gateway 인스턴스 생성 요청이 성공하면 인스턴스의 구성 정보와 생성 상태가 반환됩니다.
명령
명령 예시는 다음과 같습니다.
./ncloud vpc createNatGatewayInstance \
--vpcNo 12345678 \
--zoneCode KR-1 \
--natGatewayName test-natgw-01 \
--natGatewayDescription "Test NAT Gateway" \
--subnetNo 23456789 \
--regionCode KR \
--output json
출력
출력 예시는 다음과 같습니다.
{
"createNatGatewayInstanceResponse": {
"totalRows": 1,
"natGatewayInstanceList": [
{
"vpcNo": "12345678",
"vpcName": "vpc01",
"natGatewayInstanceNo": "56789012",
"natGatewayName": "test-natgw-01",
"publicIp": "",
"natGatewayInstanceStatus": {
"code": "INIT",
"codeName": "INIT 상태"
},
"natGatewayInstanceStatusName": "Creating",
"natGatewayInstanceOperation": {
"code": "CREAT",
"codeName": "CREAT OP"
},
"createDate": "2026-07-20T10:14:18+0900",
"natGatewayDescription": "Test NAT Gateway",
"zoneCode": "KR-1",
"natGatewayType": {
"code": "PBLIP",
"codeName": "공인"
},
"subnetName": "test-natgw-subnet",
"subnetNo": "23456789",
"privateIp": "192.168.4.6",
"publicIpInstanceNo": "",
"natGatewayIpList": [
{
"type": "PRIMARY",
"privateIp": "192.168.4.6",
"publicIp": "",
"publicIpInstanceNo": ""
}
]
}
],
"requestId": "e6c2ad26-0bd1-46d0-a3c5-02aaf5600237",
"returnCode": "0",
"returnMessage": "success"
}
}