Unbinding Scaling Groups from CVM

Last updated: 2020-06-04 16:23:51


    This is a legacy API which has been hidden and will no longer be updated. We recommend using the new Auto Scaling API 3.0 which is standardized and faster.

    1. API Description

    This API (DetachInstance) is used to detach a CVM instance from a specified scaling group.
    Domain for API request: scaling.api.qcloud.com

    2. Input Parameters

    The following request parameter list only provides API request parameters. Common request parameters need to be added when the API is called. For more information, refer to Common Request Parameters. The Action field for this API is DetachInstance.

    1) If the removed CVM instance is manually created by the user, the instance will not be stopped and released.

    2) This function can be performed only when the scaling group is in active status.

    3) This API can be called only when the scaling group is not performing a scaling activity.

    4) This function can be performed directly without the cooldown period when the scaling group has no scaling activity being performed.

    5) If the number of instances of the current scaling group minus the number of instances specified by this API is less than the minimum group size specified by the scaling group, the call fails.

    Parameter Name Required Type Description
    scalingGroupId Yes String ID of the scaling group to be removed from the CVM instance. It can be queried by calling API Query Scaling Group List (DescribeScalingGroup).
    instanceIds.n Yes String ID of the CVM instance to be removed from the scaling group. Please fill in the instanceId (unified ID of CVM) field returned in API Query CVM Bound to Scaling Group (DescribeScalingInstance).
    keepInstance No Int Whether to keep the detached instance. Value range:
  • 0: stop and release the detached instances.
  • 1: keep the detached instances.

    default value: 0
  • 3. Output Parameters

    Parameter Name Type Description
    code Int Common error code; 0: Succeeded; other values: Failed. For more information, please refer to Common Error Codes on the Error Code page.
    codeDesc String Error code at business side. If the task succeeds, it will return "Success"; if the task fails, the specific business error reason will be returned.
    message String Module error message description depending on API.

    4. Error Codes

    The following error codes only include the business logic error codes for this API.

    Error Code Description
    InvalidParameter.ScalingGroupIdError Incorrect scalingGroupId
    InvalidParameter.InstanceIdError Incorrect instanceId

    5. Example

    &<Common request parameters>

    Example of returned result is as follows. If the code is 0, it is unbound successfully.


    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback