# HivelocityApi.VLANApi

All URIs are relative to *https://localhost/api/v2*

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteVlanIdResource**](VLANApi.md#deleteVlanIdResource) | **DELETE** /vlan/{vlanId} | Remove an existing Private VLAN
[**getVlanIdResource**](VLANApi.md#getVlanIdResource) | **GET** /vlan/{vlanId} | Fetch information from an existing Private VLAN
[**getVlanResource**](VLANApi.md#getVlanResource) | **GET** /vlan/ | Return a list with all Private VLANs
[**postVlanResource**](VLANApi.md#postVlanResource) | **POST** /vlan/ | Create a new Private VLAN
[**putVlanIdResource**](VLANApi.md#putVlanIdResource) | **PUT** /vlan/{vlanId} | Update an existing Private VLAN, including adding and/or removing devices from it


<a name="deleteVlanIdResource"></a>
# **deleteVlanIdResource**
> Vlan deleteVlanIdResource(vlanId, opts)

Remove an existing Private VLAN

### Example
```javascript
var HivelocityApi = require('hivelocity_api');
var defaultClient = HivelocityApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new HivelocityApi.VLANApi();

var vlanId = 56; // Number | Id of the VLAN to interact with

var opts = { 
  'xFields': "xFields_example" // String | An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteVlanIdResource(vlanId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **vlanId** | **Number**| Id of the VLAN to interact with | 
 **xFields** | **String**| An optional fields mask | [optional] 

### Return type

[**Vlan**](Vlan.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="getVlanIdResource"></a>
# **getVlanIdResource**
> Vlan getVlanIdResource(vlanId, opts)

Fetch information from an existing Private VLAN

### Example
```javascript
var HivelocityApi = require('hivelocity_api');
var defaultClient = HivelocityApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new HivelocityApi.VLANApi();

var vlanId = 56; // Number | Id of the VLAN to interact with

var opts = { 
  'xFields': "xFields_example" // String | An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getVlanIdResource(vlanId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **vlanId** | **Number**| Id of the VLAN to interact with | 
 **xFields** | **String**| An optional fields mask | [optional] 

### Return type

[**Vlan**](Vlan.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="getVlanResource"></a>
# **getVlanResource**
> [Vlan] getVlanResource(opts)

Return a list with all Private VLANs

### Example
```javascript
var HivelocityApi = require('hivelocity_api');
var defaultClient = HivelocityApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new HivelocityApi.VLANApi();

var opts = { 
  'xFields': "xFields_example" // String | An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getVlanResource(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **xFields** | **String**| An optional fields mask | [optional] 

### Return type

[**[Vlan]**](Vlan.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="postVlanResource"></a>
# **postVlanResource**
> Vlan postVlanResource(payload, opts)

Create a new Private VLAN

### Example
```javascript
var HivelocityApi = require('hivelocity_api');
var defaultClient = HivelocityApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new HivelocityApi.VLANApi();

var payload = new HivelocityApi.VlanCreate(); // VlanCreate | 

var opts = { 
  'xFields': "xFields_example" // String | An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.postVlanResource(payload, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **payload** | [**VlanCreate**](VlanCreate.md)|  | 
 **xFields** | **String**| An optional fields mask | [optional] 

### Return type

[**Vlan**](Vlan.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="putVlanIdResource"></a>
# **putVlanIdResource**
> Vlan putVlanIdResource(vlanIdpayload, opts)

Update an existing Private VLAN, including adding and/or removing devices from it

### Example
```javascript
var HivelocityApi = require('hivelocity_api');
var defaultClient = HivelocityApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

var apiInstance = new HivelocityApi.VLANApi();

var vlanId = 56; // Number | Id of the VLAN to interact with

var payload = new HivelocityApi.VlanCreate(); // VlanCreate | 

var opts = { 
  'xFields': "xFields_example" // String | An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.putVlanIdResource(vlanIdpayload, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **vlanId** | **Number**| Id of the VLAN to interact with | 
 **payload** | [**VlanCreate**](VlanCreate.md)|  | 
 **xFields** | **String**| An optional fields mask | [optional] 

### Return type

[**Vlan**](Vlan.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

