Creates an application in an ECS cluster.
Operation description
To create an application in a Kubernetes cluster, call the InsertK8sApplication operation.
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. Specify this parameter to create the application in a specific ECS cluster. If you leave this parameter empty, the application is created in the default cluster. We recommend that you 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 a High-speed Service Framework (HSF) application. You can obtain the build package number in one of the following ways:
|
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 of the application. |
8090 |
| EcuInfo |
string |
No |
The `ecu_id` of the ECS instance to which you want to scale out the application. The `ecu_id` is the unique ID of an ECS instance that is imported to EDAS. To specify multiple `ecu_id`s, separate them with commas (,). You can call the ListScaleOutEcu operation to query the `ecu_id`. For more information, see ListScaleOutEcu. |
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 for the application container in a Swarm cluster. |
2048 |
| LogicalRegionId |
string |
No |
The ID of the microservices namespace. In the EDAS console, choose Resource Management > Microservices Namespace in the navigation pane on the left to view the ID of the microservices namespace. You can also call the ListUserDefineRegion operation to query the ID. For more information, see ListUserDefineRegion.
|
cn-beijing:prod |
| Jdk |
string |
No |
(Deprecated) The version of the Java Development Kit (JDK) that the application uses. |
8 |
| WebContainer |
string |
No |
(Deprecated) The version of Apache Tomcat. |
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. For more information, see ListComponents. This parameter is required if the application runs in an Apache Tomcat container (for Dubbo applications that are deployed in a WAR package) or a standard Java application runtime environment (for Spring Boot or Spring Cloud applications that are deployed in a JAR package). The following application component IDs are commonly used:
To set this parameter, you must update the Java or Python software development kit (SDK) to version 2.57.3 or later. If you do not use an EDAS SDK, such as aliyun-python-sdk-core, aliyun-java-sdk-core, or Alibaba Cloud CLI, you can set this parameter. |
7 |
| Hooks |
string |
No |
The configuration of the mounted script. 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 size of the heap memory. Unit: MB. |
500 |
| MaxPermSize |
integer |
No |
The size of the permanent generation memory. Unit: MB. |
200 |
| MaxHeapSize |
integer |
No |
The maximum size of the heap memory. 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 ID of the request. |
4264F69C-686C-4107-B493-0599C8xxxxxx |
| ApplicationInfo |
object |
The application object that is returned after the application is created. |
|
| ChangeOrderId |
string |
The ID of the change process. |
d0cf569e-dce3-4efb-****-08b70021**** |
| AppName |
string |
The name of the application. |
hello-edas-test-1 |
| Owner |
string |
The owner of the application. This is the user who created 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. This ID is the unique identifier of an EDAS application. |
6c733bcd-6efb-47a1-8226-cf722c****** |
| UserId |
string |
The user ID of the application owner. |
tdy218@1362469756xxxxxx |
| Port |
integer |
The default port of the application is 8080. You can call the UpdateContainerConfiguration operation to change the port. For more information, see UpdateContainerConfiguration. |
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.