Softlayer API: 如何update/remove 机器密码

Softlayer API: how to update/remove machine password

我可以通过 SoftLayer_Virtual_Guest 获取 VS OS 密码,但现在面临更新 OS 通行证的问题。如何更新(最好删除,或置空)这个

也不确定 Software_Component_Password 的用途。

您关于密码更新的问题已在此处得到解答

在您的情况下,对于虚拟来宾,您应该能够通过以下 GET REST 调用获取 VSI 的所有密码

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/[server_id]/getSoftwareComponents?objectMask=mask[passwords,softwareLicense]

更改[用户名],[apikey],[server_id] 用你自己的数据。

您需要 select 密码 ID 并使用以下 POST 请求来更新它。

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Software_Component_Password/[password_id]/editObject


Body in JSON:
{
  "parameters": [
    {
      "password": "myPassEdited",
      "username": "myUserEdited"
    }
  ]
}

尝试发送一个空密码,只需在密码参数中设置“”即可。

使用 Software_Component_Password service you can create, edit, delete 一个或一组密码,我建议您查看有关此服务的信息。