You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Launch templates
ModifyTemplateDefaultVersion - Modifies the default version of an instance launch template
Copy page
Download PDF
ModifyTemplateDefaultVersion - Modifies the default version of an instance launch template
Call the ModifyTemplateDefaultVersion operation to modify the default version of an instance launch template.​
Usage notes​
When you start an instance by using an instance launch template, the default version is automatically used. We recommend that you specify the commonly used version of the instance launch template as the default version. This eliminates the repetitive task of manually selecting a version each time.​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Only the request parameters specific to this operation and some common parameters are listed below. For more information, refer to Common parameters.​
Action string required Sample value: ModifyTemplateDefaultVersion​
The action that you want to perform. Value: ModifyTemplateDefaultVersion.​
​
Version stringrequired Sample value: 2020-04-01​
The API version. Value: 2020-04-01.​
​
LaunchTemplateId string Optional Sample value: lt-ysxc16auaugh9zfy****​
The ID of the instance launch template.​
tip​
You are required to specify LaunchTemplateId or LaunchTemplateName to specify the template.​
​
DefaultVersionNumber integer required Sample value: 2​
Specifies the version number of the default version of the instance launch template.​
​
LaunchTemplateName string Optional Sample value: templateNameDemo​
The name of the instance launch template.​
tip​
You are required to specify LaunchTemplateId or LaunchTemplateName to specify the template.​
​
​
​
Response parameters​
This operation has no specific response parameters. For more information, refer to Response structure.​
Sample request​
​
GET /?Action=ModifyTemplateDefaultVersion&Version=2020-04-01&LaunchTemplateId=lt-ysxc16auaugh9zfy****&DefaultVersionNumber=2 HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
Region: cn-beijing​
ServiceName: ecs​
​
Sample response​
​
{​
"ResponseMetadata": {​
"RequestId": "20220419160338010225133143077B****",​
"Action": "ModifyTemplateDefaultVersion",​
"Version": "2020-04-01",​
"Service": "ecs",​
"Region": "cn-beijing"​
},​
"Result": {}​
}​
​
Error codes​
The table below lists the business-related error codes of the operation. For more information, refer to Common error codes.​
​
Status code​
Error code​
Error message​
Description​
400​
InvalidArgument​
The specified argument is invalid.​
The specified argument is invalid.​
​
Last updated: 2026.04.17 10:57:32