All Products
Search
Document Center

Smart Access Gateway:CreateHealthCheck

Last Updated:Jul 31, 2025

Creates a health check for a Smart Access Gateway (SAG) instance.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
smartag:CreateHealthCheckcreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the SAG instance.

cn-shanghai
SmartAGIdstringYes

The ID of the SAG instance.

sag-1um5x5nwhilymw****
NamestringYes

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.

hc-123
DescriptionstringNo

The description of the health check.

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

hc_123
TypestringYes

The type of packets used in the health check.

Note Only ICMP_ECHO is supported.
ICMP_ECHO
DstIpAddrstringYes

The destination IP address of the health check.

192.XX.XX.1
DstPortintegerNo

The destination port of the health check.

Note This parameter is not supported.
1333
SrcIpAddrstringYes

The source IP address of the health check.

10.XX.XX.1
SrcPortintegerNo

The source port of the health check.

Note This parameter is not supported.
1344
ProbeIntervalintegerNo

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: milliseconds.

2000
ProbeCountintegerNo

The number of probes performed per health check.

Valid values: 1 to 20.

Default value: 1.

1
ProbeTimeoutintegerNo

The timeout period of a probe.

Valid values: 10 to 30000.

Default value: 1000.

Unit: milliseconds.

1000
RttThresholdintegerNo

The maximum round-trip time (RTT).

Valid values: -1 and 1 to 5000.

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

Unit: milliseconds.

1000
RttFailThresholdintegerNo

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

Valid values: 1 to 15.

Default value: 3.

3
FailCountThresholdintegerNo

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

Valid values: 1 to 15.

Default value: 3.

3

Response parameters

ParameterTypeDescriptionExample
object
InstanceIdstring

The ID of the health check.

hc-rrqoucina3gmpn****
RequestIdstring

The ID of the request.

E38E950D-28A4-4C41-9428-A8908EC6AE5C

Examples

Sample success responses

JSONformat

{
  "InstanceId": "hc-rrqoucina3gmpn****",
  "RequestId": "E38E950D-28A4-4C41-9428-A8908EC6AE5C"
}

Error codes

HTTP status codeError codeError messageDescription
400HC.AutoGeneratedThe health check instance is automatically generated and cannot be modified.The health check instance is automatically generated and cannot be modified.
400HC.InstanceNoFoundThe specified network health check instance does not exist.The specified network health check instance does not exist.
400HC.InvalidDescriptionThe specified description is invalid.The specified description is invalid.
400HC.InvalidDstIpAddrThe specified destination IP address is invalid.The specified destination IP address is invalid.
400HC.InvalidDstPortThe specified destination port is invalid.The specified destination port is invalid.
400HC.InvalidFailCountThresholdThe maximum number of successive failed probes is exceeded.The maximum number of successive failed probes is exceeded.
400HC.InvalidNameThe specified name is invalid.The specified name is invalid.
400HC.InvalidProbeCountThe specified number of probes is invalid.The specified number of probes is invalid.
400HC.InvalidProbeIntervalThe specified probe interval is invalid.The specified probe interval is invalid.
400HC.InvalidProbeTimeoutThe specified probe timeout period is invalid.The specified probe timeout period is invalid.
400HC.InvalidRttFailThresholdThe RTT threshold has been triggered too many times.The RTT threshold has been triggered too many times.
400HC.InvalidRttThresholdThe specified RTT is invalid.The specified RTT is invalid.
400HC.InvalidSrcIpAddrThe specified source IP address is invalid.The specified source IP address is invalid.
400HC.InvalidSrcPortThe specified source port is invalid.The specified source port is invalid.
400HC.InvalidTypeThe specified type is invalid.The specified type is invalid.
400HC.RelatedRouteThe specified health check instance has associated routes and cannot be deleted.The specified health check instance has associated routes and cannot be deleted.
400SAG.ArrearageThe specified SAG instance has overdue payments. Renew the instance first.The specified SAG instance has overdue payments. Renew the instance first.
400SAG.InstanceIdEmptyYou must specify the SAG instance ID.You must specify the SAG instance ID.
400SAG.InstanceNoFoundThe specified SAG instance does not exist.The specified SAG instance does not exist.
400SAG.NoActiveThe specified SAG instance has not been activated.The specified SAG instance has not been activated.
400HC.AmountLimitThe maximum number of health check instances is exceeded.The maximum number of health check instances is exceeded.
403FeatureNotSupportThe current edition of the smart access gateway does not support this feature.The current version of Smart Access Gateway does not support this feature.
500InternalErrorAn error occurred while processing your request.An error occurred while processing your request.

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