Reject a Cross-Region Peering Connection

Last updated: 2019-11-29 16:02:00

PDF

1. API Description

This API (RejectVpcPeeringConnectionEx) is used to reject cross-region peering connections.
API request domain name: vpc.api.qcloud.com

This API is used by the receiver to reject the request for cross-region peering connection from another account.

2. Input Parameters

Below is a list of API request parameters. You need to add common request parameters to your request when calling this API. For more information, see the Common Request Parameters page. The Action field for this API is RejectVpcPeeringConnectionEx.

Parameter name Required Type Description
peeringConnectionId Yes String ID of VPC peering connection, for example: pcx-8g675gr8.

3. Output Parameters

Parameter name Type Description
code int Error code. 0: Successful; other values: Failed.
message string Error message.
taskId int Task ID. You can query the execution result by using taskId. For more information, see the API for Querying Task Execution Results.

4. Error Codes

The following error codes only include business logic error codes for this API. For additional common error codes, see VPC Error Codes.

Error code Description
InvalidVpc.NotFound Invalid VPC. This error code indicates that the VPC resource does not exist. In this case, verify whether the resource information that you entered is correct.
InvalidPeeringConnection.NotFound Invalid peering connection. This error code indicates that the peering connection resource does not exist. In this case, verify whether the resource information that you entered is correct.

5. Sample

Input

https://vpc.api.qcloud.com/v2/index.php?Action=RejectVpcPeeringConnectionEx
&>
&peeringConnectionId=pcx-8g675gr8

Output

{
    "code":"0",
    "message":"",
    "taskId":1235
}