All Products
Search
Document Center

Enterprise Distributed Application Service:InsertApplication

Last Updated:Oct 28, 2025

Creates an application in an ECS cluster.

Operation description

Note

To create an application in a Kubernetes cluster, call the InsertK8sApplication operation.

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. 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:

  • Call the ListBuildPack operation. For more information, see ListBuildPack.

  • Obtain the build package number from the Build Package Number column in the Container versions table.

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.

  • 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 is reported.

  • If the cluster is in the default microservices namespace, you do not need to specify this parameter. The microservices namespace of the application must be the same as the microservices namespace of the specified cluster.

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:

  • 4: Apache Tomcat 7.0.91

  • 7: Apache Tomcat 8.5.42

  • 5: OpenJDK 1.8.x

  • 6: OpenJDK 1.7.x

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"},{"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 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: 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 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:

  • true: The application is a Docker application.

  • false: The application is not a Docker application.

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.