You can call this operation to add a static route.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | CreateSagStaticRoute |
The operation that you want to perform. Set the value to CreateSagStaticRoute. |
DestinationCidr | String | Yes | 192.XX.XX.0/24 |
The destination CIDR block. |
NextHop | String | Yes | 192.XX.XX.1 |
The IP address of the next hop. |
PortName | String | Yes | 0 |
The name of the port. |
RegionId | String | Yes | cn-shanghai |
The ID of the region where the Smart Access Gateway (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. |
Vlan | String | Yes | 20 |
The VLAN ID. Valid values: 0 indicates a physical port.1 to 4094 indicates that VLANs are supported. |
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=CreateSagStaticRoute
&DestinationCidr=192.XX.XX.0/24
&NextHop=192.XX.XX.1
&PortName=0
&RegionId=cn-shanghai
&SmartAGId=sag-whfn****
&SmartAGSn=sag32a30****
&Vlan=20
&<Common request parameters>
Sample success responses
XML
format
<CreateSagStaticRouteResponse>
<RequestId>1120228A-E5E1-4E9C-B56D-96887E1A2B2F</RequestId>
</CreateSagStaticRouteResponse>
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. |
400 | Sag.EccVlanNotExist | The specified dedicated VLAN does not exist. | VLANs are not enabled for the leased line port. |
400 | Sag.StaticRouteExist | The specified static route already exists. | The specified static route already exists. |
For a list of error codes, visit the API Error Center.