Creates an application in an ECS cluster.
Operation description
To create an application in a Kubernetes cluster, use the InsertK8sApplication operation provided by EDAS.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
edas:CreateApplication |
create |
*NameSpace
|
None | None |
Request syntax
POST /pop/v5/changeorder/co_create_app HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
No |
The ID of the ECS cluster. If you specify this parameter, the application is created in the specified ECS cluster. If you leave this parameter empty, the application is created in the default cluster. Specify this parameter. |
13136119-f384-4f50-b76e-xxxxxxxxxxx |
| BuildPackId |
integer |
No |
The build package number of EDAS-Container. This parameter is required when you create an HSF application. You can obtain the value by using one of the following methods:
|
59 |
| Description |
string |
No |
The description of the application. |
create by edas pop api |
| ApplicationName |
string |
Yes |
The name of the application. The name can contain only digits, letters, hyphens (-), and underscores (_). It must start with a letter and can be up to 36 characters in length. |
hello-edas-test-1 |
| ReservedPortStr |
string |
No |
[Deprecated] The reserved port number of the application. |
8090 |
| EcuInfo |
string |
No |
The ecu_id of the ECS instance to be scaled out. The ecu_id is the unique identifier of an ECS instance imported to EDAS. Separate multiple ecu_ids with commas (,). You can call the ListScaleOutEcu operation to query the ecu_id. |
07bd417a-b863-477d-****-************ |
| Cpu |
integer |
No |
[Deprecated] The number of CPU cores for the application container in a Swarm cluster. |
2 |
| Mem |
integer |
No |
[Deprecated] The memory size of the application container in a Swarm cluster. |
2048 |
| LogicalRegionId |
string |
No |
The ID of the microservices namespace. You can choose Resource Management > Microservices Namespace in the left-side navigation pane of the EDAS console to find the ID of the target microservices namespace. You can also call the ListUserDefineRegion operation to obtain the microservices namespace ID.
|
cn-beijing:prod |
| Jdk |
string |
No |
[Deprecated] The JDK version used by the application. |
8 |
| WebContainer |
string |
No |
[Deprecated] The Apache Tomcat version. |
4 |
| PackageType |
string |
No |
The format of the application deployment package. Valid values: war and jar. |
war |
| ComponentIds |
string |
No |
The ID of the application component. You can call the ListComponents operation to query the component ID. This parameter is required when the application runtime environment uses Apache Tomcat (applicable to Dubbo applications deployed by using WAR packages) or the standard Java application runtime environment (applicable to Spring Boot or Spring Cloud applications deployed by using JAR packages). Common application component IDs and their meanings:
To configure this parameter, you must update the EDAS Java or Python SDK to version 2.57.3 or later. If you do not use the SDK provided by EDAS (for example, you use aliyun-python-sdk-core, aliyun-java-sdk-core, or Alibaba Cloud CLI), you can directly configure this parameter. |
7 |
| Hooks |
string |
No |
The mount script configuration. The value is a JSON string. Example:
|
[{"ignoreFail":false,"name":"postprepareInstanceEnvironmentOnScaleOut","script":"ls"}] |
| JvmOptions |
string |
No |
The custom parameters. |
-Dproperty=value |
| MinHeapSize |
integer |
No |
The initial heap memory size. Unit: MB. |
500 |
| MaxPermSize |
integer |
No |
The permanent generation memory size. Unit: MB. |
200 |
| MaxHeapSize |
integer |
No |
The maximum heap memory size. Unit: MB. |
1000 |
| EnableUrlCheck |
boolean |
No |
Specifies whether to enable the health check URL. Valid values:
|
true |
| EnablePortCheck |
boolean |
No |
Specifies whether to enable the port health check. Valid values:
|
true |
| HealthCheckUrl |
string |
No |
The health check URL of the application. This parameter is equivalent to the HealthCheckURL parameter. |
http://127.0.0.1:8080/_ehc.html |
| ResourceGroupId |
string |
No |
The ID of the resource group. |
rg-aek24j4s4b***** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
integer |
The status code. |
200 |
| Message |
string |
The returned message. |
The application name test-hsy-C5039-paas-6 had been created successfully. |
| RequestId |
string |
The request ID. |
4264F69C-686C-4107-B493-0599C8xxxxxx |
| ApplicationInfo |
object |
The application object returned after the application is created. |
|
| ChangeOrderId |
string |
The ID of the change order. |
d0cf569e-dce3-4efb-****-08b70021**** |
| AppName |
string |
The name of the application. |
hello-edas-test-1 |
| Owner |
string |
The owner of the application, which is the creator of the application. |
249763358688******** |
| Dockerize |
boolean |
Indicates whether the application is a Docker application. Valid values:
|
false |
| RegionName |
string |
The name of the region. |
cn-hangzhou |
| AppId |
string |
The ID of the application, which is the unique identifier of the EDAS application. |
6c733bcd-6efb-47a1-8226-cf722c****** |
| UserId |
string |
The user ID of the application owner. |
tdy218@1362469756xxxxxx |
| Port |
integer |
The default port number of the created application, which is 8080. You can call the UpdateContainerConfiguration operation to modify the port number. |
8080 |
Examples
Success response
JSON format
{
"Code": 200,
"Message": "The application name test-hsy-C5039-paas-6 had been created successfully.",
"RequestId": "4264F69C-686C-4107-B493-0599C8xxxxxx",
"ApplicationInfo": {
"ChangeOrderId": "d0cf569e-dce3-4efb-****-08b70021****",
"AppName": "hello-edas-test-1",
"Owner": "249763358688********",
"Dockerize": false,
"RegionName": "cn-hangzhou",
"AppId": "6c733bcd-6efb-47a1-8226-cf722c******",
"UserId": "tdy218@1362469756xxxxxx",
"Port": 8080
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.