ModifyCenRouteMap

Updated at:

Use ModifyCenRouteMap to modify a route map.

Operation description

ModifyCenRouteMap is an asynchronous API. The system returns a RequestId immediately, but the modification task runs in the background. You can call the DescribeCenRouteMaps API to query the state of the route map.

  • If a route map is in the Modifying state, it is being modified. You can only query the route map and cannot perform other operations.

  • If the route map is in the Active state, the modification is complete.

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

update

*CenInstance

acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

CenId

string

Yes

The ID of the Cloud Enterprise Network (CEN) instance.

cen-7qthudw0ll6jmc****

CenRegionId

string

Yes

The ID of the region where the route map is applied.

You can call the DescribeChildInstanceRegions operation to obtain region IDs.

cn-hangzhou

RouteMapId

string

Yes

The ID of the route map.

cenrmap-abcdedfghij****

Description

string

No

The new description of the route map.

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

desctest

MapResult

string

Yes

The policy action to apply to routes that match all conditions. Valid values:

  • Permit: Permits matched routes.

  • Deny: Denies matched routes.

Permit

NextPriority

integer

No

The priority of the next associated route map.

  • This parameter is available only when MapResult is set to Permit. Permitted routes continue to match the next route map.

  • The next route map must have the same region and direction of application as the current route map.

  • The priority of the next route map must be lower than the priority of the current one. This means the priority value of the next route map must be greater than the priority value of the current route map.

20

CidrMatchMode

string

No

The match mode for the prefix list. Valid values:

  • Include: Fuzzy match. A route is matched if the prefix in the match condition includes the route's prefix.

For example, a condition with the prefix 10.10.0.0/16 matches the route 10.10.1.0/24.

  • Complete: Exact match. A route is matched only if its prefix is identical to a prefix in the list.

For example, a condition with the prefix 10.10.0.0/16 matches only the route 10.10.0.0/16.

Include

AsPathMatchMode

string

No

The match mode for the AS path list. Valid values:

  • Include: Fuzzy match. A route is matched if its AS path contains the AS numbers specified in the match condition.

  • Complete: Exact match. A route is matched only if its AS path is identical to the AS path specified in the match condition.

Include

CommunityMatchMode

string

No

The match mode for the community. Valid values:

  • Include: Fuzzy match. A route is matched if its community attribute contains the community values specified in the match condition.

  • Complete: Exact match. A route is matched only if its community attribute is identical to the community specified in the match condition.

Include

CommunityOperateMode

string

No

The action to perform on the community attribute. Valid values:

  • Additive: Adds the specified community to the route.

  • Replace: Replaces the original community of the route with the specified community.

Additive

Preference

integer

No

The new priority of the route.

Valid values: 1 to 100. The default priority is 50. A smaller value indicates a higher priority.

22

Priority

integer

Yes

The new priority of the route map. Valid values: 1 to 100. A smaller value indicates a higher priority.

Note

The priorities of route maps must be unique within the same region and for the same direction of application. When matching routes, the system processes route maps in ascending order of their priority values (from smallest to largest). Set priorities to control the matching order.

10

SourceInstanceIdsReverseMatch

boolean

No

Specifies whether to reverse the match condition for the source instance ID list. Valid values:

  • false (default): A route is matched if its source instance ID is in the SourceInstanceIds.N list.

  • true: A route is matched if its source instance ID is not in the SourceInstanceIds.N list.

false

DestinationInstanceIdsReverseMatch

boolean

No

Specifies whether to reverse the match condition for the destination instance ID list. Valid values:

  • false (default): A route is matched if its destination instance ID is in the DestinationInstanceIds.N list.

  • true: A route is matched if its destination instance ID is not in the DestinationInstanceIds.N list.

false

MatchAddressType

string

No

The IP version of the route to match. Valid values:

  • IPv4: Match only IPv4 routes.

  • IPv6: Match only IPv6 routes.

If you do not set this parameter, routes of all IP versions are matched.

