Softlayer API:帐户关联?

时间:2016-11-24 08:05:07

标签: api account ibm-cloud-infrastructure associate

现在我正在开发一个关于softlayer api的项目,我不打算通过调用softlayer api创建一个子帐户。然后我将通过调用softlayer api将子帐户与主帐户关联起来。并通过aoftlayer api销毁子帐户。

所以有三个问题:

  1. 如何通过softlayer api创建softlayer帐户?
  2. 如何通过softlayer api将子帐号与主帐户相关联?
  3. 如何通过softlayer api销毁子帐户?
  4. 问候〜

1 个答案:

答案 0 :(得分:0)

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