Skip to main content
Resource Center/Resource Pool/Auto-Scaling Group Operations

CreateAutoScalingVmTemplate

CreateAutoScalingVmTemplate

POST/zstack/v1/autoscaling/vmtemplate

Operation ID

CreateAutoScalingVmTemplate

Since

3.1.0

Execution Mode

Synchronous

Auth Context

Auth Required

Auth Context

Send these values as request headers when calling this API.

AuthorizationstringRequired

Bearer Token

X-Tenant-IDstring

X-Tenant-ID

Request Inputs

application/json

Body Fields

  • params
    ObjectRequired

    Request body parameter object.

    • vmInstanceName
      StringRequired

      The VM instance name.

    • vmInstanceDescription
      String

      Optional. The detailed description of the VM instance.

    • vmInstanceOfferingUuid
      StringRequired

      The instance offering of the VM instance.

    • imageUuid
      StringRequired

      The image UUID of the VM instance.

    • l3NetworkUuids
      ListRequired

      The L3 networks of the VM instance.

    • rootDiskOfferingUuid
      String

      Optional. The disk offering of the VM instance root volume.

    • dataDiskOfferingUuids
      List

      Optional. The disk offerings of the VM instance data volumes.

    • vmInstanceZoneUuid
      String

      Optional. The zone to which the VM instance belongs.

    • vmInstanceClusterUuid
      String

      Optional. The cluster to which the VM instance belongs.

    • hostUuid
      String

      Optional. The host UUID.

    • primaryStorageUuidForRootVolume
      String

      Optional. The UUID of the primary storage where the root volume locates.

    • defaultL3NetworkUuid
      StringRequired

      The default L3 network of the VM instance.

    • name
      StringRequired

      The resource name.

    • description
      String

      Optional. The detailed description of the resource.

    • type
      String

      Optional. The template type.

    • resourceUuid
      String

      Optional. The resource UUID.

    • tagUuids
      List

      Optional. The tag UUID list.

  • systemTags
    List

    Optional. The system tags.

  • userTags
    List

    Optional. The user tags.

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • error
    ErrorCodeRequired

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

    • code
      StringRequired

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

    • description
      StringRequired

      The brief description of the error.

    • details
      StringRequired

      The details about the error.

    • elaboration
      StringRequired

      The reserved field. Default value: null.

    • opaque
      LinkedHashMapRequired

      The reserved field. Default value: null.

    • cause
      ErrorCodeRequired

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

  • inventory
    AutoScalingTemplateInventoryRequired

    See inventory.

    • uuid
      StringRequired

      The resource UUID.

    • name
      StringRequired

      The resource name.

    • description
      StringRequired

      The detailed description of the resource.

    • type
      StringRequired

      The template type.

    • state
      StringRequired

      The state of the template.

    • systemTags
      ListRequired

      The system tags.

    • createDate
      TimestampRequired

      The creation date.

    • lastOpDate
      TimestampRequired

      The last operation date.