如何在SoftLay中访问已删除的VSI数据

2024-06-16 13:24:40 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要访问已删除的VSI以查找其ID。我有已删除设备的主机名。本质上,我需要获取已删除VSI的主机名并找到它们的ID

import SoftLayer
import json

USERNAME = 'set me'
API_KEY = 'set me'


client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
accountService = client['SoftLayer_Account']
objectMask= "mask[hostname,id]"

try:

 response = accountService.getallTopLevelBillingItems(mask=objectMask)
 print(json.dumps(response, sort_keys=True, indent=2, separators=(',', ': ')))

except:

 print("Unable to get the VSIs")`

Tags: keyimportclientapiidjsonresponseusername
1条回答
网友
1楼 · 发布于 2024-06-16 13:24:40

一旦删除的VSI被取消,就无法使用SLDN API检索它们

我不确定,但你可以尝试通过提交一个票证,并要求该信息,如果你需要这些身份证记录的目的

相关问题 更多 >