用于标记机器的Softlayer REST API

时间:2017-08-09 06:53:03

标签: ibm-cloud-infrastructure

有人可以给我一个Softlayer REST API,用于标记已经配置的机器。我需要虚拟机和裸机。

谢谢, 基肖尔马布

1 个答案:

答案 0 :(得分:0)

虚拟机

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Tag/setTags
Method: Post

{  
   "parameters":[  
      "tag1,tag2",
      "GUEST",
      29756959
   ]
}

replace 29756959 with the ID of your virtual machine

裸金属

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Tag/setTags

Method: Post

{  
   "parameters":[  
      "tag1,tag2",
      "HARDWARE",
      29756959
   ]
}

replace 29756959 with the ID of your bare metal