getCloudPostgresqlTargetSubnetList

Prev Next

VPC環境で利用できます。

Cloud DB for PostgreSQLで使用可能な Subnetリストを照会します。

コマンド

コマンド構文は次の通りです。

ncloud vpostgresql getCloudPostgresqlTargetSubnetList [regionCode] [vpcNo] [cloudPostgresqlImageProductCode] [isPublic] [output]

パラメータ

パラメータの説明は次の通りです。

パラメータ タイプ 必須の有無 説明 制限事項
regionCode String N リージョンコード
- regionCodeはgetRegionListアクションを通じて取得
- デフォルト: getRegionList照会結果の最初のリージョンを選択
-
vpcNo String Y VPC番号
- vpcNoはgetCloudPostgresqlTargetVpcListアクションを通じて取得
-
cloudPostgresqlImageProductCode String Y Cloud DB for PostgreSQLイメージ商品コード
- cloudPostgresqlImageProductCodeはgetCloudPostgresqlImageProductListアクションの productCodeで取得
-
isPublic Boolean N Public Subnetを照会するかどうか -
output String N レスポンス結果の形式タイプ
- オプション: xml | json
- デフォルト: json
-

レスポンス

レスポンスデータタイプ

  • TargetSubnetListタイプ
TargetSubnetList extends CommonResponse 説明
private Integer totalRows; 照会されたリストの総数
private List<TargetSubnet> targetSubnetList = new ArrayList<>(); Subnetリスト
  • TargetSubnetタイプ
TargetSubnet 説明
private String subnetNo; Subnet番号
private String subnetName; Subnet名
private String vpcNo; VPC番号
private String vpcName; VPC名
private String zoneCode; Zoneコード
private String subnet; IPアドレスの範囲
private Boolean isPublic; Public Subnetかどうか
private Date createdDate; 作成日

呼び出しとレスポンスの例を説明します。

呼び出し例

呼び出しのサンプルコードは次の通りです。

ncloud vpostgresql getCloudPostgresqlTargetSubnetList --regionCode KR --vpcNo 25**** --cloudPostgresqlImageProductCode SW.VPGSL.OS.LNX64.CNTOS.0708.PGSQL.133.B050

レスポンス例

レスポンスのサンプルコードは次の通りです。

レスポンス結果の形式タイプ(output)が jsonの場合

{
  "getCloudPostgresqlTargetSubnetListResponse": {
    "requestId": "415050c7-bda1-43b6-9af1-f5ade127ad82",
    "returnCode": 0,
    "returnMessage": "success",
    "totalRows": 2,
    "targetSubnetList": [
      {
        "subnetNo": "37****",
        "subnetName": "test-****-private-kr1",
        "vpcNo": "25****",
        "vpcName": "test-****",
        "zoneCode": "KR-1",
        "subnet": "192.168.0.0/24",
        "isPublic": false,
        "createdDate": "2022-03-24T18:00:00+0900"
      },
      {
        "subnetNo": "37****",
        "subnetName": "test-****-public-kr1",
        "vpcNo": "25****",
        "vpcName": "test-****",
        "zoneCode": "KR-1",
        "subnet": "192.168.1.0/24",
        "isPublic": true,
        "createdDate": "2022-03-24T18:00:00+0900"
      }
    ]
  }
}

レスポンス結果の形式タイプ(output)が xmlの場合

<getCloudPostgresqlTargetSubnetListResponse>
    <requestId>415050c7-bda1-43b6-9af1-f5ade127ad82</requestId>
    <returnCode>0</returnCode>
    <returnMessage>success</returnMessage>
    <totalRows>2</totalRows>
    <targetSubnetList>
        <targetSubnet>
            <subnetNo>37****</subnetNo>
            <subnetName>test-****-private-kr1</subnetName>
            <vpcNo>25****</vpcNo>
            <vpcName>test-****</vpcName>
            <zoneCode>KR-1</zoneCode>
            <subnet>192.168.0.0/24</subnet>
            <isPublic>false</isPublic>
            <createdDate>2022-03-24T18:00:00+0900</createdDate>
        </targetSubnet>
        <targetSubnet>
            <subnetNo>37****</subnetNo>
            <subnetName>test-****-public-kr1</subnetName>
            <vpcNo>25****</vpcNo>
            <vpcName>test-****</vpcName>
            <zoneCode>KR-1</zoneCode>
            <subnet>192.168.1.0/24</subnet>
            <isPublic>true</isPublic>
            <createdDate>2022-03-24T18:00:00+0900</createdDate>
        </targetSubnet>
    </targetSubnetList>
</getCloudPostgresqlTargetSubnetListResponse>