Softlayer API:帐户关联?
Softlayer API: Account association?
现在我正在开发一个关于 softlayer api 的项目,我不想通过调用 softlayer api 创建一个 child 帐户。然后我将通过调用 softlayer api 将 child 帐户与主帐户相关联。并通过 aoftlayer api.
销毁 child 帐户
所以接下来是三个问题:
- 如何通过 softlayer 创建 softlayer 帐户 api?
- 如何通过软层api将child账户与主账户相关联?
- 如何通过 softlayer api 销毁 child 帐户?
问候~
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_Brand
http://sldn.softlayer.com/reference/services/SoftLayer_Account
现在我正在开发一个关于 softlayer api 的项目,我不想通过调用 softlayer api 创建一个 child 帐户。然后我将通过调用 softlayer api 将 child 帐户与主帐户相关联。并通过 aoftlayer api.
销毁 child 帐户所以接下来是三个问题:
- 如何通过 softlayer 创建 softlayer 帐户 api?
- 如何通过软层api将child账户与主账户相关联?
- 如何通过 softlayer api 销毁 child 帐户?
问候~
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_Brand http://sldn.softlayer.com/reference/services/SoftLayer_Account