• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. VPNaas
  6. Create VPN service

Create VPN service

Function Description

This interface is used to create a VPN service.

Interface Format

Method

URI

Description

POST

/v2.0/vpn/vpnservices

Creates a VPN service.

Restrictions

  • Only one VPN service can be created in a VPC.
  • The project_id attribute is not supported.
  • The tenant_id value is the UUID.
  • The name value must contain 1 to 64 characters.
  • The description value can contain a maximum of 255 characters.
  • The value of router_id must be the router ID in a VPC.
  • The value of admin_state_up can be only UP.

Request Parameter

Parameter

Type

Mandatory

Description

project_id

String

Yes

Specifies the ID of the project.

subnet_id

String

No

Specifies the ID of the subnet.

router_id

String

Yes

Specifies the ID of the router.

name

String

Yes

Specifies the name of the VPN service.

admin_state_up

Boolean

Yes

Specifies the administrator status. The value can be true or false.

tenant_id

String

Yes

Specifies the ID of the tenant.

description

String

Yes

Specifies the description about the VPN service.

vpnservice

Object

Yes

Specifies a VPN service object.

Response Parameter

Parameter

Type

Mandatory

Description

router_id

String

Yes

Specifies the ID of the router.

status

String

No

Specifies whether the IPSec VPN service is currently operational. A valid value can be ACTIVEDOWNBUILDERRORPENDING_CREATEPENDING_UPDATE, or PENDING_DELETE.

name

String

Yes

Specifies the name of the VPN service.

external_v6_ip

String

Yes

Specifies the external gateway IPv6 address that is used for the VPN service.

admin_state_up

Boolean

Yes

Specifies the administrator status. The value can be true or false.

subnet_id

String

No

Specifies the ID of the subnet.

tenant_id

String

Yes

Specifies the ID of the tenant.

external_v4_ip

String

Yes

Specifies the external gateway IPv4 address that is used for the VPN service.

id

String

Yes

Specifies the ID of the VPN service.

description

String

Yes

Specifies the description about the VPN service.

vpnservice

Object

Yes

Specifies a VPN service object.

project_id

String

Yes

Specifies the ID of the project.

Request Example

POST /v2.0/vpn/vpnservices

Response Example

{
 "vpnservice" : {
"router_id" : "66e3b16c-8ce5-40fb-bb49-ab6d8dc3f2aa",
"status" : "PENDING_CREATE",
"name" : "myservice",
"external_v6_ip" : "2001:db8::1",
"admin_state_up" : true,
"subnet_id" : null,
"project_id" : "10039663455a446d8ba2cbb058b0f578",
"tenant_id" : "10039663455a446d8ba2cbb058b0f578",
"external_v4_ip" : "172.32.1.11",
"id" : "5c561d9d-eaea-45f6-ae3e-08d1a7080828",
"description" : ""
 }
}

Error Code

For details, see section Return Code Processing.