All Products
Search
Document Center

Enterprise Distributed Application Service:ScaleoutApplicationWithNewInstances

Last Updated:Jan 08, 2024

Purchases Elastic Compute Service (ECS) instances in the Enterprise Distributed Application Service (EDAS) console and adds the purchased ECS instances to the specified instance group of an application.

Operation description

Limits

Assume that the auto scaling feature is configured and enabled for an application. When an auto scale-in is triggered for the application, the ECS instances that are purchased by calling this operation are removed first.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Debug

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
edas:ManageApplicationWrite
  • Application
    acs:edas:{#regionId}:{#accountId}:namespace/{#NameSpaceId}/application/{#AppId}
    none
none

Request syntax

POST /pop/v5/scaling/scale_out

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringYes

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

e370c17f-*****-3df0721a327
GroupIdstringYes

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

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

The number of instances to be added for the scale-out.

2
TemplateIdstringNo

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

lt-****hy9s2
TemplateVersionstringNo

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

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

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
TemplateInstanceIdstringNo

The ID of the existing ECS instance used for the scale-out. If this parameter is specified, the specifications and configurations of the specified ECS instance are used as a template to purchase new instances.

i-28wt4****
ClusterIdstringNo

The ID of the cluster to which you want to add ECS instances. If the application and application instance group for the scale-out are specified, this parameter is ignored.

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

The billing method of the instance. Valid values:

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

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
InstanceChargePeriodintegerNo

The duration of the subscription. The unit of the subscription duration is specified by the InstanceChargePeriodUnit parameter. This parameter takes effect only when the InstanceChargeType parameter 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
AutoRenewbooleanNo

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

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

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 parameters

ParameterTypeDescriptionExample
object

The content that is returned.

ChangeOrderIdstring

The ID of the change process for the scale-out.

e370c17f-*****-3df0721a327
Codeinteger

The HTTP status code that is returned.

200
Messagestring

The additional information that is returned.

success
RequestIdstring

The ID of the request.

e370c17f-*****-3df0721a327
InstanceIdsarray

The IDs of ECS instances.

string

The list of purchased ECS instances.

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

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
500Edas.errorcode.PermissionDenied.messageYou are not authorized to perform the operation.No permissions

For a list of error codes, visit the Service error codes.