Creating a Microservice Engine
Function
This API is used to create a microservice engine. You can create an exclusive ServiceComb engine or registry/configuration center.
URI
POST /v2/{project_id}/enginemgr/engines
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID, which must be unique. The value contains 1 to 64 characters. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
X-Enterprise-Project-ID |
No |
String |
If this parameter is not set, the default enterprise project is default and the ID is 0. Default value: 0 |
Content-Type |
Yes |
String |
Set it to application/json;charset=UTF-8. |
Accept |
Yes |
String |
Set it to application/json. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Microservice engine name. |
description |
No |
String |
Microservice engine description. Maximum length: 255 |
payment |
Yes |
String |
Billing mode of a microservice engine. 0 indicates yearly/monthly, 1 indicates pay-per-use, and 2 indicates free of charge. Enumerated values:
Maximum length: 24 |
flavor |
Yes |
String |
Microservice engine flavor.
Enumerated values:
|
azList |
No |
Array of strings |
List of AZs where an exclusive ServiceComb engine is deployed. This parameter is mandatory when you create an exclusive ServiceComb engine. Array length: 1–3 |
authType |
No |
String |
Authentication type of the engine. This parameter is mandatory when you create an exclusive ServiceComb engine. RBAC indicates security authentication, and NONE indicates no authentication. Enumerated values:
|
vpc |
Yes |
String |
VPC name. Maximum length: 64 |
vpcId |
Yes |
String |
VPC ID. Maximum length: 64 |
networkId |
Yes |
String |
Subnet ID of a microservice engine. Maximum length: 64 |
subnetCidr |
Yes |
String |
Subnet division of a microservice engine. Maximum length: 24 |
publicIpId |
No |
String |
Public network address ID of a microservice engine. Currently, the value is null. Maximum length: 64 |
auth_cred |
No |
EngineRbacPwd object |
This parameter is mandatory when RBAC authentication is selected for creating an exclusive ServiceComb engine. It contains the engine authentication information. |
specType |
Yes |
String |
Deployment type of a microservice engine. Default value: CSE2 Enumerated values:
|
inputs |
No |
Map<String,String> |
Additional parameter of an engine. |
enginestateInfo |
No |
enginestateInfo object |
Engine status information. |
periodType |
No |
Integer |
Creation period type. |
enterpriseProject |
No |
enterpriseProject object |
Enterprise project information. |
vpcCidr |
No |
String |
Gateway VPC division. |
resourceParams |
No |
resourceParams object |
Microservice engine resource parameter. |
productId |
No |
String |
Product ID. |
capacityProductId |
No |
String |
Capacity product ID. |
isFree |
No |
Boolean |
Whether the microservice engine is free of charge. |
subnetName |
No |
String |
Name of the subnet used by a microservice engine. |
tags |
No |
Array of strings |
Tag. |
elbid |
No |
String |
ID of the ELB used by a microservice engine. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
pwd |
No |
String |
Password of the default user root of an exclusive microservice engine with security authentication enabled. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
cluster |
No |
Boolean |
Cluster. |
twinClusters |
No |
Boolean |
Twin cluster. |
singleEngine |
No |
Boolean |
Single engine. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
String |
Enterprise project ID. |
name |
No |
String |
Enterprise project name. |
description |
No |
String |
Enterprise project description. |
status |
No |
Integer |
Enterprise project status. |
created_at |
No |
String |
Creation time of an enterprise project. |
updated_at |
No |
String |
Update time of an enterprise project. |
label |
No |
String |
Enterprise project label. |
Response
Parameter |
Type |
Description |
---|---|---|
id |
String |
Microservice engine ID. |
name |
String |
Microservice engine name. |
jobId |
Integer |
ID of the job executed by a microservice engine. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
detail |
String |
Location details. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
detail |
String |
Location details. |
Example Request
POST https://{endpoint}/v2/{project_id}/enginemgr/engines
{
"name" : "string",
"description" : "string",
"payment" : "string",
"flavor" : "cse.s1.small2",
"azList" : [ "string" ],
"authType" : "NONE",
"vpc" : "string",
"networkId" : "string",
"subnetCidr" : "string",
"publicIpId" : "string",
"specType" : "string",
"inputs" : {
"nodeFlavor" : "string"
}
}
Example Response
Status code: 200
Response structure for creating a microservice engine.
{
"id" : "891bf21a-4024-4f47-b38c-bd259ca8f10a",
"name" : "test",
"jobId" : 17655
}
Status Code
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
500 |
Internal Server Error |
Error Code
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot