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

CreateAutoScalingGroup

CreateAutoScalingGroup

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.

    • nameStringRequired

      The resource name.

    • descriptionString

      Optional. The detailed description of the resource.

    • scalingResourceTypeStringRequired

      The resource type of the auto scaling group. Current type: VM instance.

    • minResourceSizeIntegerRequired

      The minimum number of VM instances in the auto scaling group.

    • maxResourceSizeIntegerRequired

      The maximum number of VM instances in the auto scaling group.

    • defaultCooldownLongRequired

      The default cooldown time of the auto scaling rule.

    • removalPolicyStringRequired

      The policy for removing a VM instance.

    • defaultEnableboolean

      Optional. Whether to enable the auto scaling group after creation.

    • 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.

  • inventoryAutoScalingGroupInventoryRequired

    See inventory.

    • nameStringRequired

      The resource name.

    • uuidStringRequired

      The resource UUID.

    • scalingResourceTypeStringRequired

      The resource type of the auto scaling group. Current type: VM instance.

    • stateStringRequired

      The state of the auto scaling group.

    • defaultCooldownLongRequired

      The default cooldown time of the auto scaling rule.

    • descriptionStringRequired

      The detailed description of the resource.

    • minResourceSizeIntegerRequired

      The minimum number of VM instances in the auto scaling group.

    • maxResourceSizeIntegerRequired

      The maximum number of VM instances in the auto scaling group.

    • removalPolicyStringRequired

      The default policy for removing a VM instance.

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • attachedTemplatesListRequired

      The templates of VM instances attached to the auto scaling group.

    • systemTagsListRequired

      系统标签。

Endpoint

POST/zstack/v1/autoscaling/groups

/zstack/v1/autoscaling/groups

Operation ID

CreateAutoScalingGroup

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/autoscaling/groups' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","description":"<description>","scalingResourceType":"<scalingResourceType>","minResourceSize":1,"maxResourceSize":1,"defaultCooldown":1,"removalPolicy":"<removalPolicy>","defaultEnable":true,"resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "name": "test-group", "uuid": "ff296e09f82e3a84af082257ff63d162", "description": "just for test", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } }

Change History

This API has no change history records yet.

View all change history