Modifies a routing policy of a CEN instance.
Usage notes
ModifyCenRouteMap is an asynchronous operation. After you send a request, the system returns the request ID but the operation is still being performed in the system background. You can call
DescribeCenRouteMaps to query the status of a routing policy.
- Modifying: indicates that the system is modifying the routing policy. You can only query the routing policy, but cannot perform other operations.
- Active: indicates that the routing policy is modified.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | ModifyCenRouteMap |
The operation that you want to perform. Set the value to ModifyCenRouteMap. |
| CenId | String | Yes | cen-7qthudw0ll6jmc**** |
The ID of the Cloud Enterprise Network (CEN) instance. |
| CenRegionId | String | Yes | cn-hangzhou |
The ID of the region where the routing policy is applied. You can call the DescribeChildInstanceRegions operation to query the most recent region list. |
| RouteMapId | String | Yes | cenrmap-abcdedfghij**** |
The ID of the routing policy. |
| Description | String | No | desctest |
The description of the routing policy. The description cannot start with |
| MapResult | String | Yes | Permit |
The action to be performed on a route that meets all match conditions. Valid values:
|
| NextPriority | Integer | No | 20 |
The priority of the routing policy that you want to associate with the current one.
|
| CidrMatchMode | String | No | Include |
The match method that is used to match routes against the prefix list. Valid values:
|
| AsPathMatchMode | String | No | Include |
The match method that is used to match routes against the AS paths. Valid values:
|
| CommunityMatchMode | String | No | Include |
The match method that is used to match routes against the community. Valid values:
|
| CommunityOperateMode | String | No | Additive |
The action that is performed on the community. Valid values:
This parameter specifies the action to be performed when a route meets the match condition. |
| Preference | Integer | No | 22 |
The new priority of the route. Valid values: 1 to 100. The default priority is 50. A smaller value indicates a higher priority. This parameter specifies the action to be performed when a route meets the match condition. |
| Priority | Integer | Yes | 10 |
The priority of the routing policy. Valid values: 1 to 100. A smaller value indicates a higher priority. Note You cannot specify the same priority for routing policies that apply in the same region
and direction. The system matches routes against the match conditions of routing policies
in descending order of priority. A smaller value indicates a higher priority. You
must set the priorities to proper values.
|
| SourceInstanceIdsReverseMatch | Boolean | No | false |
Specifies whether to exclude the source network instance IDs. Valid values:
|
| DestinationInstanceIdsReverseMatch | Boolean | No | false |
Specifies whether to exclude the destination network instance IDs. Valid values:
|
| MatchAddressType | String | No | IPv4 |
The type of IP address in the match condition. Valid values:
This parameter can be empty. If no value is specified, all types of IP address are a match. |
| SourceInstanceIds.N | String | No | vpc-afsfdf5435vcvc**** |
The IDs of the source network instances from which routes are evaluated. The following network instance types are supported:
You can enter at most 32 IDs. |
| DestinationInstanceIds.N | String | No | vpc-avcdsg34ds**** |
The IDs of the destination network instances to which the routes point. The following network instance types are supported:
You can enter at most 32 IDs. Note The destination network instance IDs are valid only when the routing policy is applied
to scenarios where routes are advertised from the gateway in the current region to
network instances in the current region.
|
| SourceRouteTableIds.N | String | No | vtb-acdbvtbr342cd**** |
The IDs of the source route tables from which routes are evaluated. You can enter at most 32 route table IDs. |
| DestinationRouteTableIds.N | String | No | vtb-adfg53c322v**** |
The IDs of the destination route tables to which routes are evaluated. You can enter at most 32 route table IDs. Note The destination route table IDs are valid only when the routing policy is applied
to scenarios where routes are advertised from the gateway in the current region to
route tables in the current region.
|
| SourceRegionIds.N | String | No | cn-beijing |
The IDs of the source regions from which routes are evaluated. You can enter at most 32 region IDs. You can call the DescribeChildInstanceRegions operation to query the most recent region list. |
| SourceChildInstanceTypes.N | String | No | VPC |
The types of source network instance to which the routes belong. The following types of network instances are supported:
|
| DestinationChildInstanceTypes.N | String | No | VPC |
The types of destination network instance to which the routes point. The following types of network instances are supported:
The destination network instance types are valid only when the routing policy is applied to scenarios where routes are advertised from the gateway in the current region to network instances in the current region. |
| DestinationCidrBlocks.N | String | No | 10.10.10.0/24 |
The prefix list against which routes are matched. You must specify the IP addresses in CIDR notation. You can enter at most 32 CIDR blocks. |
| RouteTypes.N | String | No | System |
The type of route to be matched against the match conditions. Valid values: The following route types are supported:
|
| MatchAsns.N | Integer | No | 65501 |
The AS paths against which routes are matched. Note Only the AS-SEQUENCE parameter is supported. The AS-SET, AS-CONFED-SEQUENCE, and AS-CONFED-SET
parameters are not supported. In other words, only the AS number list is supported.
Sets and sub-lists are not supported.
|
| MatchCommunitySet.N | String | No | 65501:1 |
The community against which routes are matched. Specify the community in the format of n:m. Valid values of n and m: 1 to 65535. Each community must comply with the RFC 1997 standard. The RFC 8092 standard that defines Border Gateway Protocol (BGP) large communities is not supported. You can specify at most 32 communities. Note If the configurations of the communities are incorrect, routes may fail to be advertised
to your data center.
|
| OperateCommunitySet.N | String | No | 65501:1 |
The community set on which actions are performed. Specify the community in the format of n:m. Valid values of n and m: 1 to 65535. Each community must comply with RFC 1997. The RFC 8092 standard that defines BGP large communities is not supported. You can specify at most 32 communities. Note If the configurations of the communities are incorrect, routes may fail to be advertised
to your data center.
|
| PrependAsPath.N | Long | No | 65501 |
The AS paths that are prepended by using an action statement when regional gateways receive or advertise routes. The AS paths vary based on the direction in which the routing policy is applied:
This parameter specifies the action to be performed when a route meets the match condition. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 54B48E3D-DF70-471B-AA93-08E683A1B457 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ModifyCenRouteMap
&CenId=cen-7qthudw0ll6jmc****
&CenRegionId=cn-hangzhou
&MapResult=Permit
&Priority=10
&RouteMapId=cenrmap-abcdedfghij****
&<Common request parameters>
Sample success response
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyCenRouteMapResponse>
<RequestId>54B48E3D-DF70-471B-AA93-08E683A1B457 </RequestId>
</ModifyCenRouteMapResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "54B48E3D-DF70-471B-AA93-08E683A1B457\t"
}
Error codes
| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidOperation.NoEffictiveAction | No effective action be configured. | The error message returned because the specified action is invalid. |
For a list of error codes, visit the API Error Center.