All Products
Search
Document Center

Microservices Engine:ListEurekaInstances

Last Updated:Feb 13, 2023

Queries Eureka instances.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • 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 keyword: refers to the condition keyword defined by the cloud product itself.
  • 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.
Operateaccess levelResource typeconditional keywordAssociation operation
mse:ListEurekaInstancesRead
  • MSE
    acs:mse:{#regionId}:{#accountId}:instance/*
    without
without

Request parameters

ParameterTypeRequiredDescriptionExample
RequestParsstringNo

The extended request parameters in the JSON format.

{}
PageNumintegerYes

The number of the page to return.

1
PageSizeintegerYes

The number of entries to return on each page.

10
ClusterIdstringNo

The ID of the instance.

mse-09k1q11****
ServiceNamestringYes

The name of the service.

name
AcceptLanguagestringNo

The language of the response. Valid values:

  • zh: Chinese
  • en: English
zh

Response parameters

ParameterTypeDescriptionExample
object

The data structure.

HttpCodestring

The HTTP status code returned.

202
TotalCountinteger

The total number of returned instances.

7
RequestIdstring

The ID of the request.

316F5F64-F73D-42DC-8632-01E308B6****
Messagestring

The message returned.

The request is successfully processed.
PageSizeinteger

The number of entries returned per page.

10
PageNumberinteger

The page number of the returned page.

1
Dataarray

The details of the data.

object

The data structure.

Statusstring

The number of service providers. The value is in the following format: Number of healthy instances/Total number of instances.

1/1
LastDirtyTimestamplong

The time when the instance was last modified.

20201009115543
IpAddrstring

The IP address.

30.5.XX.XX
HomePageUrlstring

The URL of the homepage.

http://30.5.XX.XX:8091/
HostNamestring

The hostname.

30.5.XX.XX
InstanceIdstring

The ID of the instance.

L-PC1A6A28-****.hz.ali.com:contactinfo:8091
Portinteger

The service port number.

8091
SecurePortinteger

The security port.

443
Appstring

The name of the application.

CONTACTINFO
DurationInSecsinteger

The timeout period of the instance.
After the specified timeout period expires, the service is unavailable by default and is deleted.

90
LastUpdatedTimestamplong

The time when the instance heartbeat was last checked.

20201010071203
RenewalIntervalInSecsinteger

The maximum interval between two heartbeat checks after a heartbeat check times out.
Default value: 10.

10
VipAddressstring

The virtual IP address (VIP).

contactinfo
Metadataobject

The metadata.

ErrorCodestring

The error code returned if the request failed.

mse-100-000
Successboolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true

Example

Normal return example

JSONFormat

{
  "HttpCode": "202",
  "TotalCount": 7,
  "RequestId": "316F5F64-F73D-42DC-8632-01E308B6****",
  "Message": "The request is successfully processed.\n",
  "PageSize": 10,
  "PageNumber": 1,
  "Data": [
    {
      "Status": "1/1",
      "LastDirtyTimestamp": 20201009115543,
      "IpAddr": "30.5.XX.XX",
      "HomePageUrl": "http://30.5.XX.XX:8091/",
      "HostName": "30.5.XX.XX",
      "InstanceId": "L-PC1A6A28-****.hz.ali.com:contactinfo:8091",
      "Port": 8091,
      "SecurePort": 443,
      "App": "CONTACTINFO",
      "DurationInSecs": 90,
      "LastUpdatedTimestamp": 20201010071203,
      "RenewalIntervalInSecs": 10,
      "VipAddress": "contactinfo",
      "Metadata": {
        "test": "test",
        "test2": 1
      }
    }
  ],
  "ErrorCode": "mse-100-000",
  "Success": true
}

Error codes

Http codeError codeError messageDescription
400duplicatedClusterAliasNameduplicated cluster alias nameThe instance name is duplicate. User another name.
400illegalRequestillegal request:%sInvalid request: %s
400invalidParameterparameter error:%sInvalid input parameter: %s
403NoPermissionYou are not authorized to perform this operation.-
404clusterNotFoundcluster not foundThe cluster is not found.
500systemErrorsystem errorAn error occurred on the system. Try again later.
500regcenterErrorregister center error:%sInstance request error: %s

For a list of error codes, visit the API error center.