All Products
Search
Document Center

Elastic Compute Service:DeleteLaunchTemplate

Last Updated:Jul 23, 2024

Deletes a launch template. You can use the LaunchTemplateId or LaunchTemplateName parameter to specify the launch template that you want to delete from the specified region.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
LaunchTemplateIdstringNo

The ID of the launch template. For more information, see DescribeLaunchTemplates .

You must specify LaunchTemplateId or LaunchTemplateName to specify a launch template.

lt-bp1apo0bbbkuy0rj****
LaunchTemplateNamestringNo

The name of the launch template.

You must specify LaunchTemplateId or LaunchTemplateName to specify a launch template.

testLaunchTemplateName

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
LaunchTemplateIdstring

The ID of the launch template. For more information, see DescribeLaunchTemplates .

You must specify LaunchTemplateId or LaunchTemplateName to specify a launch template.

lt-bp1apo0bbbkuy0rj****
LaunchTemplateVersionNumbersarray

The versions of the deleted launch template.

long

The versions of the deleted launch template.

[1,2,3]

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "LaunchTemplateId": "lt-bp1apo0bbbkuy0rj****",
  "LaunchTemplateVersionNumbers": {
    "versionNumbers": [
      0
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidRegion.NotExist%sThe specified region does not exist.
400MissingParameter%sA parameter is not specified.
400InvalidParameter%sThe specified parameter is invalid.
403InnerServiceFailed%sAn internal service cannot be called.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-11-06The Error code has changed. The response structure of the API has changedView Change Details
2023-03-10The Error code has changed. The response structure of the API has changedView Change Details