【问题标题】:How to get a VM Flavours in IBM cloud through Softlayer Rest API如何通过 Softlayer Rest API 在 IBM 云中获取 VM 风味
【发布时间】:2019-06-24 22:21:19
【问题描述】:

我想使用 Softlayer Rest API 获得 VM Flavours(Compute C1.2x2,Balanced B1.2x8)。我没有找到任何与获取 Flavours 相关的 API 参考。

【问题讨论】:

    标签: api virtual-machine ibm-cloud-infrastructure


    【解决方案1】:

    要检索活动的 VM 风格,请使用以下 rest api 调用:

    方法:获取

    https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/835/getActivePresets
    

    您将收到如下示例的响应:

    [
      {
            "description": "B1.16x64x100",
            "id": 351,
            "isActive": "1",
            "keyName": "B1_16X64X100",
            "name": "B1.16x64x100",
            "packageId": 835
        },
        {
            "description": "C1.1x1x100",
            "id": 359,
            "isActive": "1",
            "keyName": "C1_1X1X100",
            "name": "C1.1x1x100",
            "packageId": 835
        },
    ] 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-11-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-15
      相关资源
      最近更新 更多