DescribeTransitRouterPolicyBasedRoutes

Updated at:

Queries the policy-based route rules in the policy route table of an Enterprise Edition transit router.

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 supports 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

cen:DescribeTransitRouterPolicyBasedRoutes

get

*All Resource

*

None None

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

PolicyTableId

string

No

The instance ID of the policy routing table.

ptbl-abc123xyz

MaxResults

integer

No

The number of entries to return on each page. Valid values: 1 to 100. Default value: 20.

20

NextToken

string

No

The token that is used to retrieve the next page of results. Valid values:

  • If NextToken is empty, no more results are available.

  • If NextToken returns a value, the value is the token used to start the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

Filter

array<object>

No

The filter conditions.

You can specify up to 5 filter conditions at a time.

object

No

The filter conditions.

You can specify up to 5 filter conditions at a time.

Key

string

No

The filter condition. Valid values:

  • PolicyBasedRouteId: the instance ID of the policy-based routing rule.

By default, multiple filter conditions are evaluated by using the AND operator. A resource matches the filter only if it meets all the specified conditions.

You can specify up to 5 filter conditions at a time.

PolicyBasedRouteId

Value

array

No

The value of the filter condition.

Specify the filter value based on the Key. You can specify multiple values for a single Key. Multiple values are evaluated by using the OR operator. A resource matches the filter condition if it meets at least one of the specified values.

You can specify up to 5 values for each filter condition.

string

No

The value of the filter condition.

Specify the filter value based on the Key. You can specify multiple values for a single Key. Multiple values are evaluated by using the OR operator. A resource matches the filter condition if it meets at least one of the specified values.

You can specify up to 5 values for each filter condition.

pbr-123qweasd

Response elements

Element

Type

Description

Example

object

Schema of Response

NextToken

string

The token that is used to retrieve the next page of results. Valid values:

  • If NextToken is empty, no more results are available.

  • If NextToken returns a value, the value is the token used to start the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

RequestId

string

The request ID.

F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1

TotalCount

integer

The total number of entries.

4

MaxResults

integer

The number of entries returned on each page. Default value: 20.

20

PolicyBasedRoutes

array<object>

The policy-based route rules.

object

PolicyBasedRouteId

string

The instance ID of the policy-based routing rule.

pbr-123qwead

PolicyTableId

string

The instance ID of the policy routing table.

ptbl-123adsfzc

Priority

integer

The priority of the policy-based route. Valid values: 1 to 100.

The priority of each policy-based route in a transit router policy route table must be unique. A smaller value indicates a higher priority.

1

SourceCidr

string

The source CIDR block.

10.0.0.0/8

DestinationCidr

string

The destination CIDR block.

10.185.33.0/24

Protocol

string

The protocol type of the traffic packets.

Traffic classification rules support matching traffic of various protocol types, such as HTTP, HTTPS, TCP, UDP, SSH, and Telnet. For more protocol types, log on to the Cloud Enterprise Network (CEN) console.

TCP

SourcePortRange

string

The source port. Valid values: -1 or 1 to 65535.

Matches traffic whose port number falls within the source port range. If this parameter is not specified, traffic from any source port is matched.

The port range format is described as follows:

  • 80: specifies port 80.

  • 80/80: specifies port 80.

  • 1/200: specifies ports 1 to 200.

  • -1/-1: specifies all ports.

80/80

DestPortRange

string

The destination port. Valid values: -1 or 1 to 65535.

Matches traffic whose port number falls within the destination port range. If this parameter is not specified, traffic to any destination port is matched.

The port range format is described as follows:

  • 80: specifies port 80.

  • 80/80: specifies port 80.

  • 1/200: specifies ports 1 to 200.

  • -1/-1: specifies all ports.

80/80

Dscp

string

The Differentiated Services Code Point (DSCP) value of the traffic packets to match. Valid values: 0 to 63.

The input format is described as follows:

  • 1: matches traffic with a DSCP value of 1.

  • 1/10: matches traffic with a DSCP value from 1 to 10.

  • -1/-1: matches traffic with any DSCP value.

1/10

TargetRouteTableId

string

The target route table.

vtb-123adf

Name

string

The name of the policy-based route rule.

The name can be empty or 1 to 128 characters in length. It cannot start with http:// or https://.

None

Description

string

The description of the policy route table instance.

OK

Status

string

The status of the policy-based route. Valid values:

  • Creating: creating

  • Active: available

  • Deleting: deleting

Active

AddressFamily

string

The address family. Valid values:

  • IPv4

  • IPv6

IPv4

Examples

Success response

JSON format

{
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1",
  "TotalCount": 4,
  "MaxResults": 20,
  "PolicyBasedRoutes": [
    {
      "PolicyBasedRouteId": "pbr-123qwead",
      "PolicyTableId": "ptbl-123adsfzc",
      "Priority": 1,
      "SourceCidr": "10.0.0.0/8",
      "DestinationCidr": "10.185.33.0/24",
      "Protocol": "TCP",
      "SourcePortRange": "80/80",
      "DestPortRange": "80/80",
      "Dscp": "1/10",
      "TargetRouteTableId": "vtb-123adf",
      "Name": "None",
      "Description": "OK",
      "Status": "Active",
      "AddressFamily": "IPv4"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.