Queries the details of one or more route map rules.
Operation description
Request description
RouteMapId: specifies the route map whose rules you want to query.
RouteMapRuleIds: the list of rule IDs to query. This parameter and filter conditions can be used together for matching, and they have an OR relationship.
Filter: the filter. 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 both are provided, a joint query is performed based on these two parameters. If only RouteMapId is provided, all rules under the route map are returned. If only RouteMapRuleIds is provided, the details of the specified rules are returned.
Try it now
Test
RAM authorization
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. This parameter and filter conditions can be used together for matching, and they have an AND relationship. |
|
|
string |
No |
The list of route map rule IDs to query. This parameter and filter conditions can be used together for matching, and they have an AND relationship. |
rmr-0a1b2c3d4e5f6a7b8 |
|
| Filter |
array<object> |
No |
The information about the filter conditions. You can specify up to 5 filter conditions at a time. |
|
|
object |
No |
The information about 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 have an AND relationship. A match succeeds only when all filter conditions are met. 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 parameter. You can specify multiple filter values for a single key. Multiple filter values have an OR relationship. A match succeeds if any of the filter values is met. 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 parameter. You can specify multiple filter values for a single key. Multiple filter values have an OR relationship. A match succeeds if any of the filter values is met. 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 in a paginated query. |
20 |
| NextToken |
string |
No |
The token for the next query. Valid values:
|
dd20**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned result. |
||
| MaxResults |
integer |
The number of entries returned on each page in a paginated query. |
20 |
| NextToken |
string |
The token for the next query. Valid values:
|
dd20**** |
| RequestId |
string |
The request ID. |
EF44D7B7-6248-5A60-8A4C-A92388605A57 |
| 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 executes the actions defined in SetActions only when a route meets all the match conditions defined in this parameter. |
|
| AddressPrefixesInclude |
array |
The route prefix list for fuzzy matching. A match succeeds if the route prefix in the match condition contains the route prefix of the matched route. For example, a policy defined with 10.0.0.0/8 can fuzzy match a route with 10.10.10.0/24. IP address ranges use the CIDR format. Both IPv4 and IPv6 are supported. This parameter and AddressPrefixesMatch are mutually exclusive and cannot be specified at the same time. |
|
|
string |
The route prefix list for fuzzy matching. A match succeeds if the route prefix in the match condition contains the route prefix of the matched route. For example, a policy defined with 10.0.0.0/8 can fuzzy match a route with 10.10.10.0/24. IP address ranges use the CIDR format. Both IPv4 and IPv6 are supported. This parameter and AddressPrefixesMatch are mutually exclusive and cannot be specified at the same time. |
10.0.0.0/8 |
|
| AddressPrefixesMatch |
array |
The route prefix list for exact matching. A match succeeds only when the route prefix in the match condition is exactly the same as the route prefix of the matched route. For example, a policy defined with 10.0.0.0/8 can only exactly match a route with 10.0.0.0/8. IP address ranges use the CIDR format. Both IPv4 and IPv6 are supported. This parameter and AddressPrefixesInclude are mutually exclusive and cannot be specified at the same time. |
|
|
string |
The route prefix list for exact matching. A match succeeds only when the route prefix in the match condition is exactly the same as the route prefix of the matched route. For example, a policy defined with 10.0.0.0/8 can only exactly match a route with 10.0.0.0/8. IP address ranges use the CIDR format. Both IPv4 and IPv6 are supported. This parameter and AddressPrefixesInclude are mutually exclusive and cannot be specified at the same time. |
10.0.0.0/8 |
|
| AsPathsInclude |
array |
The list of AS paths for fuzzy matching. A match succeeds if the AS path in the match condition overlaps with the AS path of the matched route. This parameter and AsPathsMatch are mutually exclusive 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 only a list of AS numbers is supported, and sets and sub-lists are not supported. |
|
|
integer |
The list of AS paths for fuzzy matching. A match succeeds if the AS path in the match condition overlaps with the AS path of the matched route. This parameter and AsPathsMatch are mutually exclusive 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 only a list of AS numbers is supported, and sets and sub-lists are not supported. |
65000 |
|
| AsPathsMatch |
array |
The list of AS paths for exact matching. A match succeeds only when the AS path in the match condition is exactly the same as the AS path of the matched route. This parameter and AsPathsInclude are mutually exclusive 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 only a list of AS numbers is supported, and sets and sub-lists are not supported. |
|
|
integer |
The list of AS paths for exact matching. A match succeeds only when the AS path in the match condition is exactly the same as the AS path of the matched route. This parameter and AsPathsInclude are mutually exclusive 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 only a list of AS numbers is supported, and sets and sub-lists are not supported. |
65000 |
|
| CommunitySetInclude |
array |
The community set for fuzzy matching. A match succeeds if the community in the match condition overlaps with the community of the matched 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 and CommunitySetMatch are mutually exclusive 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 match succeeds if the community in the match condition overlaps with the community of the matched 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 and CommunitySetMatch are mutually exclusive 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 match succeeds only when the community in the match condition is exactly the same as the community of the matched 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 and CommunitySetInclude are mutually exclusive 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 match succeeds only when the community in the match condition is exactly the same as the community of the matched 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 and CommunitySetInclude are mutually exclusive 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 exclude matching 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 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. |
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 direction of the route map is outbound. |
vtb-wz9x2kcw75vsceun3a0wg |
|
| MatchAddressType |
string |
The IP address type 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 exclude matching 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 |
| RouteMapRuleId |
string |
The ID of the route map rule. |
rmr-3dm13f66wtctcnydup |
| SetActions |
object |
The actions to execute 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 or advertises routes. This parameter and AsPathReplace are mutually exclusive 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 or advertises routes. This parameter and AsPathReplace are mutually exclusive 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 or advertises routes. The original AS path of the route is replaced with the list of AS numbers specified in this parameter. This parameter and AsPathPrepend are mutually exclusive 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 or advertises routes. The original AS path of the route is replaced with the list of AS numbers specified in this parameter. This parameter and AsPathPrepend are mutually exclusive 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 and CommunityReplace are mutually exclusive and cannot be specified at the same time. This parameter specifies the action to execute 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 and CommunityReplace are mutually exclusive and cannot be specified at the same time. This parameter specifies the action to execute 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 and CommunityAdd are mutually exclusive and cannot be specified at the same time. This parameter specifies the action to execute 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 and CommunityAdd are mutually exclusive and cannot be specified at the same time. This parameter specifies the action to execute 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 policy action after all conditions are met. Valid values:
|
Permit |
| Status |
string |
The status of the route map rule. Valid values:
|
Active |
| TotalCount |
integer |
The total number of entries. |
2 |
Examples
Success response
JSON format
{
"MaxResults": 20,
"NextToken": "dd20****",
"RequestId": "EF44D7B7-6248-5A60-8A4C-A92388605A57",
"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",
"RouteMapRuleId": "rmr-3dm13f66wtctcnydup",
"SetActions": {
"AsPathPrepend": [
65000
],
"AsPathReplace": [
65123
],
"CommunityAdd": [
"65000:100"
],
"CommunityReplace": [
"65000:200"
],
"NextPriority": 1,
"RouteAction": "Permit"
},
"Status": "Active"
}
],
"TotalCount": 2
}
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.