Modifies the high availability (HA) settings of a Smart Access Gateway (SAG) device.

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 Yes ModifySagHa

The operation that you want to perform. Set the value to ModifySagHa.

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 of the SAG device associated with the SAG instance.

Mode String Yes NONE

The HA mode. Valid values:

  • NONE: disables HA.
  • STATIC: enables static HA.
  • DYNAMIC: enables dynamic HA.
PortName String Yes 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

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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