Updated on 2022-12-07 GMT+08:00

Creating a DDM Instance

Function

This API is used to create a DDM instance.

Constraints

DDM runs in VPCs. Before creating a DDM instance, ensure that a VPC is available and a subnet and security group have been configured.

URI

POST /v1/{project_id}/instances

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

instance

Yes

CreateDDMInstanceDetail object

Instance information

extend_param

No

CreateDDMInstanceExtendParam object

Extended parameter

Table 4 Parameters for creating a DDM instance

Parameter

Mandatory

Type

Description

name

Yes

String

Name of a DDM instance, which:

  • Consists of 4 to 64 characters.
  • Must start with a letter.
  • Contains only letters, digits, and hyphens (-).

Minimum length: 4

Maximum length: 64

flavor_id

Yes

String

Specification ID

node_num

Yes

Integer

Number of nodes

engine_id

Yes

String

Engine ID

enterprise_project_id

No

String

Enterprise project ID

available_zones

Yes

Array of strings

AZ code.

vpc_id

Yes

String

VPC ID

security_group_id

Yes

String

Security group ID

subnet_id

Yes

String

Subnet ID

param_group_id

No

String

Parameter template ID

Table 5 Additional parameters for creating a DDM instance

Parameter

Mandatory

Type

Description

charge_mode

No

String

The value can be:

  • The default value is postPaid.

Response Parameters

Status code: 200

Table 6 Response body parameters

Parameter

Type

Description

id

String

DDM instance ID

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

errCode

String

Service error code

externalMessage

String

Error message

Example Request

  • Example request
    POST https://{endpoint}/v1/{project_id}/instances
    
    {
      "instance" : {
        "name" : "ddm-test-001",
        "flavor_id" : "8f2e696c-a9c1-30bd-af90-25522bc67606",
        "node_num" : "4",
        "engine_id" : "2325a707-0361-8be6-dd01-13474bbac437",
        "enterprise_project_id" : "0",
        "available_zones" : [ "az1xahz" ],
        "vpc_id" : "e1d886ec-cfe7-4cd4-b748-fc55a10b4172",
        "security_group_id" : "035b70ed-319b-4086-9fd7-62a2e8548b2e",
        "subnet_id" : "f942f970-1a02-4eee-8927-xxxxxxxx",
         "param_group_id" : "035b70ed-319b-4086-9fd7-xxxxxxxx"
      }
    }
  • Example request
    POST https://{endpoint}/v1/{project_id}/instances
    
    {
      "instance" : {
        "name" : "ddm-test-002",
        "flavor_id" : "8f2e696c-a9c1-30bd-af90-25522bc67606",
        "node_num" : 4,
        "engine_id" : "2325a707-0361-8be6-dd01-13474bbac437",
        "enterprise_project_id" : "0",
        "available_zones" : [ "az1xahz" ],
        "vpc_id" : "e1d886ec-cfe7-4cd4-b748-fc55a10b4172",
        "security_group_id" : "035b70ed-319b-4086-9fd7-62a2e8548b2e",
        "subnet_id" : "f942f970-1a02-4eee-8927-e8670ce5a882"
        "param_group_id" : "035b70ed-319b-4086-9fd7-xxxxxxxx"
      },
      "extend_param" : {
        "charge_mode" : "postPaid"
      }
    }

Example Response

Status code: 200

OK

{
  "id" : "",
  "order_id" : "CS1810251738L8VVD"
}

Status code: 400

bad request

{
  "externalMessage" : "Parameter error.",
  "errCode" : "DBS.280001"
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.