Modifies a routing policy by calling the ModifyCenRouteMap operation.
Operation description
The ModifyCenRouteMap operation is asynchronous. After you send a request, the system returns a RequestId but the routing policy has not been modified yet. The modification task is still running in the background. You can call the DescribeCenRouteMaps operation to query the status of the routing policy.
If the routing policy is in the Modifying state, the routing policy is being modified. In this state, you can only perform query operations.
If the routing policy is in the Active state, the routing policy has been modified.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:ModifyCenRouteMap |
update |
*CenInstance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CenId |
string |
Yes |
The instance ID of the Cloud Enterprise Network (CEN) instance. |
cen-7qthudw0ll6jmc**** |
| CenRegionId |
string |
Yes |
The ID of the region where the routing policy is applied. You can call the DescribeChildInstanceRegions operation to query region IDs. |
cn-hangzhou |
| RouteMapId |
string |
Yes |
The ID of the routing policy. |
cenrmap-abcdedfghij**** |
| Description |
string |
No |
The description of the routing policy. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://. |
desctest |
| MapResult |
string |
Yes |
The action to perform on a route that matches all the match conditions. Valid values:
Valid values:
|
Permit |
| NextPriority |
integer |
No |
Policy priority of the next associated routing policy.
|
20 |
| CidrMatchMode |
string |
No |
The match mode of the prefix list. Valid values:
For example: A policy that defines 10.10.0.0/16 can fuzzy match the route 10.10.1.0/24.
For example: A policy that defines 10.10.0.0/16 can only exactly match the route 10.10.0.0/16. Valid values:
|
Include |
| AsPathMatchMode |
string |
No |
The match mode of the AS path list. Valid values:
Valid values:
|
Include |
| CommunityMatchMode |
string |
No |
The match mode of the Community. Valid values:
Valid values:
|
Include |
| CommunityOperateMode |
string |
No |
The action to perform on the Community. Valid values:
This parameter specifies the action to perform on a route after the route matches the match conditions. Valid values:
|
Additive |
| Preference |
integer |
No |
The priority of the route to be modified. Valid values: 1 to 100. The default priority of a route is 50. A smaller value indicates a higher priority. This parameter specifies the action to perform on a route after the route matches the match conditions. |
22 |
| Priority |
integer |
Yes |
Policy priority of the routing policy. Valid values: 1 to 100. A smaller value indicates a higher priority. Note
Policy priority of routing policies in the same region and with the same direction must be unique. When the system executes routing policies, it starts matching conditional statements from the routing policy with the smallest priority number. Specify policy priority based on the expected matching order. |
10 |
| SourceInstanceIdsReverseMatch |
boolean |
No |
Specifies whether to use the reverse match mode for the source instance ID list. Valid values:
|
false |
| DestinationInstanceIdsReverseMatch |
boolean |
No |
Specifies whether to use the reverse match mode for the destination instance ID list. Valid values:
|
false |
| MatchAddressType |
string |
No |
The IP address type that the route must match. Valid values:
This parameter can be left empty, which indicates that all types of routes are matched. |
IPv4 |
| SourceInstanceIds |
array |
No |
The list of source instance IDs that the route must match. The following instance types are supported:
A maximum of 64 instance IDs can be specified. |
vpc-afsfdf5435vcvc**** |
|
string |
No |
The list of source instance IDs that the route must match. The following instance types are supported:
A maximum of 64 instance IDs can be specified. |
vpc-afsfdf5435vcvc**** |
|
| DestinationInstanceIds |
array |
No |
The list of destination instance IDs that the route must match. The following instance types are supported:
A maximum of 64 instance IDs can be specified. Note
The destination instance ID list takes effect only when the routing policy is applied in the outbound direction from the regional gateway and the destination instance IDs are in the local region. |
vpc-avcdsg34ds**** |
|
string |
No |
The list of destination instance IDs that the route must match. The following instance types are supported:
A maximum of 64 instance IDs can be specified. Note
The destination instance ID list takes effect only when the routing policy is applied in the outbound direction from the regional gateway and the destination instance IDs are in the local region. |
vpc-avcdsg34ds**** |
|
| SourceRouteTableIds |
array |
No |
The list of source route table IDs that the route must match. A maximum of 64 route table IDs can be specified. |
vtb-acdbvtbr342cd**** |
|
string |
No |
The list of source route table IDs that the route must match. A maximum of 64 route table IDs can be specified. |
vtb-acdbvtbr342cd**** |
|
| DestinationRouteTableIds |
array |
No |
The list of destination route table IDs that the route must match. A maximum of 64 route table IDs can be specified. Note
The destination route table ID list takes effect only when the routing policy is applied in the outbound direction from the regional gateway and the destination route table IDs are route table IDs of network instances in the local region. |
vtb-adfg53c322v**** |
|
string |
No |
The list of destination route table IDs that the route must match. A maximum of 64 route table IDs can be specified. Note
The destination route table ID list takes effect only when the routing policy is applied in the outbound direction from the regional gateway and the destination route table IDs are route table IDs of network instances in the local region. |
vtb-adfg53c322v**** |
|
| SourceRegionIds |
array |
No |
The list of source region IDs that the route must match. A maximum of 64 region IDs can be specified. You can call the DescribeChildInstanceRegions operation to query region IDs. |
cn-beijing |
|
string |
No |
The list of source region IDs that the route must match. A maximum of 64 region IDs can be specified. You can call the DescribeChildInstanceRegions operation to query region IDs. |
cn-beijing |
|
| SourceChildInstanceTypes |
array |
No |
The list of source instance types that the route must match. The following instance types are supported:
|
VPC |
|
string |
No |
The list of source instance types that the route must match. The following instance types are supported:
|
VPC |
|
| DestinationChildInstanceTypes |
array |
No |
The list of destination instance types that the route must match. The following instance types are supported:
The destination instance type list takes effect only when the routing policy is applied in the outbound direction from the regional gateway and the destination instance types are instance types in the local region. |
VPC |
|
string |
No |
The list of destination instance types that the route must match. The following instance types are supported:
The destination instance type list takes effect only when the routing policy is applied in the outbound direction from the regional gateway and the destination instance types are instance types in the local region. |
VPC |
|
| DestinationCidrBlocks |
array |
No |
The prefix list that the route must match. IP address ranges in the prefix list are in CIDR format. A maximum of 64 IP address ranges can be specified. |
10.10.10.0/24 |
|
string |
No |
The prefix list that the route must match. IP address ranges in the prefix list are in CIDR format. A maximum of 64 IP address ranges can be specified. |
10.10.10.0/24 |
|
| RouteTypes |
array |
No |
The list of routing types that the route must match. The following routing types are supported:
|
System |
|
string |
No |
The list of routing types that the route must match. The following routing types are supported:
|
System |
|
| MatchAsns |
array |
No |
The AS path list that the route must match. Note
Only AS SEQUENCE is supported. AS SET, AS CONFED SEQUENCE, and AS CONFED SET are not supported. This means that only AS number lists are supported, and sets and sublists are not supported. |
65501 |
|
integer |
No |
The AS path list that the route must match. Note
Only AS SEQUENCE is supported. AS SET, AS CONFED SEQUENCE, and AS CONFED SET are not supported. This means that only AS number lists are supported, and sets and sublists are not supported. |
65501 |
|
| MatchCommunitySet |
array |
No |
The Community set that the route must match. Each Community is in the n:m format, where the value range of both n and m is 1 to 65535. Communities must comply with RFC 1997. Large Communities (RFC 8092) are not supported. A maximum of 64 Communities can be specified. Note
Incorrect Community configurations may cause routes to fail to be advertised to on-premises data centers. |
65501:1 |
|
string |
No |
The Community set that the route must match. Each Community is in the n:m format, where the value range of both n and m is 1 to 65535. Communities must comply with RFC 1997. Large Communities (RFC 8092) are not supported. A maximum of 64 Communities can be specified. Note
Incorrect Community configurations may cause routes to fail to be advertised to on-premises data centers. |
65501:1 |
|
| OperateCommunitySet |
array |
No |
The Community set to be executed. Each Community is in the n:m format, where the value range of both n and m is 1 to 65535. Communities must comply with RFC 1997. Large Communities (RFC 8092) are not supported. A maximum of 32 Communities can be specified. Note
Incorrect Community configurations may cause routes to fail to be advertised to on-premises data centers. |
65501:1 |
|
string |
No |
The Community set to be executed. Each Community is in the n:m format, where the value range of both n and m is 1 to 65535. Communities must comply with RFC 1997. Large Communities (RFC 8092) are not supported. A maximum of 32 Communities can be specified. Note
Incorrect Community configurations may cause routes to fail to be advertised to on-premises data centers. |
65501:1 |
|
| PrependAsPath |
array |
No |
The AS path that is prepended when the regional gateway receives or advertises route entries. The requirements for configuring the prepended AS path vary based on the direction of the routing policy:
This parameter specifies the action to execute on a route after the route matches the match conditions. |
65501 |
|
integer |
No |
The AS path that is prepended when the regional gateway receives or advertises route entries. The requirements for configuring the prepended AS path vary based on the direction of the routing policy:
This parameter specifies the action to execute on a route after the route matches the match conditions. |
65501 |
|
| DestinationRegionIds |
array |
No |
The list of destination region IDs that the route must match. A maximum of 64 region IDs can be specified. |
|
|
string |
No |
The list of destination region IDs that the route must match. A maximum of 64 region IDs can be specified. |
cn-beijing |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| 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. | |
| 400 | InvalidParameter.CenId | The specified parameter CenId is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.