Create Virtual Network Appliance

Summary

Create Virtual Network Appliance.

Type

  • Create

Synchronous/Asynchronous

  • Asynchronous

Request

HTTP Request Method

  • POST

HTTP Request Path

{api_endpoint}/v1.0/virtual_network_appliances

HTTP Request Header

Content-Type: application/json
Accept: application/json
X-Auth-Token: <token_id>
X-VNA-Request-Id: <request_id>

注釈

  • Field names in HTTP request header are case-insensitive.
  • You can set the request_id for a specific request.
  • The request_id is unique for each tenant.
  • If you make the request again with the same Path and the same method and the same request_id, the request is ignored and you can receive a response similar to show virtual_network_appliance at the current time.
  • For example, when you failed to receive a response after requested, you can confirm whether the request succeeded or failed by requesting again with the same request_id. Also, this prevents duplicate execution of requests.

HTTP Request Body

Parameters

Input Parameters
name style datatype format description required/optional default value action for invalid parameter response code for invalid parameter
token_id Header String Non-Hyph-uuid keystone authentication token required   Terminate 401
request_id Header String Hyph-uuid A request_id to identify requests. optional   Terminate 400
virtual_network_appliance Body Object -   required   Terminate 400
name Body String String(0-255) Name of the Virtual Network Appliance optional   Terminate 400
description Body String String(0-255) Description of the Virtual Network Appliance optional   Terminate 400
default_gateway Body String Ipv4 IP address of default gateway optional See notes Terminate 400
availability_zone Body String String(0-255) Availability Zone, this can be referred to using Virtual Server (Nova)’s list availability zones optional   Terminate 400
virtual_network_appliance_plan_id Body String Hyph-uuid ID of the Virtual Network Appliance Plan required   Terminate 400
tenant_id Body String Non-Hyph-uuid Tenant ID of the owner (UUID) optional   Terminate 400
tags Body Object - Tags of the Virtual Network Appliance optional   Terminate 400
interfaces Body Object - Attached interfaces optional   Terminate 400
interfaces.interface_<slot_number> Body Object -   optional   Terminate 400
interfaces.interface_<slot_number>.name Body String String(0-255) Name of the Interface optional ge-0/0/<slot_number - 1> Terminate 400
interfaces.interface_<slot_number>.description Body String String(0-255) Description of the Interface optional   Terminate 400
interfaces.interface_<slot_number>.network_id Body String Hyph-uuid The ID of network this Interface belongs to. required   Terminate 400
interfaces.interface_<slot_number>.tags Body Object - Tags of the Interface optional   Terminate 400
interfaces.interface_<slot_number>.fixed_ips Body Array<Object> - List of fixes IP addresses assign to Interface. optional See notes Terminate 400
interfaces.interface_<slot_number>.fixed_ips.ip_address Body String Ipv4 The IP address assign to Interface within subnet. required   Terminate 400

Response

Response Header

Format

HTTP/1.1 <response_code> <message>       (ex. 200 OK)
  • <response_code>: see "HTTP Responses" section
  • <message>: message based on the response code

Response Code

Response Codes
response code condition
200 Created
400 Bad request
401 Unauthorized
500 Internal Server Error

Response Body

Format

{
  "virtual_network_appliance": {
    "name": "<name>",
    "id": "<id>",
    "appliance_type": "<appliance_type>",
    "description": "<description>",
    "default_gateway": "<default_gateway>",
    "availability_zone": "<availability_zone>",
    "os_monitoring_status": "<os_monitoring_status>",
    "os_login_status": "<os_login_status>",
    "vm_status": "<vm_status>",
    "operation_status" : "<operation_status>",
    "virtual_network_appliance_plan_id": "<virtual_network_appliance_plan_id>",
    "tenant_id": "<tenant_id>",
    "username": "<username>",
    "password": "<password>",
    "tags": {},
    "interfaces": {
      "interface_<slot_number>": {
        "name": "<name>",
        "description": "<description>",
        "network_id": "<network_id>",
        "updatable": "<updatable>",
        "tags": {},
        "fixed_ips": [
          {
            "ip_address": "<ip_address>",
            "subnet_id": "<subnet_id>"
          }
        ],
        "allowed_address_pairs":[
          {
            "ip_address": "<ip_address>",
            "mac_address": "<mac_address>",
            "type": "<type>",
            "vrid": "<vrid>"
          }
        ]
      }
    }
  }
}

Parameters

