ListRouteMapRules
Queries the details of one or more route map rules.
Operation description
Request description
RouteMapId: specifies the ID of the route map whose rules you want to query.
RouteMapRuleIds: the list of rule IDs to query. You can use this parameter together with filter conditions. The logical relationship between them is OR.
Filter: the filter conditions. You can filter by attributes such as direction. Supported filter conditions include Status and Direction.
DryRun: specifies whether to enable the dry run mode. Default value: false.
You must specify at least one of RouteMapId and RouteMapRuleIds. If you specify both, the system performs a joint query based on the two parameters. If you specify only RouteMapId, all rules under the route map are returned. If you specify only RouteMapRuleIds, the details of the specified rules are returned.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:ListRouteMapRules |
list |
RouteMapRule
RouteMap
|
None | None |
Request syntax
GET / HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can generate a parameter value on your client to ensure that the value is unique across different requests. The ClientToken parameter supports only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId of each API request may be different. |
02fb3da4-130e-11e9-8e44-001**** |
| RouteMapId |
string |
No |
The ID of the route map to query. |
rm-0a1b2c3d4e5f6a7b8 |
| RouteMapRuleIds |
array |
No |
The list of route map rule IDs to query. You can use this parameter together with filter conditions. The logical relationship between them is AND. |
|
|
string |
No |
The list of route map rule IDs to query. You can use this parameter together with filter conditions. The logical relationship between them is AND. |
rmr-0a1b2c3d4e5f6a7b8 |
|
| 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:
By default, multiple filter conditions are evaluated with an AND logical operator. A route map rule matches the filter conditions only if it meets all the specified conditions. You can specify up to 5 filter conditions at a time. |
Name |
| Value |
array |
No |
The value of the filter condition. Specify the filter value based on the Key. You can specify multiple filter values for a single Key. Multiple filter values are evaluated with an OR logical operator. A route map rule matches the filter condition if it meets at least one of the specified filter values. You can specify up to 5 filter values for a single filter condition. |
|
|
string |
No |
The value of the filter condition. Specify the filter value based on the Key. You can specify multiple filter values for a single Key. Multiple filter values are evaluated with an OR logical operator. A route map rule matches the filter condition if it meets at least one of the specified filter values. You can specify up to 5 filter values for a single filter condition. |
test |
|
| DryRun |
boolean |
No |
Specifies whether to only precheck the request. Valid values:
|
|
| MaxResults |
integer |
No |
The number of entries to return on each page. |
20 |
| NextToken |
string |
No |
The token that is used to retrieve the next page of results. Valid values:
|
dd20**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| TotalCount |
integer |
The total number of entries. |
2 |
| RequestId |
string |
The request ID. |
EF44D7B7-6248-5A60-8A4C-A92388605A57 |
| NextToken |
string |
The token that is used to retrieve the next page of results. Valid values:
|
dd20**** |
| MaxResults |
integer |
The number of entries returned on each page. |
20 |
| RouteMapRules |
array<object> |
The list of route map rules. |
|
|
array<object> |
The information about the route map rule. |
||
| Description |
string |
The description of the rule. |
Matches production prefixes from on-prem and sets a higher local preference. |
| MatchConditions |
object |
The match conditions of the route map rule. The system performs the actions defined in SetActions only if a route meets all the match conditions defined in this parameter. |
|
| AddressPrefixesInclude |
array |
The list of route prefixes for fuzzy matching. A route matches the condition if the route prefix in the match condition contains the route prefix of the route to be matched. For example, a policy defined with 10.0.0.0/8 can fuzzy match a route with the prefix 10.10.10.0/24. The IP address range uses the CIDR format and supports IPv4 and IPv6. This parameter is mutually exclusive with AddressPrefixesMatch and cannot be specified at the same time. |
|
|
string |
The list of route prefixes for fuzzy matching. A route matches the condition if the route prefix in the match condition contains the route prefix of the route to be matched. For example, a policy defined with 10.0.0.0/8 can fuzzy match a route with the prefix 10.10.10.0/24. The IP address range uses the CIDR format and supports IPv4 and IPv6. This parameter is mutually exclusive with AddressPrefixesMatch and cannot be specified at the same time. |
10.0.0.0/8 |
|
| AddressPrefixesMatch |
array |
The list of route prefixes for exact matching. A route matches the condition only if the route prefix in the match condition is exactly the same as the route prefix of the route to be matched. For example, a policy defined with 10.0.0.0/8 can only exactly match a route with the prefix 10.0.0.0/8. The IP address range uses the CIDR format and supports IPv4 and IPv6. This parameter is mutually exclusive with AddressPrefixesInclude and cannot be specified at the same time. |
|
|
string |
The list of route prefixes for exact matching. A route matches the condition only if the route prefix in the match condition is exactly the same as the route prefix of the route to be matched. For example, a policy defined with 10.0.0.0/8 can only exactly match a route with the prefix 10.0.0.0/8. The IP address range uses the CIDR format and supports IPv4 and IPv6. This parameter is mutually exclusive with AddressPrefixesInclude and cannot be specified at the same time. |
10.0.0.0/8 |
|
| AsPathsInclude |
array |
The list of AS paths for fuzzy matching. A route matches the condition if the AS path in the match condition overlaps with the AS path of the route to be matched. This parameter is mutually exclusive with AsPathsMatch and cannot be specified at the same time. Note
Only AS SEQUENCE is supported. AS SET, AS CONFED SEQUENCE, and AS CONFED SET are not supported. This means that only a list of AS numbers is supported, and sets and sublists are not supported. |
|
|
integer |
The list of AS paths for fuzzy matching. A route matches the condition if the AS path in the match condition overlaps with the AS path of the route to be matched. This parameter is mutually exclusive with AsPathsMatch and cannot be specified at the same time. Note
Only AS SEQUENCE is supported. AS SET, AS CONFED SEQUENCE, and AS CONFED SET are not supported. This means that only a list of AS numbers is supported, and sets and sublists are not supported. |
65000 |
|
| AsPathsMatch |
array |
The list of AS paths for exact matching. A route matches the condition only if the AS path in the match condition is exactly the same as the AS path of the route to be matched. This parameter is mutually exclusive with AsPathsInclude and cannot be specified at the same time. Note
Only AS SEQUENCE is supported. AS SET, AS CONFED SEQUENCE, and AS CONFED SET are not supported. This means that only a list of AS numbers is supported, and sets and sublists are not supported. |
|
|
integer |
The list of AS paths for exact matching. A route matches the condition only if the AS path in the match condition is exactly the same as the AS path of the route to be matched. This parameter is mutually exclusive with AsPathsInclude and cannot be specified at the same time. Note
Only AS SEQUENCE is supported. AS SET, AS CONFED SEQUENCE, and AS CONFED SET are not supported. This means that only a list of AS numbers is supported, and sets and sublists are not supported. |
65000 |
|
| CommunitySetInclude |
array |
The community set for fuzzy matching. A route matches the condition if the community in the match condition overlaps with the community of the route to be matched. Each community is in the format of n:m, where n and m range from 1 to 65535. The community must comply with RFC 1997. Large communities (RFC 8092) are not supported. This parameter is mutually exclusive with CommunitySetMatch and cannot be specified at the same time. Note
Incorrect community configurations may prevent routes from being advertised to the on-premises data center. |
|
|
string |
The community set for fuzzy matching. A route matches the condition if the community in the match condition overlaps with the community of the route to be matched. Each community is in the format of n:m, where n and m range from 1 to 65535. The community must comply with RFC 1997. Large communities (RFC 8092) are not supported. This parameter is mutually exclusive with CommunitySetMatch and cannot be specified at the same time. Note
Incorrect community configurations may prevent routes from being advertised to the on-premises data center. |
65000:100 |
|
| CommunitySetMatch |
array |
The community set for exact matching. A route matches the condition only if the community in the match condition is exactly the same as the community of the route to be matched. Each community is in the format of n:m, where n and m range from 1 to 65535. The community must comply with RFC 1997. Large communities (RFC 8092) are not supported. This parameter is mutually exclusive with CommunitySetInclude and cannot be specified at the same time. Note
Incorrect community configurations may prevent routes from being advertised to the on-premises data center. |
|
|
string |
The community set for exact matching. A route matches the condition only if the community in the match condition is exactly the same as the community of the route to be matched. Each community is in the format of n:m, where n and m range from 1 to 65535. The community must comply with RFC 1997. Large communities (RFC 8092) are not supported. This parameter is mutually exclusive with CommunitySetInclude and cannot be specified at the same time. Note
Incorrect community configurations may prevent routes from being advertised to the on-premises data center. |
65000:100 |
|
| DestinationInstanceIds |
array |
The list of destination instance IDs to match. The following instance types are supported:
Note
The list of destination instance IDs takes effect only when the direction of the route map is outbound. |
|
|
string |
The list of destination instance IDs to match. The following instance types are supported:
Note
The list of destination instance IDs takes effect only when the direction of the route map is outbound. |
vbr-gw8jiyiedko141709c903 |
|
| DestinationInstanceIdsReverseMatch |
boolean |
Specifies whether to use the reverse match mode for the list of destination instance IDs. Valid values:
|
false |
| DestinationInstanceTypes |
array |
The list of destination instance types to match. The following instance types are supported:
Note
The list of destination instance types takes effect only when the direction of the route map is outbound. |
|
|
string |
The list of destination instance types to be matched by the route. The following instance types are supported:
Note
The list of destination instance types takes effect only when the direction of the route map is outbound. |
VPC |
|
| DestinationRegionIds |
array |
The list of destination region IDs to match. |
|
|
string |
The list of destination region IDs to match. |
all |
|
| DestinationRouteTableIds |
array |
The list of destination route table IDs to match. Note
The list of destination route table IDs takes effect only when the direction of the route map is outbound. |
|
|
string |
The list of destination route table IDs to match. Note
The list of destination route table IDs takes effect only when the route map direction is outbound. |
vtb-wz9x2kcw75vsceun3a0wg |
|
| MatchAddressType |
string |
The IP address type of the route to match. Valid values:
You can leave this parameter empty to match routes of all types. |
IPv4 |
| RouteTypes |
array |
The list of route types to match. The following route types are supported:
You can specify multiple route types. |
|
|
string |
The list of route types to match. The following route types are supported:
You can specify multiple route types. |
System |
|
| SourceInstanceIds |
array |
The list of source instance IDs to match. The following instance types are supported:
|
|
|
string |
The list of source instance IDs to match. The following instance types are supported:
|
vpc-2zea9zsh6ce30nfcjlvyr |
|
| SourceInstanceIdsReverseMatch |
boolean |
Specifies whether to use the reverse match mode for the list of source instance IDs. Valid values:
|
false |
| SourceInstanceTypes |
array |
The list of source instance types to match. The following instance types are supported:
|
|
|
string |
The list of source instance types to match. The following instance types are supported:
|
VPC |
|
| SourceRegionIds |
array |
The list of source region IDs to match. |
|
|
string |
The list of source region IDs to match. |
cn-hongkong |
|
| SourceRouteTableIds |
array |
The list of source route table IDs to match. |
|
|
string |
The list of source route table IDs to match. |
vtb-uf684wwipxgflzkpe4zgd |
|
| Name |
string |
The name of the rule. |
Permit-Prod-Prefixes-Set-LP |
| Priority |
integer |
The priority of the rule. A smaller value indicates a higher priority. |
10 |
| RouteMapId |
string |
The ID of the route map. |
rm-0a1b2c3d4e5f6a7b8 |
| SetActions |
object |
The actions to perform for the route map rule. After a route meets all the match conditions defined in MatchConditions, the system processes the route based on the actions defined in this parameter. |
|
| AsPathPrepend |
array |
The AS path to prepend when the regional gateway receives a route or performs a publish route entry operation. This parameter is mutually exclusive with AsPathReplace and cannot be specified at the same time. This parameter specifies the action to execute after a route meets the match conditions. |
|
|
integer |
The AS path to prepend when the regional gateway receives a route or performs a publish route entry operation. This parameter is mutually exclusive with AsPathReplace and cannot be specified at the same time. This parameter specifies the action to execute after a route meets the match conditions. |
65000 |
|
| AsPathReplace |
array |
The AS path to replace when the regional gateway receives a route or performs a publish route entry operation. The original AS path of the route is replaced with the list of AS numbers specified in this parameter. This parameter is mutually exclusive with AsPathPrepend and cannot be specified at the same time. This parameter specifies the action to execute after a route meets the match conditions. |
|
|
integer |
The AS path to replace when the regional gateway receives a route or performs a publish route entry operation. The original AS path of the route is replaced with the list of AS numbers specified in this parameter. This parameter is mutually exclusive with AsPathPrepend and cannot be specified at the same time. This parameter specifies the action to execute after a route meets the match conditions. |
65123 |
|
| CommunityAdd |
array |
The community set to add to the route. Each community is in the format of n:m, where n and m range from 1 to 65535. The community must comply with RFC 1997. Large communities (RFC 8092) are not supported. This parameter is mutually exclusive with CommunityReplace and cannot be specified at the same time. This parameter specifies the action to perform after a route meets the match conditions. Note
Incorrect community configurations may prevent routes from being advertised to the on-premises data center. |
|
|
string |
The community set to add to the route. Each community is in the format of n:m, where n and m range from 1 to 65535. The community must comply with RFC 1997. Large communities (RFC 8092) are not supported. This parameter is mutually exclusive with CommunityReplace and cannot be specified at the same time. This parameter specifies the action to perform after a route meets the match conditions. Note
Incorrect community configurations may prevent routes from being advertised to the on-premises data center. |
65000:100 |
|
| CommunityReplace |
array |
The community set to replace the original community of the route. Each community is in the format of n:m, where n and m range from 1 to 65535. The community must comply with RFC 1997. Large communities (RFC 8092) are not supported. This parameter is mutually exclusive with CommunityAdd and cannot be specified at the same time. This parameter specifies the action to perform after a route meets the match conditions. Note
Incorrect community configurations may prevent routes from being advertised to the on-premises data center. |
|
|
string |
The community set to replace the original community of the route. Each community is in the format of n:m, where n and m range from 1 to 65535. The community must comply with RFC 1997. Large communities (RFC 8092) are not supported. This parameter is mutually exclusive with CommunityAdd and cannot be specified at the same time. This parameter specifies the action to perform after a route meets the match conditions. Note
Incorrect community configurations may prevent routes from being advertised to the on-premises data center. |
65000:200 |
|
| NextPriority |
integer |
Policy priority of the associated next route map rule.
|
1 |
| RouteAction |
string |
The action to perform after all conditions are met. Valid values:
|
Permit |
| RouteMapRuleId |
string |
The ID of the route map rule. |
rmr-3dm13f66wtctcnydup |
| Status |
string |
The status of the route map rule. Valid values:
|
Active |
Examples
Success response
JSON format
{
"TotalCount": 2,
"RequestId": "EF44D7B7-6248-5A60-8A4C-A92388605A57",
"NextToken": "dd20****",
"MaxResults": 20,
"RouteMapRules": [
{
"Description": "Matches production prefixes from on-prem and sets a higher local preference.",
"MatchConditions": {
"AddressPrefixesInclude": [
"10.0.0.0/8"
],
"AddressPrefixesMatch": [
"10.0.0.0/8"
],
"AsPathsInclude": [
65000
],
"AsPathsMatch": [
65000
],
"CommunitySetInclude": [
"65000:100"
],
"CommunitySetMatch": [
"65000:100"
],
"DestinationInstanceIds": [
"vbr-gw8jiyiedko141709c903"
],
"DestinationInstanceIdsReverseMatch": false,
"DestinationInstanceTypes": [
"VPC"
],
"DestinationRegionIds": [
"all"
],
"DestinationRouteTableIds": [
"vtb-wz9x2kcw75vsceun3a0wg"
],
"MatchAddressType": "IPv4",
"RouteTypes": [
"System"
],
"SourceInstanceIds": [
"vpc-2zea9zsh6ce30nfcjlvyr"
],
"SourceInstanceIdsReverseMatch": false,
"SourceInstanceTypes": [
"VPC"
],
"SourceRegionIds": [
"cn-hongkong"
],
"SourceRouteTableIds": [
"vtb-uf684wwipxgflzkpe4zgd"
]
},
"Name": "Permit-Prod-Prefixes-Set-LP",
"Priority": 10,
"RouteMapId": "rm-0a1b2c3d4e5f6a7b8",
"SetActions": {
"AsPathPrepend": [
65000
],
"AsPathReplace": [
65123
],
"CommunityAdd": [
"65000:100"
],
"CommunityReplace": [
"65000:200"
],
"NextPriority": 1,
"RouteAction": "Permit"
},
"RouteMapRuleId": "rmr-3dm13f66wtctcnydup",
"Status": "Active"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalParam.NextToken | NextToken is illegal | The error message returned because the NextToken parameter is set to an invalid value. |
| 400 | InvalidParameter.MaxResults | The specified MaxResults is invalid. | The error message returned because the MaxResults parameter is set to an invalid value. |
| 400 | InvalidParameter.RouteMapIds | The specified RouteMapIds is invalid. | The specified RouteMapIds is invalid. |
| 400 | InvalidParameter.Filter | The specified Filter is invalid. | The specified Filter is invalid. |
| 400 | InvalidParameter.RouteMapRuleIds | The specified parameter "RouteMapRuleIds" is invalid. | The specified parameter "RouteMapRuleIds" is invalid. |
| 400 | InvalidParameter.RouteMapId | The specified parameter RouteMapId is invalid. | The parameter RouteMapId entered is illegal. |
| 400 | MissingParameter.RouteMapIdOrRouteMapRuleIds | The input parameter "RouteMapId" or "RouteMapRuleIds" that is mandatory for processing this request is not supplied. | The input parameter "RouteMapId" or "RouteMapRuleIds" that is mandatory for processing this request is not supplied. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.