You can call this operation to create a heath check instance for 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 No CreateHealthCheck

The operation that you want to perform.

Set the value to CreateHealthCheck.

DstIpAddr String Yes 192.XX.XX.1

The destination IP address used in heath checks.

Name String Yes hc-123

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.

RegionId String Yes cn-shanghai

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

SmartAGId String Yes sag-1um5x5nwhilymw****

The ID of the SAG instance.

SrcIpAddr String Yes 10.XX.XX.1

The source IP address used in health checks.

Type String Yes ICMP_ECHO

The type of packet used in health checks.

Note Only ICMP_ECHO is supported.
Description String No hc_123

The description of the health check instance.

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

DstPort Integer No 1333

The destination port used in health checks.

Note This feature is not supported.
SrcPort Integer No 1344

The source port used in health checks.

Note This feature is not supported.
ProbeInterval Integer No 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.

ProbeCount Integer No 1

The number of probes performed during each health check.

Valid values: 1 to 20.

Default value: 1.

ProbeTimeout Integer No 1000

The timeout period of a probe.

Valid values: 10 to 30000.

Default value: 1000.

Unit: millisecond.

RttThreshold Integer No 1000

The maximum round-trip time (RTT).

Valid values: -1 and 1 to 5000.

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

Unit: millisecond.

RttFailThreshold Integer No 3

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

Valid values: 1 to 15.

Default value: 3.

FailCountThreshold Integer No 3

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

Valid values: 1 to 15.

Default value: 3.

Response parameters

Parameter Type Example Description
CreateTime Long 1522744623000

The time when the heath check instance was created.

Description String test

The description of the health check instance.

DstIpAddr String 192.XX.XX.1

The destination IP address used in health checks.

DstPort Integer 1334

The destination port used in health checks.

Note This feature is not supported.
FailCountThreshold Integer 3

The number of times that the RTT has been exceeded.

InstanceId String hc-rrqoucina3gmpn****

The ID of the health check instance.

Name String hc-1113

The name of the health check instance.

ProbeCount Integer 1

The number of probes performed during each health check.

ProbeInterval Integer 2000

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

ProbeTimeout Integer 1000

The timeout period of a probe.

RegionId String cn-shanghai

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

RequestId String E38E950D-28A4-4C41-9428-A8908EC6AE5C

The ID of the request.

RttFailThreshold Integer 3

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

RttThreshold Integer 10

The maximum RTT.

SmartAGId String sag-1um5x5nwhilymw****

The ID of the SAG instance.

SrcIpAddr String 10.XX.XX.1

The source IP address used in health checks.

SrcPort Integer 1234

The source port used in health checks.

Note This feature is not supported.
Type String ICMP_ECHO

The type of packet used in health checks.

Examples

Sample requests

http(s)://[Endpoint]/? Action=CreateHealthCheck
&DstIpAddr=192.XX.XX.1
&Name=hc-123
&RegionId=cn-shanghai
&SmartAGId=sag-1um5x5nwhilymw****
&SrcIpAddr=10.XX.XX.1
&Type=ICMP_ECHO
&<Common request parameters>

Sample success responses

XML format

<CreateHealthCheckResponse>
  <InstanceId>hc-vfgyz7dv07lthr****</InstanceId>
  <RequestId>0637D6BB-4EAA-4AFD-9EA0-152FA3E943DC</RequestId>
</CreateHealthCheckResponse>

JSON format

{
	"InstanceId": "hc-vfgyz7dv07lthr***",
	"RequestId": "0637D6BB-4EAA-4AFD-9EA0-152FA3E943DC"
}

Error codes

HttpCode Error code Error message Description
400 HC.AutoGenerated The health check instance is automatically generated and cannot be modified. The error message returned because the specified health check instance is automatically orchestrated and cannot be modified.
400 HC.InstanceNoFound The specified network health check instance does not exist. The error message returned because the specified health check instance does not exist.
400 HC.InvalidDescription The specified description is invalid. The error message returned because the description of the health check instance is invalid.
400 HC.InvalidDstIpAddr The specified destination IP address is invalid. The error message returned because the destination IP address specified for the health check instance is invalid.
400 HC.InvalidDstPort The specified destination port is invalid. The error message returned because the destination port specified for the health check instance is invalid.
400 HC.InvalidFailCountThreshold The maximum number of successive failed probes is exceeded. The error message returned because the specified number of failed probes before a health check is declared failed is invalid.
400 HC.InvalidName The specified name is invalid. The error message returned because the name of the health check instance is invalid.
400 HC.InvalidProbeCount The specified number of probes is invalid. The error message returned because the specified number of probes performed during each health check is invalid.
400 HC.InvalidProbeInterval The specified probe interval is invalid. The error message returned because the time interval at which probes are performed is invalid.
400 HC.InvalidProbeTimeout The specified probe timeout period is invalid. The error message returned because the specified timeout period of a probe is invalid.
400 HC.InvalidRttFailThreshold The RTT threshold has been triggered too many times. The error message returned because the specified number of times that the maximum RTT is exceeded before an alert is triggered is invalid.
400 HC.InvalidRttThreshold The specified RTT is invalid. The error message returned because the specified RTT is invalid.
400 HC.InvalidSrcIpAddr The specified source IP address is invalid. The error message returned because the source IP address specified for the health check instance is invalid.
400 HC.InvalidSrcPort The specified source port is invalid. The error message returned because the source port specified for the health check instance is invalid.
400 HC.InvalidType The specified type is invalid. The error message returned because the specified type of health check is invalid.
400 HC.RelatedRoute The specified health check instance has associated routes and cannot be deleted. The error message returned because the specified health check instance is already associated with a route and cannot be deleted.
400 SAG.Arrearage The specified SAG instance has overdue payments. Renew the instance first. The error message returned because the specified health check instance has overdue payments. You must complete the overdue payments first.
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.
400 SAG.NoActive The specified SAG instance has not been activated. The error message returned because the specified SAG instance has not been activated. Activate the SAG instance first.
400 HC.AmountLimit The maximum number of health check instances is exceeded. The error message returned because the number of health check instances that you have created has reached the upper limit. You can submit a ticket to request a quota increase.
403 FeatureNotSupport The current edition of the smart access gateway does not support this feature. The error message returned because the version of the specified SAG instance does not support this feature.
500 InternalError An error occurred while processing your request. The error message returned because an unknown error occurred. The request failed.

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