Accepts a virtual private cloud (VPC) peering connection request.
Usage notes
- 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
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AcceptVpcPeerConnection | The operation that you want to perform. Set the value to AcceptVpcPeerConnection. |
InstanceId | String | Yes | pcc-guzvyqlj0n6e10**** | The ID of the VPC peering connection to be accepted by the accepter VPC. |
DryRun | Boolean | No | false | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
|
ClientToken | String | No | 02fb3da4-130e-11e9-8e44-001**** | 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. |
ResourceGroupId | String | No | rg-acfmxazb4ph6aiy**** | The ID of the resource group. For more information about resource groups, see What is a resource group? |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 4EC47282-1B74-4534-BD0E-403F3EE64CAF | The request ID. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=AcceptVpcPeerConnection
&InstanceId=pcc-guzvyqlj0n6e10****
&DryRun=false
&ClientToken=02fb3da4-130e-11e9-8e44-001****
&ResourceGroupId=rg-acfmxazb4ph6aiy****
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<AcceptVpcPeerConnectionResponse>
<RequestId>4EC47282-1B74-4534-BD0E-403F3EE64CAF</RequestId>
</AcceptVpcPeerConnectionResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "4EC47282-1B74-4534-BD0E-403F3EE64CAF"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | ResourceNotFound.InstanceId | The specified resource of %s is not found. | The specified instance is not found and cannot be deleted. |
400 | OperationFailed.CdtNotOpened | The operation failed because the Cdt service is not opened. | The operation failed because Cloud Data Transfer (CDT) is not activated. |
400 | OperationFailed.NotExist.ResourceGroup | The operation failed because the resource group does not exist. | The operation failed because the resource group does not exist. |
For a list of error codes, see Service error codes.