You can call this operation to query health check instances that are associated with a specific 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 No DescribeHealthChecks

The operation that you want to perform.

Set the value to DescribeHealthChecks.

RegionId String Yes cn-shanghai

The ID of the region where the SAG instance is deployed.

SmartAGId String Yes sag-qi0p07ld5q86k3****

The ID of the SAG instance.

HcInstanceId String No hc-ifflm5ygj3diwiu****

The ID of the health check instance

Name String No ddd3333

The name of the health check instance.

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

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
HealthChecks Array

The list of health check instances that are associated with the specified SAG instance.

HealthCheck
Description String Health check

The description of the health check instance.

DstIpAddr String 110.XX.XX.1

The destination IP address used by the health check instance.

DstPort Integer 33

The destination port used by the health check instance.

Note This feature is not supported.
FailCountThreshold Integer 3

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

Valid values: 1 to 15.

Default value: 3.

HcInstanceId String hc-ifflm5ygj3diwi****

The ID of the health check instance.

Name String doctest

The name of the health check instance.

ProbeCount Integer 2

The number of probes performed by a health check.

Valid values: 1 to 20.

Default value: 1.

ProbeInterval Integer 2000

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

Valid values: 1000 to 60000.

Default value: 2000.

Unit: millisecond.

ProbeTimeout Integer 1000

The timeout period of a probe.

Valid values: 10 to 30000.

Default value: 1000.

Unit: millisecond.

RelationCount Integer 3

The number of routes associated with the health check instance.

RttFailThreshold Integer 3

The number of times that the maximum RTT is exceeded before an alert is triggered.

Valid values: 1 to 15.

Default value: 3.

RttThreshold Integer 45

The RTT.

Valid values: -1 and 1 to 5000.

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

Unit: millisecond.

SmartAGId String sag-qi0p07ld5q86k3****

The ID of the SAG instance.

SrcIpAddr String 192.XX.XX.1

The source IP address used in health checks.

SrcPort Integer 334

The source port used in health checks.

Note This feature is not supported.
Status String unknown

The status of the last health check.

  • success: The SAG instance passed the last health check.
  • failed: The SAG instance failed the last health check.
  • unknown: The health check instance has not run a health check.
Type String ICMP_ECHO

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

PageNumber Integer 1

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

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.

TotalCount Integer 5

The total number of entries returned.

Examples

Sample requests

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

Sample success responses

XML format

<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

{
	"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

HttpCode Error code Error message Description
400 SAG.InstanceIdEmpty You must specify the SAG instance ID. The error message returned because the ID of the specified 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.