All Products
Search
Document Center

Enterprise Distributed Application Service:DeployApplication

Last Updated:Dec 22, 2025

Deploys an application in an Elastic Compute Service (ECS) cluster.

Operation description

Note

To deploy an application in a Container Service for Kubernetes (ACK) cluster that is imported into Enterprise Distributed Application Service (EDAS), call the DeployK8sApplication operation provided by EDAS. For more information, see DeployK8sApplication.

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

none

*Application

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

None None

Request syntax

POST /pop/v5/changeorder/co_deploy HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see ListApplication.

3616cdca-********************

PackageVersion

string

Yes

The version of the application deployment package. The value can be up to 64 characters in length. We recommend that you use a timestamp.

1.0

Desc

string

No

The description of the application deployment.

Deploy by edas pop api

DeployType

string

Yes

The deployment mode of the application. Valid values: url and image. The image value is deprecated. You can deploy an application to a Swarm cluster only by using an image.``

URL

WarUrl

string

No

The URL of the application deployment package. The package can be a WAR or JAR package. This parameter is required if you set the DeployType parameter to url. We recommend that you specify the URL of an application deployment package that is stored in an Object Storage Service (OSS) bucket.

https://edas.oss-cn-hangzhou.aliyuncs.com/demo/hello-edas.war

ImageUrl

string

No

The URL of the application image that is used to deploy the application in a Swarm cluster. We recommend that you use an image that is stored in Alibaba Cloud Container Registry. This parameter is deprecated.

registry.cn-hangzhou.aliyuncs.com/mw/testapp:latest

GroupId

string

Yes

The ID of the instance group to which the application is deployed. You can call the ListDeployGroup operation to query the ID of the instance group. For more information, see ListDeployGroup.

Set the parameter to all if you want to deploy the application to all instance groups.

all

Batch

integer

No

The number of batches per instance group.

  • If you specify an ID when you set the GroupId parameter, the application is deployed to the specified instance group. The minimum number of batches that can be specified is 1. The maximum number of batches is the maximum number of ECS instances in the Normal state in the instance group. The actual value falls in the range of [1, specified number]. The specified number of batches equals the number of ECS instances in the specified instance group.

  • If you set the GroupId parameter to all, the application is deployed to all instance groups. The minimum number of batches that can be specified is 1. The maximum number of batches is the number of ECS instances in the instance group that has the largest number of ECS instances in the Normal state.

1

BatchWaitTime

integer

No

The wait time between deployment batches for the application. Unit: minutes.

  • Default value: 0. If no wait time between deployment batches is needed, set this parameter to 0.

  • Maximum value: 5.

If many deployment batches are needed, we recommend that you specify a small value for this parameter. Otherwise, the application deployment is time-consuming.

0

AppEnv

string

No

The environment variables of the application. Specify each environment variable by using two key-value pairs. Example: {"name":"x","value":"y"},{"name":"x2","value":"y2"}. The keys of the two key-value pairs are name and value.

[{\"name\":\"env_name_1\", \"value\":\"env_value_1\"}, {\"name\":\"env_name_2\",\"value\":\"env_value_2\"}]

BuildPackId

integer

No

The build package number of EDAS Container.

  • You do not need to set the parameter if you do not need to change the EDAS Container version during the deployment.

  • Set the parameter if you need to update the EDAS Container version of the application during the deployment.

You can query the build package number by using one of the following methods:

59

ComponentIds

string

No

The IDs of the components used by the application. The parameter is not applicable to High-Speed Framework (HSF) applications. You can call the ListComponents operation to query the component IDs. For more information, see ListComponents.

  • If you have specified the component IDs when you create the application, you do not need to set the parameter when you deploy the application.

  • Set the parameter if you need to update the component versions for the application during the deployment.

Valid values for common application components:

  • 4: Apache Tomcat 7.0.91

  • 7: Apache Tomcat 8.5.42

  • 5: OpenJDK 1.8.x

  • 6: OpenJDK 1.7.x

For more information, see the Common application parameters section of the InsertApplication topic.

7

ReleaseType

integer

No

The mode in which the deployment batches are triggered. Valid values:

  • 0: automatic.

  • 1: You must manually trigger the next batch. You can manually click Proceed to Next Batch in the console or call the ContinuePipeline operation to proceed to the next batch. We recommend that you choose the automatic mode when you call an API operation to deploy the application. For more information, see ContinuePipeline.

0

Gray

boolean

No

Specifies whether canary release is selected as the deployment method. Valid values:

  • true: Canary release is selected.

    • To implement a canary release, specify the GroupId parameter, which specifies the ID of the instance group for the canary release.

    • Canary release can be selected as the deployment method for only one batch.

    • After the canary release is complete, the application is released in regular mode. The Batch parameter specifies the number of batches.

  • false: Single-batch release or phased release is selected.

true

TrafficControlStrategy

string

No

The canary release policy. For more information about canary release policies, see DeployK8sApplication.

{"http":{"rules":[{"conditionType":"percent","percent":10}]}}

Response elements

Element

Type

Description

Example

object

Code

integer

The HTTP status code that is returned.

200

ChangeOrderId

string

The change process ID of the application deployment.

adf86823-055b-48a4-a59f-fa5582******

Message

string

The message returned for the request.

success

RequestId

string

The ID of the request.

d6834ee9-5045-*************

Examples

Success response

JSON format

{
  "Code": 200,
  "ChangeOrderId": "adf86823-055b-48a4-a59f-fa5582******",
  "Message": "success",
  "RequestId": "d6834ee9-5045-*************"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.