All Products
Search
Document Center

Smart Access Gateway:ViewSmartAccessGatewayPortRouteProtocol

Last Updated:Aug 08, 2025

Queries the list of ports on a Smart Access Gateway (SAG) device that have a routable protocol enabled. This operation is applicable to SAG instances that are associated with an SCG5000 or SCG5000-5G device of version 3.4.2 or later.

Operation description

You can query the list of ports that have a routable protocol enabled only on SCG5000 and SCG5000-5G devices of version 3.4.2 or later.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

smartag:ViewSmartAccessGatewayPortRouteProtocol

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

SagInsId

string

Yes

The ID of the Smart Access Gateway instance.

sag-sv487b7lno6go5****

SagSn

string

Yes

The serial number (SN) of the Smart Access Gateway device.

sagf4dk****

RegionId

string

Yes

The ID of the region where the Smart Access Gateway instance is deployed.

You can call the DescribeRegions operation to obtain the region ID.

cn-shanghai

CrossAccount

boolean

No

Specifies whether to query only the Smart Access Gateway instances that belong to other accounts. Valid values:

  • false (default): No.

  • true: Yes.

false

ResourceUid

string

No

The ID of the Alibaba Cloud account to which the Smart Access Gateway instance belongs.

109790620697****

Response parameters

Parameter

Type

Description

Example

object

RequestId

string

The request ID.

877F5673-FFD1-5168-99D1-1E8009FBFF7B

Ports

array<object>

The list of port information.

object

The port information.

Status

string

The status of the port. Valid values:

  • UP: The port is enabled.

  • DOWN: The port is disabled.

UP

RemoteIp

string

The IP address of the peer.

192.XX.XX.1

PortName

string

The name of the port.

5

NeighborIp

string

The IP address of the neighbor.

192.XX.XX.2

RouteProtocol

string

The routable protocol of the port. Valid values:

  • STATIC: static routing protocol.

  • OSPF: Open Shortest Path First (OSPF) dynamic routing protocol.

  • BGP: Border Gateway Protocol (BGP) dynamic routing protocol.

BGP

RemoteAs

string

The autonomous system (AS) number of the BGP peer.

65535

Vlan

string

The VLAN ID.

2

TaskStates

array<object>

The status of the query task.

object

The status of the query task.

ErrorMessage

string

The error message. `Successful` indicates that the query task is successful.

Successful

State

string

The status of the asynchronous task:

  • Initialized: The query task is being initialized.

  • Offline: The SAG device is offline and the query task is not sent. The task will be sent after the device goes online.

  • Succeed: The query task is sent.

  • Processing: The query task is being sent.

  • VersionNotSupport: The current version of the SAG device is not supported.

  • BuildRequestError: The management plane does not support the operation.

  • HardwareError: The query task failed to be sent due to a device error.

  • TaskNotExist: The query task does not exist.

  • OfflineNotConfiged: The SAG device is offline and the query task is not sent. The task will not be sent even after the device goes online.

Succeed

ErrorCode

string

The error code. `200` indicates that the query task is successful.

200

CreateTime

string

The time when the query task was created.

This is a UNIX timestamp that represents the number of milliseconds that have elapsed since 00:00:00 UTC on January 1, 1970.

1586765938000

Examples

Success response

JSON format

{
  "RequestId": "877F5673-FFD1-5168-99D1-1E8009FBFF7B",
  "Ports": [
    {
      "Status": "UP",
      "RemoteIp": "192.XX.XX.1",
      "PortName": "5",
      "NeighborIp": "192.XX.XX.2",
      "RouteProtocol": "BGP",
      "RemoteAs": "65535",
      "Vlan": "2"
    }
  ],
  "TaskStates": [
    {
      "ErrorMessage": "Successful",
      "State": "Succeed",
      "ErrorCode": "200",
      "CreateTime": "1586765938000"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 GATEWAY.InvalidSN The specified gateway serial number does not exist.
400 MissParameter.GatewayId The input parameter GatewayId that is mandatory for processing this model is not supplied.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.