Accepts a virtual private cloud (VPC) peering connection request.
Operation description
-
For a cross-account VPC peering connection, the connection is activated only after the accepter VPC accepts the connection request.
-
AcceptVpcPeerConnection is an asynchronous operation. After a request is sent, the system returns a request ID and runs the operation in the background. You can call the GetVpcPeerConnectionAttribute operation to query the status of the task.
- If a VPC peering connection is in the Updating state, the VPC peering connection is being activated.
- If a VPC peering connection is in the Activated state, the VPC peering connection is activated.
-
You cannot repeatedly call the AcceptVpcPeerConnection operation within a specific period of time.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceId | string | Yes | The ID of the VPC peering connection to be accepted by the accepter VPC. | pcc-guzvyqlj0n6e10**** |
DryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
| false |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses request ID as the client token. The request ID may be different for each request.
| 02fb3da4-130e-11e9-8e44-001**** |
ResourceGroupId | string | No | The ID of the resource group. For more information about resource groups, see What is a resource group? | rg-acfmxazb4ph6aiy**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "4EC47282-1B74-4534-BD0E-403F3EE64CAF"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | ResourceNotFound.InstanceId | The specified resource of %s is not found. | The specified instance is not found |
400 | IncorrectStatus.VpcPeer | The status of %s [%s] is incorrect. | The status of the peer-to-peer connection instance does not meet the requirements. In this status, the peer-to-peer connection instance cannot be received. |
400 | OperationFailed.CdtNotOpened | The operation failed because the Cdt service is not opened. | The operation failed because CDT is not activated. |
400 | IncorrectBusinessStatus.VpcPeer | The business status of %s [%s] is incorrect. | The current instance status is abnormal and the current operation is not allowed. |
400 | OperationFailed.NotExist.ResourceGroup | The operation failed because the resource group does not exist. | The operation failed because the resource group does not exist. |
400 | OperationFailed.CrossBorderCdtNotOpened | The cross-border data transmission function of Alibaba Cloud is not enabled. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-06-05 | The Error code has changed | View Change Details |
2024-01-23 | API Description Update. The Error code has changed | View Change Details |
2023-05-30 | The Error code has changed. The request parameters of the API has changed | View Change Details |