All Products
Search
Document Center

Smart Access Gateway:ViewSmartAccessGatewayRoutes

Last Updated:Mar 29, 2024

Queries the route details about an SCG5000 or SCG5000-5G device whose version is 3.4.2 or later.

Operation description

You can query the route details only of SCG5000 and SCG5000-5G devices whose version is 3.4.2 or later.

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:ViewSmartAccessGatewayRoutesRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SagInsIdstringYes

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

sag-sv487b7lno6go5****
SagSnstringYes

The serial number of the SAG device.

sagf4ea****
RegionIdstringYes

The region ID of the SAG instance.

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

cn-shanghai
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.

147304382796****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

F3D21D0B-5258-5412-AD1C-3929D297286B
Routesobject []

The information about the queried routes.

Idxinteger

The port number. A value of -1 indicates that the next hop points to a VPN tunnel.

Valid values: -1 to 4294967295.

2
Typestring

The route type. Valid values:

  • static
  • bgp
  • ospf
static
Rolestring

The port role.

WAN
Dststring

The destination CIDR block.

172.1.1.0/24
Nexthopstring

The next hop.

1.XX.XX.1
ConflictCidrsarray

The CIDR blocks that overlap with each other.

string

The CIDR block that overlaps with another CIDR block.

192.XX.XX.0/24
Coststring

The route cost.

The first 0 represents the administrative distance (AD).

The second 0 represents the router metric.

[0/0]

Examples

Sample success responses

JSONformat

{
  "RequestId": "F3D21D0B-5258-5412-AD1C-3929D297286B",
  "Routes": [
    {
      "Idx": 2,
      "Type": "static",
      "Role": "WAN",
      "Dst": "172.1.1.0/24",
      "Nexthop": "1.XX.XX.1",
      "ConflictCidrs": [
        "192.XX.XX.0/24"
      ],
      "Cost": "[0/0]"
    }
  ]
}

Error codes

HTTP status codeError codeError message
400GATEWAY.InvalidSNThe specified gateway serial number does not exist.
400MissParameter.GatewayIdThe input parameter GatewayId that is mandatory for processing this model is not supplied.
400InvalidSpec.FeatureNotSupportThe current edition of the cloudbranch does not support this feature.

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