有什么方法可以检查 billing/order 项是否确实存在于 softlayer 中?

Is there any way to check if a billing/order item actually exists in softlayer?

如果我有账单项目和订单项目的详细信息,是否有任何属性可以表明资源是否实际存在于 SL 中?例如:虚拟访客是否可用或取消配置?可能还有其他资源,例如:network_vlan 等

这个 REST 示例可能对您有所帮助:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Billing_Item/[billing_item_id]/getObject?objectMask=mask[id,cancellationDate,activeFlag]

Method: GET

其中:

cancellationDate:

A billing item's cancellation date. A billing item with a cancellation date in the past is not charged on your SoftLayer invoice. Cancellation dates in the future indicate the current billing item is active, but will be cancelled and not charged for in the future. A billing item with a null cancellation date is also considered an active billing item and is charged once every billing cycle.

已取消的计费项目的响应将是:

{
  "cancellationDate": "2014-05-16T13:53:55-05:00",
  "id": 18450000,
  "activeFlag": false
}

参考: SoftLayer_Billing_Item