All Products
Search
Document Center

Smart Access Gateway:UpdateSmartAccessGatewayPortRouteProtocol

Last Updated:Jul 31, 2025

Modifies the port protocol of an SCG5000 or SCG5000-5G device whose version is 3.4.2 or later.

Operation description

You can modify the port protocol only of SCG5000 and SCG5000-5G devices whose version is 3.4.2 or later.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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:UpdateSmartAccessGatewayPortRouteProtocol
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SagInsIdstringYes

The ID of the Smart Access Gateway (SAG) instance.

sag-3manef62evrfr6****
SagSnstringYes

The serial number of the SAG device.

sagf4dk****
RegionIdstringYes

The region ID of the SAG instance.

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

cn-shanghai
PortNamestringYes

The port name.

0
VlanstringNo

The VLAN ID.

10
RouteProtocolstringYes

The routing protocol. Valid values:

  • STATIC
  • OSPF
  • BGP
STATIC
RemoteIpstringNo

The IP address of the peer device.

Note When you enable BGP, you must set this parameter.
192.XX.XX.1
RemoteAsstringNo

The autonomous system number (ASN) of the SAG device.

Note When you enable BGP, you must set this parameter.
65535
CrossAccountbooleanNo

Specifies whether to query only the SAG instances that belong to another Alibaba Cloud account. Valid values:

  • false (default)
  • true
false
ResourceUidstringNo

The ID of the Alibaba Cloud account to which the SAG instance belongs.

109790620697****

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The response code. A value of 200 indicates that the task is successful.

200
Successboolean

Indicates whether the call is successful. Valid values:

  • true
  • false
true
RequestIdstring

The request ID.

A7DB1241-17CB-5457-83A9-638162A514C6
Messagestring

The response message. A value of Successful indicates that the task is successful.

Successful

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Success": true,
  "RequestId": "A7DB1241-17CB-5457-83A9-638162A514C6",
  "Message": "Successful"
}

Error codes

HTTP status codeError codeError message
400GATEWAY.InvalidSNThe specified gateway serial number does not exist.
400InternalErrorInternal server error
400MissParameter.GatewayIdThe input parameter GatewayId that is mandatory for processing this model is not supplied.
400MissParameter.PortNameThe input parameter PortName that is mandatory for processing this model is not supplied.
400MissParameter.RouteTypeThe input parameter RouteType that is mandatory for processing this model is not supplied.
400InvalidParameter.VlanThe input parameter Vlan is illegal, please check your input.
400InvalidParameter.RouteTypeThe input parameter RouteType is illegal, please check your input.
400InvalidParameter.RemoteIpThe input parameter RemoteIp is illegal, please check your input.
400InvalidParameter.RemoteAsThe input parameter RemoteAs is illegal, please check your input.
400InvalidSpec.FeatureNotSupportThe current edition of the cloudbranch does not support this feature.
400SMARTAG.PORT.ROLE.INVALIDInvalid port role
400DeviceNotExistThe specified device does not exist

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