Queries the versions of a 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
Action String Yes ListTemplateVersions

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

TemplateName String Yes describeinstances

The name of the template.

RegionId String No cn-hangzhou

The ID of the region.

MaxResults Integer No 50

The maximum number of results on each page. Valid values: 10 to 100

NextToken String No H8xj9c-398djs9-39ajd9asdjjJ

The token that is used to retrieve the next page of results.

ShareType String No Private

The type of the template. Valid values: Private and Public.

Response parameters

Parameter Type Example Description
MaxResults Integer 50

The maximum number of results on each page.

NextToken String NJSNDKLJS-SJKJDO090k30-JSDK232

The token that is used to retrieve the next page of results.

RequestId String E6CD612B-5889-4F1A-823F-8A4029E46

The ID of the request.

TemplateVersions Array

The versions of the template.

Description String Detach the eip from the special instance.

The description of the version.

TemplateFormat String YAML

The format of the template content. Valid values: YAML and JSON.

TemplateVersion String v2

The number of the version.

UpdatedBy String foo

The user who last updated the version.

UpdatedDate String 2020-05-19T06:05:41Z

The time when the version was last updated.

VersionName String baz

The name of the version.

Examples

Sample requests

http(s)://oos.cn-hangzhou.aliyuncs.com? Action=ListTemplateVersions
&TemplateName=describeinstances
&<Common request parameters>

Sample success responses

XML format

<ListTemplateVersionsResponse>
  <RequestId>E6CD612B-5889-4F1A-823F-8A4029E4667F</RequestId>
  <MaxResults>20</MaxResults>
  <TemplateVersions>
        <UpdatedBy>sub:239325550833674852:wb-kxy520087</UpdatedBy>
        <Description>Detach the eip from the special instance. </Description>
        <TemplateFormat>YAML</TemplateFormat>
        <UpdatedDate>2020-05-19T06:05:41Z</UpdatedDate>
        <TemplateVersion>v3</TemplateVersion>
  </TemplateVersions>
  <TemplateVersions>
        <UpdatedBy>sub:239325550833674852:wb-kxy520087</UpdatedBy>
        <Description>Detach the eip from the special instance. </Description>
        <TemplateFormat>YAML</TemplateFormat>
        <UpdatedDate>2020-05-19T02:48:16Z</UpdatedDate>
        <TemplateVersion>v2</TemplateVersion>
  </TemplateVersions>
  <TemplateVersions>
        <UpdatedBy>sub:239325550833674852:wb-kxy520087</UpdatedBy>
        <Description>Detach the eip from the special instance. </Description>
        <TemplateFormat>YAML</TemplateFormat>
        <UpdatedDate>2020-05-19T02:41:09Z</UpdatedDate>
        <TemplateVersion>v1</TemplateVersion>
  </TemplateVersions>
</ListTemplateVersionsResponse>

JSON format

{
    "RequestId": "E6CD612B-5889-4F1A-823F-8A4029E4667F",
    "MaxResults": 20,
    "TemplateVersions": [
        {
            "UpdatedBy": "sub:239325550833674852:wb-kxy520087",
            "Description": "Detach the eip from the special instance.",
            "TemplateFormat": "YAML",
            "UpdatedDate": "2020-05-19T06:05:41Z",
            "TemplateVersion": "v3"
        },
        {
            "UpdatedBy": "sub:239325550833674852:wb-kxy520087",
            "Description": "Detach the eip from the special instance.",
            "TemplateFormat": "YAML",
            "UpdatedDate": "2020-05-19T02:48:16Z",
            "TemplateVersion": "v2"
        },
        {
            "UpdatedBy": "sub:239325550833674852:wb-kxy520087",
            "Description": "Detach the eip from the special instance.",
            "TemplateFormat": "YAML",
            "UpdatedDate": "2020-05-19T02:41:09Z",
            "TemplateVersion": "v1"
        }
    ]
}

Error codes

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