Query the route publishing status
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:ListVpcPublishedRouteEntries | list | *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. | cn-hangzhou |
| RouteTableId | string | Yes | The ID of the route table. | vtb-bp145q7glnuzd**** |
| DestinationCidrBlock | string | No | The destination CIDR block of the route entry, supporting both IPv4 and IPv6 segments. | 47.100.XX.XX/16 |
| TargetType | string | Yes | The type of the route publishing target. | ECR |
| TargetInstanceId | string | No | The ID of the route publishing target instance. | ecr-dhw2xsds5**** |
| MaxResults | integer | No | The number of entries to display per batch query. Range: 1~500, default value is 50. | 50 |
| NextToken | string | No | Indicates whether there is a token for the next query. Values:
| FFmyTO70tTpLG6I3FmYAXGKPd**** |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "1D0971B2-A35A-42C1-A44C-E91360C36C0B",
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RouteEntries": [
{
"RouteEntryId": "rte-bp1mnnr2al0naomnpv****",
"DestinationCidrBlock": "10.0.0.0/24",
"RouteTableId": "vtb-2ze3jgygk9bmsj23s****",
"RoutePublishTargets": [
{
"PublishStatus": "Published",
"PublishTargetType": "ECR",
"PublishTargetInstanceId": "ecr-xvuqdfma6x57ei****"
}
]
}
]
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | ResourceNotAssociated.TargetInstance | The target instance is not associated with vpc. | The destination instance of the route is not associated with the VPC. |
| 400 | ResourceNotFound.RouteTable | The specified resource gatewayRouteTable is not found. | The gateway route table does not exist. |
| 400 | IllegalParam.NextToken | The specified NextToken is invalid. | The specified NextToken is invalid. |
| 400 | IllegalParam.NextTokenExpired | The specified NextToken is invalid. | The specified NextToken is invalid. |
| 400 | IllegalParam.TargetType | The parameter of TargetType is illegal. | The parameter TargetType is illegal. |
| 400 | OperationDenied.UnexpectedRouteTable | Operation is denied because only system route table supports publishing route entries. | The operation was denied because only the system routing table supports publishing routes |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2024-11-27 | The Error code has changed | View Change Details |
| 2024-09-13 | The Error code has changed. The response structure of the API has changed | View Change Details |
