Deletes a version of an instance launch template. This operation cannot delete the default version of an instance launch template. To delete the default version, you must call the DeleteLaunchTemplate operation to delete the instance launch template and all of its versions.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DeleteLaunchTemplateVersion |
The operation that you want to perform. Set the value to DeleteLaunchTemplateVersion. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region to which the instance lauch template belongs. You can call the DescribeRegions operation to query the most recent region list. |
LaunchTemplateId | String | No | lt-bp1apo0bbbkuy0rj**** |
The ID of the instance launch template. For more information, call the DescribeLaunchTemplates operation. |
LaunchTemplateName | String | No | testLaunchTemplateName |
The name of the instance launch template. |
DeleteVersion.N | Long | Yes | 2 |
The version number of the instance launch template. Valid values of N: 1 to 29. You can call the DescribeLaunchTemplateVersions operation to query all versions of an instance launch template. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
The ID of the request. |
Examples
Sample requests
https://ecs.aliyuncs.com/?Action=DeleteLaunchTemplateVersion
&DeleteVersion.1=2
&RegionId=cn-hangzhou
&LaunchTemplateId=lt-bp1apo0bbbkuy0rj****
&LaunchTemplateName=testLaunchTemplateName
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeleteLaunchTemplateVersionResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</DeleteLaunchTemplateVersionResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidRegion.NotExist | %s | The error message returned because the specified RegionId parameter does not exist. |
400 | MissingParameter | %s | The error message returned because a required parameter is not specified. |
400 | InvalidParameter | %s | The error message returned because a specified parameter is invalid. |
403 | InvalidOperation.DeleteDefaultVersion | %s | The error message returned because the specified operation is invalid. |
403 | InnerServiceFailed | %s | The error message returned because an internal service cannot be called. |
For a list of error codes, visit the API Error Center.