现在,我正在开发一个有关SoftLayer API的项目,我不会通过Call SoftLayer API创建一个子帐户。然后,我将通过Call SoftLayer API将儿童帐户与主要帐户相关联。并通过Aoftlayer API销毁该账户。
因此,有三个问题:
- 如何通过SoftLayer API创建一个SoftLayer帐户?
- 我如何将儿童帐户与Softlayer API的主要帐户相关联?
- 如何通过Softlayer API销毁子帐户?
问候〜
softlayer_brand服务是创建新帐户所需的服务。为了成功创建一个新帐户,您需要一个BAP帐户,该帐户是用于品牌使用的帐户,如果您还没有,我建议您联系销售部门并要求一个。
您可以使用REST以这种方式创建一个品牌帐户:
https://$username:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Brand/$brandId/createCustomerAccount.json
Method: POST
Body:
{
"parameters": [
{
"brandId": 2,
"companyName": "test-571-companyname",
"firstName": "test-571-firstname",
"lastName": "test-571-lastname",
"address1": "4444 Alpha Rd",
"postalCode": "75244-4608",
"city": "Dallas",
"state": "TX",
"country": "US",
"officePhone": "281.714.3333",
"email": "test-571-email@softlayer.com",
"lateFeeProtectionFlag": true,
"claimedTaxExemptTxFlag": false,
"allowedPptpVpnQuantity": 1,
"isReseller": 0,
"accountStatusId": 1001
}
]
}
您可以使用REST以这种方式创建一个子品牌:
https://$username:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Brand/createObject.json
Method: POST
Body:
{
"parameters": [
{
"longName": "Company Long Name02",
"name": "Company Name02",
"keyName": "KEY_NAME_Marce",
"account": {
"address1": "4444 Alpha Rd",
"city": "Dallas",
"companyName": "companyname02",
"country": "US",
"email": "test-571-email@softlayer.com",
"firstName":"firstname",
"lastName": "lastname",
"officePhone": "281.714.3333",
"postalCode": "75244-4608",
"state": "TX"
}
}
]
}
注意:关于如何将儿童帐户与主要帐户联系在一起,它将完成创建儿童品牌,然后为该儿童品牌创建帐户。
此外,我建议您阅读下一个链接以获取更多信息:http://sldn.softlayer.com/reference/services/softlayer_brandhttp://sldn.softlayer.com/reference/services/softlayer_account