Listing Templates
Function
This API is used to filter and list launch templates from the database based on the request conditions.
Debugging
You can debug this API in API Explorer.
Authorization
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the permissions listed below are required.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
ecs:launchTemplates:list |
list |
- |
- |
- |
- |
URI
GET /v3/{project_id}/launch-templates
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
project_id |
Yes |
Definition Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
limit |
No |
Integer |
Definition Specifies the maximum number of templates that can be returned. Constraints A maximum of 100 templates can be returned. Range N/A Default Value N/A |
|
marker |
No |
String |
Definition Specifies the template ID to which the marker corresponds. The query will start from the next ID. Constraints This parameter must be used together with the parameter limit. Range N/A Default Value N/A |
|
launch_template_id |
No |
Array of strings |
Definition Specifies the template ID. Constraints N/A Range N/A Default Value N/A |
|
name |
No |
Array of strings |
Definition Specifies the template name. Constraints N/A Range N/A Default Value N/A |
Request
None
Response
Table 3 describes the response parameters.
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition Specifies the template ID. Range N/A |
|
name |
String |
Definition Specifies the template name. Range N/A |
|
description |
String |
Definition Specifies the template description. Range N/A |
|
created_at |
String |
Definition Specifies the time when the template was created. Range N/A |
|
updated_at |
String |
Definition Specifies the time when the template was updated. Range N/A |
|
default_version |
Integer |
Definition Specifies the default version of the template. Range N/A |
|
latest_version |
Integer |
Definition Specifies the latest version of the template. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
next_marker |
String |
Definition Specifies the start index ID of the next page. Range N/A |
|
previous_marker |
String |
Definition Specifies the start index ID of the previous page. Range N/A |
Example Request
List templates.
GET https://{endpoint}/v3/{projectId}/launch-templates
Example Response
{
"launch_templates": [
{
"id": "e6b99563-xxxx-xxxx-xxxx-1820d4fd2a67",
"name": "my-template",
"description": "this template is used for XXXXXX",
"created_at": "XXXXX-XX-XX",
"updated_at": "XXXXX-XX-XX",
"default_version": 2,
"latest_version": 3
}
],
"page_info": {
"next_marker": "string"
}
}
Returned Values
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot