Create VPN service

Creates a VPN service.

URI

/v2.0/vpn/vpnservices

HTTP method

POST

Request parameter

Key Description Type Required/optional
subnet_id The subnet on which the project wants the VPN service. uuid-str Required
router_id Router ID to which the VPN service is inserted. uuid-str Required
name Human readable name for the VPN service. Does not have to be unique. string Optional
admin_state_up Administrative state of the vpnservice. If false (down), port does not forward packets. bool Optional
description Human readable description for the VPN service. string Optional
availability_zone The Availability Zone name.

If you do not specify this, the resource will be created in the default Availability Zone.

xsd:string Optional

Example request


{
  "vpnservice": {
    "subnet_id": "f4fb4528-ed93-467c-a57b-11c7ea9f963e",
    "router_id": "ec8619be-0ba8-4955-8835-3b49ddb76f89",
    "name": "myservice",
    "admin_state_up": true,
    "availability_zone": "AZ1"
  }
}
     

Response status

Status code Description
201 Normal response codes
Unauthorized (401) Error response codes
Bad Request (400) Error response codes

Response body (normal status)


{
  "vpnservice": {
    "router_id": "ec8619be-0ba8-4955-8835-3b49ddb76f89",
    "status": "PENDING_CREATE",
    "name": "myservice",
    "admin_state_up": true,
    "subnet_id": "f4fb4528-ed93-467c-a57b-11c7ea9f963e",
    "tenant_id": "ccb81365fe36411a9011e90491fe1330",
    "id": "9faaf49f-dd89-4e39-a8c6-101839aa49bc",
    "description": "",
    "availability_zone": "AZ1"
  }
}
     

Description of response body (normal status)

Item Description
router_id Router ID to which the VPN service is inserted.
status Indicates whether IPsec VPN service is currently operational. Possible values include: ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, or PENDING_DELETE.
name Human readable name for the VPN service. Does not have to be unique.
admin_state_up Administrative state of the vpnservice. If false (down), port does not forward packets.
subnet_id The subnet on which the project wants the VPN service.
tenant_id Owner of the VPN service. Only admin users can specify a project identifier other than their own.
id Unique identifier for the VPN Service object.
description Human readable description for the VPN service.
availability_zone The Availability Zone name