All Products
Search
Document Center

Enterprise Distributed Application Service:InsertApplication

Last Updated:Oct 26, 2026

Creates an application in an ECS cluster.

Operation description

Note

To create an application in a Kubernetes cluster, use the InsertK8sApplication operation provided by EDAS.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

edas:CreateApplication

create

*NameSpace

acs:edas:{#regionId}:{#accountId}:namespace/{#NameSpaceId}

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.

  • If the specified cluster is not in the default microservices namespace, you must specify this parameter. Otherwise, the "application regionId is different with cluster regionId!" error message is returned.

  • If the specified cluster is in the default microservices namespace, you do not need to specify this parameter. The value of this parameter must be consistent with the microservices namespace to which the specified cluster ID belongs.

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:

  • 4: Apache Tomcat 7.0.91

  • 7: Apache Tomcat 8.5.42

  • 5: OpenJDK 1.8.x

  • 6: OpenJDK 1.7.x

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"},{"ignoreFail":true,"name":"postdeleteInstanceDataOnScaleIn","script":""},{"ignoreFail":true,"name":"prestartInstance","script":""},{"ignoreFail":true,"name":"poststartInstance","script":""},{"ignoreFail":true,"name":"prestopInstance","script":""},{"ignoreFail":true,"name":"poststopInstance","script":""}]

[{"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: Enabled.

  • false: Disabled.

true

EnablePortCheck

boolean

No

Specifies whether to enable the port health check. Valid values:

  • true: Enabled.

  • false: Disabled.

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:

  • true: Yes.

  • false: No.

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.