You can call this operation to view the list of versions.

Request headers

This operation uses only common request headers. For more information, see Common parameters.

Request syntax

GET /services/{serviceName}/versions 

Request parameters

Parameter Type Position Required Example Description
serviceName String Path Yes service_name

The name of the service.

limit Integer Query No 20

The maximum number of resources to return. Default value: 20. Maximum value: 100. The number of returned resources is smaller than or equal to the specified number.

nextToken String Query No nextservice

The token used to obtain more results. If the number of resources exceeds the limit, the nextToken parameter is returned. Include this parameter in subsequent invocations to obtain more results. You do not need to provide this parameter in the first invocation.

startKey String Query No nextservice

The position from which the list begins. Results are sorted based on the version numbers.

direction String Query No BACKWARD

The direction in which the returned versions are sorted. Default value: BACKWARD. Valid values:

  • FORWARD: The results are sorted in ascending order.
  • BACKWARD: The results are sorted in descending order.

Response parameters

Parameter Type Example Description
direction String BACKWARD

The direction in which the returned versions are sorted. Default value: BACKWARD. Valid values:

  • FORWARD: The results are sorted in ascending order.
  • BACKWARD: The results are sorted in descending order.
nextToken String null

The token used to obtain more results.

Note If this value is not returned, all results are returned.
versions Array

The list of versions.

createdTime String 2020-03-16T06:23:50Z

The time when the service version was created.

description String test_description

The description of the service version.

lastModifiedTime String 2020-07-15T06:12:31Z

The last time when the service version was updated.

versionId String 1

The version of the service.

Examples

Sample requests

GET /2016-08-15/services/service_name/versions HTTP/1.1 
            

Sample success responses

JSON format

HTTP/1.1 200 OK Common response headers {   "versions": [     {       "versionId": "4",       "description": "test_description",       "createdTime": "2020-07-15T06:13:25Z",       "lastModifiedTime": "2020-07-15T06:13:25Z"     },     {       "versionId": "3",       "description": "test_description",       "createdTime": "2020-07-15T06:12:31Z",       "lastModifiedTime": "2020-07-15T06:12:31Z"     },     {       "versionId": "2",       "description": "test_description",       "createdTime": "2020-03-16T06:23:50Z",       "lastModifiedTime": "2020-03-16T06:23:50Z"     }   ],   "nextToken": null,   "direction": "BACKWARD" }