• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. API Reference
  4. APIs
  5. VPC Peering Connection
  6. Accepting a VPC Peering Connection

Accepting a VPC Peering Connection

Function

After tenant A requests to create a VPC peering connection with a VPC of tenant B. Tenant B must accept the request to make the VPC peering connection take effect. This interface is used by a tenant to accept a VPC peering connection request initiated by another tenant.

URI

PUT /v2.0/vpc/peerings/{peering_id}/accept
Table 1 Parameter description

Name

Mandatory

Type

Description

peering_id

Yes

String

Specifies the VPC peering connection ID, which uniquely identifies the VPC peering connection.

Request Message

  • Request parameter

    None

  • Example request
    PUT /v2.0/vpc/peerings/22b76469-08e3-4937-8c1d-7aad34892be1/accept

Response Message

  • Response parameter
    Table 2 Response parameter

    Parameter

    Type

    Description

    name

    String(64)

    Specifies the VPC peering connection name.

    id

    Uuid-str

    Specifies the VPC peering connection ID.

    request_vpc_info

    Dict

    Specifies information about the local VPC.

    accept_vpc_info

    Dict

    Specifies information about the peer VPC.

    status

    String(16)

    Specifies the VPC peering connection status.

  • Example response
    {  
        "name": "test", 
       "id": "22b76469-08e3-4937-8c1d-7aad34892be1",
        "request_vpc_info": {
            "vpc_id": "9daeac7c-a98f-430f-8e38-67f9c044e299",
               "tenant_id": "f65e9ebc-ed5d-418b-a931-9a723718ba4e"
        },
        "accept_vpc_info": {
            "vpc_id": "f583c072-0bb8-4e19-afb2-afb7c1693be5",
               "tenant_id": "059a737356594b41b447b557bf0aae56"
        }, 
        "status": "ACTIVE"
    }

Status Codes

For details, see section Status Codes.