Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Api SoftLayer_帐户::getOperatingSystemReloadImages_Api_Ibm Cloud Infrastructure - Fatal编程技术网

Api SoftLayer_帐户::getOperatingSystemReloadImages

Api SoftLayer_帐户::getOperatingSystemReloadImages,api,ibm-cloud-infrastructure,Api,Ibm Cloud Infrastructure,我想在OSReload期间使用API获取可用的OS列表。 我找到了提到的SoftLayer_Account::getOperatingSystemReloadImages方法。但找不到该方法的用法。 谁能在这件事上帮我? 谢谢。我找不到这个方法getOperatingSystemReloadImages。但我找到了一种获得操作系统重新加载选项的方法: 首先,我们需要知道用于订购服务器的软件包。例如,对于虚拟来宾,使用的包是46。但如果您想确认这一点,请执行以下Rest请求: https://[u

我想在OSReload期间使用API获取可用的OS列表。 我找到了提到的SoftLayer_Account::getOperatingSystemReloadImages方法。但找不到该方法的用法。 谁能在这件事上帮我?
谢谢。

我找不到这个方法
getOperatingSystemReloadImages
。但我找到了一种获得操作系统重新加载选项的方法:

首先,我们需要知道用于订购服务器的软件包。例如,对于
虚拟来宾
,使用的包是
46
。但如果您想确认这一点,请执行以下
Rest
请求:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/[vsi_id]/getBillingItem?objectMask=mask[package]

Method: GET
然后,要获取“重新加载选项”,请执行:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/46/getItemPrices?objectFilter={   "itemPrices": {     "categories": {       "categoryCode": {         "operation": "os"       }     }   } }&objectMask=mask[id,item[softwareDescription], categories[categoryCode]]

Method: GET
参考文献:

编辑: 现在,为了使用“SoftLayer\u Virtual\u Guest::reloadOperatingSystem”,我们需要在Json主体配置中添加一些参数:“token”和“config”(参考:)

下面是一个REST示例:

网址:

方法:邮寄

Json:


其中:45466是操作系统的新priceId

请参见此示例以重新加载操作系统

SoftLayer_Virtual_Guest::ReloadingOperatingSystem在以下url中提到了此方法:。让我也试试你的建议。谢谢。@April,我在“编辑”部分中为“SoftLayer\u Virtual\u Guest::ReloadingOperatingSystem”添加了一个Rest示例。请检查:)。我希望它能帮助你。谢谢。让我先测试一下。
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/[virtual_Guest_ID]/reloadOperatingSystem
{
  "parameters": [
    "FORCE",
    {
      "itemPrices": [
        {
          "id": 45466
        }
      ]
    }
  ]
}