You can call this operation to query the list of templates.

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
Action String Yes ListTemplates

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

TemplateName String No MyTemplate

The name of the template. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.

PageNumber Long No 10

The number of the page to return. Pages start from page 1. Default value: 1.

PageSize Long No 1

The number of entries to return on each page. Valid values: 1 to 50. Default value: 10.

Response parameters

Parameter Type Example Description
RequestId String C3A8413B-1F16-4DED-AC3E-61A00718DE8A

The ID of the request.

PageSize Integer 10

The number of entries returned per page.

PageNumber Integer 1

The page number of the returned page. Pages start from page 1.

TotalCount Integer 3

The total number of templates.

Templates

The list of templates.

CreateTime String 2019-10-15T08:17:14.000000

The time when the template was created.

Description String test-description

The description of the template.

TemplateId String 4d4f5aa2-3260-4e47-863b-763fbb12****

The ID of the template.

TemplateName String test-list-templates

The name of the template.

UpdateTime String 2019-10-15T08:17:14.000000

The time when the template was last updated.

Examples

Sample requests


http(s)://[Endpoint]/? Action=ListTemplates
&<Common request parameters>

Sample success responses

XML format

<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<RequestId>C3A8413B-1F16-4DED-AC3E-61A00718DE8A</RequestId>
<Templates>
    <CreateTime>2019-10-15T08:17:15.000000</CreateTime>
    <Description>test-description-update</Description>
    <TemplateId>c8b8bd07-c488-4302-ac15-b88ef073****</TemplateId>
    <TemplateName>test-template-name-update</TemplateName>
    <UpdateTime>2019-10-15T08:17:15.000000</UpdateTime>
</Templates>
<Templates>
    <CreateTime>2019-10-15T08:17:15.000000</CreateTime>
    <Description>test-description</Description>
    <TemplateId>4d4f5aa2-3260-4e47-863b-763fbb12****</TemplateId>
    <TemplateName>test-list-templates-2</TemplateName>
    <UpdateTime>2019-10-15T08:17:15.000000</UpdateTime>
</Templates>
<Templates>
    <CreateTime>2019-10-15T08:17:14.000000</CreateTime>
    <Description>test-description</Description>
    <TemplateId>1e808bb6-c2d1-4196-98a3-3b2cb2a4****</TemplateId>
    <TemplateName>test-list-templates-1</TemplateName>
    <UpdateTime>2019-10-15T08:17:14.000000</UpdateTime>
</Templates>
<TotalCount>3</TotalCount>

JSON format

{
	"PageNumber":1,
	"TotalCount":3,
	"PageSize":10,
	"RequestId":"C3A8413B-1F16-4DED-AC3E-61A00718DE8A",
	"Templates":[
		{
			"TemplateName":"test-template-name-update",
			"Description":"test-description-update",
			"CreateTime":"2019-10-15T08:17:15.000000",
			"UpdateTime":"2019-10-15T08:17:15.000000",
			"TemplateId":"c8b8bd07-c488-4302-ac15-b88ef073****"
		},
		{
			"TemplateName":"test-list-templates-2",
			"Description":"test-description",
			"CreateTime":"2019-10-15T08:17:15.000000",
			"UpdateTime":"2019-10-15T08:17:15.000000",
			"TemplateId":"4d4f5aa2-3260-4e47-863b-763fbb12****"
		},
		{
			"TemplateName":"test-list-templates-1",
			"Description":"test-description",
			"CreateTime":"2019-10-15T08:17:14.000000",
			"UpdateTime":"2019-10-15T08:17:14.000000",
			"TemplateId":"1e808bb6-c2d1-4196-98a3-3b2cb2a4****"
		}
	]
}

Error codes

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

For a list of error codes common to all operations, see Common error codes.