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
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
smartag:ModifySagWan | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | 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 |
SmartAGId | string | Yes | The ID of the SAG instance. | sag-whfn**** |
SmartAGSn | string | Yes | The serial number of the SAG device. | sag32a30**** |
PortName | string | Yes | The number of the WAN port. | 0 |
IPType | string | Yes | The connection type of the WAN port: Valid values:
| DHCP |
IP | string | No | 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 |
Mask | string | No | 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 |
Gateway | string | No | The IP address of the gateway. Note
| 192.XX.XX.254 |
Username | string | No | 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*** |
Password | string | No | 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*** |
Priority | integer | No | 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 |
Weight | integer | No | The weight of the WAN port. Valid values: 1 to 100. Default value: 100. | 100 |
ISP | string | No | The ISP used by the WAN port. Valid values:
| CT |
Bandwidth | integer | No | The maximum bandwidth of the WAN port. Unit: Mbit/s. | 50 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "AFF7E5A6-6897-4FDC-A5A8-1978B5B3E545"
}
Error codes
HTTP status code | 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 specified device port role is invalid. |
For a list of error codes, visit the Service error codes.