Skip to main content
Resource Center/Resource Pool/Auto-Scaling Group Operations
POSTAuto-Scaling Group OperationsSince 3.1.0SynchronousAuth Required

CreateAutoScalingGroupRemovalInstanceRule

CreateAutoScalingGroupRemovalInstanceRule

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • adjustmentTypeStringRequired

      The scale-in method. Options: Remove a specified number of VM instances. Remove VM instances by percentage. Remove VM instances to a specified number.

    • adjustmentValueIntegerRequired

      The scale-in size.

    • removalPolicyStringRequired

      The policy for removing a VM instance.

    • nameStringRequired

      The resource name.

    • descriptionString

      Optional. The detailed description of the resource.

    • autoScalingGroupUuidStringRequired

      The UUID of the auto scaling group.

    • typeString

      Optional. The type of the auto scaling rule.

    • cooldownLong

      Optional. The cooldown time after the auto scaling rule is triggered.

    • resourceUuidString

      Optional. The resource UUID.

    • tagUuidsList

      Optional. The tag UUID list.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoryAutoScalingRuleInventoryRequired

    See inventory.

    • typeStringRequired

      The type of the auto scaling rule.

    • descriptionStringRequired

      The detailed description of the resource.

    • cooldownLongRequired

      The cooldown time.

    • systemTagsListRequired

      系统标签。

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • nameStringRequired

      The resource name.

    • uuidStringRequired

      The resource UUID.

    • scalingGroupUuidStringRequired

      扩缩容组UUID。

    • stateAutoScalingRuleStateRequired

      See state.

      • EnabledAutoScalingRuleStateRequired

        The auto scaling rule is enabled.

      • DisabledAutoScalingRuleStateRequired

        The auto scaling rule is disabled.

    • statusAutoScalingRuleStatusRequired

      See status.

      • CreatedAutoScalingRuleStatusRequired

        The auto scaling rule is created.

      • WaitingForTriggerAutoScalingRuleStatusRequired

        The auto scaling rule is waiting to be triggered.

      • TriggeringAutoScalingRuleStatusRequired

        The auto scaling rule is triggered.

      • ErrorAutoScalingRuleStatusRequired

        错误。

    • ruleTriggersListRequired

      See ruleTriggers.

      • nameStringRequired

        The resource name.

      • uuidStringRequired

        The resource UUID.

      • typeStringRequired

        The trigger type.

      • ruleUuidStringRequired

        The UUID of the auto scaling rule.

      • descriptionStringRequired

        The detailed description of the resource.

      • stateStringRequired

        The state of the trigger.

        • EnabledAutoScalingRuleStateRequired

          The auto scaling rule is enabled.

        • DisabledAutoScalingRuleStateRequired

          The auto scaling rule is disabled.

      • createDateTimestampRequired

        The creation date.

      • lastOpDateTimestampRequired

        The last operation date.

Endpoint

POST/zstack/v1/autoscaling/rules/removal-instance

/zstack/v1/autoscaling/rules/removal-instance

Operation ID

CreateAutoScalingGroupRemovalInstanceRule

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/autoscaling/rules/removal-instance' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"adjustmentType":"<adjustmentType>","adjustmentValue":1,"removalPolicy":"<removalPolicy>","name":"<name>","description":"<description>","autoScalingGroupUuid":"<autoScalingGroupUuid>","type":"<type>","cooldown":1,"resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "type": "HealthProfile", "description": "just for test", "cooldown": 10.0, "state": "Enabled", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM", "name": "test-health-policy", "uuid": "f41b2b0ae44637a2af1985e362dc52d4" } }

Change History

This API has no change history records yet.

View all change history