IPv4

SourceInstanceIds

array

No

A list of source instance IDs to match. The following instance types are supported:

  • VPC instance ID

  • VBR instance ID

  • CCN instance ID

  • Smart Access Gateway (SAG) instance ID

  • IPsec connection ID

You can specify up to 64 instance IDs.

vpc-afsfdf5435vcvc****

string

No

A source instance ID to match.

vpc-afsfdf5435vcvc****

DestinationInstanceIds

array

No

A list of destination instance IDs to match. The following instance types are supported:

  • VPC instance ID

  • VBR instance ID

  • CCN instance ID

  • Smart Access Gateway (SAG) instance ID

  • IPsec connection ID

You can specify up to 64 instance IDs.

Note

This condition applies only when the route map is used for routes that are advertised from a gateway to a network instance within the same region.

vpc-avcdsg34ds****

string

No

A destination instance ID to match.

Note

vpc-avcdsg34ds****

SourceRouteTableIds

array

No

A list of source route table IDs to match. You can specify up to 64 route table IDs.

vtb-acdbvtbr342cd****

string

No

A source route table ID to match.

vtb-acdbvtbr342cd****

DestinationRouteTableIds

array

No

A list of destination route table IDs to match. You can specify up to 64 route table IDs.

Note

This condition applies only when the route map is used for routes that are advertised from a gateway to a network instance within the same region.

vtb-adfg53c322v****

string

No

A destination route table ID to match.

Note

vtb-adfg53c322v****

SourceRegionIds

array

No

A list of source region IDs to match. You can specify up to 64 region IDs.

You can call the DescribeChildInstanceRegions operation to obtain region IDs.

cn-beijing

string

No

A source region ID to match.

cn-beijing

SourceChildInstanceTypes

array

No

A list of source instance types to match. The following instance types are supported:

  • VPC: VPC instance.

  • VBR: VBR instance.

  • CCN: CCN instance.

  • VPN: VPN Gateway instance or IPsec connection.

    • For this parameter to take effect when an IPsec connection or SSL server is bound to a VPN Gateway, the associated VPC must be connected to a Transit Router, and the VPN Gateway must use BGP dynamic routing.

    • If an IPsec connection is directly attached to a Transit Router, this parameter takes effect.

VPC

string

No

A source instance type to match.

VPC

DestinationChildInstanceTypes

array

No

A list of destination instance types to match. The following instance types are supported:

  • VPC: VPC instance.

  • VBR: VBR instance.

  • CCN: CCN instance.

  • VPN: IPsec connection.

    Note

    This parameter is effective only for IPsec connections that are directly attached to a Transit Router. It does not apply to connections that are bound to a VPN Gateway.

This condition applies only when the route map is used for routes that are advertised from a gateway to a network instance within the same region.

VPC

string

No

A destination instance type to match.

  • Note

VPC

DestinationCidrBlocks

array

No

The prefix list to match.

Specify the IP addresses in CIDR notation. You can specify up to 64 CIDR blocks.

10.10.10.0/24

string

No

A prefix from the list to match.

10.10.10.0/24

RouteTypes

array

No

A list of route types to match. You can specify one or more types. The following route types are supported:

  • System: Routes that are automatically generated by the system.

  • Custom: Routes that are manually added.

  • BGP: Routes learned through BGP.

System

string

No

A route type to match.

System

MatchAsns

array

No

An AS path list to match.

Note

Only AS_SEQUENCE is supported. AS_SET, AS_CONFED_SEQUENCE, and AS_CONFED_SET are not supported. You can specify only a list of AS numbers.

65501

integer

No

An AS number to match.

Note

65501

MatchCommunitySet

array

No

The community set to match.

Each community must be in the n:m format, where n and m are integers from 1 to 65535. The community must comply with RFC 1997. Large Communities (RFC 8092) are not supported.

You can enter up to 64 communities.

Note

An incorrect community configuration might prevent routes from being advertised to your on-premises data center.

65501:1

