This API is used to create a VPC peering connection.
If you create a VPC peering connection with another VPC of your own, the connection is created without the need for you to accept the connection.
If you create a VPC peering connection with a VPC of another tenant, the peer tenant must accept the connection so that the connection can be created. If the peer tenant refuses the connection, it cannot be created.
POST /v2.0/vpc/peerings
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
peering |
Yes |
peering object |
Specifies the VPC peering connection. For details, see Table 2. |
Attribute |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters. |
description |
No |
String |
Provides supplementary information about the VPC peering connection. The value can contain no more than 255 characters and cannot contain angle brackets (< or >). |
request_vpc_info |
Yes |
vpc_info object |
Specifies information about the local VPC. For details, see Table 3. |
accept_vpc_info |
Yes |
vpc_info object |
Specifies information about the peer VPC. For details, see Table 3. |
Attribute |
Mandatory |
Type |
Description |
---|---|---|---|
vpc_id |
Yes |
String |
Specifies the ID of a VPC involved in a VPC peering connection. |
tenant_id |
No |
String |
Specifies the ID of the project to which a VPC involved in the VPC peering connection belongs. This parameter is mandatory if the VPC peering connection is created between VPCs in different accounts. |
POST https://{Endpoint}/v2.0/vpc/peerings { "peering": { "name": "test", "request_vpc_info": { "vpc_id": "9daeac7c-a98f-430f-8e38-67f9c044e299" }, "accept_vpc_info": { "vpc_id": "f583c072-0bb8-4e19-afb2-afb7c1693be5" } } }
Parameter |
Type |
Description |
---|---|---|
peering |
peering object |
Specifies the VPC peering connection. For details, see Table 5. |
Attribute |
Type |
Description |
---|---|---|
id |
String |
Specifies the VPC peering connection ID. |
name |
String |
Specifies the VPC peering connection name. |
status |
String |
Specifies the VPC peering connection status. Possible values are as follows:
|
request_vpc_info |
vpc_info object |
Specifies information about the local VPC. For details, see Table 6. |
accept_vpc_info |
vpc_info object |
Specifies information about the peer VPC. For details, see Table 6. |
description |
String |
Provides supplementary information about the VPC peering connection. |
created_at |
String |
Specifies the time (UTC) when the VPC peering connection is created. Format: yyyy-MM-ddTHH:mm:ss |
updated_at |
String |
Specifies the time (UTC) when the VPC peering connection is updated. Format: yyyy-MM-ddTHH:mm:ss |
{ "peering": { "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": "f65e9ebc-ed5d-418b-a931-9a723718ba4e" }, "status": "ACTIVE" } }
See Status Codes.
See Error Codes.