All URIs are relative to https://api.vultr.com/v2
Method | HTTP request | Description |
---|---|---|
CreateLoadBalancer | POST /load-balancers | Create Load Balancer |
CreateLoadBalancerForwardingRules | POST /load-balancers/{load-balancer-id}/forwarding-rules | Create Forwarding Rule |
DeleteLoadBalancer | DELETE /load-balancers/{load-balancer-id} | Delete Load Balancer |
DeleteLoadBalancerForwardingRule | DELETE /load-balancers/{load-balancer-id}/forwarding-rules/{forwarding-rule-id} | Delete Forwarding Rule |
DeleteLoadBalancerSsl | DELETE /load-balancers/{load-balancer-id}/ssl | Delete Load Balancer SSL |
GetLoadBalancer | GET /load-balancers/{load-balancer-id} | Get Load Balancer |
GetLoadBalancerForwardingRule | GET /load-balancers/{load-balancer-id}/forwarding-rules/{forwarding-rule-id} | Get Forwarding Rule |
GetLoadbalancerFirewallRule | GET /load-balancers/{loadbalancer-id}/firewall-rules/{firewall-rule-id} | Get Firewall Rule |
ListLoadBalancerForwardingRules | GET /load-balancers/{load-balancer-id}/forwarding-rules | List Forwarding Rules |
ListLoadBalancers | GET /load-balancers | List Load Balancers |
ListLoadbalancerFirewallRules | GET /load-balancers/{loadbalancer-id}/firewall-rules | List Firewall Rules |
UpdateLoadBalancer | PATCH /load-balancers/{load-balancer-id} | Update Load Balancer |
CreateLoadBalancer202Response CreateLoadBalancer (CreateLoadBalancerRequest? createLoadBalancerRequest = null)
Create Load Balancer
Create a new Load Balancer in a particular region
.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class CreateLoadBalancerExample
{
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 LoadBalancerApi(config);
var createLoadBalancerRequest = new CreateLoadBalancerRequest?(); // CreateLoadBalancerRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Create Load Balancer
CreateLoadBalancer202Response result = apiInstance.CreateLoadBalancer(createLoadBalancerRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.CreateLoadBalancer: " + 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 Load Balancer
ApiResponse<CreateLoadBalancer202Response> response = apiInstance.CreateLoadBalancerWithHttpInfo(createLoadBalancerRequest);
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 LoadBalancerApi.CreateLoadBalancerWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
createLoadBalancerRequest | CreateLoadBalancerRequest? | Include a JSON object in the request body with a content type of application/json. | [optional] |
[API Key](../README.md#API Key)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Accepted | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void CreateLoadBalancerForwardingRules (string loadBalancerId, CreateLoadBalancerForwardingRulesRequest? createLoadBalancerForwardingRulesRequest = null)
Create Forwarding Rule
Create a new forwarding rule for a Load Balancer.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class CreateLoadBalancerForwardingRulesExample
{
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 LoadBalancerApi(config);
var loadBalancerId = "loadBalancerId_example"; // string | The [Load Balancer id](#operation/list-load-balancers).
var createLoadBalancerForwardingRulesRequest = new CreateLoadBalancerForwardingRulesRequest?(); // CreateLoadBalancerForwardingRulesRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Create Forwarding Rule
apiInstance.CreateLoadBalancerForwardingRules(loadBalancerId, createLoadBalancerForwardingRulesRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.CreateLoadBalancerForwardingRules: " + 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 Forwarding Rule
apiInstance.CreateLoadBalancerForwardingRulesWithHttpInfo(loadBalancerId, createLoadBalancerForwardingRulesRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.CreateLoadBalancerForwardingRulesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
loadBalancerId | string | The Load Balancer id. | |
createLoadBalancerForwardingRulesRequest | CreateLoadBalancerForwardingRulesRequest? | 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 |
---|---|---|
202 | Accepted | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteLoadBalancer (string loadBalancerId)
Delete Load Balancer
Delete a Load Balancer.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DeleteLoadBalancerExample
{
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 LoadBalancerApi(config);
var loadBalancerId = "loadBalancerId_example"; // string | The [Load Balancer id](#operation/list-load-balancers).
try
{
// Delete Load Balancer
apiInstance.DeleteLoadBalancer(loadBalancerId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.DeleteLoadBalancer: " + 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 Load Balancer
apiInstance.DeleteLoadBalancerWithHttpInfo(loadBalancerId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.DeleteLoadBalancerWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
loadBalancerId | string | The Load Balancer 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 DeleteLoadBalancerForwardingRule (string loadBalancerId, string forwardingRuleId)
Delete Forwarding Rule
Delete a Forwarding Rule on a Load Balancer.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DeleteLoadBalancerForwardingRuleExample
{
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 LoadBalancerApi(config);
var loadBalancerId = "loadBalancerId_example"; // string | The [Load Balancer id](#operation/list-load-balancers).
var forwardingRuleId = "forwardingRuleId_example"; // string | The [Forwarding Rule id](#operation/list-load-balancer-forwarding-rules).
try
{
// Delete Forwarding Rule
apiInstance.DeleteLoadBalancerForwardingRule(loadBalancerId, forwardingRuleId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.DeleteLoadBalancerForwardingRule: " + 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 Forwarding Rule
apiInstance.DeleteLoadBalancerForwardingRuleWithHttpInfo(loadBalancerId, forwardingRuleId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.DeleteLoadBalancerForwardingRuleWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
loadBalancerId | string | The Load Balancer id. | |
forwardingRuleId | string | The Forwarding 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]
void DeleteLoadBalancerSsl (string loadBalancerId)
Delete Load Balancer SSL
Delete a Load Balancer SSL.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DeleteLoadBalancerSslExample
{
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 LoadBalancerApi(config);
var loadBalancerId = "loadBalancerId_example"; // string | The [Load Balancer id](#operation/delete-load-balancer-ssl).
try
{
// Delete Load Balancer SSL
apiInstance.DeleteLoadBalancerSsl(loadBalancerId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.DeleteLoadBalancerSsl: " + 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 Load Balancer SSL
apiInstance.DeleteLoadBalancerSslWithHttpInfo(loadBalancerId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.DeleteLoadBalancerSslWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
loadBalancerId | string | The Load Balancer 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]
CreateLoadBalancer202Response GetLoadBalancer (string loadBalancerId)
Get Load Balancer
Get information for a Load Balancer.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetLoadBalancerExample
{
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 LoadBalancerApi(config);
var loadBalancerId = "loadBalancerId_example"; // string | The [Load Balancer id](#operation/list-load-balancers).
try
{
// Get Load Balancer
CreateLoadBalancer202Response result = apiInstance.GetLoadBalancer(loadBalancerId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.GetLoadBalancer: " + 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 Load Balancer
ApiResponse<CreateLoadBalancer202Response> response = apiInstance.GetLoadBalancerWithHttpInfo(loadBalancerId);
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 LoadBalancerApi.GetLoadBalancerWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
loadBalancerId | string | The Load Balancer id. |
[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]
GetLoadBalancerForwardingRule200Response GetLoadBalancerForwardingRule (string loadBalancerId, string forwardingRuleId)
Get Forwarding Rule
Get information for a Forwarding Rule on a Load Balancer.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetLoadBalancerForwardingRuleExample
{
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 LoadBalancerApi(config);
var loadBalancerId = "loadBalancerId_example"; // string | The [Load Balancer id](#operation/list-load-balancers).
var forwardingRuleId = "forwardingRuleId_example"; // string | The [Forwarding Rule id](#operation/list-load-balancer-forwarding-rules).
try
{
// Get Forwarding Rule
GetLoadBalancerForwardingRule200Response result = apiInstance.GetLoadBalancerForwardingRule(loadBalancerId, forwardingRuleId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.GetLoadBalancerForwardingRule: " + 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 Forwarding Rule
ApiResponse<GetLoadBalancerForwardingRule200Response> response = apiInstance.GetLoadBalancerForwardingRuleWithHttpInfo(loadBalancerId, forwardingRuleId);
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 LoadBalancerApi.GetLoadBalancerForwardingRuleWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
loadBalancerId | string | The Load Balancer id. | |
forwardingRuleId | string | The Forwarding Rule id. |
GetLoadBalancerForwardingRule200Response
[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]
LoadbalancerFirewallRule GetLoadbalancerFirewallRule (string loadbalancerId, string firewallRuleId)
Get Firewall Rule
Get a firewall rule for a Load Balancer.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetLoadbalancerFirewallRuleExample
{
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 LoadBalancerApi(config);
var loadbalancerId = "loadbalancerId_example"; // string |
var firewallRuleId = "firewallRuleId_example"; // string |
try
{
// Get Firewall Rule
LoadbalancerFirewallRule result = apiInstance.GetLoadbalancerFirewallRule(loadbalancerId, firewallRuleId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.GetLoadbalancerFirewallRule: " + 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<LoadbalancerFirewallRule> response = apiInstance.GetLoadbalancerFirewallRuleWithHttpInfo(loadbalancerId, 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 LoadBalancerApi.GetLoadbalancerFirewallRuleWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
loadbalancerId | string | ||
firewallRuleId | string |
[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]
ListLoadBalancerForwardingRules200Response ListLoadBalancerForwardingRules (string loadBalancerId, int? perPage = null, string? cursor = null)
List Forwarding Rules
List the fowarding rules for a Load Balancer.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListLoadBalancerForwardingRulesExample
{
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 LoadBalancerApi(config);
var loadBalancerId = "loadBalancerId_example"; // string | The [Load Balancer id](#operation/list-load-balancers).
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 Forwarding Rules
ListLoadBalancerForwardingRules200Response result = apiInstance.ListLoadBalancerForwardingRules(loadBalancerId, perPage, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.ListLoadBalancerForwardingRules: " + 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 Forwarding Rules
ApiResponse<ListLoadBalancerForwardingRules200Response> response = apiInstance.ListLoadBalancerForwardingRulesWithHttpInfo(loadBalancerId, 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 LoadBalancerApi.ListLoadBalancerForwardingRulesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
loadBalancerId | string | The Load Balancer 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] |
ListLoadBalancerForwardingRules200Response
[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]
ListLoadBalancers200Response ListLoadBalancers (int? perPage = null, string? cursor = null)
List Load Balancers
List the Load Balancers in your account.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListLoadBalancersExample
{
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 LoadBalancerApi(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 Load Balancers
ListLoadBalancers200Response result = apiInstance.ListLoadBalancers(perPage, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.ListLoadBalancers: " + 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 Load Balancers
ApiResponse<ListLoadBalancers200Response> response = apiInstance.ListLoadBalancersWithHttpInfo(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 LoadBalancerApi.ListLoadBalancersWithHttpInfo: " + 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 | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LoadbalancerFirewallRule ListLoadbalancerFirewallRules (string loadbalancerId, string? perPage = null, string? cursor = null)
List Firewall Rules
List the firewall rules for a Load Balancer.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListLoadbalancerFirewallRulesExample
{
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 LoadBalancerApi(config);
var loadbalancerId = "loadbalancerId_example"; // string |
var perPage = "perPage_example"; // string? | 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
LoadbalancerFirewallRule result = apiInstance.ListLoadbalancerFirewallRules(loadbalancerId, perPage, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.ListLoadbalancerFirewallRules: " + 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<LoadbalancerFirewallRule> response = apiInstance.ListLoadbalancerFirewallRulesWithHttpInfo(loadbalancerId, 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 LoadBalancerApi.ListLoadbalancerFirewallRulesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
loadbalancerId | string | ||
perPage | string? | 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 | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateLoadBalancer (string loadBalancerId, UpdateLoadBalancerRequest? updateLoadBalancerRequest = null)
Update Load Balancer
Update information for a Load Balancer. All attributes are optional. If not set, the attributes will retain their original values.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class UpdateLoadBalancerExample
{
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 LoadBalancerApi(config);
var loadBalancerId = "loadBalancerId_example"; // string | The [Load Balancer id](#operation/list-load-balancers).
var updateLoadBalancerRequest = new UpdateLoadBalancerRequest?(); // UpdateLoadBalancerRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Update Load Balancer
apiInstance.UpdateLoadBalancer(loadBalancerId, updateLoadBalancerRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.UpdateLoadBalancer: " + 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 Load Balancer
apiInstance.UpdateLoadBalancerWithHttpInfo(loadBalancerId, updateLoadBalancerRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LoadBalancerApi.UpdateLoadBalancerWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
loadBalancerId | string | The Load Balancer id. | |
updateLoadBalancerRequest | UpdateLoadBalancerRequest? | 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 | - |
403 | Forbidden | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]