Queries the health status of a listener.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetHealthStatus

The operation that you want to perform. Set the value to GetHealthStatus.

RegionId String Yes cn-hangzhou

The ID of the region where the Global Accelerator (GA) instance is deployed. Set the value to cn-hangzhou.

ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Note If you do not set this parameter, the system automatically uses RequestId as ClientToken. RequestId of each API request may be different.
DryRun Boolean No true

Specifies whether only to precheck the request. Valid values:

  • true: prechecks the request only. The health status of the listener is not queried. The system prechecks the required parameters, request syntax, and limits. If the request fails the precheck, an error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.
  • false (default): sends a normal request. If the request passes the precheck, a 2xx HTTP status code is returned and the health status of the listener is obtained.
AcceleratorId String Yes ga-bp1odcab8tmno0hdq****

The ID of the GA instance that you want to query.

ListenerId String Yes lsr-bp1bpn0kn908w4nbw****

The ID of the listener.

Response parameters

Parameter Type Example Description
RequestId String 64ADAB1E-0B7F-4FD8-A404-3BECC0E9CCFF

The ID of the request.

ListenerId String lsr-bp1bpn0kn908w4nbw****

The ID of the listener.

HealthStatus String normal

The health status of the listener. Valid values:

  • normal: The listener is normal.
  • Abnormal: The listener is abnormal.
  • partiallyAbnormal: Some exceptions occur to the listener.
EndpointGroups Array of endpointGroupHealthStatuses

The information about the endpoint group.

EndpointGroupId String epg-bp14sz7ftcwwjgrdm****

The ID of the endpoint group.

EndpointGroupType String default

The type of the endpoint group. Valid values:

  • default: a default endpoint group
  • virtual: a virtual endpoint group
HealthStatus String normal

The health status of the endpoint group. Valid values:

  • init: The endpoint group is being initialized.
  • normal: The endpoint group is normal.
  • Abnormal: The endpoint group is abnormal.
  • partiallyAbnormal: Some endpoint groups that are associated with the listener are abnormal.
ForwardingRuleIds Array of String frule-bp134k63nmtwmnwee****

The IDs of the forwarding rules.

Endpoints Array of endpointHealthStatuses

The information about the endpoints.

EndpointId String ep-hp33b2e43fays7s8****

The ID of the endpoint.

Address String 47.0.XX.XX

The IP address of the endpoint.

HealthStatus String normal

The health status of the endpoint. Valid values:

  • init: The endpoint is being initialized.
  • normal: The endpoint is normal.
  • Abnormal: The endpoint is abnormal.
HealthDetail String None

The health check details of the endpoint.

Note This parameter is unavailable.
Port Long 80

The port that is used to connect to the endpoint.

Type String Ip

The type of the endpoint. Valid values:

  • Domain: a custom domain name
  • Ip: a custom IP address
  • PublicIp: a public IP address provided by Alibaba Cloud
  • ECS: an Elastic Compute Service (ECS) instance
  • SLB: a Server Load Balancer (SLB) instance
  • ALB: an Application Load Balancer (ALB) instance
  • OSS: an Object Storage Service (OSS) bucket

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetHealthStatus
&RegionId=cn-hangzhou
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&DryRun=true
&AcceleratorId=ga-bp1odcab8tmno0hdq****
&ListenerId=lsr-bp1bpn0kn908w4nbw****
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetHealthStatusResponse>
    <RequestId>64ADAB1E-0B7F-4FD8-A404-3BECC0E9CCFF</RequestId>
    <ListenerId>lsr-bp1bpn0kn908w4nbw****</ListenerId>
    <HealthStatus>normal</HealthStatus>
    <EndpointGroups>
        <EndpointGroupId>epg-bp14sz7ftcwwjgrdm****</EndpointGroupId>
        <EndpointGroupType>default</EndpointGroupType>
        <HealthStatus>normal</HealthStatus>
        <ForwardingRuleIds>frule-bp134k63nmtwmnwee****</ForwardingRuleIds>
        <Endpoints>
            <EndpointId>ep-hp33b2e43fays7s8****</EndpointId>
            <Address>47.0.XX.XX</Address>
            <HealthStatus>normal</HealthStatus>
            <HealthDetail>None</HealthDetail>
            <Port>80</Port>
            <Type>Ip</Type>
        </Endpoints>
    </EndpointGroups>
</GetHealthStatusResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "64ADAB1E-0B7F-4FD8-A404-3BECC0E9CCFF",
  "ListenerId" : "lsr-bp1bpn0kn908w4nbw****",
  "HealthStatus" : "normal",
  "EndpointGroups" : [ {
    "EndpointGroupId" : "epg-bp14sz7ftcwwjgrdm****",
    "EndpointGroupType" : "default",
    "HealthStatus" : "normal",
    "ForwardingRuleIds" : [ "frule-bp134k63nmtwmnwee****" ],
    "Endpoints" : [ {
      "EndpointId" : "ep-hp33b2e43fays7s8****",
      "Address" : "47.0.XX.XX",
      "HealthStatus" : "normal",
      "HealthDetail" : "None",
      "Port" : 80,
      "Type" : "Ip"
    } ]
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.