Queries the endpoints of a registered service in an Alibaba Cloud Service Mesh (ASM) instance.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | GetRegisteredServiceEndpoints |
The operation that you want to perform. Set the value to GetRegisteredServiceEndpoints. |
| ServiceMeshId | String | Yes | c08ba3fd1e6484b0f8cc1ad8fe10d**** |
The ID of the ASM instance. |
| Namespace | String | No | default |
The name of the namespace. |
| ClusterIds | String | No | c8b054ee8c3914d079b5ce9733328****,c58faedb8a78640d3aeb0372e4c02**** |
The IDs of clusters in the ASM instance. Separate multiple cluster IDs with commas (,). |
| Name | String | No | reviews |
The name of the registered service. |
| ServiceType | String | No | Kubernetes |
The type of the registered service. Valid values:
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| ServiceEndpoints | Array of ServiceEndpoint |
The endpoints of the registered service. |
|
| Address | String | 192.168.25.153 |
The IP address of the registered service. |
| ClusterId | String | c80f45444b3da447da60a911390c2**** |
The ID of the cluster on the data plane. |
| EndPointSlice | Object |
The details of the endpoints of the registered service. |
|
| ServiceName | String | reviews |
The name of the registered service. |
| Namespace | String | default |
The name of the namespace. |
| Location | String | MESH_INTERNAL |
The location of the registered service. Valid values:
|
| EndpointsDetails | Array of endpointsDetail |
The details of the endpoint of the registered service. |
|
| PodName | String | provider-v1-8c86b6898-h*** |
The name of the pod. |
| Address | String | 127.2.**.** |
The IP address of the registered service. |
| Ports | Array of Integer | 9090 |
The port of the registered service. |
| Hostname | String | www.demo.com |
The host name of the registered service. |
| Region | String | cn-hangzhou |
The ID of the region in which the registered service resides. |
| SidecarInjected | Boolean | false |
Indicates whether sidecar proxies are injected. Valid values:
|
| RequestId | String | 31d3a0f0-07ed-4f6e-9004-1804498c**** |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=GetRegisteredServiceEndpoints
&ServiceMeshId=c08ba3fd1e6484b0f8cc1ad8fe10d****
&Namespace=default
&ClusterIds=c8b054ee8c3914d079b5ce9733328****,c58faedb8a78640d3aeb0372e4c02****
&Name=reviews
&ServiceType=Kubernetes
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetRegisteredServiceEndpointsResponse>
<ServiceEndpoints>
<Address>192.168.25.153</Address>
<ClusterId>c80f45444b3da447da60a911390c2****</ClusterId>
</ServiceEndpoints>
<EndPointSlice>
<ServiceName>reviews</ServiceName>
<Namespace>default</Namespace>
<Location>MESH_INTERNAL</Location>
<EndpointsDetails>
<PodName>provider-v1-8c86b6898-h***</PodName>
<Address>127.2.**.**</Address>
<Ports>9090</Ports>
<Hostname>www.demo.com</Hostname>
<Region>cn-hangzhou</Region>
<SidecarInjected>false</SidecarInjected>
</EndpointsDetails>
</EndPointSlice>
<RequestId>31d3a0f0-07ed-4f6e-9004-1804498c****</RequestId>
</GetRegisteredServiceEndpointsResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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 code | Error code | Error message | Description |
|---|---|---|---|
| 500 | ERR500 | An internal server error occurred. | The error message returned because a backend service error occurs. |
For a list of error codes, visit the API Error Center.