Subnetリストの照会
    • PDF

    Subnetリストの照会

    • PDF

    Article Summary

    VPC環境で利用できます。

    説明

    使用できるSubnetリストを照会します

    リクエスト

    リクエストURL

    GET https://vpcsearchengine.apigw.ntruss.com/api/v2/cluster/getSubnetList
    ?softwareProductCode={softwareProductCode}
    &vpcNo={vpcNo} [KR]
    
    GET https://vpcsearchengine.apigw.ntruss.com/api/sgn-v2/cluster/getSubnetList
    ?softwareProductCode={softwareProductCode}
    &vpcNo={vpcNo} [SGN]
    
    GET https://vpcsearchengine.apigw.ntruss.com/api/jpn-v2/cluster/getSubnetList
    ?softwareProductCode={softwareProductCode}
    &vpcNo={vpcNo} [JPN]
    

    リクエストヘッダ

    ヘッダ名説明
    x-ncp-apigw-timestamp1970年1月1日00:00:00協定世界時(UTC)からの経過時間をミリ秒(Millisecond)で表したもので、
    API Gatewayサーバとの時間差が5分以上の場合、有効ではないリクエストとみなす
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyNAVERクラウドプラットフォームのポータルから発行されたAccess Key ID値
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2Access Key ID値とSecret Keyで暗号化した署名
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    Content-Typeリクエストボディーcontent typeをapplication/jsonに指定
    Content-Type: application/json

    リクエストパラメータ

    パラメータタイプ必須有無説明
    softwareProductCodeStringY使用するOSタイプです。getOsProductListアクションを通じて取得できます。
    vpcNoIntegerY使用するVPC Noです。getVpcListアクションを通じて取得できます。

    リクエスト例

    GET https://vpcsearchengine.apigw.ntruss.com/api/v2/cluster/getSubnetList
    ?softwareProductCode=SW.VELST.OS.LNX64.CNTOS.0708.B050
    &vpcNo=1236
    HOST: vpcsearchengine.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-signature-v2: zq0FrtlU8JZJi9esTK31bCQUNG3H+jo4CMjMkJDoWSc=
    x-ncp-apigw-timestamp: 1593848345548
    x-ncp-iam-access-key: 7fIvgFY428mtY6sY8maw
    
    curl -X GET "https://vpcsearchengine.apigw.ntruss.com/api/v2/cluster/getSubnetList
    ?softwareProductCode=SW.VELST.OS.LNX64.CNTOS.0708.B050
    &vpcNo=1236" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "x-ncp-iam-access-key: 7fIvgFY428mtY6sY8maw" \
    -H "x-ncp-apigw-timestamp: 1601971222179" \
    -H "x-ncp-apigw-signature-v2: zrCelnR48AADdK/uh6Xe3yy468i8KpQoewYHUmeqYh4=" \
    

    レスポンスパラメータ

    public class GetSubnetListResponseVo {
        ArrayList<SubnetListDetailVo> content;
    }
    
    public class SubnetListDetailVo {
        String subnet;
        String subnetName;
        Integer subnetNo;
        String vpcName;
        Integer vpcNo;
        String zoneName;
        Integer zoneNo;
        String permission;
    }
    

    フィールド

    パラメータ名タイプ説明
    contentArrayList<SubnetListDetailVo>Subnetリスト
    subnetStringSubnet IPアドレスの範囲
    subnetNameStringSubnet名
    subnetNoIntegerSubnet番号
    vpcNameStringVPC名
    vpcNoIntegerVPC番号
    zoneNameStringZone名
    zoneNoIntegerZone番号
    permissionStringSubaccountアカウントでの使用の可否です。Denyである場合、getSubnetDetail権限がないため使用できない状態を意味します。

    レスポンス例

    {
      "code": 0,
      "message": "SUCCESS",
      "result": {
        "content": [
          {
            "subnet": "10.0.2.16/28",
            "subnetName": "privatesmall",
            "subnetNo": 22632,
            "vpcName": "test",
            "vpcNo": 36752,
            "zoneName": "KR-1",
            "zoneNo": 2,
            "permission": "Allow"
          },
          {
            "subnet": "10.0.1.0/24",
            "subnetName": "testpri",
            "subnetNo": 22630,
            "vpcName": "test",
            "vpcNo": 36752,
            "zoneName": "KR-1",
            "zoneNo": 2,
            "permission": "Allow"
          }
        ]
      },
      "requestId": "79e63e0c-9cdb-4736-89c6-8a61dab0d687"
    }
    

    この記事は役に立ちましたか?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.