是否可以使用Softlayer rest api从多VLAN中删除附加组件?如果是这样,请告诉我请求主体应该是什么。我知道可以从控制门户网站上完成。
答案 0 :(得分:0)
要从Multi-Vlan中删除加载项,可以使用以下rest api:
方法:开机自检
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Billing_Item/[billingItemId]/cancelItem
身体:杰森
{
"parameters":[
true,
true,
"reason",
"customerNote"
]
}
参考:
https://softlayer.github.io/reference/services/SoftLayer_Billing_Item/cancelItem/
要获取结算项目ID,请使用此rest api:
方法:GET
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Network_Vlan_Firewall/[networkVlanFirewallId]/getObject?objectMask=mask[billingItem.activeChildren[categoryCode,id,description]]
参考:
https://softlayer.github.io/reference/services/SoftLayer_Network_Vlan_Firewall/getObject/
您将收到类似以下示例的响应:
{
"administrativeBypassFlag": "",
"customerManagedFlag": true,
"id": 11111,
"billingItem": {
"categoryCode": "firewall_appliance",
"description": "FortiGate Security Appliance",
"id": 33333333,
"laborFee": "0",
"laborFeeTaxRate": "0",
"modifyDate": "2018-06-13T06:24:57-06:00",
"nextBillDate": "2018-07-03T23:00:00-06:00",
"recurringFeeTaxRate": "0",
"recurringMonths": 1
"activeChildren": [
{
"categoryCode": "bandwidth",
"description": "20000 GB Bandwidth",
"id": 39999999
},
{
"categoryCode": "firewall_appliance_ha_pair",
"description": "FortiGate Firewall Appliance HA Option",
"id": 32222222
},
{
"categoryCode": "firewall_appliance_addon_bundle",
"description": "FortiGate Security Appliance - Add-on bundle (NGFW, Web, AV) (High Availability)",
"id": 333333333
},
{
"categoryCode": "firewall_appliance_addon_antivirus",
"description": "FortiGate Security Appliance - AV Add-on (High Availability)",
"id": 344444444
},
{
"categoryCode": "firewall_appliance_addon_next_gen_service",
"description": "FortiGate Security Appliance - NGFW Add-on (High Availability)",
"id": 311111111
},
{
"categoryCode": "firewall_appliance_addon_web_filter",
"description": "FortiGate Security Appliance - Web Filtering Add-on (High Availability)",
"id": 355555555
}
]
}
}
如果要删除所有附加配置,请使用billingItem id。要使用最后四个“ activeChildren” Id选项一一删除,它们的顺序与门户网站控件中的顺序相同。