Retrieves the list of services to which a gateway is subscribed.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:ListGatewayService |
get |
*Gateway
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PageNumber |
integer |
No |
The page number. |
1 |
| PageSize |
integer |
No |
The number of entries per page. |
10 |
| OrderItem |
string |
No |
The sorting property. |
GmtCreate |
| DescSort |
boolean |
No |
Indicates whether to sort the results in descending order. |
false |
| FilterParams |
object |
No |
The filter conditions, specified as a JSON string, such as {"key1":"value1"}. |
|
| Name |
string |
No |
The service name. |
test |
| SourceType |
string |
No |
The source type. |
MSE |
| Namespace |
string |
No |
The namespace. |
public |
| GroupName |
string |
No |
The group. |
test |
| GatewayUniqueId |
string |
Yes |
The unique gateway ID. |
gw-5017305290e14centbrveca**** |
| ServiceProtocol |
string |
No |
The service protocol.
Valid values:
|
HTTP |
| AcceptLanguage |
string |
No |
The response language. Valid values:
|
zh |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data structure. |
||
| RequestId |
string |
The request ID. |
F46CDBA4-B1EE-5C94-8A48-51C10177**** |
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Message |
string |
The response message. |
You are not authorized to perform this operation. |
| Code |
integer |
The response code. |
200 |
| Success |
boolean |
Specifies whether the request succeeded. Valid values:
|
true |
| Data |
object |
The response data. |
|
| TotalSize |
integer |
The total number of entries. |
9 |
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. Default value: 10. |
10 |
| Result |
array<object> |
The list of services. |
|
|
array<object> |
The details of a service. |
||
| Id |
integer |
The ID of the service. |
1 |
| Name |
string |
The service name. |
test |
| GatewayUniqueId |
string |
The unique ID of the gateway. |
gw-5017305290e14centbrveca**** |
| GatewayId |
integer |
The gateway ID. |
1 |
| SourceType |
string |
The source type. |
MSE |
| Namespace |
string |
The namespace. |
public |
| GroupName |
string |
The group name. |
test |
| SourceId |
integer |
The source ID. |
2 |
| ServiceNameInRegistry |
string |
The original service name in the service registry. |
test |
| MetaInfo |
string |
The service metadata. |
{} |
| Ips |
array |
A list of the service's IP addresses. |
|
|
string |
An IP address of the service. |
127.0.2.1 |
|
| GmtCreate |
string |
The time when the service was created. |
2022-01-07 18:07:57 |
| GmtModified |
string |
The time when the service was last modified. |
2022-01-07 18:07:57 |
| Versions |
array<object> |
A list of service versions. |
|
|
object |
A service version. |
||
| Name |
string |
The version name. |
v1 |
| ServiceProtocol |
string |
The service protocol. |
HTTP |
| ServicePort |
integer |
The service port. |
80 |
| HealehStatus |
string |
The health status of the service. Valid values:
|
Unhealthy |
| HealthStatus |
string |
The health status of the service. Valid values:
|
Unhealthy |
| HealthCheck |
boolean |
Specifies whether to perform a health check. |
true |
| HealthCheckInfo |
object |
The health check configuration. |
|
| Check |
boolean |
Specifies whether to enable the health check. |
true |
| Protocol |
string |
The protocol for the health check. |
TCP |
| Timeout |
integer |
The timeout for the health check, in seconds. |
2 |
| Interval |
integer |
The interval between health checks, in seconds. |
2 |
| HealthyThreshold |
integer |
The number of consecutive successful health checks required for an endpoint to be considered healthy. |
2 |
| UnhealthyThreshold |
integer |
The number of consecutive failed health checks required for an endpoint to be considered unhealthy. |
2 |
| HttpPath |
string |
The HTTP path for the health check. |
/health |
| HttpHost |
string |
The host for the health check HTTP request. |
http://172.168.0.1 |
| ExpectedStatuses |
array |
A list of expected HTTP status codes that indicate a successful health check. |
|
|
integer |
An expected HTTP status code. |
200 |
|
| UnhealthyEndpoints |
array |
A list of unhealthy endpoints. |
|
|
string |
An unhealthy endpoint. |
172.168.0.1 |
|
| GatewayTrafficPolicy |
object |
The traffic management policy. |
|
| Tls |
object |
The Transport Layer Security (TLS) settings. |
|
| Mode |
string |
The TLS mode.
|
SIMPLE |
| CertId |
string |
The certificate ID. |
5******-cn-hangzhou |
| CaCertId |
string |
The ID of the CA certificate. |
5******-cn-hangzhou |
| CaCertContent |
string |
The public key of the CA certificate. |
content |
| SubjectAltNames |
array |
A list of subject alternative names (SANs). |
|
|
string |
A subject alternative name. |
name |
|
| Sni |
string |
The Server Name Indication (SNI). |
name-sni |
| LoadBalancerSettings |
object |
The load balancing settings. |
|
| LoadbalancerType |
string |
The load balancing policy.
|
RANDOM |
| ConsistentHashLBConfig |
object |
Configuration for cookie-based consistent hashing. |
|
| ParameterName |
string |
The name of the parameter used for the consistent hash. |
param |
| HttpCookie |
object |
Configuration for cookie-based consistent hashing. |
|
| Name |
string |
The name of the cookie. |
name |
| Path |
string |
The path of the cookie. |
/path |
| Ttl |
string |
The time to live (TTL) of the cookie. |
360 |
| MinimumRingSize |
integer |
The minimum size of the hash ring. |
10000 |
| ConsistentHashLBType |
string |
The consistent hash method.
|
HEADER |
| WarmupDuration |
integer |
The warm-up duration in seconds. During this period, traffic to a newly added endpoint gradually increases. |
10 |
| Ports |
array |
A list of service ports. |
|
|
integer |
A service port number. |
8080 |
|
| ServiceFQDN |
string |
The fully qualified domain name (FQDN) of the service. |
|
| DnsServerList |
array |
A list of DNS servers. This parameter is used only for DNS-based services. |
|
|
string |
A DNS server address in the |
1.1.1.1:80 |
Examples
Success response
JSON format
{
"RequestId": "F46CDBA4-B1EE-5C94-8A48-51C10177****",
"HttpStatusCode": 200,
"Message": "You are not authorized to perform this operation.",
"Code": 200,
"Success": true,
"Data": {
"TotalSize": 9,
"PageNumber": 1,
"PageSize": 10,
"Result": [
{
"Id": 1,
"Name": "test",
"GatewayUniqueId": "gw-5017305290e14centbrveca****",
"GatewayId": 1,
"SourceType": "MSE",
"Namespace": "public",
"GroupName": "test",
"SourceId": 2,
"ServiceNameInRegistry": "test",
"MetaInfo": "{}",
"Ips": [
"127.0.2.1"
],
"GmtCreate": "2022-01-07 18:07:57",
"GmtModified": "2022-01-07 18:07:57",
"Versions": [
{
"Name": "v1"
}
],
"ServiceProtocol": "HTTP",
"ServicePort": 80,
"HealehStatus": "Unhealthy",
"HealthStatus": "Unhealthy",
"HealthCheck": true,
"HealthCheckInfo": {
"Check": true,
"Protocol": "TCP",
"Timeout": 2,
"Interval": 2,
"HealthyThreshold": 2,
"UnhealthyThreshold": 2,
"HttpPath": "/health",
"HttpHost": "http://172.168.0.1",
"ExpectedStatuses": [
200
]
},
"UnhealthyEndpoints": [
"172.168.0.1"
],
"GatewayTrafficPolicy": {
"Tls": {
"Mode": "SIMPLE",
"CertId": "5******-cn-hangzhou",
"CaCertId": "5******-cn-hangzhou",
"CaCertContent": "content",
"SubjectAltNames": [
"name"
],
"Sni": "name-sni"
},
"LoadBalancerSettings": {
"LoadbalancerType": "RANDOM",
"ConsistentHashLBConfig": {
"ParameterName": "param",
"HttpCookie": {
"Name": "name",
"Path": "/path",
"Ttl": "360"
},
"MinimumRingSize": 10000,
"ConsistentHashLBType": "HEADER"
},
"WarmupDuration": 10
}
},
"Ports": [
8080
],
"ServiceFQDN": "",
"DnsServerList": [
"1.1.1.1:80"
]
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | Invalid request: %s |
| 400 | InvalidParameter | Parameter error:%s | Request parameter error: %s |
| 500 | InternalError | Console error. Try again later:%s | Console error. Try again later: %s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | You do not have the permission to use this interface:%s |
| 404 | NotFound | Not found:%s | The resource does not exist:%s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.