You can call this operation to query the high availability (HA) configuration of 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 DescribeSagHa

The operation that you want to perform.

Set the value to DescribeSagHa.

RegionId String Yes cn-shanghai

The ID of the region where the Smart Access Gateway (SAG) instance is deployed.

SmartAGId String Yes sag-whfn****

The ID of the SAG instance.

SmartAGSn String Yes sag32a30****

The serial number of the SAG device.

Response parameters

Parameter Type Example Description
Mode String NONE

The HA mode. Valid values:

  • NONE: HA is disabled.
  • STATIC: static HA is enabled.
  • DYNAMIC: dynamic HA is enabled.
Ports Array

The information about the port.

PortName String 5

The name of the port.

VirtualIp String 192.XX.XX.1

The virtual IP address of the SAG device.

RequestId String 273D62FD-E346-4959-AA18-D79B9276FEFB

The ID of the request.

TaskStates Array

The information about the query task.

CreateTime String 1586836343000

The time when the query task was created.

ErrorCode String 200

The error code returned for a query task. The 200 error code indicates that the query task is successful.

ErrorMessage String Successful

The error message returned for a query task. The Successful error message indicates that the query task is successful.

State String Succeed

The status of the query task. Valid values:

  • Initialized: The query task has been initialized.
  • Offline: The query task is not dispatched because the SAG device is disconnected from Alibaba Cloud. The task will be dispatched after the SAG device is connected to Alibaba Cloud.
  • Succeed: The query task has been dispatched.
  • Processing: The query task is being dispatched.
  • VersionNotSupport: The current version of the SAG device does not support query tasks.
  • BuildRequestError: The SAG control system does not support query tasks.
  • HardwareError: The query task failed to be dispatched due to device errors.
  • TaskNotExist: The query task does not exist.
  • OfflineNotConfiged: The query task is not dispatched because the SAG device is disconnected from Alibaba Cloud. The task will not be dispatched after the device is connected to Alibaba Cloud.

Examples

Sample requests

http(s)://smartag.cn-shanghai.aliyuncs.com/? Action=DescribeSagHa
&RegionId=cn-shanghai
&SmartAGId=sag-whfn****
&SmartAGSn=sag32a30****
&<Common request parameters>

Sample success responses

XML format

<DescribeSagHaResponse>
  <RequestId>0EF71E33-011D-45DC-B942-8F1241D931E3</RequestId>
  <Mode>DYNAMIC</Mode>
  <TaskStates>
        <State>Succeed</State>
        <CreateTime>1586836343000</CreateTime>
        <ErrorCode>200</ErrorCode>
        <ErrorMessage>Successful</ErrorMessage>
  </TaskStates>
</DescribeSagHaResponse>

JSON format

{
	"RequestId": "0EF71E33-011D-45DC-B942-8F1241D931E3",
	"Mode": "DYNAMIC",
	"TaskStates": [
		{
			"State": "Succeed",
			"CreateTime": 1586836343000,
			"ErrorCode": "200",
			"ErrorMessage": "Successful"
		}
	]
}

Error codes

HttpCode Error code Error message Description
400 SAG.InstanceNoFound The specified SAG instance does not exist. The error message returned because the specified SAG instance does not exist.
400 SAG.SoftwareNotSupport The specified SAG software edition instance does not support ACL. The error message returned because the specified SAG instance does not support ACLs.
500 SmartAccessGatewayInArrears The specified Smart Access Gateway has expired. The error message returned because the specified SAG instance has expired. You must renew the SAG instance first.
500 SmartAccessGatewayNotActivated The specified Smart Access Gateway has not been activated. The error message returned because the specified SAG instance has not been activated. Activate the SAG instance first.
403 SmartAccessGatewayNotOnline The specified smart access gateway is not online. The error message returned because the specified SAG device is disconnected from Alibaba Cloud.
500 SmartAccessGatewayOffline The request cannot be completed. The Smart Access Gateway is offline. The error message returned because the SAG device is disconnected from Alibaba Cloud. The operation failed.
400 InstanceNotExit The specified instance does not exist. The error message returned because the specified instance does not exist.
400 ConfigUnsynchronized The network configuration is not synchronized. The error message returned because the network settings are not synchronized between the SAG device and instance.
403 FeatureNotSupport The current edition of the smart access gateway does not support this feature. The error message returned because the current version of the SAG device does not support this feature.
403 FeatureNotSupportForActiveSmartAG The current edition of the active smart access gateway does not support this feature. The error message returned because the current version of the active SAG device does not support this feature.
403 FeatureNotSupportForStandBySmartAG The current edition of the standby smart access gateway does not support this feature. The error message returned because the current version of the standby SAG device does not support this feature.

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