addRoute
    • PDF

    addRoute

    • PDF

    Article Summary

    VPC環境で利用できます。

    概要

    ルートテーブルにルートリストを追加します。

    リクエスト

    リクエストパラメータ

    パラメータ名必須の有無タイプ制約事項説明
    regionCodeNoStringリージョンコード
    ルートが追加されるルートテーブルのリージョン(Region)を決定できます。
    regionCodeはgetRegionListアクションを通じて取得できます。
    Default:getRegionList照会結果の最初のリージョンを選択
    vpcNoYesStringVPC番号
    ルートが追加されるルートテーブルのVPCを決定します。
    vpcNoはgetVpcListアクションを通じて取得できます。
    routeTableNoYesStringルートテーブル番号
    ルートが追加されるルートテーブル番号を決定します。
    routeTableNoはgetRouteTableListアクションを通じて取得できます。
    routeList.N.destinationCidrBlockYesString目的地IPv4 CIDRブロック
    追加するルートの目的地IPアドレス範囲を指定します。
    ex) routeList.1.destinationCidrBlock=0.0.0.0/0&routeList.2.destinationCidrBlock=100.10.20.0/24
    routeList.N.targetTypeCodeYesString目的地タイプコード
    追加するルートの目的地タイプを決定します。
    Options : NATGW (NAT Gateway) | VPCPEERING (VPC Peering) | VGW (Virtual Private Gateway)
    ex) routeList.1.targetTypeCode=NATGW&routeList.2.targetTypeCode=VPCPEERING
    routeList.N.targetNoYesString目的地識別番号
    目的地タイプに該当する目的地識別番号を決定します。
    targetNoは各目的地タイプに該当する照会アクションを通じて取得できます。
    ex) routeList.1.targetNo=1234&routeList.2.targetNo=2345
    routeList.N.targetNameYesString目的地名
    目的地タイプに該当する目的地名を入力します。
    targetNameは各目的地タイプに該当する照会アクションを通じて取得できます。
    ex) routeList.1.targetName=test-natgateway&routeList.2.targetName=test-peering
    responseFormatTypeNoStringレスポンス結果のフォーマットタイプ
    Options : xml | json
    Default : xml

    レスポンス

    レスポンスボディ

    リクエスト例

    GET {API_URL}/vpc/v2/addRoute
    ?regionCode=KR
    &vpcNo=***04
    &routeTableNo=***38
    &routeList.1.destinationCidrBlock=***.***.200.0/24
    &routeList.1.targetTypeCode=NATGW
    &routeList.1.targetNo=***9734
    &routeList.1.targetName=test-***
    

    レスポンス例

    リクエストの実行後、該当ルートテーブルのルートリスト

    <addRouteResponse>
      <requestId>2b97f2f0-39fc-40f0-9a8d-3eb6d40506e3</requestId>
      <returnCode>0</returnCode>
      <returnMessage>success</returnMessage>
      <totalRows>3</totalRows>
      <routeList>
        <route>
          <destinationCidrBlock>***.***.200.0/24</destinationCidrBlock>
          <targetName>test-***</targetName>
          <routeTableNo>***38</routeTableNo>
          <targetType>
            <code>NATGW</code>
            <codeName>NAT Gateway</codeName>
          </targetType>
          <targetNo>***9734</targetNo>
          <isDefault>false</isDefault>
        </route>
        <route>
          <destinationCidrBlock>***.***.0.0/16</destinationCidrBlock>
          <targetName>LOCAL</targetName>
          <routeTableNo>***38</routeTableNo>
          <targetType>
            <code>LOCAL</code>
            <codeName>Local</codeName>
          </targetType>
          <targetNo></targetNo>
          <isDefault>true</isDefault>
        </route>
        <route>
          <destinationCidrBlock>***.***.0.0/0</destinationCidrBlock>
          <targetName>INTERNET GATEWAY</targetName>
          <routeTableNo>***38</routeTableNo>
          <targetType>
            <code>IGW</code>
            <codeName>Internet Gateway</codeName>
          </targetType>
          <targetNo></targetNo>
          <isDefault>true</isDefault>
        </route>
      </routeList>
    </addRouteResponse>
    

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

    What's Next
    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.