Creating an Account
Function
This API is used to create an account. The generated account automatically becomes a member account of the organization holding the account that calls this API. This API can be called only from the organization's management account. The Organizations service creates the required service-linked agency and account-accessed agency in the new account.
URI
POST /v1/organizations/accounts
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Security-Token |
No |
String |
Security token (session token) of your temporary security credentials. If a temporary security credential is used, this header is required. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Account name. |
|
No |
String |
Email address. This parameter is mandatory when an account is created at the Huawei Cloud International website. |
phone |
No |
String |
Mobile number. This parameter is mandatory when an account is created at the Huawei Cloud Chinese Mainland website. |
agency_name |
No |
String |
Agency name. |
description |
No |
String |
Description. |
tags |
No |
Array of TagDto objects |
List of tags you want to attach to the new account. |
Response Parameters
Status code: 202
Parameter |
Type |
Description |
---|---|---|
create_account_status |
CreateAccountStatusDto object |
States of CreateAccount requests for an organization. |
Parameter |
Type |
Description |
---|---|---|
account_id |
String |
Unique ID of the newly created account if any. |
account_name |
String |
Account name. |
completed_at |
String |
Date and time when the account was created and the request was completed. |
created_at |
String |
Date and time when the CreateAccount request was made. |
id |
String |
Unique ID of a request. You can get this value from the response to the initial CreateAccount request. |
state |
String |
Status of the asynchronous request for creating an account. |
failure_reason |
String |
Reason for a request failure. |
failure_detail_msg |
failure_detail_msg object |
Detailed reason why the request fails. |
Example Requests
Creating an account
POST /v1/organizations/accounts { "name" : "C9Qzukfn6FIyxAmC3dQclrwZW34UDu_rPSRrCQ4aGFm0-r1zC2RDHt5oHA-aY21B", "tags" : [ { "key" : "keystring", "value" : "valuestring" } ] }
Example Responses
Status code: 202
Successful
{ "create_account_status" : { "account_id" : "0a6d25d23900d45c0faac010e0fb4de0", "account_name" : "paas_iam_573331", "completed_at" : "2022-08-24T06:41:15Z", "created_at" : "2022-08-24T06:41:15Z", "id" : "h-awjp43m7bz3b8jgy5v61jrfwakt3og8w", "state" : "in_progress", "failure_reason" : "string" } }
Status Codes
Status Code |
Description |
---|---|
202 |
Successful |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.