All Products
Search
Document Center

Cloud Enterprise Network:UpdateRouteMapRule

Last Updated:Nov 03, 2026

Updates the attributes of an existing route map rule.

Operation description

Request description

  • RouteMapRuleId specifies the route map rule to be updated.

  • Name, Description, and Priority are used to update the name, description, and priority of the rule. Rule priorities under the same route map must be unique.

  • MatchConditions is used to update the match conditions of the rule, and SetActions is used to update the actions to be performed when a route meets the match conditions.

  • DryRun is an optional parameter used to precheck the request without actually updating the route map rule.

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:UpdateRouteMapRule

update

*RouteMapRule

acs:cen:*:{#accountId}:routemaprule/{#RouteMapRuleId}

None None

Request syntax

POST / 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 use the client to generate the value, but you must make sure that the value is unique among different requests. The client token can contain 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****

DryRun

boolean

No

Specifies whether to precheck only this request. Valid values:

  • true: prechecks the request without updating the route map rule. The system checks whether required parameters are set, the request format, and service limits. If the request fails the precheck, the corresponding error is returned. If the request passes the precheck, the DryRunOperation error code is returned.

  • false (default): sends the request. If the request passes the precheck, the route map rule is updated.

RouteMapRuleId

string

No

The ID of the route map rule to be updated.

rmr-0a1b2c3d4e5f6a7b8

Name

string

No

The name of the rule for easy identification. The name can be empty or 1 to 128 characters in length, and cannot start with http:// or https://.

Permit-Prod-Prefixes-Set-LP

Priority

integer

No

The priority of the rule. A smaller value indicates a higher priority.

10

Description

string

No

The detailed description of the rule. The description can be empty or 1 to 256 characters in length, and cannot start with http:// or https://.

Matches production prefixes from on-prem and sets a higher local preference.

MatchConditions

object

No

The match conditions of the route map rule. The system performs the actions defined in SetActions only when a route meets all the match conditions defined in this parameter.

AddressPrefixesInclude

array

No

The route prefix list for fuzzy matching. You can specify up to 64 CIDR blocks.

A match is successful if the route prefix in the match condition contains the route prefix of the route being matched.

For example, a policy defined with 10.0.0.0/8 can fuzzy match the 10.10.10.0/24 route.

The CIDR blocks use the CIDR format and support both IPv4 and IPv6.

This parameter is mutually exclusive with AddressPrefixesMatch. You cannot specify both parameters at the same time.

string

No

The route prefix list for fuzzy matching. You can specify up to 64 CIDR blocks.

A match is successful if the route prefix in the match condition contains the route prefix of the route being matched.

For example, a policy defined with 10.0.0.0/8 can fuzzy match the 10.10.10.0/24 route.

The CIDR blocks use the CIDR format and support both IPv4 and IPv6.

This parameter is mutually exclusive with AddressPrefixesMatch. You cannot specify both parameters at the same time.

10.0.0.0/8

AddressPrefixesMatch

array

No

The route prefix list for exact matching. You can specify up to 64 CIDR blocks.

A match is successful only if the route prefix in the match condition is identical to the route prefix of the route being matched.

For example, a policy defined with 10.0.0.0/8 can exactly match only the 10.0.0.0/8 route.

The CIDR blocks use the CIDR format and support both IPv4 and IPv6.

This parameter is mutually exclusive with AddressPrefixesInclude. You cannot specify both parameters at the same time.

string

No

The route prefix list for exact matching. You can specify up to 64 CIDR blocks.

A match is successful only if the route prefix in the match condition is identical to the route prefix of the route being matched.

For example, a policy defined with 10.0.0.0/8 can exactly match only the 10.0.0.0/8 route.

The CIDR blocks use the CIDR format and support both IPv4 and IPv6.

This parameter is mutually exclusive with AddressPrefixesInclude. You cannot specify both parameters at the same time.

10.0.0.0/8

AsPathsInclude

array

No

The list of AS paths for fuzzy match. You can enter up to 64 AS numbers.

A route is considered a match if the AS path in the match condition overlaps with the AS path of the matched route.

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

No

The list of AS paths for fuzzy match. You can enter up to 64 AS numbers.

A route is considered a match if the AS path in the match condition overlaps with the AS path of the matched route.

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

No

The list of AS paths for exact match. You can enter up to 64 AS numbers.

A route is considered a match only when the AS path in the match condition is exactly the same as the AS path of the matched route.

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

No

The list of AS paths for exact match. You can enter up to 64 AS numbers.

A route is considered a match only when the AS path in the match condition is exactly the same as the AS path of the matched route.

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

No

The community set for fuzzy match. You can enter up to 64 communities.

A route is considered a match 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 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

No

The community set for fuzzy match. You can enter up to 64 communities.

A route is considered a match 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 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

No

The community set for exact match. You can enter up to 64 communities.

A route is considered a match 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 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

No

The community set for exact match. You can enter up to 64 communities.

A route is considered a match 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 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

No

The list of destination instance IDs to be matched. You can enter the following types of instance IDs:

  • Virtual private cloud (VPC) instance IDs

  • Virtual border router (VBR) instance IDs

You can enter up to 64 instance IDs.

Note

The list of destination instance IDs takes effect only when the direction of the route map is outbound.

string

No

The list of destination instance IDs to be matched. You can enter the following types of instance IDs:

  • Virtual private cloud (VPC) instance IDs

  • Virtual border router (VBR) instance IDs

You can enter up to 64 instance IDs.

Note

The list of destination instance IDs takes effect only when the direction of the route map is outbound.

vbr-gw8jiyiedko141709c903

DestinationInstanceIdsReverseMatch

boolean

No

Specifies whether to use the exclusion match mode for the list of destination instance IDs. Valid values:

  • false (default): no. A route is considered a match if the destination instance ID of the route is in DestinationInstanceIds.N.

  • true: yes. A route is considered a match if the destination instance ID of the route is not in DestinationInstanceIds.N.

false

DestinationInstanceTypes

array

No

The list of destination instance types to be matched. The following instance types are supported:

  • VPC: VPC instance.

  • VBR: VBR instance.

You can enter multiple instance types.

Note

The list of destination instance types takes effect only when the direction of the route map is outbound.

string

No

The list of destination instance types to be matched. The following instance types are supported:

  • VPC: VPC instance.

  • VBR: VBR instance.

You can enter multiple instance types.

Note

The list of destination instance types takes effect only when the direction of the route map is outbound.

VPC

DestinationRegionIds

array

No

The list of destination region IDs to be matched. You can enter up to 64 region IDs.

string

No

The list of destination region IDs to be matched. You can enter up to 64 region IDs.

all

DestinationRouteTableIds

array

No

The list of destination route table IDs to be matched. You can enter up to 64 route table IDs.

Note

The list of destination route table IDs takes effect only when the direction of the route map is outbound.

string

No

The list of destination route table IDs to be matched. You can enter up to 64 route table IDs.

Note

The list of destination route table IDs takes effect only when the direction of the route map is outbound.

vtb-wz9x2kcw75vsceun3a0wg

MatchAddressType

string

No

The IP address type of the routes to be matched. Valid values:

  • IPv4: matches only IPv4 routes.

  • IPv6: matches only IPv6 routes.

This parameter can be left empty, which indicates that all types of routes are matched.

IPv4

RouteTypes

array

No

The list of route types to match. The following route types are supported:

  • System: system route, which is automatically generated by the system.

  • Custom: custom route, which is manually added by users.

  • BGP: BGP route, which is propagated through the BGP routable protocol.

You can specify multiple route types.

string

No

The list of route types to match. The following route types are supported:

  • System: system route, which is automatically generated by the system.

  • Custom: custom route, which is manually added by users.

  • BGP: BGP route, which is propagated through the BGP routable protocol.

You can specify multiple route types.

System

SourceInstanceIds

array

No

The list of source instance IDs to be matched. You can enter the following types of instance IDs:

  • Virtual private cloud (VPC) instance IDs

  • Virtual border router (VBR) instance IDs

You can enter up to 64 instance IDs.

string

No

The list of source instance IDs to be matched. You can enter the following types of instance IDs:

  • Virtual private cloud (VPC) instance IDs

  • Virtual border router (VBR) instance IDs

You can enter up to 64 instance IDs.

vpc-2zea9zsh6ce30nfcjlvyr

SourceInstanceIdsReverseMatch

boolean

No

Specifies whether to use the exclusion match mode for the list of source instance IDs. Valid values:

  • false (default): no. A route is considered a match if the source instance ID of the route is in SourceInstanceIds.N.

  • true: yes. A route is considered a match if the source instance ID of the route is not in SourceInstanceIds.N.

false

SourceInstanceTypes

array

No

The list of source instance types to be matched. The following instance types are supported:

  • VPC: VPC instance.

  • VBR: VBR instance.

You can enter multiple instance types.

string

No

The list of source instance types to be matched. The following instance types are supported:

  • VPC: VPC instance.

  • VBR: VBR instance.

You can enter multiple instance types.

VPC

SourceRegionIds

array

No

The list of source region IDs to be matched. You can enter up to 64 region IDs.

string

No

The list of source region IDs to be matched. You can enter up to 64 region IDs.

cn-hongkong

SourceRouteTableIds

array

No

The list of source route table IDs to be matched. You can enter up to 64 route table IDs.

string

No

The list of source route table IDs to be matched. You can enter up to 64 route table IDs.

vtb-uf684wwipxgflzkpe4zgd

SetActions

object

No

The actions to be performed 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

No

The AS path to prepend when the regional gateway accepts or executes a publish route entry.

This parameter is mutually exclusive with AsPathReplace. You cannot specify both parameters at the same time.

This parameter specifies the action to execute after a route meets the match conditions.

integer

No

The AS path to prepend when the regional gateway accepts or executes a publish route entry.

This parameter is mutually exclusive with AsPathReplace. You cannot specify both parameters at the same time.

This parameter specifies the action to execute after a route meets the match conditions.

65000

AsPathReplace

array

No

The AS path to use as a replacement when the regional gateway accepts or executes a publish route entry. The original AS path of the route is replaced with the list of AS numbers specified by this parameter.

This parameter is mutually exclusive with AsPathPrepend. You cannot specify both parameters at the same time.

This parameter specifies the action to execute after a route meets the match conditions.

integer

No

The AS path to use as a replacement when the regional gateway accepts or executes a publish route entry. The original AS path of the route is replaced with the list of AS numbers specified by this parameter.

This parameter is mutually exclusive with AsPathPrepend. You cannot specify both parameters at the same time.

This parameter specifies the action to execute after a route meets the match conditions.

65123

CommunityAdd

array

No

The community set to be added 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 be performed after a route meets the match conditions.

Note

Incorrect community configurations may prevent routes from being advertised to the on-premises data center.

string

No

The community set to be added 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 be performed 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

No

The community set used 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 be performed after a route meets the match conditions.

Note

Incorrect community configurations may prevent routes from being advertised to the on-premises data center.

string

No

The community set used 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 be performed 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

No

Policy priority of the associated next route map rule.

  • You can set policy priority of the associated route map rule only when RouteAction is set to Permit. Only the permitted routes continue to match the associated next route map rule.

  • Policy priority of the associated next route map rule must be lower than that of the current route map rule.

1

RouteAction

string

No

The action to be performed after all conditions are met. Valid values:

  • Permit: permits the matched route.

  • Deny: denies the matched route.

Valid values:

  • Permit :

    Permit.

  • Deny :

    Deny.

Permit

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

EF44D7B7-6248-5A60-8A4C-A92388605A57

Examples

Success response

JSON format

{
  "RequestId": "EF44D7B7-6248-5A60-8A4C-A92388605A57"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InstanceNotExist.RouteMapRule The RouteMap rule does not exist. The RouteMap rule does not exist.
400 IncorrectStatus.RouteMap RouteMap is not in a valid state for the operation. RouteMap is not in a valid state for the operation.
400 IncorrectStatus.RouteMapRule RouteMap rule is not in a valid state for the operation. RouteMap rule is not in a valid state for the operation.
400 InvalidOperation.RouteMapRulePriorityConflict Operation is invalid because the route map rule priority conflicts with existing rules. Operation is invalid because the route map rule priority conflicts with existing rules.
400 InvalidOperation.UnsupportedRouteMapRule Operation is invalid because the route map rule contains unsupported configurations for associated instances. Operation is invalid because the route map rule contains unsupported configurations for associated instances.
400 ParamExclusive.AddressPrefixesIncludeAndAddressPrefixesMatch AddressPrefixesInclude and AddressPrefixesMatch are mutually exclusive. Parameter AddressPrefixesInclude and AddressPrefixesMatch are mutually exclusive.
400 ParamExclusive.CommunitySetMatchAndCommunitySetInclude Parameter CommunitySetMatch And CommunitySetInclude are mutually exclusive. Parameter CommunitySetMatch And CommunitySetInclude are mutually exclusive.
400 ParamExclusive.AsPathsMatchAndAsPathsInclude Parameter AsPathsMatch And AsPathsInclude are mutually exclusive. Parameter AsPathsMatch And AsPathsInclude are mutually exclusive.
400 InvalidParameter.MatchConditions.AddressPrefixesMatch The specified parameter "MatchConditions.AddressPrefixesMatch" is invalid. The specified parameter "MatchConditions.AddressPrefixesMatch" is invalid.
400 InvalidParameter.MatchConditions.AddressPrefixesInclude The specified parameter "MatchConditions.AddressPrefixesInclude" is invalid. The specified parameter "MatchConditions.AddressPrefixesInclude" is invalid.
400 InvalidParameter.MatchConditions.CommunitySetMatch The specified parameter "MatchConditions.CommunitySetMatch" is invalid. The specified parameter "MatchConditions.CommunitySetMatch" is invalid.
400 InvalidParameter.MatchConditions.CommunitySetInclude The specified parameter "MatchConditions.CommunitySetInclude" is invalid. The specified parameter "MatchConditions.CommunitySetInclude" is invalid.
400 InvalidParameter.MatchConditions.AsPathsMatch The specified parameter "MatchConditions.AsPathsMatch" is invalid. The specified parameter "MatchConditions.AsPathsMatch" is invalid.
400 InvalidParameter.MatchConditions.AsPathsInclude The specified parameter "MatchConditions.AsPathsInclude" is invalid. The specified parameter "MatchConditions.AsPathsInclude" is invalid.
400 InvalidParameter.MatchConditions.SourceInstanceTypes The specified parameter "MatchConditions.SourceInstanceTypes" is invalid. The specified parameter "MatchConditions.SourceInstanceTypes" is invalid.
400 InvalidParameter.MatchConditions.DestinationInstanceTypes The specified parameter "MatchConditions.DestinationInstanceTypes" is invalid. The specified parameter "MatchConditions.DestinationInstanceTypes" is invalid.
400 InvalidParameter.MatchConditions.MatchAddressType The specified parameter "MatchConditions.MatchAddressType" is invalid. The specified parameter "MatchConditions.MatchAddressType" is invalid.
400 InvalidParameter.MatchConditions.RouteTypes The specified parameter "MatchConditions.RouteTypes" is invalid. The specified parameter "MatchConditions.RouteTypes" is invalid.
400 InvalidParameter.SetActions.RouteAction The specified parameter "SetActions.RouteAction" is invalid. The specified parameter "SetActions.RouteAction" is invalid.
400 ParamExclusive.AsPathPrependAndAsPathReplace Parameter AsPathPrepend And AsPathReplace are mutually exclusive. Parameter AsPathPrepend And AsPathReplace are mutually exclusive.
400 ParamExclusive.CommunityAddAndCommunityReplace Parameter CommunityAdd And CommunityReplace are mutually exclusive. Parameter CommunityAdd And CommunityReplace are mutually exclusive.
400 InvalidParameter.SetActions.AsPathReplace The specified parameter "SetActions.AsPathReplace" is invalid. The specified parameter "SetActions.AsPathReplace" is invalid.
400 InvalidParameter.SetActions.AsPathPrepend The specified parameter "SetActions.AsPathPrepend" is invalid. The specified parameter "SetActions.AsPathPrepend" is invalid.
400 InvalidParameter.SetActions.CommunityAdd The specified parameter "SetActions.CommunityAdd" is invalid. The specified parameter "SetActions.CommunityAdd" is invalid.
400 InvalidParameter.SetActions.CommunityReplace The specified parameter "SetActions.CommunityReplace" is invalid. The specified parameter "SetActions.CommunityReplace" is invalid.
400 InvalidParameter.SetActions.NextPriority The specified parameter "SetActions.NextPriority" is invalid. The specified parameter "SetActions.NextPriority" is invalid.
400 InvalidParameter.RouteMapRuleId The specified parameter RouteMapRuleId is invalid. The parameter RouteMapRuleId entered is illegal.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.