CreateLaunchTemplate

Last Updated At: 2026-08-02 00:05:21

1. Interface Description

Interface request domain name: cvm.api3.convergecloud.com.

This API (CreateLaunchTemplate) is used to create an instance launch template.

An instance launch template is a type of configuration data and can be used to create instances. Its content includes configurations required to create instances, such as instance type, types and sizes of data disk and system disk, security groups, and other information.

Default interface request rate limit: 20 times per second.

Interface update time: 2023-03-18 07:13:24.

The interface is both signature verification and authentication.

2. Input Parameters

The following list of request parameters only lists interface request parameters and some public parameters, For a complete list of public parameters see public request parameters.

Parameter name Required Allow NULL Type Description
Action Yes No String Public parameter, The value of this interface: CreateLaunchTemplate
Version Yes No String Public parameter, The value of this interface: 2017-03-12
Region No No String Public parameter,Regional information A list of supported geographies is available through the DescribeRegions interface
LaunchTemplateName Yes No String Name of an instance launch template. It contains 2 to 128 English characters.
Example: MyLaunchTemplate
Placement Yes No Placement Location of the instance. You can specify attributes such as availability zone, project, and host (specified when creating a instance on the CDH) to which the instance belongs through this parameter.
Example:View
ImageId Yes No String Specifies a valid Image ID in the formats such as img-xxx. There are four types of images: 1. Public Image 2. Custom Image 3. Shared Image 4. Service Market Image. The IDs of the Public Image, Custom Image, and Shared Image can be found by logging in to the Console. The ID of the Service Market Image can be found in the Cloud Marketplace. By calling the DescribeImages API and inputting InstanceType, you can get the list of images supported by the current model from the returned ImageId field.
Example: img-dkwyg6sr
LaunchTemplateVersionDescription No No String Version description of an instance launch template. It contains 2 to 256 English characters.
Example: MyLaunchTemplateVersionDesc
InstanceType Yes No String Instance model. Different instance models specify different resource specifications.
Example: S5.16XLARGE256
SystemDisk No No SystemDisk Instance system disk configuration information. If this parameter is not specified, it will be assigned based on the system default values.
Example:View
DataDisks No No Array of DataDisk Array of DataDisk Instance data disk configuration information. If this parameter is not specified, no data disks are purchased by default. A maximum of 21 data disks can be specified when purchasing, including up to one LOCAL_BASIC or LOCAL_SSD data disk and up to 20 CLOUD_BASICCLOUD_PREMIUM, or CLOUD_SSD data disks.
Example:View
VirtualPrivateCloud No No VirtualPrivateCloud VPC-related information configuration. You can specify information such as VPC ID and subnet ID through this parameter. If this parameter is not specified, use the basic network by default. If a VPC IP is specified in this parameter, it indicates the primary network interface card IP of each instance. In addition, the number of the InstanceCount parameter should be consistent with the number of the VPC IP and should not exceed 20.
Example:View
InternetAccessible No No InternetAccessible Public bandwidth-related settings. If this parameter is not specified, the public bandwidth is 0 Mbps by default.
Example:View
InstanceCount No No Int64 Number of instances to purchase. For monthly subscription instances, the value range is [1,300]. For pay-as-you-go instances, the value range is [1,100]. Default value: 1. The specified number of instances to purchase should not exceed the remaining quota of the user. For specific restrictions on quota, see the CVM instance purchase restrictions.
Example: 1
InstanceName No No String Instance display name.
Example: MyInstance
LoginSettings No No LoginSettings Instance login settings. You can set login method, password, or key of the instance or retain the original login settings of the image. By default, a password will be randomly generated and notified to the user through Message Center.
Example:View
SecurityGroupIds No No Array of String Security groups to which an instance belongs. You can obtain this parameter through the sgId field in the returned value by calling DescribeSecurityGroups. If this parameter is not specified, bind the security group by default.
Example: ["sg-rf6ogz49"]
EnhancedService No No EnhancedService Enhanced services. You can specify whether to enable services such as Cloud Security and Cloud Monitor through this parameter. If this parameter is not specified, the Cloud Monitor and Cloud Security is enabled by default. For custom images and image market images, the Cloud Monitor and Cloud Security is not enabled by default. Instead, they use services retained in the images.
Example:View
ClientToken No No String String used to ensure request idempotency. This string is generated by the customer and should be unique across different requests. The maximum length should be no more than 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be ensured.
Example: 12dasfa423fdasq5twerra
HostName No No String The HostName for Cloud Virtual Machine (CVM) cannot have a dot (.) or hyphen (-) at the beginning or end, and they can not be used consecutively. Windows instances: The name must have [2, 15] characters, which can include letters (case insensitive), numbers, and hyphens (-), but cannot include dots (.) or be comprised entirely of numbers. Other types of instances (such as Linux): The name must have [2, 60] characters, which can include multiple dots, and each segment between dots can include letters (case insensitive), numbers, and hyphens (-).
Example: zhangsan
ActionTimer No No Datetime Scheduled task. You can specify a scheduled task for the instance through this parameter. Currently, only scheduled termination is supported.
Example: 2014-08-03 12:00:00
DisasterRecoverGroupIds No No Array of String Placement group ID, only one can be specified.
Example: ["ps-3p88qhfo"]
TagSpecification No No Array of TagSpecification List of tag descriptions. You can bind tags to corresponding resource instances at the same time by specifying this parameter. Currently, only binding tags to the CVM is supported.
Example:View
UserData No No String User data provided for the instance, should be encoded in base64 format, supports a maximum data size of 16 KB.
Example: YmFzZTY0Cg==
CamRoleName No No String CAM role name. Can be obtained through the roleName in the returned value from the API DescribeRoleList.
Example: roleName001
HpcClusterId No No String High-performance computing cluster ID. If the created instance is a high-performance computing instance, the cluster where the instance is placed should be specified. Otherwise, it cannot be specified.
Example: hpc-a5n666lo
InstanceChargeType No No String Instance billing type.
Example: PREPAID
InstanceChargePrepaid No No InstanceChargePrepaid Prepaid mode, that is, monthly subscription-related parameter settings. You can specify attributes of a monthly subscription instance, such as purchase duration and whether to set auto-renewal, through this parameter. If the billing mode of the specified instance is prepaid mode, this parameter is required.
Example:View
DisableApiTermination No No Bool Instance termination protection flag, indicating whether the instance is allowed to be deleted through the API. Value range: 
  • TRUE: Indicates that instance protection is enabled, and the instance is not allowed to be deleted through the API
  • FALSE: Indicates that instance protection is disabled, and the instance is allowed to be deleted through the API
    Default value: FALSE.
    Example: false
  • ProjectSpecification No No Array of ProjectSpecification Project specifications.
    Example:View

    3. Output Parameters

    Parameter name Type Description
    LaunchTemplateId String When an instance launch template is created through this API, this parameter will be returned, indicating the successfully created instance launch template ID.
    Example: lt-a5n125lo
    RequestId String Unique request id, Each request will return. The RequestId of the request needs to be provided when locating the problem.

    4. Error Code

    The following lists only the error codes related to the interface business logic, For other error codes, see public ErrorCode.

    Error Code Description
    AccountQualificationRestrictions The requesting account did not pass the qualification audit.
    FailedOperation.DisasterRecoverGroupNotFound The specified disaster recovery group was not found.
    FailedOperation.InquiryPriceFailed Failed to get the cost
    FailedOperation.NoAvailableIpAddressCountInSubnet The available IPs in the subnet are exhausted.
    FailedOperation.SnapshotSizeLargerThanDataSize The snapshot capacity exceeds the disk size. Choose a larger disk space.
    InternalError Internal error
    InvalidParameterValueLimit The parameter value is out of range
    InvalidParameterCombination It indicates that the parameter combination is incorrect.
    InvalidParameter.ValueTooLarge The parameter length exceeds the limit.
    VpcAddrNotInSubNet The VPC IP is not within the subnet.
    InvalidInstanceType.Malformed The parameter format of the specified InstanceType is invalid.
    InvalidClientToken.TooLong The string length of the specified ClientToken exceeds the limit. It should be less than or equal to 64 bytes.
    InvalidImageOsType.Unsupported Unsupported operating system type.
    InvalidParameter.InvalidIpFormat The specified VPC IP format is incorrect.
    ImageQuotaLimitExceeded The image quota has exceeded the limit.
    InvalidCloudDisk.SoldOut The cloud disk has been sold out.
    SecGroupActionFailure General error in security group service API calling.
    FailedOperation.NoAvailableInstanceType No available instance types.