Updated on 2022-01-25 GMT+08:00

Updating a VPC Peering Connection

Function

Updates a VPC peering connection.

URI

PUT /v2.0/vpc/peerings/{peering_id}

Table 1 describes the parameters.
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
    Table 2 Request parameter

    Parameter

    Mandatory

    Type

    Description

    peering

    Yes

    Object

    Updates a VPC peering connection. For details, see Table 3.

    When updating a VPC peering connection, you must specify at least one attribute. Currently, only the VPC peering connection name and description can be updated.

    Table 3 Description of the peering field

    Parameter

    Mandatory

    Type

    Description

    name

    No

    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 is a string of no more than 255 characters that can contain letters and digits.

  • Example request
    PUT https://{Endpoint}/v2.0/vpc/peerings/7a9a954a-eb41-4954-a300-11ab17a361a2 
    { 
        "peering": { 
            "name": "test2" 
        } 
    }

Response Message

  • Response parameter
    Table 4 Response parameter

    Parameter

    Type

    Description

    peering

    Object

    Specifies the VPC peering connection object list. For details, see Table 5.

    Table 5 peering objects

    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:

    • PENDING_ACCEPTANCE
    • REJECTED
    • EXPIRED
    • DELETED
    • ACTIVE

    request_vpc_info

    Object

    Specifies information about the local VPC. For details, see Table 6.

    accept_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

    Table 6 vpc_info objects

    Attribute

    Type

    Description

    vpc_id

    String

    Specifies the ID of a VPC involved in a VPC peering connection.

    tenant_id

    String

    Specifies the ID of the project to which a VPC involved in the VPC peering connection belongs.

  • Example response
    { 
        "peering": { 
            "name": "test2", 
           "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 Code

See Status Codes.

Error Code

See Error Codes.