You can call this operation to modify the LAN port configurations 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 No ModifySagLan

The operation that you want to perform.

Set the value to ModifySagLan.

IP String Yes 192.XX.XX.1

The IP address of the LAN port.

IPType String Yes STATIC

The connection type of the LAN port. Valid values:

  • DHCP: a dynamic IP address. Uses the Dynamic Host Configuration Protocol (DHCP) to dynamically assign an IP address to a connected device.
  • STATIC: a static IP address. Specifies a static IP address for the LAN port.
Mask String Yes 255.255.255.0

The subnet mask of the LAN port IP address.

PortName String Yes 0

The name of the LAN port.

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 that is associated with the SAG instance.

StartIp String No 192.XX.XX.2

The first IP address of the DHCP pool.

EndIp String No 192.XX.XX.254

The last IP address of the DHCP pool.

Lease String No 7

The time duration that the IP address is retained after it is assigned through DHCP. Unit: minute.

Valid values: 1 to 43200.

Response parameters

Parameter Type Example Description
RequestId String 1120228A-E5E1-4E9C-B56D-96887E1A2B2F

The ID of the request.

Examples

Sample requests

http(s)://smartag.cn-shanghai.aliyuncs.com/? Action=ModifySagLan
&IP=192.XX.XX.1
&IPType=STATIC
&Mask=255.255.255.0
&PortName=0
&RegionId=cn-shanghai
&SmartAGId=sag-whfn****
&SmartAGSn=sag32a30****
&<Common request parameters>

Sample success responses

XML format

<ModifySagLanResponse>
     <RequestId>1120228A-E5E1-4E9C-B56D-96887E1A2B2F</RequestId>
</ModifySagLanResponse>

JSON format

{
"RequestId": "1120228A-E5E1-4E9C-B56D-96887E1A2B2F"
}

Error codes

HttpCode Error code Error message Description
400 Sag.PortNotExist The specified port does not exist. The specified port does not exist.
400 Sag.PortRoleInvalid The port role is invalid. The port role is invalid.

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