string

No

A community value to match.

Note

65501:1

OperateCommunitySet

array

No

The community set to be applied.

Each community must be in the n:m format, where n and m are integers from 1 to 65535. The community must comply with RFC 1997. Large Communities (RFC 8092) are not supported.

You can enter up to 32 communities.

Note

An incorrect community configuration might prevent routes from being advertised to your on-premises data center.

65501:1

string

No

A community value to apply.

Note

65501:1

PrependAsPath

array

No

The AS path to prepend to the route when the gateway receives or advertises the route.

The requirements for prepending an AS path vary based on the direction in which the route map is applied:

  • If the route map is applied to inbound routes (received by the gateway), you must specify the source instance IDs and source region in the match conditions. The source region must be the same as the route map's region.

  • If the route map is applied to outbound routes (advertised by the gateway), you must specify the destination instance IDs in the match conditions.

65501

integer

No

An AS number to prepend.

65501

DestinationRegionIds

array

No

A list of destination region IDs to match. You can enter up to 64 region IDs.

string

No

A destination region ID to match.

cn-beijing

Response elements

Element

Type

Description

Example

object

The response data.

RequestId

string

The request ID.

54B48E3D-DF70-471B-AA93-08E683A1B457

Examples

Success response

JSON format

{
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B457\t"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidOperation.NoEffictiveAction No effective action be configured. The error message returned because the specified action is invalid.
400 InvalidOperation.CenRouteMapExist Operation is invalid because an route map config exist. The error message returned because this operation is not supported when a routing policy exists.
400 Invid.Parameter When using GatewayRegionId, SourceRegionId must not be null The error message returned because the GatewayRegionId and SourceRegionId parameters must be set.
400 InvalidName Name is invalid. The error message returned because the specified name is invalid.
400 InvalidDescription Description is invalid. The error message returned because the description is invalid.
400 InvalidParam.DestinationInstanceIds When using "PrependAsPath" in the "RegionOut", "DestinationInstanceIds" must be local region instances. When using the PrependAsPath option in a RegionOut configuration, the DestinationInstanceIds target instance should be within the local domain.
400 Forbidden.NoMedAuthorized Med operation is unauthorized. Unable to operate on the specified Med routing policy.
400 InvalidOperation.MedRouteMapExist Operation is invalid because the default med route map already exist. The operation is invalid because there is already a med routeMap with the next hop destination for this Ecr instance.
400 InvalidOperation.MedRouteMapNotAllowedOtherAction Operation is invalid because the default med not allowed other action. the med policy does not allow to configure other policies.
400 InvalidOperation.MedRouteMapActionMustPermit Operation is invalid because the default med map result must be permit. Operation is invalid because the default med map result must be permit.
400 InvalidParameter.MedRouteMapDestInstanceIds Param DestInstanceIds must be ecr instance id. The destination instance list of med routeMap must be ECR instance.
400 InvalidParameter.MedRouteMapDestInstanceType Param DestChildInstanceTypes must be ecr. The destination instance type of the med routeMap must be ECR.
400 InvalidOperation.PrependAsPathWithInvalidSourceRegionId When using PrependAsPath in the RegionIn direction, SourceRegionId must be local region ID. When using PrependAsPath in the RegionIn direction, SourceRegionId must be local region ID.
400 InvalidOperation.PrependAsPathWithInvalidSourceInstanceIds When using PrependAsPath in the RegionIn direction, SourceInstanceIds must be local instance ids. When using PrependAsPath in the RegionIn direction, SourceInstanceIds must be local instance ids.
400 InvalidOperation.TransitRouterNotExist Operation is invalid because the transit router not exist. The error message returned because the specified transit router does not exist.
400 InvalidParameter Invalid parameter. The error message returned because the parameter is set to an invalid value.
400 Unauthorized The AccessKeyId is unauthorized. The error message returned because you do not have the permissions to perform this operation.
400 InvalidParameter.RouteMapId The specified parameter RouteMapId is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.