Skip to content

Create a VPC Peering

POST/projects/{project_id}/vpcs/{vpc_id}/peerings

Creates a new VPC peering connection.

Path ParametersExpand Collapse
project_id: string
vpc_id: string
Body ParametersJSONExpand Collapse
peer_account_id: string
peer_region_code: string
peer_vpc_id: string
ReturnsExpand Collapse
Peering object { id, error_message, peer_account_id, 4 more }
id: optional string
error_message: optional string
peer_account_id: optional string
peer_region_code: optional string
peer_vpc_id: optional string
provisioned_id: optional string
status: optional string

Create a VPC Peering

curl http://localhost:8080/projects/$PROJECT_ID/vpcs/$VPC_ID/peerings \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
    -d '{
          "peer_account_id": "acc-12345",
          "peer_region_code": "aws-us-east-1",
          "peer_vpc_id": "1234567890"
        }'
{
  "id": "1234567890",
  "error_message": "VPC not found",
  "peer_account_id": "acc-12345",
  "peer_region_code": "aws-us-east-1",
  "peer_vpc_id": "1234567890",
  "provisioned_id": "1234567890",
  "status": "active"
}
Returns Examples
{
  "id": "1234567890",
  "error_message": "VPC not found",
  "peer_account_id": "acc-12345",
  "peer_region_code": "aws-us-east-1",
  "peer_vpc_id": "1234567890",
  "provisioned_id": "1234567890",
  "status": "active"
}