Response Parameters
item datatype format description
virtual_network_appliances Array<Object> -  
name String String(0-255) Name of the Virtual Network Appliance
id String Hyph-uuid It identifies a Virtual Network Appliance uniquely.
appliance_type String String(0-255) Type of the appliance
description String String(0-255) Description of the Virtual Network Appliance
default_gateway String Ipv4 IP address of default gateway
availability_zone String String(0-255) Availability Zone, this can be referred to using Virtual Server (Nova)’s list availability zones
os_monitoring_status String String(0-255) OS Monitoring Status
os_login_status String String(0-255) OS Login Status
vm_status String String(0-255) VM Status
operation_status String String(0-255) Operation Status
virtual_network_appliance_plan_id String Hyph-uuid It identifies a Virtual Network Appliance Plan uniquely.
tenant_id String Non-Hyph-uuid Tenant ID of the owner (UUID)
username String String(0-255) Username with user access to VNA instance
password String Passowrd(12) Password for user
tags Object - Tags of the Virtual Network Appliance
interfaces Object - Attached interfaces
interfaces.interface_<slot_number> Object -  
interfaces.interface_<slot_number>.name String String(0-255) Name of the Interface
interfaces.interface_<slot_number>.description String String(0-255) Description of the Interface
interfaces.interface_<slot_number>.network_id String Hyph-uuid The ID of network this Interface belongs to.
interfaces.interface_<slot_number>.updatable Boolean -  
interfaces.interface_<slot_number>.tags Object - Tags of the Interface
interfaces.interface_<slot_number>.fixed_ips Array<Object> - List of fixes IP addresses assign to Interface.
interfaces.interface_<slot_number>.fixed_ips.ip_address String Ipv4 The IP address assign to Interface within subnet.
interfaces.interface_<slot_number>.fixed_ips.subnet_id String Hyph-uuid The ID of subnet from which IP address is allocated.
interfaces.interface_<slot_number>.allowed_address_pairs Array<Object> - Allowed address pairs
interfaces.interface_<slot_number>.allowed_address_pairs.ip_address String Ipv4  
interfaces.interface_<slot_number>.allowed_address_pairs.mac_address String Mac_Address  
interfaces.interface_<slot_number>.allowed_address_pairs.type String String(0-255)  
interfaces.interface_<slot_number>.allowed_address_pairs.vrid Integer Integer(0-255)  

Sample Request and Response

Sample API Request

Request URI

https://{api_endpoint}/v1.0/virtual_network_appliances

Request Header

Content-Type: application/json
Accept: application/json
X-Auth-Token: 69105c889f824efdafb56af224208ad4

Request Body

{
  "virtual_network_appliance": {
    "name": "virtual_network_appliance_name",
    "description": "virtual_network_appliance_name_description",
    "default_gateway": "192.168.0.1",
    "availability_zone": "zone1-groupa",
    "virtual_network_appliance_plan_id": "b0cdb8c5-aaf0-48eb-81ac-f211b54da53c",
    "tenant_id": "13572f6f42a74d2b82f7099f78d0393a",
    "tags": {},
    "interfaces": {
      "interface_1": {
        "name": "interface_1_name",
        "description": "interface_1_description",
        "network_id": "0967afc2-73a8-4c1f-869a-54c3b07dc199",
        "tags":{},
        "fixed_ips": [
          {
            "ip_address": "192.168.0.100"
          }
        ]
      }
    }
  }
}

Sample API Response

Response Header

HTTP/1.1 200 OK

Response Body

{
  "virtual_network_appliance": {
    "name": "virtual_network_appliance_name",
    "id": "a80c1728-cc0c-11e6-8080-525400060300",
    "appliance_type": "ECL::VirtualNetworkAppliance::VSRX",
    "description": "virtual_network_appliance_name_description",
    "default_gateway": "192.168.0.1",
    "availability_zone": "zone1-groupa",
    "os_monitoring_status": "initial",
    "os_login_status": "initial",
    "vm_status": "initial",
    "operation_status" : "PROCESSING",
    "virtual_network_appliance_plan_id": "b0cdb8c5-aaf0-48eb-81ac-f211b54da53c",
    "tenant_id": "13572f6f42a74d2b82f7099f78d0393a",
    "username": "root",
    "password": "4AeC36ac1k1P",
    "tags": {},
    "interfaces": {
      "interface_1": {
        "name": "interface_1_name",
        "description": "interface_1_description",
        "network_id": "0967afc2-73a8-4c1f-869a-54c3b07dc199",
        "updatable": true,
        "tags": {},
        "fixed_ips": [
          {
            "ip_address": "192.168.0.100",
            "subnet_id": ""
          }
        ],
        "allowed_address_pairs": []
      }
      (snip)
    }
  }
}

Example Error Message

HTTP Request

POST /v1.0/virtual_network_appliances HTTP/1.1
User-Agent: curl/7.51.0
Host: 10.1.131.140
Accept:application/json
X-Auth-Token:4e54395a12b740d585d74190ba4eb14b
Content-Type: application/json

HTTP Response

HTTP/1.1 400 Bad Request
Server: nginx
Date: Wed, 07 Feb 2018 06:49:20 GMT
Content-Type: application/json
Content-Length: 41
Connection: keep-alive

{
    "message": "ip_address is not in cidr."
}