--- title: "getCloudMysqlTargetSubnetList" slug: "cli-vmysql-getcloudmysqltargetsubnetlist" updated: 2026-09-17T10:11:06Z published: 2026-09-17T10:11:06Z canonical: "cli.ncloud-docs.com/cli-vmysql-getcloudmysqltargetsubnetlist" --- > ## 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. # getCloudMysqlTargetSubnetList VPC環境で利用できます。 Cloud DB for MySQLで使用可能な Subnetリストを照会します。 ## 構文 `getCloudMysqlTargetSubnetList`構文は次の通りです。 ``` ./ncloud vmysql getCloudMysqlTargetSubnetList \ --vpcNo \ --cloudMysqlImageProductCode \ [--isPublic ] \ [--regionCode ] \ [--output ] ``` ## オプション `getCloudMysqlTargetSubnetList`の実行時に指定できるオプションについて説明します。 ### 必須オプション `getCloudMysqlTargetSubnetList`の必須オプションです。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--vpcNo` | String | Required | VPC番号 - [getCloudMysqlTargetVpcList](/docs/ja/cli-vmysql-getcloudmysqltargetvpclist)を参照 | | `--cloudMysqlImageProductCode` | String | Required | Cloud DB for MySQLイメージ商品コード - [getCloudMysqlImageProductList](/docs/ja/cli-vmysql-getcloudmysqlimageproductlist)を参照 | ### 任意オプション `getCloudMysqlTargetSubnetList`の任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--isPublic` | Boolean | Optional | Public Subnetかどうか - `true` \| `false` - `true`: Public Subnet - `false`: Private Subnet | ### 共通オプション `vmysql`コマンドで共通して使用するオプションについては、[Cloud DB for MySQL (VPC)のオプション](/docs/ja/cli-vmysql#%EC%98%B5%EC%85%98)を参照してください。 ## 例 Cloud DB for MySQL Subnetリストの照会リクエストが成功すると、各 Subnetの番号と名前、IPアドレス範囲情報が返されます。 ### コマンド コマンドの例は次の通りです。 ``` ./ncloud vmysql getCloudMysqlTargetSubnetList \ --vpcNo 12345678 \ --cloudMysqlImageProductCode SW.VMYSL.OS.LNX64.ROCKY.0810.MYSQL.B050 \ --isPublic false \ --regionCode KR \ --output json ``` ### 出力 出力の例は次の通りです。 ``` { "getCloudMysqlTargetSubnetListResponse": { "totalRows": 2, "targetSubnetList": [ { "subnetNo": "23456789", "subnetName": "private-subnet", "vpcNo": "12345678", "vpcName": "vpc-01", "zoneCode": "KR-1", "subnet": "10.0.0.0/24", "isPublic": false, "createdDate": "2026-04-28T13:00:34+0900" }, { "subnetNo": "23456790", "subnetName": "standby-subnet", "vpcNo": "12345678", "vpcName": "vpc-01", "zoneCode": "KR-2", "subnet": "10.0.1.0/24", "isPublic": false, "createdDate": "2026-06-04T16:49:30+0900" } ], "requestId": "d4e5f6a7-b8c9-0123-defa-456789012345", "returnCode": "0", "returnMessage": "success" } } ```