All Products
Search
Document Center

Microservices Engine:ListGatewayService

Last Updated:Nov 13, 2024

Queries a list of services that are subscribed with a gateway.

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
mse:ListGatewayServiceget
  • Gateway
    acs:mse:{#regionId}:{#accountId}:instance/{#GatewayUniqueId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PageNumberintegerNo

The number of the page to return.

1
PageSizeintegerNo

The number of entries to return on each page.

10
OrderItemstringNo

The item based on which entries are sorted.

GmtCreate
DescSortbooleanNo

Specifies whether to enable sorting.

false
FilterParamsobjectNo

The parameters that are used to specify filter conditions. The values of the parameters are in the format of {"key1":"value1"}.

NamestringNo

The name of the service.

test
SourceTypestringNo

The type of the source.

MSE
NamespacestringNo

The namespace to which the service belongs.

public
GroupNamestringNo

The group.

test
GatewayUniqueIdstringYes

The unique ID of the gateway.

gw-5017305290e14centbrveca****
ServiceProtocolstringNo

The protocol of the service.

  • HTTP
  • HTTPS
  • HTTP2
  • GRPC
  • DUBBO
HTTP
AcceptLanguagestringNo

The language of the response. Valid values:

  • zh: Chinese
  • en: English
zh

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

F46CDBA4-B1EE-5C94-8A48-51C10177****
HttpStatusCodeinteger

The HTTP status code returned.

200
Messagestring

The error message returned if the request failed.

You are not authorized to perform this operation.
Codeinteger

The return value.

200
Successboolean

Indicates whether the request was successful. Valid values:

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

The returned data.

TotalSizelong

The total number of entries returned.

9
PageNumberinteger

The number of the returned page.

1
PageSizeinteger

The number of entries returned per page. Default value: 10.

10
Resultarray<object>

The data returned.

Servicesobject

The data structure.

Idlong

The ID.

1
Namestring

The name of the service.

test
GatewayUniqueIdstring

The unique ID of the gateway.

gw-5017305290e14centbrveca****
GatewayIdlong

The gateway ID.

1
SourceTypestring

The source type.

MSE
Namespacestring

The namespace.

public
GroupNamestring

The group.

test
SourceIdlong

The ID of the service source.

2
ServiceNameInRegistrystring

The name of the service that is registered with the service registry.

test
MetaInfostring

The metadata or IP addresses of the service.

{}
Ipsarray

The list of IP addresses.

Ipsstring

The IP address.

127.0.2.1
GmtCreatestring

The creation time.

2022-01-07 18:07:57
GmtModifiedstring

The modification time.

2022-01-07 18:07:57
Versionsarray<object>

The service version.

Versionsobject

The version.

Namestring

The version number.

v1
ServiceProtocolstring

The protocol of the service.

HTTP
ServicePortlong

The service port number.

80
HealehStatusstring

The health status.

  • Health
  • Unhealthy
  • Unknown
Unhealthy
HealthStatusstring

The health status.

  • Health
  • Unhealthy
  • Unknown
Unhealthy
HealthCheckboolean

Indicates whether health checks are performed.

true
HealthCheckInfoobject

The information about health checks.

Checkboolean

Indicates whether checks are performed.

true
Protocolstring

The network protocol.

TCP
Timeoutinteger

The timeout period.

2
Intervalinteger

The health check interval.

2
HealthyThresholdinteger

The threshold for healthy instances.

2
UnhealthyThresholdinteger

The threshold for unhealthy instances.

2
HttpPathstring

The path to which the HTTP request for the health check is sent.

/health
HttpHoststring

The endpoint of the HTTP request for the health check.

http://172.168.0.1
ExpectedStatusesarray

The expected status of the health check.

expectedStatusesinteger

The expected HTTP status.

200
UnhealthyEndpointsarray

The array of endpoints of unhealthy instances.

unhealthyEndpointsstring

The endpoint of the unhealthy instance.

172.168.0.1
GatewayTrafficPolicyobject

The traffic management policy.

Tlsobject

The Transport Layer Security (TLS).

Modestring

The TLS mode.

  • DISABLE
  • SIMPLE
  • MUTUAL
  • ISTIO_MUTUAL
SIMPLE
CertIdstring

The ID of the certificate.

5******-cn-hangzhou
CaCertIdstring

The ID of the certification authority (CA) certificate.

5******-cn-hangzhou
CaCertContentstring

The public key of the CA certificate .

content
SubjectAltNamesarray

The array of subject aliases.

SubjectAltNamestring

The subject alias.

name
Snistring

The Server Name Indication (SNI) value.

name-sni
LoadBalancerSettingsobject

The load balancing settings.

LoadbalancerTypestring

The load balancing type.

  • ROUND_ROBIN
  • LEAST_CONN
  • RANDOM
  • CONSISTENT_HASH
RANDOM
ConsistentHashLBConfigobject

The consistent hashing settings.

ParameterNamestring

The name of the parameter.

param
HttpCookieobject

The cookie-based load balancing parameters.

Namestring

The name of the cookie.

name
Pathstring

The path of the cookie.

/path
Ttlstring

The lifecycle of the cookie.

360
MinimumRingSizelong

The minimum value of the hash ring.

10000
ConsistentHashLBTypestring

The type based on which consistent hashing load balancing is performed.

  • HEADER
  • COOKIE
  • SOURCE_IP
  • QUERY_PARAMETER
HEADER
WarmupDurationinteger

The prefetch time of the least connection load balancing.

10
Portsarray

The port array.

portsinteger

The port number.

8080

Examples

Sample success responses

JSONformat

{
  "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": ""
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalRequestInvalid request:%sInvalid request: %s
400InvalidParameterParameter error:%sRequest parameter error: %s
403NoPermissionYou are not authorized to perform this operation:%sYou do not have the permission to use this interface:%s
404NotFoundNot found:%sThe resource does not exist:%s
500InternalErrorConsole error. Try again later:%sConsole error. Try again later: %s

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

Change history

Change timeSummary of changesOperation
2024-05-06The response structure of the API has changedView Change Details
2023-03-31The internal configuration of the API is changed, but the call is not affectedView Change Details
2022-02-22The response structure of the API has changedView Change Details
2022-02-22The internal configuration of the API is changed, but the call is not affectedView Change Details