无法使用软层取消 vlan api

Not able to cancel vlan using softlayer api

我已经使用 billing_svc.cancelItem(billingItemId) sl api 调用取消了可移植子网。 已验证的取消 sl 票已打开以供取消。 但是在SL portal里面还是看到了可移植的子网,没有提供取消的选项。

尝试使用 billingItem 取消 vlan 时,出现以下错误:

SoftLayerAPIError(SoftLayer_Exception_Public):无法处理此取消,请联系支持人员。无法取消 VLAN。原因:1 个非主子网仍在 VLAN 上。

错误指出非主子网仍在 VLAN 上。为了解决这个问题,您需要 运行 使用非主要子网计费项目 ID 的 cancelItem 方法。

这样做的结果是子网将没有其计费项目,然后您需要等到作业进程开始所有计费项目的回收过程(它应该 运行 每天一次,或者通常在 24 小时内)。

最后,VLAN 应该没有引用的子网,cancelItem 方法应该使用 VLAN 计费 ID 成功运行。

这将是检索 VLAN 及其非主要子网计费项目 ID 的请求

https://$username:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Network_Vlan/$networkVlanId/getObject.json?objectMask=mask[billingItem[id],secondarySubnets[billingItem[id]]]
Method: GET

然后使用子网计费项目 ID 在下一个请求中取消它:

https://$username:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Billing_Item/$subnetBillingItemId/cancelItem.json
Method: DELETE
Body:
{
                "parameters": [
                                true
                ]
}