All URIs are relative to https://api.vultr.com/v2
Method | HTTP request | Description |
---|---|---|
CreateFirewallGroup | POST /firewalls | Create Firewall Group |
DeleteFirewallGroup | DELETE /firewalls/{firewall-group-id} | Delete Firewall Group |
DeleteFirewallGroupRule | DELETE /firewalls/{firewall-group-id}/rules/{firewall-rule-id} | Delete Firewall Rule |
GetFirewallGroup | GET /firewalls/{firewall-group-id} | Get Firewall Group |
GetFirewallGroupRule | GET /firewalls/{firewall-group-id}/rules/{firewall-rule-id} | Get Firewall Rule |
ListFirewallGroupRules | GET /firewalls/{firewall-group-id}/rules | List Firewall Rules |
ListFirewallGroups | GET /firewalls | List Firewall Groups |
PostFirewallsFirewallGroupIdRules | POST /firewalls/{firewall-group-id}/rules | Create Firewall Rules |
UpdateFirewallGroup | PUT /firewalls/{firewall-group-id} | Update Firewall Group |
CreateFirewallGroup201Response CreateFirewallGroup (CreateFirewallGroupRequest? createFirewallGroupRequest = null)
Create Firewall Group
Create a new Firewall Group.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class CreateFirewallGroupExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new FirewallApi(config);
var createFirewallGroupRequest = new CreateFirewallGroupRequest?(); // CreateFirewallGroupRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Create Firewall Group
CreateFirewallGroup201Response result = apiInstance.CreateFirewallGroup(createFirewallGroupRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.CreateFirewallGroup: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Create Firewall Group
ApiResponse<CreateFirewallGroup201Response> response = apiInstance.CreateFirewallGroupWithHttpInfo(createFirewallGroupRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.CreateFirewallGroupWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
createFirewallGroupRequest | CreateFirewallGroupRequest? | Include a JSON object in the request body with a content type of application/json. | [optional] |
CreateFirewallGroup201Response
[API Key](../README.md#API Key)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteFirewallGroup (string firewallGroupId)
Delete Firewall Group
Delete a Firewall Group.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DeleteFirewallGroupExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new FirewallApi(config);
var firewallGroupId = "firewallGroupId_example"; // string | The [Firewall Group id](#operation/list-firewall-groups).
try
{
// Delete Firewall Group
apiInstance.DeleteFirewallGroup(firewallGroupId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.DeleteFirewallGroup: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete Firewall Group
apiInstance.DeleteFirewallGroupWithHttpInfo(firewallGroupId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.DeleteFirewallGroupWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
firewallGroupId | string | The Firewall Group id. |
void (empty response body)
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteFirewallGroupRule (string firewallGroupId, string firewallRuleId)
Delete Firewall Rule
Delete a Firewall Rule.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DeleteFirewallGroupRuleExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new FirewallApi(config);
var firewallGroupId = "firewallGroupId_example"; // string | The [Firewall Group id](#operation/list-firewall-groups).
var firewallRuleId = "firewallRuleId_example"; // string | The [Firewall Rule id](#operation/list-firewall-group-rules).
try
{
// Delete Firewall Rule
apiInstance.DeleteFirewallGroupRule(firewallGroupId, firewallRuleId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.DeleteFirewallGroupRule: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete Firewall Rule
apiInstance.DeleteFirewallGroupRuleWithHttpInfo(firewallGroupId, firewallRuleId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.DeleteFirewallGroupRuleWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
firewallGroupId | string | The Firewall Group id. | |
firewallRuleId | string | The Firewall Rule id. |
void (empty response body)
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateFirewallGroup201Response GetFirewallGroup (string firewallGroupId)
Get Firewall Group
Get information for a Firewall Group.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetFirewallGroupExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new FirewallApi(config);
var firewallGroupId = "firewallGroupId_example"; // string | The [Firewall Group id](#operation/list-firewall-groups).
try
{
// Get Firewall Group
CreateFirewallGroup201Response result = apiInstance.GetFirewallGroup(firewallGroupId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.GetFirewallGroup: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get Firewall Group
ApiResponse<CreateFirewallGroup201Response> response = apiInstance.GetFirewallGroupWithHttpInfo(firewallGroupId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.GetFirewallGroupWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
firewallGroupId | string | The Firewall Group id. |
CreateFirewallGroup201Response
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PostFirewallsFirewallGroupIdRules201Response GetFirewallGroupRule (string firewallGroupId, string firewallRuleId)
Get Firewall Rule
Get a Firewall Rule.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetFirewallGroupRuleExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new FirewallApi(config);
var firewallGroupId = "firewallGroupId_example"; // string | The [Firewall Group id](#operation/list-firewall-groups).
var firewallRuleId = "firewallRuleId_example"; // string | The [Firewall Rule id](#operation/list-firewall-group-rules).
try
{
// Get Firewall Rule
PostFirewallsFirewallGroupIdRules201Response result = apiInstance.GetFirewallGroupRule(firewallGroupId, firewallRuleId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.GetFirewallGroupRule: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get Firewall Rule
ApiResponse<PostFirewallsFirewallGroupIdRules201Response> response = apiInstance.GetFirewallGroupRuleWithHttpInfo(firewallGroupId, firewallRuleId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.GetFirewallGroupRuleWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
firewallGroupId | string | The Firewall Group id. | |
firewallRuleId | string | The Firewall Rule id. |
PostFirewallsFirewallGroupIdRules201Response
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListFirewallGroupRules200Response ListFirewallGroupRules (string firewallGroupId, int? perPage = null, string? cursor = null)
List Firewall Rules
Get the Firewall Rules for a Firewall Group.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListFirewallGroupRulesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new FirewallApi(config);
var firewallGroupId = "firewallGroupId_example"; // string | The [Firewall Group id](#operation/list-firewall-groups).
var perPage = 56; // int? | Number of items requested per page. Default is 100 and Max is 500. (optional)
var cursor = "cursor_example"; // string? | Cursor for paging. See [Meta and Pagination](#section/Introduction/Meta-and-Pagination). (optional)
try
{
// List Firewall Rules
ListFirewallGroupRules200Response result = apiInstance.ListFirewallGroupRules(firewallGroupId, perPage, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.ListFirewallGroupRules: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List Firewall Rules
ApiResponse<ListFirewallGroupRules200Response> response = apiInstance.ListFirewallGroupRulesWithHttpInfo(firewallGroupId, perPage, cursor);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.ListFirewallGroupRulesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
firewallGroupId | string | The Firewall Group id. | |
perPage | int? | Number of items requested per page. Default is 100 and Max is 500. | [optional] |
cursor | string? | Cursor for paging. See Meta and Pagination. | [optional] |
ListFirewallGroupRules200Response
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListFirewallGroups200Response ListFirewallGroups (int? perPage = null, string? cursor = null)
List Firewall Groups
Get a list of all Firewall Groups.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListFirewallGroupsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new FirewallApi(config);
var perPage = 56; // int? | Number of items requested per page. Default is 100 and Max is 500. (optional)
var cursor = "cursor_example"; // string? | Cursor for paging. See [Meta and Pagination](#section/Introduction/Meta-and-Pagination). (optional)
try
{
// List Firewall Groups
ListFirewallGroups200Response result = apiInstance.ListFirewallGroups(perPage, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.ListFirewallGroups: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List Firewall Groups
ApiResponse<ListFirewallGroups200Response> response = apiInstance.ListFirewallGroupsWithHttpInfo(perPage, cursor);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.ListFirewallGroupsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
perPage | int? | Number of items requested per page. Default is 100 and Max is 500. | [optional] |
cursor | string? | Cursor for paging. See Meta and Pagination. | [optional] |
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PostFirewallsFirewallGroupIdRules201Response PostFirewallsFirewallGroupIdRules (string firewallGroupId, PostFirewallsFirewallGroupIdRulesRequest? postFirewallsFirewallGroupIdRulesRequest = null)
Create Firewall Rules
Create a Firewall Rule for a Firewall Group. The attributes ip_type
, protocol
, subnet
, and subnet_size
are required.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class PostFirewallsFirewallGroupIdRulesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new FirewallApi(config);
var firewallGroupId = "firewallGroupId_example"; // string | The [Firewall Group id](#operation/list-firewall-groups).
var postFirewallsFirewallGroupIdRulesRequest = new PostFirewallsFirewallGroupIdRulesRequest?(); // PostFirewallsFirewallGroupIdRulesRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Create Firewall Rules
PostFirewallsFirewallGroupIdRules201Response result = apiInstance.PostFirewallsFirewallGroupIdRules(firewallGroupId, postFirewallsFirewallGroupIdRulesRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.PostFirewallsFirewallGroupIdRules: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Create Firewall Rules
ApiResponse<PostFirewallsFirewallGroupIdRules201Response> response = apiInstance.PostFirewallsFirewallGroupIdRulesWithHttpInfo(firewallGroupId, postFirewallsFirewallGroupIdRulesRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.PostFirewallsFirewallGroupIdRulesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
firewallGroupId | string | The Firewall Group id. | |
postFirewallsFirewallGroupIdRulesRequest | PostFirewallsFirewallGroupIdRulesRequest? | Include a JSON object in the request body with a content type of application/json. | [optional] |
PostFirewallsFirewallGroupIdRules201Response
[API Key](../README.md#API Key)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateFirewallGroup (string firewallGroupId, UpdateFirewallGroupRequest? updateFirewallGroupRequest = null)
Update Firewall Group
Update information for a Firewall Group.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class UpdateFirewallGroupExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new FirewallApi(config);
var firewallGroupId = "firewallGroupId_example"; // string | The [Firewall Group id](#operation/list-firewall-groups).
var updateFirewallGroupRequest = new UpdateFirewallGroupRequest?(); // UpdateFirewallGroupRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Update Firewall Group
apiInstance.UpdateFirewallGroup(firewallGroupId, updateFirewallGroupRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.UpdateFirewallGroup: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Update Firewall Group
apiInstance.UpdateFirewallGroupWithHttpInfo(firewallGroupId, updateFirewallGroupRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FirewallApi.UpdateFirewallGroupWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
firewallGroupId | string | The Firewall Group id. | |
updateFirewallGroupRequest | UpdateFirewallGroupRequest? | Include a JSON object in the request body with a content type of application/json. | [optional] |
void (empty response body)
[API Key](../README.md#API Key)
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]