Skip to main content

ModifyScalingGroup

Description

modify the scaling group.

Request Method

POST

Request Path

/apsara/route/Ess/ModifyScalingGroup

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
MinSizeBODYintegerNoNo sample value for this parameter.The minimum number of ECS instances in the scaling group. Value range:[0, 100].
DefaultCooldownBODYintegerNoNo sample value for this parameter.the default cooling time of the scaling group, value range:[0, 86400], unit: seconds.
ActiveScalingConfigurationIdBODYstringNoNo sample value for this parameter.the scaling configuration ID in effect in the scaling group.
regionIdBODYstringYesNo sample value for this parameter.region id
ScalingGroupIdBODYstringYesNo sample value for this parameter.ID of the scaling group.
RemovalPolicy.NBODYstringNoNo sample value for this parameter.Policy for removing ECS instances from scaling groups. Optional value: OldestInstance: the earliest ECS instance added to the scaling group. NewestInstance: the latest ECS instance added to the scaling group. OldestScalingConfiguration: you can enter up to 2 instances created by taking the earliest scaling configuration.
MaxSizeBODYintegerNoNo sample value for this parameter.The maximum number of ECS instances in the scaling group. Value range:[0, 100].
versionBODYstringNo2016-01-01version of api
ScalingGroupNameBODYstringNoNo sample value for this parameter.the display name of the scaling group, 2-40 English or Chinese characters, starting with numbers, large and small letters or Chinese, and can contain numbers, "_", "-" or "." The same user account is unique in the same region.

Return data

NameTypeSample valueDescription
The specified scaling group does not exist under this user accountinvalidscalinggroupid.notfoundThe specified scaling group does not exist.404
scaling group name already existsinvalidscalinggroupname.duplicateThe specified value of parameter is duplicated.400
The specified MinSize is greater than the MaxSizeinvalidparameter.conflictThe value of parameter and parameter are conflict.400
the instance type of the specified scaling configuration does not match the instance type of the currently effective scaling configurationinvalidscalingconfigurationid.instancetypemismatchThe specified scaling configuration and existing active scaling configuration have different instance type.400
the specified scaling configuration does not exist in the specified scaling groupinvalidscalingconfigurationid.notfoundThe specified scaling configuration does not exist.404

Example

Successful Response example

{
"The specified scaling group does not exist under this user account":"The specified scaling group does not exist.",
"scaling group name already exists":"The specified value of parameter is duplicated.",
"The specified MinSize is greater than the MaxSize":"The value of parameter and parameter are conflict.",
"the instance type of the specified scaling configuration does not match the instance type of the currently effective scaling configuration":"The specified scaling configuration and existing active scaling configuration have different instance type.",
"the specified scaling configuration does not exist in the specified scaling group":"The specified scaling configuration does not exist."
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}