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
|
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 |
| ScalingPolicy |
string |
No |
The instance reclaim mode of the scaling group. Valid values:
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 |
| InstanceChargePeriodUnit |
string |
No |
The unit of the subscription period. Valid values:
|
Month |
| InstanceChargePeriod |
integer |
No |
The subscription duration, in the unit specified by InstanceChargePeriodUnit. This parameter takes effect only when InstanceChargeType is set to PrePaid.
|
1 |
| AutoRenew |
boolean |
No |
Whether to enable auto-renewal. This parameter takes effect only when InstanceChargeType is set to PrePaid. Valid values:
|
true |
| AutoRenewPeriod |
integer |
No |
The auto-renewal period. Valid values:
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.