All Products
Search
Document Center

Enterprise Distributed Application Service:ScaleoutApplicationWithNewInstances

Last Updated:Aug 28, 2026

Purchases ECS instances and adds them to a specified instance group of an EDAS application.

Operation description

Limits

If auto scaling is configured and enabled for an application, ECS instances purchased by this operation are removed first during an auto scale-in.

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

update

*All Resource

*

None None

Request syntax

POST /pop/v5/scaling/scale_out HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

No

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

e370c17f-*****-3df0721a327

GroupId

string

No

The ID of the instance group to scale out. You can call the ListDeployGroup operation to query this ID. For more information, see ListDeployGroup.

e37**********-33df0721a327

ScalingNum

integer

Yes

The number of instances to add for the scale-out.

2

TemplateId

string

No

The ID of the ECS instance launch template. You can call the DescribeLaunchTemplates operation to query this ID. For more information, see DescribeLaunchTemplates.

lt-****hy9s2

TemplateVersion

string

No

The version of the ECS instance launch template. You can call the DescribeLaunchTemplateVersions operation to query this version. For more information, see DescribeLaunchTemplateVersions.

Note

If you set this parameter to -1, the default launch template version is used.

-1

ScalingPolicy

string

No

The instance reclaim mode of the scaling group. Valid values:

  • recycle: economical mode

  • release: release mode

For more information about how to remove instances from a specified scaling group, see RemoveInstances.

release

TemplateInstanceId

string

No

The ID of an existing ECS instance to use as a template for the scale-out. If specified, new instances are purchased with the same specifications and configurations.

i-28wt4****

ClusterId

string

No

The ID of the cluster to add ECS instances to. This parameter is ignored if the application and instance group are specified.

e37**********-33df0721a327

InstanceChargeType

string

No

The billing method of the instance. Valid values:

  • PrePaid: subscription.

  • PostPaid: pay-as-you-go. This is the default value.

PrePaid

InstanceChargePeriodUnit

string

No

The unit of the subscription period. Valid values:

  • Week: billed on a weekly basis.

  • Month: billed on a monthly basis. This is the default value.

Month

InstanceChargePeriod

integer

No

The subscription duration, in the unit specified by InstanceChargePeriodUnit. This parameter takes effect only when InstanceChargeType is set to PrePaid.

  • If the InstanceChargePeriodUnit parameter is set to Week, the valid values of the InstanceChargePeriod parameter are 1, 2, 3, and 4.

  • If the InstanceChargePeriodUnit parameter is set to Month, the valid values of the InstanceChargePeriod parameter are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.

1

AutoRenew

boolean

No

Whether to enable auto-renewal. This parameter takes effect only when InstanceChargeType is set to PrePaid. Valid values:

  • true: enables auto-renewal.

  • false: does not enable auto-renewal. This is the default value.

true

AutoRenewPeriod

integer

No

The auto-renewal period. Valid values:

  • If the InstanceChargePeriodUnit parameter is set to Week, the valid values of the AutoRenewPeriod parameter are 1, 2, and 3.

  • If the InstanceChargePeriodUnit parameter is set to Month, the valid values of the AutoRenewPeriod parameter are 1, 2, 3, 6, 12, 24, 36, 48, and 60.

Default value: 1.

1

Response elements

Element

Type

Description

Example

object

The response body.

ChangeOrderId

string

The change order ID for the scale-out.

e370c17f-*****-3df0721a327

Code

integer

The HTTP status code.

200

Message

string

Additional information.

success

RequestId

string

The request ID.

e370c17f-*****-3df0721a327

InstanceIds

array

The ECS instance IDs.

string

The list of purchased ECS instances.

["i-28wt4****","i-28wt4****"]

Examples

Success response

JSON format

{
  "ChangeOrderId": "e370c17f-*****-3df0721a327",
  "Code": 200,
  "Message": "success",
  "RequestId": "e370c17f-*****-3df0721a327",
  "InstanceIds": [
    "[\"i-28wt4****\",\"i-28wt4****\"]"
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

500 Edas.errorcode.PermissionDenied.message You are not authorized to perform the operation. No permissions

See Error CodesError Codes for a complete list.

Release notes

See Release NotesRelease Notes for a complete list.