All Products
Search
Document Center

Alibaba Cloud Service Mesh:GetRegisteredServiceEndpoints

Last Updated:Jan 07, 2025

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

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
servicemesh:GetRegisteredServiceEndpointsget
*All Resources
*
    none
none

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
ServiceEndpointsarray<object>

The IP address of the registered service.

ServiceEndpointobject
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
EndpointsDetailsarray<object>

The name of the pod.

endpointsDetailobject
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.

portinteger
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.