--- title: "getSubnetList" slug: "cli-vpc-subnetmanagement-getsubnetlist" tags: ["VPC"] updated: 2026-10-08T05:05:16Z published: 2026-10-08T05:05:16Z canonical: "cli.ncloud-docs.com/cli-vpc-subnetmanagement-getsubnetlist" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # getSubnetList Available in VPC Get the list of subnets based on the conditions the user specifies. ## Syntax The `getSubnetList` syntax is as follows: ``` ./ncloud vpc getSubnetList \ [--vpcNo ] \ [--zoneCode ] \ [--subnetNoList ] \ [--subnetName ] \ [--subnet ] \ [--subnetTypeCode ] \ [--usageTypeCode ] \ [--networkAclNo ] \ [--subnetStatusCode ] \ [--pageNo ] \ [--pageSize ] \ [--regionCode ] \ [--output ] ``` ## Options This section describes the options available when running `getSubnetList`. ### Required options The following options are required for `getSubnetList`. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--pageSize` | Integer | Conditional | Page size to display when paginating - Required if `pageNo` is entered. - Uses `pageNo` and `pageSize` to paginate the results. | ### Optional options These are the optional options for `getSubnetList`. Options that are not specified will use their default values. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--vpcNo` | String | Optional | VPC number - See [getVpcList](/docs/en/cli-vpc-vpcmanagement-getvpclist). | | `--zoneCode` | String | Optional | Zone code - See [getZoneList](/docs/en/cli-vserver-server-common-getzonelist). | | `--subnetNoList` | List | Optional | Subnet number list - You can enter multiple items separated by spaces (e.g., `--subnetNoList 1234 2345`). | | `--subnetName` | String | Optional | Subnet name | | `--subnet` | String | Optional | IP address range | | `--subnetTypeCode` | String | Optional | Subnet type code - `PUBLIC` \| `PRIVATE` | | `--usageTypeCode` | String | Optional | Subnet usage type code - `GEN` \| `LOADB` \| `BM` \| `NATGW` - `GEN`: General - `LOADB`: Load balancer only - `BM`: Bare metal only - `NATGW`: NAT Gateway only | | `--networkAclNo` | String | Optional | Network ACL number - See [getNetworkAclList](/docs/en/cli-vpc-networkacl-getnetworkacllist). | | `--subnetStatusCode` | String | Optional | Subnet status code - `INIT` \| `CREATING` \| `RUN` \| `TERMTING` | | `--pageNo` | Integer | Optional | Page numbers in paged results - Page the result values using `pageNo` and `pageSize`. | ### Common options For information about the options common to all `vpc` subcommands, see [VPC options](/docs/en/cli-vpc#%EC%98%B5%EC%85%98). ## Examples If the request to retrieve the subnet list is successful, the configuration information for each subnet is returned. ### Command The command example is as follows: ``` ./ncloud vpc getSubnetList \ --vpcNo 12345678 \ --zoneCode KR-1 \ --subnetNoList 23456789 23456790 \ --subnetName test-subnet-01 \ --subnet 10.0.1.0/24 \ --subnetTypeCode PUBLIC \ --usageTypeCode GEN \ --networkAclNo 34567890 \ --subnetStatusCode RUN \ --pageNo 0 \ --pageSize 10 \ --regionCode KR \ --output json ``` ### Output The output example is as follows: ``` { "getSubnetListResponse": { "totalRows": 1, "subnetList": [ { "subnetNo": "23456789", "vpcNo": "12345678", "zoneCode": "KR-1", "subnetName": "test-subnet-01", "subnet": "10.0.1.0/24", "subnetStatus": { "code": "RUN", "codeName": "In operation" }, "createDate": "2026-07-07T14:12:27+0900", "subnetType": { "code": "PUBLIC", "codeName": "Public" }, "usageType": { "code": "GEN", "codeName": "General" }, "networkAclNo": "34567890" } ], "requestId": "b2c3d4e5-f6a7-8901-bcde-f23456789012", "returnCode": "0", "returnMessage": "success" } } ```