Creates an account for a specified host in an ApsaraDB for MyBase dedicated cluster.

Each host can have only one account. Before you create an account for a host, make sure that the existing account is deleted. For more information, see Create an account for a host.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateDedicatedHostAccount

The operation that you want to perform. Set the value to CreateDedicatedHostAccount.

AccountName String Yes test

The custom account name of the host.

  • The name can contain lowercase letters, digits, and underscores (_).
  • The name must start with a lowercase letter and end with a lowercase letter or a digit.
  • The name must be 2 to 16 characters in length.
AccountPassword String Yes testxxxxxx

The password of the host account.

  • The password must be 6 to 32 characters in length.
  • The password can contain letters, digits, and special characters.
  • Special characters are !@ # $ % ^ & * ( ) _ + - =
ClientToken String Yes ETnLKlblzczshOTUbOCz*******

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value. You must make sure that the value is unique among different requests. The value can contain only ASCII characters and can be up to 64 characters in length.

DedicatedHostId String Yes ch-bp10a5id3boqi****

The ID of the host. You can call the DescribeDedicatedHosts operation to query the host ID.

RegionId String Yes cn-hangzhou

The region ID of the host. You can call the DescribeDedicatedHostAttribute operation to query the region ID.

BastionInstanceId String No bastionhost-cn-xxxxxxxxxxx

The ID of the bastion host with which the specified host is associated. You can view this ID on the Bastion Hosts page in the ApsaraDB for MyBase console.

AccountType String No Admin

The type of the host account. Valid values:

  • Normal: a standard account
  • Admin: an administrator account

For more information, see Host account permissions.

Response parameters

Parameter Type Example Description
RequestId String D6E068C3-25BC-455A-85FE-45F0B22E12AS

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

HttpCode Error code Error message Description
400 InvalidAccountPassword.Format The account password format is invalid. The error message returned because the format of the specified account password is invalid.
404 HostInfo.NotFound The host is not found. The error message returned because the specified host does not exist.

For a list of error codes, visit the API Error Center.