Publish VPC Routes
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| vpc:PublishVpcRouteEntries | update | *RouteTable acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTableId} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| RegionId | string | Yes | The ID of the region where the instance is located. You can obtain the region ID by calling the DescribeRegions interface. | cn-hangzhou |
| RouteEntries | array<object> | No | List of route entries to be published, supporting up to 50 routes at most. | |
| object | No | List of route entry information to be published. | ||
| RouteTableId | string | Yes | The ID of the route table for the route entry. | vtb-2ze3jgygk9bmsj23s**** |
| DestinationCidrBlock | string | Yes | The destination CIDR block for the route entry. | 121.41.165.123/32 |
| TargetType | string | Yes | The type of the target for route publication. | ECR |
| TargetInstanceId | string | Yes | The ID of the target instance for route publication. | ecr-dhw2xsds5**** |
| DryRun | boolean | No | Indicates whether to perform a dry run of this request. Values:
| false |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "980960B0-2969-40BF-8542-EBB34FD358AB"
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | IncorrectStatus.Vpc | The status of %s [%s] is incorrect. | The instance is in an invalid state. |
| 400 | ResourceNotFound.RouteEntry | The specified resource routeEntry is not found. | The specified route entry does not exist |
| 400 | IncorrectStatus.RouteEntry | The status of %s [%s] is incorrect. | Route entry is in non-steady state |
| 400 | Forbidden.OperateCustomRouteTable | The operation is forbidden because publish route entry in custom route table. | The operation is prohibited because it is not allowed to publish route entries in the custom route table. |
| 400 | IncorrectStatus.RouteEntryPublishStatus | Route entry publish status is incorrect. | - |
| 400 | ResourceNotAssociated.TargetInstance | The target instance is not associated with vpc. | The destination instance of the route is not associated with the VPC. |
| 400 | OperationDenied.UnsupportedTargetType | The operation is not allowed because the target type is not supported. | The operation was rejected because the type of the route publication target is not currently supported. |
| 400 | IncorrectStatus.RouteTable | The route table is in an invalid state. | The specified routing table is in the wrong state |
| 400 | OperationUnsupported.PublishSystemRouteEntry | Publishing system route entry is unsupported. | - |
| 400 | OperationUnsupported.UnsupportedNextHop | Unsupported nexthop type for route entry publish operation. | - |
| 400 | OperationUnsupported.PublishPrefixListRouteEntry | Publishing prefix list route entry is unsupported. | - |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|
