You can call this operation to modify the high availability (HA) settings for Smart Access Gateway (SAG) devices.

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 ModifySagHa

The operation that you want to perform.

Set the value to ModifySagHa.

Mode String Yes NONE

The HA mode. Valid values:

  • NONE: disables HA.
  • STATIC: enables static HA.
  • DYNAMIC: enables dynamic HA.
RegionId String Yes cn-shanghai

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

SmartAGId String Yes sag-whfn****

The ID of the SAG instance.

SmartAGSn String Yes sag32a30****

The serial number (SN) of the SAG device.

PortName String No 5

The name of the port.

Note If you select the static HA mode, you must specify the port name.
VirtualIp String No 192.XX.XX.5

The virtual IP address of the SAG instance.

Note If you select the static HA mode, you must specify the virtual IP address.

Response parameters

Parameter Type Example Description
RequestId String 3200E8A3-563F-4FFC-8BDB-0F1263FA69E8

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<ModifySagHaResponse>
     <RequestId>3200E8A3-563F-4FFC-8BDB-0F1263FA69E8</RequestId>
</ModifySagHaResponse>

JSON format

{
"RequestId":"3200E8A3-563F-4FFC-8BDB-0F1263FA69E8"
}

Error codes

HttpCode Error code Error message Description
400 Sag.HaPortExist The specified port is used by the HA configuration. The error message returned because the specified port is already specified in the HA configuration.
400 Sag.HaPortRoleError The specified port does not support HA configuration. The error message returned because the specified port does not support HA.
400 Sag.HaTypeNotAllow The specified device does not support the configuration of the specified type. The error message returned because the SAG device does not support the specified HA mode.

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