All Products
Search
Document Center

Platform For AI:ListServiceVersions

Last Updated:Nov 22, 2024

Queries the information about the historical versions of a service.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
eas:ListServiceVersionslist
*Service
acs:eas:{#regionId}:{#accountId}:service/{#ServiceName}
    none
none

Request syntax

GET /api/v2/services/{ClusterId}/{ServiceName}/versions HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The region ID of the service.

cn-hangzhou
ServiceNamestringYes

The service name. For more information about how to query the service name, see ListServices .

test_oss
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Default value: 100.

10

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

E089D584-B6F4-50C4-9902-DA2295B7****
PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page.

10
TotalCountlong

The total number of entries returned.

166
Versionsarray<object>

The historical versions of the service.

versionsobject
BuildTimestring

The time when the service version was created. The time is displayed in UTC.

2022-08-29T22:02:14Z
ImageAvailablestring

Indicates whether the image is available. Valid values:

  • true: The image is available.
  • false: The image is unavailable.
  • unknown: The availability of the image is unknown.
true
ImageIdinteger

The image ID.

4
Messagestring

The returned message.

Service is Running
ServiceRunnablestring

Indicates whether Elastic Algorithm service (EAS) is activated. Valid values:

  • true: EAS is activated.
  • false: EAS is not activated.
  • unknown: The activation of EAS is unknown.
true
ServiceConfigstring

The service deployment configurations. This parameter is returned only if the service is deployed by using a custom image.

{ "metadata": { "cpu": 1, "instance": 1, "memory": 1024 }, "name": "echo" }

Examples

Sample success responses

JSONformat

{
  "RequestId": "E089D584-B6F4-50C4-9902-DA2295B7****",
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 166,
  "Versions": [
    {
      "BuildTime": "2022-08-29T22:02:14Z",
      "ImageAvailable": "true",
      "ImageId": 4,
      "Message": "Service is Running",
      "ServiceRunnable": "true",
      "ServiceConfig": "{\n    \"metadata\": {\n        \"cpu\": 1,\n        \"instance\": 1,\n        \"memory\": 1024\n    },\n    \"name\": \"echo\"\n}"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-01-23The response structure of the API has changedView Change Details