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
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
edas:ManageApplication | Write |
|
| none |
Request syntax
POST /pop/v5/scaling/scale_out
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
AppId | string | Yes | 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 |
GroupId | string | Yes | 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 |
ScalingNum | integer | Yes | The number of instances to be added for the scale-out. | 2 |
TemplateId | string | No | 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 |
TemplateVersion | string | No | 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 |
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 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**** |
ClusterId | string | No | 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 |
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 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.
| 1 |
AutoRenew | boolean | No | Specifies whether to enable auto-renewal. This parameter takes effect only when the InstanceChargeType parameter is set to PrePaid. Valid values:
| true |
AutoRenewPeriod | integer | No | The auto-renewal period. Valid values:
Default value: 1. | 1 |
Response parameters
Examples
Sample success responses
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 |
For a list of error codes, visit the Service error codes.