All URIs are relative to https://api.vultr.com/v2
Method | HTTP request | Description |
---|---|---|
AttachReservedIp | POST /reserved-ips/{reserved-ip}/attach | Attach Reserved IP |
ConvertReservedIp | POST /reserved-ips/convert | Convert Instance IP to Reserved IP |
CreateReservedIp | POST /reserved-ips | Create Reserved IP |
DeleteReservedIp | DELETE /reserved-ips/{reserved-ip} | Delete Reserved IP |
DetachReservedIp | POST /reserved-ips/{reserved-ip}/detach | Detach Reserved IP |
GetReservedIp | GET /reserved-ips/{reserved-ip} | Get Reserved IP |
ListReservedIps | GET /reserved-ips | List Reserved IPs |
PatchReservedIpsReservedIp | PATCH /reserved-ips/{reserved-ip} | Update Reserved IP |
void AttachReservedIp (string reservedIp, AttachReservedIpRequest? attachReservedIpRequest = null)
Attach Reserved IP
Attach a Reserved IP to an compute instance or a baremetal instance - instance_id
.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class AttachReservedIpExample
{
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 ReservedIpApi(config);
var reservedIp = "reservedIp_example"; // string | The [Reserved IP id](#operation/list-reserved-ips)
var attachReservedIpRequest = new AttachReservedIpRequest?(); // AttachReservedIpRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Attach Reserved IP
apiInstance.AttachReservedIp(reservedIp, attachReservedIpRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ReservedIpApi.AttachReservedIp: " + 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
{
// Attach Reserved IP
apiInstance.AttachReservedIpWithHttpInfo(reservedIp, attachReservedIpRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ReservedIpApi.AttachReservedIpWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
reservedIp | string | The Reserved IP id | |
attachReservedIpRequest | AttachReservedIpRequest? | 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]
GetReservedIp200Response ConvertReservedIp (ConvertReservedIpRequest? convertReservedIpRequest = null)
Convert Instance IP to Reserved IP
Convert the ip_address
of an existing instance into a Reserved IP.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ConvertReservedIpExample
{
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 ReservedIpApi(config);
var convertReservedIpRequest = new ConvertReservedIpRequest?(); // ConvertReservedIpRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Convert Instance IP to Reserved IP
GetReservedIp200Response result = apiInstance.ConvertReservedIp(convertReservedIpRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ReservedIpApi.ConvertReservedIp: " + 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
{
// Convert Instance IP to Reserved IP
ApiResponse<GetReservedIp200Response> response = apiInstance.ConvertReservedIpWithHttpInfo(convertReservedIpRequest);
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 ReservedIpApi.ConvertReservedIpWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
convertReservedIpRequest | ConvertReservedIpRequest? | 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 |
---|---|---|
201 | Created | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetReservedIp200Response CreateReservedIp (CreateReservedIpRequest? createReservedIpRequest = null)
Create Reserved IP
Create a new Reserved IP. The region
and ip_type
attributes 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 CreateReservedIpExample
{
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 ReservedIpApi(config);
var createReservedIpRequest = new CreateReservedIpRequest?(); // CreateReservedIpRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Create Reserved IP
GetReservedIp200Response result = apiInstance.CreateReservedIp(createReservedIpRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ReservedIpApi.CreateReservedIp: " + 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 Reserved IP
ApiResponse<GetReservedIp200Response> response = apiInstance.CreateReservedIpWithHttpInfo(createReservedIpRequest);
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 ReservedIpApi.CreateReservedIpWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
createReservedIpRequest | CreateReservedIpRequest? | 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 |
---|---|---|
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 DeleteReservedIp (string reservedIp)
Delete Reserved IP
Delete a Reserved IP.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DeleteReservedIpExample
{
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 ReservedIpApi(config);
var reservedIp = "reservedIp_example"; // string | The [Reserved IP id](#operation/list-reserved-ips).
try
{
// Delete Reserved IP
apiInstance.DeleteReservedIp(reservedIp);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ReservedIpApi.DeleteReservedIp: " + 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 Reserved IP
apiInstance.DeleteReservedIpWithHttpInfo(reservedIp);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ReservedIpApi.DeleteReservedIpWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
reservedIp | string | The Reserved IP 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DetachReservedIp (string reservedIp)
Detach Reserved IP
Detach a Reserved IP.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DetachReservedIpExample
{
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 ReservedIpApi(config);
var reservedIp = "reservedIp_example"; // string | The [Reserved IP id](#operation/list-reserved-ips)
try
{
// Detach Reserved IP
apiInstance.DetachReservedIp(reservedIp);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ReservedIpApi.DetachReservedIp: " + 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
{
// Detach Reserved IP
apiInstance.DetachReservedIpWithHttpInfo(reservedIp);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ReservedIpApi.DetachReservedIpWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
reservedIp | string | The Reserved IP 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]
GetReservedIp200Response GetReservedIp (string reservedIp)
Get Reserved IP
Get information about a Reserved IP.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetReservedIpExample
{
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 ReservedIpApi(config);
var reservedIp = "reservedIp_example"; // string | The [Reserved IP id](#operation/list-reserved-ips).
try
{
// Get Reserved IP
GetReservedIp200Response result = apiInstance.GetReservedIp(reservedIp);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ReservedIpApi.GetReservedIp: " + 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 Reserved IP
ApiResponse<GetReservedIp200Response> response = apiInstance.GetReservedIpWithHttpInfo(reservedIp);
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 ReservedIpApi.GetReservedIpWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
reservedIp | string | The Reserved IP 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]
ListReservedIps200Response ListReservedIps (int? perPage = null, string? cursor = null)
List Reserved IPs
List all Reserved IPs 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 ListReservedIpsExample
{
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 ReservedIpApi(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 Reserved IPs
ListReservedIps200Response result = apiInstance.ListReservedIps(perPage, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ReservedIpApi.ListReservedIps: " + 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 Reserved IPs
ApiResponse<ListReservedIps200Response> response = apiInstance.ListReservedIpsWithHttpInfo(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 ReservedIpApi.ListReservedIpsWithHttpInfo: " + 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]
GetReservedIp200Response PatchReservedIpsReservedIp (string reservedIp, PatchReservedIpsReservedIpRequest? patchReservedIpsReservedIpRequest = null)
Update Reserved IP
Update information on a Reserved IP.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class PatchReservedIpsReservedIpExample
{
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 ReservedIpApi(config);
var reservedIp = "reservedIp_example"; // string | The [Reserved IP id](#operation/list-reserved-ips).
var patchReservedIpsReservedIpRequest = new PatchReservedIpsReservedIpRequest?(); // PatchReservedIpsReservedIpRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Update Reserved IP
GetReservedIp200Response result = apiInstance.PatchReservedIpsReservedIp(reservedIp, patchReservedIpsReservedIpRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ReservedIpApi.PatchReservedIpsReservedIp: " + 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 Reserved IP
ApiResponse<GetReservedIp200Response> response = apiInstance.PatchReservedIpsReservedIpWithHttpInfo(reservedIp, patchReservedIpsReservedIpRequest);
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 ReservedIpApi.PatchReservedIpsReservedIpWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
reservedIp | string | The Reserved IP id. | |
patchReservedIpsReservedIpRequest | PatchReservedIpsReservedIpRequest? | 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 |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]