我正在寻找一个使用SoftLayer_Virtual_Guest::setTransientWebhook的瞬态VSI的示例代码。有没有示例代码?
谢谢Behzad
发布于 2019-11-27 06:04:23
尝试处理下一个请求:
方法获取
http://api.softlayer.com/rest/v3.1/SoftLayer_Account/getVirtualGuests?objectMask=mask[id,transientGuestFlag]&objectFilter={"virtualGuests":{"transientGuestFlag":{"operation": 1}}}数据1表示真,0表示假,在本例中,我们使用带有数据1的1
选择要设置的VSI id并使用以下请求:
POST的方法
http://api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/111111/setTransientWebhookBody
{"parameters":[
"https://test1.com",
"testsupport"]
}111111数据是我们在上一次请求中选择的VSI。
参考
https://sldn.softlayer.com/reference/datatypes/SoftLayer_Virtual_Guest/#transientGuestFlag https://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/setTransientWebhook/
我希望它能帮助你
发布于 2019-11-27 07:53:27
谢谢Daniel,这是否等同于python中的代码: request =client‘’Virtual_Guest‘.createObject({ 'hostname':hostname,‘'domain':域名,’startCpu‘:cpus,'maxMemory':内存,‘'hourlyBillingFlag':'true',’数据中心‘:{'name':'tor01'},'operatingSystemReferenceCode':os_code,# 'localDiskFlag':'false',"supplementalCreateObjectOptions":{"flavorKeyName":"C1_1X1X25"},'transientGuestFlag':'true',# 'sshKeys':{"id":201867} "parameters":["https://test1.com","testsupport"]。
https://stackoverflow.com/questions/59057139
复制相似问题