Creating a DDM instance¶
Function¶
This API is used to create a DDM instance.
Constraints¶
DDM runs in VPCs. Before you create a DDM instance, ensure that a VPC is available and a subnet and security group have been configured.
URI¶
POST /v1/{project_id}/instances
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID of a tenant in a region |
Request Parameters¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
instance | Yes | CreateInstanceDetail object | Instance information |
extend_param | No | object | The function has not been supported, and this field is reserved. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
name | Yes | String | Name of a DDM instance, which:
Minimum length: 4 characters Maximum length: 64 characters |
flavor_id | Yes | String | Class ID |
node_num | Yes | Integer | Number of nodes |
engine_id | Yes | String | Engine ID |
available_zones | Yes | Array of strings | AZ code. The value cannot be empty. For details, see Regions and Endpoints. |
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 group ID |
time_zone | No | String | UTC time zone. The default value is UTC. The value can be UTC, UTC-12:00, UTC-11:00, UTC-10:00, UTC-09:00, UTC-08:00, UTC-07:00, UTC-06:00, UTC-05:00, UTC-04:00, UTC-03:00, UTC-02:00, UTC-01:00, UTC+01:00, UTC+02:00, UTC+03:00, UTC+05:00, UTC+06:00, UTC+07:00, UTC+08:00, UTC+09:00, UTC+10:00, UTC+11:00, and UTC+12:00. |
admin_user_name | No | String | Username of the administrator. The username:
|
admin_user_password | No | String | Password of the administrator. The password:
|
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
id | String | Instance ID. |
order_id | String | The function has not been supported, and this field is reserved. |
job_id | String | ID of the job for creating an instance. |
Status code: 400
Parameter | Type | Description |
---|---|---|
errCode | String | Service error code |
externalMessage | String | Error message |
Status code: 500
Parameter | Type | Description |
---|---|---|
errCode | String | Service error code |
externalMessage | String | Error message |
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",
"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 Response¶
Status code: 200
OK
{
"job_id" : "2x414788a5112333a02390e2eb0ea227",
"id" : "7191674e562d495d9e8e4b23ece6522ein09",
"order_id" : null
}
Status code: 400
bad request
{
"externalMessage" : "Parameter error.",
"errCode" : "DBS.280001"
}
Status code: 500
server error
{
"externalMessage" : "Server failure.",
"errCode" : "DBS.200412"
}
Status Codes¶
Status Code | Description |
---|---|
200 | OK |
400 | bad request |
500 | server error |
Error Codes¶
For details, see Error Codes.