Available in VPC
Delete a subnet by specifying the subnet number.
Syntax
The deleteSubnet syntax is as follows:
./ncloud vpc deleteSubnet \
--subnetNo <subnet-no> \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running deleteSubnet.
Required options
The following options are required for deleteSubnet.
| Options | Type | Required | Description |
|---|---|---|---|
--subnetNo |
String | Required | Subnet number
|
Common options
For information about the options common to all vpc subcommands, see VPC options.
Examples
If the subnet deletion request is successful, the subnet's configuration information and termination status are returned.
Command
The command example is as follows:
./ncloud vpc deleteSubnet \
--subnetNo 23456789 \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"deleteSubnetResponse": {
"totalRows": 1,
"subnetList": [
{
"subnetNo": "23456789",
"vpcNo": "12345678",
"zoneCode": "KR-1",
"subnetName": "test-subnet-01",
"subnet": "10.0.1.0/24",
"subnetStatus": {
"code": "TERMTING",
"codeName": "Deleting"
},
"createDate": "2026-07-07T14:12:27+0900",
"subnetType": {
"code": "PUBLIC",
"codeName": "Public"
},
"usageType": {
"code": "GEN",
"codeName": "General"
},
"networkAclNo": "34567890"
}
],
"requestId": "d4e5f6a7-b8c9-0123-defa-456789012345",
"returnCode": "0",
"returnMessage": "success"
}
}