You can call this operation to delete an instance launch template.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
RegionId String Yes cn-hangzhou

The ID of the region to which the instance launch template belongs. You can call the DescribeRegions operation to query the most recent region list.

Action String Yes DeleteLaunchTemplate

The operation that you want to perform. Set the value to DeleteLaunchTemplate.

LaunchTemplateId String No lt-bp1apo0bbbkuy0rj3***

The ID of the instance launch template. For more information, call the DescribeLaunchTemplates operation. You must specify the LaunchTemplateId parameter or the LaunchTemplateName parameter to determine an instance launch template.

LaunchTemplateName String No JoshuaWinPostPaid

The name of the instance launch template. You must specify the LaunchTemplateId parameter or the LaunchTemplateName parameter to determine an instance launch template.

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request. This parameter is returned regardless of whether the operation is successful.

Examples

Sample requests


https://ecs.aliyuncs.com/?Action=DeleteLaunchTemplate
&RegionId=cn-hangzhou
&LaunchTemplateId=lt-bp1apo0bbbkuy0rj3***
&LaunchTemplateName=JoshuaWinPostPaid
&<Common request parameters>

Sample success responses

XML format

<DeleteLaunchTemplateResponse>
      <RequestId>04F0F334-1335-436C-A1D7-6C044FExxxxx</RequestId>
</DeleteLaunchTemplateResponse>

JSON format

{
	"RequestId":"04F0F334-1335-436C-A1D7-6C044FExxxxx"
}

Error codes

HTTP status code Error code Error message Description
400 InvalidRegion.NotExist %s The error message returned because the specified region 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 the parameter format is invalid.
403 InnerServiceFailed %s The error message returned because an internal service failed to be called.

For a list of error codes, visit the API Error Center.