softlayer api:如何获取虚拟机的辅助地址 [英] softlayer api: how to get Secondary Addresses of virtual machine

查看:183
本文介绍了softlayer api:如何获取虚拟机的辅助地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

softlayer api:我订购时如何订购公共辅助IP地址?

softlayer api: How to order Public Secondary IP Addresses when I ordering?

我订购了一台带有8个辅助IP地址的虚拟机。通过使用api,我如何能够检索8个辅助IP地址。

I have order a virtual machine with 8 secondary ip address. by using api, how can I retrive the 8 secondary ip address.

推荐答案

在SO上给出的答案本身包含你的答案:


订购虚拟具有辅助公共IP地址的访客

以下是REST中的一个示例,用于订购具有辅助
ip地址的虚拟访客和两个第一个问题在表单中。

Below is an example in REST to order a virtual guest with a secondary ip address and two first questions in the form.

注意:不要忘记更改 [用户名] [apikey] 价格,以及包含您自己数据的其他ID

Note: Don't forget change [username], [apikey], prices, and other ids with your own data

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder

Method: POST

Body JSON:
{
  "parameters":[
      {
          "complexType": "SoftLayer_Container_Product_Order_Virtual_Guest",
          "packageId": 46,
          "location": "AMSTERDAM",
          "quantity": 1,
          "prices":[
              {"id":14640},
              {"id":11644},
              {"id":9205},
              {"id":22272},
              {"id":52231},
              {"id":21},
              {"id":2202},
              {"id":13945},
              {"id":55},
              {"id":57},
              {"id":58},
              {"id":420},
              {"id":418},
              {"id":22}
          ],
          "virtualGuests":[
              {
                  "hostname": "test",
                  "domain": "example.com"                 
              }
          ],
          "itemCategoryQuestionAnswers":[
              {
                  "answer": "2",
                  "categoryId": 14,
                  "questionId": 14
              },
              {
                  "answer": "4",
                  "categoryId": 14,
                  "questionId": 15
              }
          ]
      }

  ]
}


注意:请参阅这个问题以获得更详细的答案。

Note : Please Refer to this Question for more detailed answer.

这篇关于softlayer api:如何获取虚拟机的辅助地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