All Products
Search
Document Center

Smart Access Gateway:ModifySagWan

Last Updated:Mar 29, 2024

Modifies the WAN port configurations of a Smart Access Gateway (SAG) device.

Operation description

We recommend that you understand the functionality of a WAN port before you modify its settings. For more information, see Configure a WAN port.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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:ModifySagWanWrite
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

You can call the DescribeRegions operation to query the most recent region list.

cn-shanghai
SmartAGIdstringYes

The ID of the SAG instance.

sag-whfn****
SmartAGSnstringYes

The serial number of the SAG device.

sag32a30****
PortNamestringYes

The number of the WAN port.

0
IPTypestringYes

The connection type of the WAN port: Valid values:

  • DHCP: The WAN port connects to the Internet through an IP address that is dynamically assigned by the Dynamic Host Configuration Protocol (DHCP) server.
  • STATIC: The WAN port connects to the Internet through a static IP address. If you set this value, you must configure a static IP address, a subnet mask, and a gateway IP address for the WAN port.
  • PPPOE: The WAN port connects to the Internet through dial-up connections. If you set this value, you must enter the username and password of the PPPoE account provided by the Internet service provider (ISP).
DHCP
IPstringNo

The IP address of the WAN port.

Note If the WAN port uses a static IP address, you must set this parameter.
192.XX.XX.1
MaskstringNo

The subnet mask of the WAN port IP address.

Note If the WAN port uses a static IP address, you must set this parameter.
255.255.255.0
GatewaystringNo

The IP address of the gateway.

Note
  • If the WAN port uses a static IP address, you must set this parameter.
  • After this parameter is set, the SAG device generates a default route.
192.XX.XX.254
UsernamestringNo

The username of the PPPoE account.

The username must be 6 to 30 characters in length, and can contain digits and letters.

Note If the connection type of the WAN port is PPPoE, you must set this parameter.
P12ppp***
PasswordstringNo

The password of the PPPoE account.

The username must be 6 to 30 characters in length, and can contain digits and letters.

Note If the connection type of the WAN port is PPPoE, you must set this parameter. If you do not need to modify the password, you can ignore this parameter.
P12ppq***
PriorityintegerNo

The priority of the WAN port.

Valid values: -1 and 1 to 50.

A smaller value indicates a higher priority. A value of -1 indicates that traffic forwarding is disabled on the WAN port.

1
WeightintegerNo

The weight of the WAN port.

Valid values: 1 to 100. Default value: 100.

100
ISPstringNo

The ISP used by the WAN port. Valid values:

  • CT: China Telecom
  • CM: China Mobile
  • CU: China Unicom
  • Other: Other ISPs.
CT
BandwidthintegerNo

The maximum bandwidth of the WAN port. Unit: Mbit/s.

50

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

AFF7E5A6-6897-4FDC-A5A8-1978B5B3E545

Examples

Sample success responses

JSONformat

{
  "RequestId": "AFF7E5A6-6897-4FDC-A5A8-1978B5B3E545"
}

Error codes

HTTP status codeError codeError messageDescription
400Sag.PortNotExistThe specified port does not exist.The specified port does not exist.
400Sag.PortRoleInvalidThe port role is invalid.The specified device port role is invalid.

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