Updated on 2026-05-30 GMT+08:00

Creating an Account (a V3 API)

Function

This API is used to create a DDM account used to connect to and manage schemas. One DDM account can be associated with multiple schemas.

Constraints

None

API Calling

For details, see Calling APIs.

Authorization Information

Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions Policies and Supported Actions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    ddm:instance:createUser

    Write

    instance *

    • g:EnterpriseProjectId

    • g:ResourceTag/<tag-key>

    ddm:user:create

    -

URI

POST /v3/{project_id}/instances/{instance_id}/users

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

For details about how to obtain the project ID, see Obtaining a Project ID.

Constraints

N/A

Range

The value contains 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance.

Constraints

N/A

Range

The value contains 36 characters with a suffix of in09. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Definition

Instance account name.

Constraints

  • The name can contain 1 to 32 characters.

  • The name must start with a letter.

  • The name can contain only letters, digits, and underscores (_).

Range

N/A

Default Value

N/A

password

Yes

String

Definition

Instance account password.

Constraints

  • The password can include 8 to 32 characters.

  • The password must contain at least three types of lowercase letters, uppercase letters, digits, swung dashes (~), and exclamation marks (!). @ # / %^ * - _ + ?

  • The password cannot be a weak password. It cannot be overly simple and easily guessed.

  • The password cannot be the same as username or username in reverse order.

Range

N/A

Default Value

N/A

base_authority

Yes

Array of strings

Definition

Basic permissions of the DDM account.

Constraints

None

Range

Any combination of CREATE, DROP, ALTER, INDEX, INSERT, DELETE, UPDATE, and SELECT

Default Value

N/A

description

No

String

Definition

Instance account description.

Constraints

  • The value can contain a maximum of 256 characters.

Range

N/A

Default Value

N/A

password_lifetime

No

Long

Definition

Password validity period of a DDM account.

Constraints

N/A

Range

The value is an integer ranging from 0 to 65535, in days.

The value 0 or null indicates that the password never expires.

Default Value

The default value is null, indicating that the password never expires.

databases

No

Array of CreateUserRelatedLogicDbV3 objects

Associated schemas.

The databases field is optional. You can create a DDM account without associating it with any schema.

Table 4 CreateUserRelatedLogicDbV3

Parameter

Mandatory

Type

Description

name

Yes

String

Definition

Name of a created schema. Permissions for this schema are granted to the account.

Constraints

N/A

Range

N/A

Default Value

N/A

Example Request

Creating an account

POST https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/61a4ea66210545909d74a05c27a7179ein09/users

{
  "name" : "user1",
  "description" : "",
  "base_authority" : [ "CREATE", "DROP", "ALTER", "INDEX", "INSERT", "DELETE", "UPDATE", "SELECT" ],
  "password" : "xxxxxxxxx"
}

Response Parameters

  • Normal response

    None

Example Response

  • Normal response example
{ }

Status Code

Error Codes

For details, see Error Codes.