Queries health checks that are associated with a Smart Access Gateway (SAG) instance.

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 DescribeHealthChecks

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

RegionId String Yes cn-shanghai

The region ID of the SAG instance.

SmartAGId String Yes sag-qi0p07ld5q86k3****

The ID of the SAG instance.

HcInstanceId String No hc-ifflm5ygj3diwiu****

The ID of the health check.

Name String No ddd3333

The name of the health check.

The name must be 2 to 100 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter.

PageNumber Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Default value: 10. Maximum value: 50.

Response parameters

Parameter Type Example Description
TotalCount Integer 5

The total number of entries returned.

PageSize Integer 10

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

RequestId String 0B275FE6-FC86-4921-BC70-1B3DF68B078F

The ID of the request.

PageNumber Integer 1

The page number of the returned page. Default value: 1.

HealthChecks Array of HealthCheck

An array that consists of details about the health checks.

HealthCheck
Type String ICMP_ECHO

The type of the packet used in the health check. Only ICMP_ECHO is supported.

ProbeTimeout Integer 1000

The timeout period of a probe.

Valid values: 10 to 30000.

Default value: 1000.

Unit: milliseconds.

Status String unknown

The status of the health check. Valid values:

  • success: The health check was successful.
  • failed: The health check failed.
  • unknown: The health check was not started.
DstIpAddr String 110.XX.XX.1

The destination IP address of the health check.

RelationCount Integer 3

The number of routes that are associated with the health check.

RttFailThreshold Integer 3

The number of times that the maximum round-trip time (RTT) is exceeded before an alert is triggered.

Valid values: 1 to 15.

Default value: 3.

SmartAGId String sag-qi0p07ld5q86k3****

The ID of the SAG instance.

DstPort Integer 33

The destination port of the health check.

Note This feature is not supported.
FailCountThreshold Integer 3

The maximum number of failed probes before a health check is declared failed.

Valid values: 1 to 15.

Default value: 3.

RttThreshold Integer 45

The maximum RTT.

Valid values: -1 and 1 to 5000.

Default value: -1. This value indicates that the RTT threshold is not specified.

Unit: milliseconds.

SrcPort Integer 334

The source port of the health check.

Note This feature is not supported.
ProbeCount Integer 2

The number of probes performed per health check.

Valid values: 1 to 20.

Default value: 1.

Description String Health check

The description of the health check.

SrcIpAddr String 192.XX.XX.1

The source IP address of the health check.

ProbeInterval Integer 2000

The time interval at which probes are performed. The next probe does not start before the current one is complete.

Valid values: 1000 to 60000.

Default value: 2000.

Unit: milliseconds.

Name String doctest

The name of the health check.

HcInstanceId String hc-ifflm5ygj3diwi****

The ID of the health check.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeHealthChecks
&RegionId=cn-shanghai
&SmartAGId=sag-qi0p07ld5q86k3****
&<Common request parameters>

Sample success responses

XML format

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

<DescribeHealthChecksResponse>
<TotalCount>1</TotalCount>
<PageSize>10</PageSize>
<RequestId>97575E44-B01C-4F8B-B829-3272A312F196</RequestId>
<PageNumber>1</PageNumber>
<HealthChecks>
    <HealthCheck>
        <Status>unknown</Status>
        <Description>TEST</Description>
        <SrcPort>44</SrcPort>
        <SrcIpAddr>2.XX.XX.1</SrcIpAddr>
        <FailCountThreshold>3</FailCountThreshold>
        <DstPort>33</DstPort>
        <Name>TEST</Name>
        <ProbeCount>5</ProbeCount>
        <Type>ICMP_ECHO</Type>
        <ProbeTimeout>30</ProbeTimeout>
        <HcInstanceId>hc-l3x9k16ag24d6j****</HcInstanceId>
        <RttThreshold>-1</RttThreshold>
        <ProbeInterval>2000</ProbeInterval>
        <RelationCount>1</RelationCount>
        <SmartAGId>sag-4goc1sj3c978z2****</SmartAGId>
        <RttFailThreshold>5</RttFailThreshold>
        <DstIpAddr>12.XX.XX.1</DstIpAddr>
    </HealthCheck>
</HealthChecks>
</DescribeHealthChecksResponse>

JSON format

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

{
  "TotalCount" : 1,
  "PageSize" : 10,
  "RequestId" : "97575E44-B01C-4F8B-B829-3272A312F196",
  "PageNumber" : 1,
  "HealthChecks" : {
    "HealthCheck" : [ {
      "Status" : "unknown",
      "Description" : "TEST",
      "SrcPort" : 44,
      "SrcIpAddr" : "2.XX.XX.1",
      "FailCountThreshold" : 3,
      "DstPort" : 33,
      "Name" : "TEST",
      "ProbeCount" : 5,
      "Type" : "ICMP_ECHO",
      "ProbeTimeout" : 30,
      "HcInstanceId" : "hc-l3x9k16ag24d6j****",
      "RttThreshold" : -1,
      "ProbeInterval" : 2000,
      "RelationCount" : 1,
      "SmartAGId" : "sag-4goc1sj3c978z2****",
      "RttFailThreshold" : 5,
      "DstIpAddr" : "12.XX.XX.1"
    } ]
  }
}

Error codes

HTTP status code Error code Error message Description
400 SAG.InstanceIdEmpty You must specify the SAG instance ID. The error message returned because the ID of the SAG instance is not specified.
400 SAG.InstanceNoFound The specified SAG instance does not exist. The error message returned because the specified SAG instance does not exist.

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