Creating an Exclusive Microservice Engine
Function
This API is used to create an exclusive microservice engine.
URI
POST /v2/{project_id}/enginemgr/engines
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant sub-project ID, which must be unique. The value contains 1 to 64 characters. See Obtaining a Project ID. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
X-Enterprise-Project-ID |
No |
String |
Enterprise project ID. If this parameter is not set, the default enterprise project is default and the ID is 0. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Name of an exclusive microservice engine. The value contains 3 to 24 characters, including letters, and digits, and starts with a letter but cannot end with a hyphen (-).
NOTICE:
Microservice engine name cannot be default. |
description |
No |
String |
Description of an exclusive microservice engine. The value contains 0 to 255 characters. |
payment |
Yes |
String |
Billing mode of an exclusive microservice engine. Set it to the fixed value 1. |
flavor |
Yes |
String |
Flavor of an exclusive microservice engine.
|
azList |
Yes |
Array of String |
List of AZs at the current region. |
authType |
Yes |
String |
Authentication mode of an exclusive microservice engine. RBAC indicates security authentication, and NONE indicates no authentication. |
authConfig |
No |
RBAC configuration of a microservice engine. If this parameter is not transferred, programming interface authentication is enabled by default. |
|
vpc |
Yes |
String |
VPC name. |
vpcId |
Yes |
String |
VPC ID. The value can contain up to 64 characters. |
networkId |
Yes |
String |
Subnet ID of an exclusive microservice engine. |
subnetCidr |
Yes |
String |
Subnet division of an exclusive microservice engine. |
publicIpId |
No |
String |
ID of the public network address for accessing an exclusive microservice engine. |
specType |
Yes |
String |
Deployment type of an exclusive microservice engine.
|
auth_cred |
No |
This parameter is mandatory when security authentication needs to be enabled for an exclusive microservice engine. It contains the authentication information of the engine. |
|
inputs |
No |
Map<String,String> |
Additional parameter of an exclusive microservice engine. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
consoleAuthEnabled |
Yes |
Boolean |
Whether to enable console authentication. |
sdkAuthEnabled |
Yes |
Boolean |
Whether to enable programming interface authentication. If the programming interface authentication parameter sdkAuthEnabled is set to true, the console security authentication parameter consoleAuthEnabled must also be set to true. |
Response
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
String |
ID of an exclusive microservice engine. |
name |
String |
Name of an exclusive microservice engine. |
jobId |
Integer |
ID of an exclusive microservice engine job. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Error code. |
errorMessage |
String |
Error message. |
detail |
String |
Location details. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Error code. |
errorMessage |
String |
Error message. |
detail |
String |
Location details. |
Example Request
Create exclusive microservice engine test: billing mode is pay-per-use, flavor is cse.s1.small2, AZ is test, security authentication is disabled, and deployment type is CSE2.
POST https://{endpoint}/v2/{project_id}/enginemgr/engines { "name": "test", "description": "test", "payment": "1", "flavor": "cse.s1.small2", "azList": ["test"], "authType": "NONE", "vpc": "vpc-demotest", "vpcId": "09902850-9454-4715-9764-018f0c37022", "networkId": "88550801-e892-4f8e-b21b-f7147f6229", "subnetCidr": "192.168.0.5/26", "specType": "CSE2, "inputs": { "nodeFlavor": "s6.large.2" } }
Example Response
{ "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 CSE 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