All Products
Search
Document Center

Alibaba Cloud Service Mesh:GetRegisteredServiceEndpoints

Last Updated:Mar 05, 2024

Queries the endpoints of a registered service in an Alibaba Cloud Service Mesh (ASM) instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ServiceMeshIdstringYes

The name of the namespace.

c08ba3fd1e6484b0f8cc1ad8fe10d****
NamespacestringNo

The IDs of clusters in the ASM instance. Separate multiple cluster IDs with commas (,).

default
ClusterIdsstringNo

The name of the registered service.

c8b054ee8c3914d079b5ce9733328****,c58faedb8a78640d3aeb0372e4c02****
NamestringNo

The type of the registered service. Valid values:

  • ServiceEntry: indicates that the service is registered by creating a service entry.
  • Kubernetes: indicates that the service is registered on a Kubernetes cluster on the data plane.
reviews
ServiceTypestringNo

The endpoints of the registered service.

Kubernetes

Response parameters

ParameterTypeDescriptionExample
object
ServiceEndpointsobject []

The IP address of the registered service.

Addressstring

The ID of the cluster on the data plane.

192.168.25.153
ClusterIdstring

The details of the endpoints of the registered service.

c80f45444b3da447da60a911390c2****
EndPointSliceobject

The name of the registered service.

ServiceNamestring

The name of the namespace.

reviews
Namespacestring

The location of the registered service. Valid values:

  • MESH_INTERNAL: The service is deployed inside the ASM instance.
  • MESH_EXTERNAL: The service is deployed outside the ASM instance.
default
Locationstring

The details of the endpoint of the registered service.

MESH_INTERNAL
EndpointsDetailsobject []

The name of the pod.

PodNamestring

The IP address of the registered service.

provider-v1-8c86b6898-h***
Addressstring

The port of the registered service.

127.2.**.**
Portsarray

The host name of the registered service.

integer
9090
Hostnamestring

The ID of the region in which the registered service resides.

www.demo.com
Regionstring

Indicates whether sidecar proxies are injected. Valid values:

  • true: yes
  • false: no
cn-hangzhou
SidecarInjectedboolean

The ID of the request.

false

Examples

Sample success responses

JSONformat

{
  "ServiceEndpoints": [
    {
      "Address": "192.168.25.153",
      "ClusterId": "c80f45444b3da447da60a911390c2****"
    }
  ],
  "EndPointSlice": {
    "ServiceName": "reviews",
    "Namespace": "default",
    "Location": "MESH_INTERNAL",
    "EndpointsDetails": [
      {
        "PodName": "provider-v1-8c86b6898-h***",
        "Address": "127.2.**.**",
        "Ports": [
          9090
        ],
        "Hostname": "www.demo.com",
        "Region": "cn-hangzhou",
        "SidecarInjected": false
      }
    ]
  },
  "RequestId": "31d3a0f0-07ed-4f6e-9004-1804498c****"
}

Error codes

HTTP status codeError codeError message
500ERR500An internal server error occurred.

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