Updating a Virtual Interface Peer

Function

This API is used to update a virtual interface peer. Following parameters can be updated: name, description, and remote_ep_group.

URI

PUT /v3/{project_id}/dcaas/vif-peers/{vif_peer_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

vif_peer_id

Yes

String

Specifies the virtual interface peer ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. To obtain the token, see section "Obtaining the User Token" in the Identity and Access Management API Reference. The token is the value of X-Subject-Token in the response header.

Minimum: 0

Maximum: 10240

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

vif_peer

No

UpdateVifPeer object

Specifies the virtual interface peer to be updated.

Table 4 UpdateVifPeer

Parameter

Mandatory

Type

Description

name

Yes

String

Specifies the name of the virtual interface peer.

Minimum: 0

Maximum: 64

description

No

String

Provides supplementary information about the virtual interface peer.

Minimum: 0

Maximum: 128

remote_ep_group

Yes

Array of strings

Specifies the remote subnet list, which records the CIDR blocks used in the on-premises data center.

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

vif_peer

VifPeer object

Specifies the virtual interface peer.

request_id

String

Specifies the request ID.

Table 6 VifPeer

Parameter

Type

Description

id

String

Specifies the resource ID.

Minimum: 36

Maximum: 36

tenant_id

String

Specifies the ID of the project that the virtual interface peer belongs to.

Minimum: 36

Maximum: 36

name

String

Specifies the name of the virtual interface peer.

Minimum: 0

Maximum: 64

description

String

Provides supplementary information about the virtual interface peer.

Minimum: 0

Maximum: 128

address_family

String

Specifies the address family of the virtual interface. The value can be IPv4 or IPv6.

local_gateway_ip

String

Specifies the gateway of the virtual interface peer used on the cloud.

remote_gateway_ip

String

Specifies the gateway of the virtual interface peer used in the on-premises data center.

route_mode

String

Specifies the routing mode. The value can be static or bgp.

Maximum: 255

Enumeration values:

  • bgp

  • static

bgp_asn

Integer

Specifies the ASN of the BGP peer.

Minimum: 1

Maximum: 4294967295

bgp_md5

String

Specifies the MD5 password of the BGP peer.

remote_ep_group

Array of strings

Specifies the remote subnet list, which records the CIDR blocks used in the on-premises data center.

service_ep_group

Array of strings

Specifies the list of public network addresses that can be accessed by the on-premises data center. This field is required in the APIs of public network connections.

device_id

String

Specifies the ID of the device that the virtual interface peer belongs to.

bgp_route_limit

Integer

Specifies the BGP route configuration.

bgp_status

String

Specifies the BGP protocol status of the virtual interface peer. If the virtual interface peer uses static routing, the status is null.

Maximum: 10

status

String

Specifies the status of the virtual interface peer.

vif_id

String

Specifies the ID of the virtual interface corresponding to the virtual interface peer.

Minimum: 36

Maximum: 36

receive_route_num

Integer

Specifies the number of received BGP routes if BGP routing is used. If static routing is used, this parameter is meaningless and the value is -1. If this parameter cannot be obtained, contact customer service to migrate your ports.

enable_nqa

Boolean

Specifies whether NQA is enabled. The value can be true or false. (This is a reserved parameter and is not supported currently.)

enable_bfd

Boolean

Specifies whether BFD is enabled. The value can be true or false. (This is a reserved parameter and is not supported currently.)

enable_gre

Boolean

Specifies whether GRE tunneling is enabled. (This is a reserved parameter and is not supported currently.)

gre_status

String

Specifies the GRE tunnel status. (This is a reserved parameter and is not supported currently.)

remote_gre_tunnel_ip

String

Specifies the IP address of the GRE tunnel. (This is a reserved parameter and is not supported currently.)

Example Requests

Updating the name, description, and remote subnet of a virtual interface peer

PUT https://{endpoint}/v3/cfa563efb77d4b6d9960781d82530fd8/dcaas/vif-peers/68250543-0a13-4ac7-aa36-d018856ac640

{
  "vif_peer" : {
    "name" : "vif-0819",
    "description" : "mytest",
    "remote_ep_group" : [ "20.1.1.0/24" ]
  }
}

Example Responses

Status code: 200

OK

{
    "vif_peer": {
        "name": "vif-b4cd",
        "id": "a6d4f1b7-4313-4ee5-8c57-657efc9769eb",
        "description": "",
        "tenant_id": "4bd6efdb0fb747b39aa2c0162c112226",
        "address_family": "ipv4",
        "local_gateway_ip": "60.60.60.1/30",
        "remote_gateway_ip": "60.60.60.2/30",
        "route_mode": "bgp",
        "bgp_asn": 123,
        "bgp_md5": "123@1234",
        "device_id": "26.151.63.100",
        "enable_bfd": false,
        "enable_nqa": false,
        "bgp_route_limit": null,
        "bgp_status": "DOWN",
        "status": "ACTIVE",
        "vif_id": "9a8387a5-2b0e-45d9-8e5a-c14487732bdb",
        "enable_gre": false,
        "local_gre_tunnel_ip": null,
        "remote_gre_tunnel_ip": null,
        "gre_status": null,
        "receive_route_num": 0,
        "remote_ep_group": [
            "0.0.0.0/0"
        ]
    },
    "request_id": "743141a86d53ed58864a6e8fcd876a4a"
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.