All URIs are relative to https://api.vultr.com/v2
Method | HTTP request | Description |
---|---|---|
AttachInstanceIso | POST /instances/{instance-id}/iso/attach | Attach ISO to Instance |
AttachInstanceNetwork | POST /instances/{instance-id}/private-networks/attach | Attach Private Network to Instance |
AttachInstanceVpc | POST /instances/{instance-id}/vpcs/attach | Attach VPC to Instance |
AttachInstanceVpc2 | POST /instances/{instance-id}/vpc2/attach | Attach VPC 2.0 Network to Instance |
CreateInstance | POST /instances | Create Instance |
CreateInstanceBackupSchedule | POST /instances/{instance-id}/backup-schedule | Set Instance Backup Schedule |
CreateInstanceIpv4 | POST /instances/{instance-id}/ipv4 | Create IPv4 |
CreateInstanceReverseIpv4 | POST /instances/{instance-id}/ipv4/reverse | Create Instance Reverse IPv4 |
CreateInstanceReverseIpv6 | POST /instances/{instance-id}/ipv6/reverse | Create Instance Reverse IPv6 |
DeleteInstance | DELETE /instances/{instance-id} | Delete Instance |
DeleteInstanceIpv4 | DELETE /instances/{instance-id}/ipv4/{ipv4} | Delete IPv4 Address |
DeleteInstanceReverseIpv6 | DELETE /instances/{instance-id}/ipv6/reverse/{ipv6} | Delete Instance Reverse IPv6 |
DetachInstanceIso | POST /instances/{instance-id}/iso/detach | Detach ISO from instance |
DetachInstanceNetwork | POST /instances/{instance-id}/private-networks/detach | Detach Private Network from Instance. |
DetachInstanceVpc | POST /instances/{instance-id}/vpcs/detach | Detach VPC from Instance |
DetachInstanceVpc2 | POST /instances/{instance-id}/vpc2/detach | Detach VPC 2.0 Network from Instance |
GetInstance | GET /instances/{instance-id} | Get Instance |
GetInstanceBackupSchedule | GET /instances/{instance-id}/backup-schedule | Get Instance Backup Schedule |
GetInstanceBandwidth | GET /instances/{instance-id}/bandwidth | Instance Bandwidth |
GetInstanceIpv4 | GET /instances/{instance-id}/ipv4 | List Instance IPv4 Information |
GetInstanceIpv6 | GET /instances/{instance-id}/ipv6 | Get Instance IPv6 Information |
GetInstanceIsoStatus | GET /instances/{instance-id}/iso | Get Instance ISO Status |
GetInstanceNeighbors | GET /instances/{instance-id}/neighbors | Get Instance neighbors |
GetInstanceUpgrades | GET /instances/{instance-id}/upgrades | Get Available Instance Upgrades |
GetInstanceUserdata | GET /instances/{instance-id}/user-data | Get Instance User Data |
HaltInstance | POST /instances/{instance-id}/halt | Halt Instance |
HaltInstances | POST /instances/halt | Halt Instances |
ListInstanceIpv6Reverse | GET /instances/{instance-id}/ipv6/reverse | List Instance IPv6 Reverse |
ListInstancePrivateNetworks | GET /instances/{instance-id}/private-networks | List instance Private Networks |
ListInstanceVpc2 | GET /instances/{instance-id}/vpc2 | List Instance VPC 2.0 Networks |
ListInstanceVpcs | GET /instances/{instance-id}/vpcs | List instance VPCs |
ListInstances | GET /instances | List Instances |
PostInstancesInstanceIdIpv4ReverseDefault | POST /instances/{instance-id}/ipv4/reverse/default | Set Default Reverse DNS Entry |
RebootInstance | POST /instances/{instance-id}/reboot | Reboot Instance |
RebootInstances | POST /instances/reboot | Reboot instances |
ReinstallInstance | POST /instances/{instance-id}/reinstall | Reinstall Instance |
RestoreInstance | POST /instances/{instance-id}/restore | Restore Instance |
StartInstance | POST /instances/{instance-id}/start | Start instance |
StartInstances | POST /instances/start | Start instances |
UpdateInstance | PATCH /instances/{instance-id} | Update Instance |
AttachInstanceIso202Response AttachInstanceIso (string instanceId, AttachInstanceIsoRequest? attachInstanceIsoRequest = null)
Attach ISO to Instance
Attach an ISO to an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class AttachInstanceIsoExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string |
var attachInstanceIsoRequest = new AttachInstanceIsoRequest?(); // AttachInstanceIsoRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Attach ISO to Instance
AttachInstanceIso202Response result = apiInstance.AttachInstanceIso(instanceId, attachInstanceIsoRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.AttachInstanceIso: " + 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 ISO to Instance
ApiResponse<AttachInstanceIso202Response> response = apiInstance.AttachInstanceIsoWithHttpInfo(instanceId, attachInstanceIsoRequest);
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 InstancesApi.AttachInstanceIsoWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | ||
attachInstanceIsoRequest | AttachInstanceIsoRequest? | 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 | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void AttachInstanceNetwork (string instanceId, AttachInstanceNetworkRequest? attachInstanceNetworkRequest = null)
Attach Private Network to Instance
Attach Private Network to an Instance.
Deprecated: use Attach VPC to Instance instead.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class AttachInstanceNetworkExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var attachInstanceNetworkRequest = new AttachInstanceNetworkRequest?(); // AttachInstanceNetworkRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Attach Private Network to Instance
apiInstance.AttachInstanceNetwork(instanceId, attachInstanceNetworkRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.AttachInstanceNetwork: " + 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 Private Network to Instance
apiInstance.AttachInstanceNetworkWithHttpInfo(instanceId, attachInstanceNetworkRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.AttachInstanceNetworkWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
attachInstanceNetworkRequest | AttachInstanceNetworkRequest? | 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]
void AttachInstanceVpc (string instanceId, AttachInstanceVpcRequest? attachInstanceVpcRequest = null)
Attach VPC to Instance
Attach a VPC to an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class AttachInstanceVpcExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var attachInstanceVpcRequest = new AttachInstanceVpcRequest?(); // AttachInstanceVpcRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Attach VPC to Instance
apiInstance.AttachInstanceVpc(instanceId, attachInstanceVpcRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.AttachInstanceVpc: " + 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 VPC to Instance
apiInstance.AttachInstanceVpcWithHttpInfo(instanceId, attachInstanceVpcRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.AttachInstanceVpcWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
attachInstanceVpcRequest | AttachInstanceVpcRequest? | 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]
void AttachInstanceVpc2 (string instanceId, AttachInstanceVpc2Request? attachInstanceVpc2Request = null)
Attach VPC 2.0 Network to Instance
Attach a VPC 2.0 Network to an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class AttachInstanceVpc2Example
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var attachInstanceVpc2Request = new AttachInstanceVpc2Request?(); // AttachInstanceVpc2Request? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Attach VPC 2.0 Network to Instance
apiInstance.AttachInstanceVpc2(instanceId, attachInstanceVpc2Request);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.AttachInstanceVpc2: " + 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 VPC 2.0 Network to Instance
apiInstance.AttachInstanceVpc2WithHttpInfo(instanceId, attachInstanceVpc2Request);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.AttachInstanceVpc2WithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
attachInstanceVpc2Request | AttachInstanceVpc2Request? | 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 | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateInstance202Response CreateInstance (CreateInstanceRequest? createInstanceRequest = null)
Create Instance
Create a new VPS Instance in a region
with the desired plan
. Choose one of the following to deploy the instance: * os_id
* iso_id
* snapshot_id
* app_id
* image_id
Supply other attributes as desired.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class CreateInstanceExample
{
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 InstancesApi(config);
var createInstanceRequest = new CreateInstanceRequest?(); // CreateInstanceRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Create Instance
CreateInstance202Response result = apiInstance.CreateInstance(createInstanceRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.CreateInstance: " + 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 Instance
ApiResponse<CreateInstance202Response> response = apiInstance.CreateInstanceWithHttpInfo(createInstanceRequest);
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 InstancesApi.CreateInstanceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
createInstanceRequest | CreateInstanceRequest? | 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 | Created | - |
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 CreateInstanceBackupSchedule (string instanceId, CreateInstanceBackupScheduleRequest? createInstanceBackupScheduleRequest = null)
Set Instance Backup Schedule
Set the backup schedule for an Instance in UTC. The type
is required.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class CreateInstanceBackupScheduleExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var createInstanceBackupScheduleRequest = new CreateInstanceBackupScheduleRequest?(); // CreateInstanceBackupScheduleRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Set Instance Backup Schedule
apiInstance.CreateInstanceBackupSchedule(instanceId, createInstanceBackupScheduleRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.CreateInstanceBackupSchedule: " + 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
{
// Set Instance Backup Schedule
apiInstance.CreateInstanceBackupScheduleWithHttpInfo(instanceId, createInstanceBackupScheduleRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.CreateInstanceBackupScheduleWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
createInstanceBackupScheduleRequest | CreateInstanceBackupScheduleRequest? | 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 |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object CreateInstanceIpv4 (string instanceId, CreateInstanceIpv4Request? createInstanceIpv4Request = null)
Create IPv4
Create an IPv4 address for an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class CreateInstanceIpv4Example
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var createInstanceIpv4Request = new CreateInstanceIpv4Request?(); // CreateInstanceIpv4Request? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Create IPv4
Object result = apiInstance.CreateInstanceIpv4(instanceId, createInstanceIpv4Request);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.CreateInstanceIpv4: " + 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 IPv4
ApiResponse<Object> response = apiInstance.CreateInstanceIpv4WithHttpInfo(instanceId, createInstanceIpv4Request);
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 InstancesApi.CreateInstanceIpv4WithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
createInstanceIpv4Request | CreateInstanceIpv4Request? | Include a JSON object in the request body with a content type of application/json. | [optional] |
Object
[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 | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void CreateInstanceReverseIpv4 (string instanceId, CreateInstanceReverseIpv4Request? createInstanceReverseIpv4Request = null)
Create Instance Reverse IPv4
Create a reverse IPv4 entry for an Instance. The ip
and reverse
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 CreateInstanceReverseIpv4Example
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var createInstanceReverseIpv4Request = new CreateInstanceReverseIpv4Request?(); // CreateInstanceReverseIpv4Request? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Create Instance Reverse IPv4
apiInstance.CreateInstanceReverseIpv4(instanceId, createInstanceReverseIpv4Request);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.CreateInstanceReverseIpv4: " + 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 Instance Reverse IPv4
apiInstance.CreateInstanceReverseIpv4WithHttpInfo(instanceId, createInstanceReverseIpv4Request);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.CreateInstanceReverseIpv4WithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
createInstanceReverseIpv4Request | CreateInstanceReverseIpv4Request? | 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]
void CreateInstanceReverseIpv6 (string instanceId, CreateInstanceReverseIpv6Request? createInstanceReverseIpv6Request = null)
Create Instance Reverse IPv6
Create a reverse IPv6 entry for an Instance. The ip
and reverse
attributes are required. IP address must be in full, expanded format.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class CreateInstanceReverseIpv6Example
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var createInstanceReverseIpv6Request = new CreateInstanceReverseIpv6Request?(); // CreateInstanceReverseIpv6Request? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Create Instance Reverse IPv6
apiInstance.CreateInstanceReverseIpv6(instanceId, createInstanceReverseIpv6Request);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.CreateInstanceReverseIpv6: " + 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 Instance Reverse IPv6
apiInstance.CreateInstanceReverseIpv6WithHttpInfo(instanceId, createInstanceReverseIpv6Request);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.CreateInstanceReverseIpv6WithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
createInstanceReverseIpv6Request | CreateInstanceReverseIpv6Request? | 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]
void DeleteInstance (string instanceId)
Delete Instance
Delete an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DeleteInstanceExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
try
{
// Delete Instance
apiInstance.DeleteInstance(instanceId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DeleteInstance: " + 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 Instance
apiInstance.DeleteInstanceWithHttpInfo(instanceId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DeleteInstanceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance 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 DeleteInstanceIpv4 (string instanceId, string ipv4)
Delete IPv4 Address
Delete an IPv4 address from an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DeleteInstanceIpv4Example
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var ipv4 = "ipv4_example"; // string | The IPv4 address.
try
{
// Delete IPv4 Address
apiInstance.DeleteInstanceIpv4(instanceId, ipv4);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DeleteInstanceIpv4: " + 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 IPv4 Address
apiInstance.DeleteInstanceIpv4WithHttpInfo(instanceId, ipv4);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DeleteInstanceIpv4WithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
ipv4 | string | The IPv4 address. |
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 | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteInstanceReverseIpv6 (string instanceId, string ipv6)
Delete Instance Reverse IPv6
Delete the reverse IPv6 for an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DeleteInstanceReverseIpv6Example
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var ipv6 = "ipv6_example"; // string | The IPv6 address.
try
{
// Delete Instance Reverse IPv6
apiInstance.DeleteInstanceReverseIpv6(instanceId, ipv6);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DeleteInstanceReverseIpv6: " + 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 Instance Reverse IPv6
apiInstance.DeleteInstanceReverseIpv6WithHttpInfo(instanceId, ipv6);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DeleteInstanceReverseIpv6WithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
ipv6 | string | The IPv6 address. |
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 | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DetachInstanceIso202Response DetachInstanceIso (string instanceId)
Detach ISO from instance
Detach the ISO from an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DetachInstanceIsoExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
try
{
// Detach ISO from instance
DetachInstanceIso202Response result = apiInstance.DetachInstanceIso(instanceId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DetachInstanceIso: " + 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 ISO from instance
ApiResponse<DetachInstanceIso202Response> response = apiInstance.DetachInstanceIsoWithHttpInfo(instanceId);
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 InstancesApi.DetachInstanceIsoWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. |
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Accepted | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DetachInstanceNetwork (string instanceId, DetachInstanceNetworkRequest? detachInstanceNetworkRequest = null)
Detach Private Network from Instance.
Detach Private Network from an Instance.
Deprecated: use Detach VPC from Instance instead.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DetachInstanceNetworkExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var detachInstanceNetworkRequest = new DetachInstanceNetworkRequest?(); // DetachInstanceNetworkRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Detach Private Network from Instance.
apiInstance.DetachInstanceNetwork(instanceId, detachInstanceNetworkRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DetachInstanceNetwork: " + 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 Private Network from Instance.
apiInstance.DetachInstanceNetworkWithHttpInfo(instanceId, detachInstanceNetworkRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DetachInstanceNetworkWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
detachInstanceNetworkRequest | DetachInstanceNetworkRequest? | 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]
void DetachInstanceVpc (string instanceId, DetachInstanceVpcRequest? detachInstanceVpcRequest = null)
Detach VPC from Instance
Detach a VPC from an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DetachInstanceVpcExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var detachInstanceVpcRequest = new DetachInstanceVpcRequest?(); // DetachInstanceVpcRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Detach VPC from Instance
apiInstance.DetachInstanceVpc(instanceId, detachInstanceVpcRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DetachInstanceVpc: " + 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 VPC from Instance
apiInstance.DetachInstanceVpcWithHttpInfo(instanceId, detachInstanceVpcRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DetachInstanceVpcWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
detachInstanceVpcRequest | DetachInstanceVpcRequest? | 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]
void DetachInstanceVpc2 (string instanceId, DetachInstanceVpc2Request? detachInstanceVpc2Request = null)
Detach VPC 2.0 Network from Instance
Detach a VPC 2.0 Network from an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DetachInstanceVpc2Example
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var detachInstanceVpc2Request = new DetachInstanceVpc2Request?(); // DetachInstanceVpc2Request? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Detach VPC 2.0 Network from Instance
apiInstance.DetachInstanceVpc2(instanceId, detachInstanceVpc2Request);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DetachInstanceVpc2: " + 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 VPC 2.0 Network from Instance
apiInstance.DetachInstanceVpc2WithHttpInfo(instanceId, detachInstanceVpc2Request);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.DetachInstanceVpc2WithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
detachInstanceVpc2Request | DetachInstanceVpc2Request? | 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 | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateInstance202Response GetInstance (string instanceId)
Get Instance
Get information about an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetInstanceExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
try
{
// Get Instance
CreateInstance202Response result = apiInstance.GetInstance(instanceId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.GetInstance: " + 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 Instance
ApiResponse<CreateInstance202Response> response = apiInstance.GetInstanceWithHttpInfo(instanceId);
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 InstancesApi.GetInstanceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance 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 | - |
403 | Forbidden | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetInstanceBackupSchedule200Response GetInstanceBackupSchedule (string instanceId)
Get Instance Backup Schedule
Get the backup schedule for an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetInstanceBackupScheduleExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
try
{
// Get Instance Backup Schedule
GetInstanceBackupSchedule200Response result = apiInstance.GetInstanceBackupSchedule(instanceId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.GetInstanceBackupSchedule: " + 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 Instance Backup Schedule
ApiResponse<GetInstanceBackupSchedule200Response> response = apiInstance.GetInstanceBackupScheduleWithHttpInfo(instanceId);
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 InstancesApi.GetInstanceBackupScheduleWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. |
GetInstanceBackupSchedule200Response
[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]
GetBandwidthBaremetal200Response GetInstanceBandwidth (string instanceId, int? dateRange = null)
Instance Bandwidth
Get bandwidth information about an Instance.
The bandwidth
object in a successful response contains objects representing a day in the month. The date is denoted by the nested object keys. Days begin and end in the UTC timezone. The bandwidth utilization data contained within the date object is refreshed periodically. We do not recommend using this endpoint to gather real-time metrics.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetInstanceBandwidthExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var dateRange = 56; // int? | The range of days to include, represented as the number of days relative to the current date. Default 30, Minimum 1 and Max 60. (optional)
try
{
// Instance Bandwidth
GetBandwidthBaremetal200Response result = apiInstance.GetInstanceBandwidth(instanceId, dateRange);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.GetInstanceBandwidth: " + 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
{
// Instance Bandwidth
ApiResponse<GetBandwidthBaremetal200Response> response = apiInstance.GetInstanceBandwidthWithHttpInfo(instanceId, dateRange);
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 InstancesApi.GetInstanceBandwidthWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
dateRange | int? | The range of days to include, represented as the number of days relative to the current date. Default 30, Minimum 1 and Max 60. | [optional] |
GetBandwidthBaremetal200Response
[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]
GetIpv4Baremetal200Response GetInstanceIpv4 (string instanceId, bool? publicNetwork = null, int? perPage = null, string? cursor = null)
List Instance IPv4 Information
List the IPv4 information for an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetInstanceIpv4Example
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var publicNetwork = true; // bool? | If `true`, includes information about the public network adapter (such as MAC address) with the `main_ip` entry. (optional)
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 Instance IPv4 Information
GetIpv4Baremetal200Response result = apiInstance.GetInstanceIpv4(instanceId, publicNetwork, perPage, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.GetInstanceIpv4: " + 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 Instance IPv4 Information
ApiResponse<GetIpv4Baremetal200Response> response = apiInstance.GetInstanceIpv4WithHttpInfo(instanceId, publicNetwork, 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 InstancesApi.GetInstanceIpv4WithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
publicNetwork | bool? | If `true`, includes information about the public network adapter (such as MAC address) with the `main_ip` entry. | [optional] |
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]
GetIpv6Baremetal200Response GetInstanceIpv6 (string instanceId)
Get Instance IPv6 Information
Get the IPv6 information for an VPS Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetInstanceIpv6Example
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
try
{
// Get Instance IPv6 Information
GetIpv6Baremetal200Response result = apiInstance.GetInstanceIpv6(instanceId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.GetInstanceIpv6: " + 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 Instance IPv6 Information
ApiResponse<GetIpv6Baremetal200Response> response = apiInstance.GetInstanceIpv6WithHttpInfo(instanceId);
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 InstancesApi.GetInstanceIpv6WithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance 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]
GetInstanceIsoStatus200Response GetInstanceIsoStatus (string instanceId)
Get Instance ISO Status
Get the ISO status for an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetInstanceIsoStatusExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
try
{
// Get Instance ISO Status
GetInstanceIsoStatus200Response result = apiInstance.GetInstanceIsoStatus(instanceId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.GetInstanceIsoStatus: " + 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 Instance ISO Status
ApiResponse<GetInstanceIsoStatus200Response> response = apiInstance.GetInstanceIsoStatusWithHttpInfo(instanceId);
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 InstancesApi.GetInstanceIsoStatusWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. |
GetInstanceIsoStatus200Response
[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]
GetInstanceNeighbors200Response GetInstanceNeighbors (string instanceId)
Get Instance neighbors
Get a list of other instances in the same location as this Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetInstanceNeighborsExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
try
{
// Get Instance neighbors
GetInstanceNeighbors200Response result = apiInstance.GetInstanceNeighbors(instanceId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.GetInstanceNeighbors: " + 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 Instance neighbors
ApiResponse<GetInstanceNeighbors200Response> response = apiInstance.GetInstanceNeighborsWithHttpInfo(instanceId);
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 InstancesApi.GetInstanceNeighborsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. |
GetInstanceNeighbors200Response
[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]
GetInstanceUpgrades200Response GetInstanceUpgrades (string instanceId, string? type = null)
Get Available Instance Upgrades
Get available upgrades for an Instance
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetInstanceUpgradesExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var type = "type_example"; // string? | Filter upgrade by type: - all (applications, os, plans) - applications - os - plans (optional)
try
{
// Get Available Instance Upgrades
GetInstanceUpgrades200Response result = apiInstance.GetInstanceUpgrades(instanceId, type);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.GetInstanceUpgrades: " + 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 Available Instance Upgrades
ApiResponse<GetInstanceUpgrades200Response> response = apiInstance.GetInstanceUpgradesWithHttpInfo(instanceId, type);
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 InstancesApi.GetInstanceUpgradesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
type | string? | Filter upgrade by type: - all (applications, os, plans) - applications - os - plans | [optional] |
GetInstanceUpgrades200Response
[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]
GetInstanceUserdata200Response GetInstanceUserdata (string instanceId)
Get Instance User Data
Get the user-supplied, base64 encoded user data for an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetInstanceUserdataExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
try
{
// Get Instance User Data
GetInstanceUserdata200Response result = apiInstance.GetInstanceUserdata(instanceId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.GetInstanceUserdata: " + 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 Instance User Data
ApiResponse<GetInstanceUserdata200Response> response = apiInstance.GetInstanceUserdataWithHttpInfo(instanceId);
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 InstancesApi.GetInstanceUserdataWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. |
GetInstanceUserdata200Response
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void HaltInstance (string instanceId)
Halt Instance
Halt an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class HaltInstanceExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
try
{
// Halt Instance
apiInstance.HaltInstance(instanceId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.HaltInstance: " + 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
{
// Halt Instance
apiInstance.HaltInstanceWithHttpInfo(instanceId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.HaltInstanceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance 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 HaltInstances (HaltInstancesRequest? haltInstancesRequest = null)
Halt Instances
Halt Instances.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class HaltInstancesExample
{
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 InstancesApi(config);
var haltInstancesRequest = new HaltInstancesRequest?(); // HaltInstancesRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Halt Instances
apiInstance.HaltInstances(haltInstancesRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.HaltInstances: " + 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
{
// Halt Instances
apiInstance.HaltInstancesWithHttpInfo(haltInstancesRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.HaltInstancesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
haltInstancesRequest | HaltInstancesRequest? | 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]
ListInstanceIpv6Reverse200Response ListInstanceIpv6Reverse (string instanceId)
List Instance IPv6 Reverse
List the reverse IPv6 information for an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListInstanceIpv6ReverseExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
try
{
// List Instance IPv6 Reverse
ListInstanceIpv6Reverse200Response result = apiInstance.ListInstanceIpv6Reverse(instanceId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.ListInstanceIpv6Reverse: " + 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 Instance IPv6 Reverse
ApiResponse<ListInstanceIpv6Reverse200Response> response = apiInstance.ListInstanceIpv6ReverseWithHttpInfo(instanceId);
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 InstancesApi.ListInstanceIpv6ReverseWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. |
ListInstanceIpv6Reverse200Response
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListInstancePrivateNetworks200Response ListInstancePrivateNetworks (string instanceId, int? perPage = null, string? cursor = null)
List instance Private Networks
Deprecated: use List Instance VPCs instead.
List the private networks for an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListInstancePrivateNetworksExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
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 instance Private Networks
ListInstancePrivateNetworks200Response result = apiInstance.ListInstancePrivateNetworks(instanceId, perPage, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.ListInstancePrivateNetworks: " + 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 instance Private Networks
ApiResponse<ListInstancePrivateNetworks200Response> response = apiInstance.ListInstancePrivateNetworksWithHttpInfo(instanceId, 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 InstancesApi.ListInstancePrivateNetworksWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance 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] |
ListInstancePrivateNetworks200Response
[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]
ListInstanceVpc2200Response ListInstanceVpc2 (string instanceId, int? perPage = null, string? cursor = null)
List Instance VPC 2.0 Networks
List the VPC 2.0 networks for an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListInstanceVpc2Example
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
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 Instance VPC 2.0 Networks
ListInstanceVpc2200Response result = apiInstance.ListInstanceVpc2(instanceId, perPage, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.ListInstanceVpc2: " + 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 Instance VPC 2.0 Networks
ApiResponse<ListInstanceVpc2200Response> response = apiInstance.ListInstanceVpc2WithHttpInfo(instanceId, 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 InstancesApi.ListInstanceVpc2WithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance 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] |
[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]
ListInstanceVpcs200Response ListInstanceVpcs (string instanceId, int? perPage = null, string? cursor = null)
List instance VPCs
List the VPCs for an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListInstanceVpcsExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
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 instance VPCs
ListInstanceVpcs200Response result = apiInstance.ListInstanceVpcs(instanceId, perPage, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.ListInstanceVpcs: " + 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 instance VPCs
ApiResponse<ListInstanceVpcs200Response> response = apiInstance.ListInstanceVpcsWithHttpInfo(instanceId, 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 InstancesApi.ListInstanceVpcsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance 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] |
[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]
ListInstances200Response ListInstances (int? perPage = null, string? cursor = null, string? tag = null, string? label = null, string? mainIp = null, string? region = null, string? firewallGroupId = null)
List Instances
List all VPS instances 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 ListInstancesExample
{
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 InstancesApi(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)
var tag = "tag_example"; // string? | Filter by specific tag. (optional)
var label = "label_example"; // string? | Filter by label. (optional)
var mainIp = "mainIp_example"; // string? | Filter by main ip address. (optional)
var region = "region_example"; // string? | Filter by [Region id](#operation/list-regions). (optional)
var firewallGroupId = "firewallGroupId_example"; // string? | Filter by [Firewall group id](#operation/list-firewall-groups). (optional)
try
{
// List Instances
ListInstances200Response result = apiInstance.ListInstances(perPage, cursor, tag, label, mainIp, region, firewallGroupId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.ListInstances: " + 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 Instances
ApiResponse<ListInstances200Response> response = apiInstance.ListInstancesWithHttpInfo(perPage, cursor, tag, label, mainIp, region, 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 InstancesApi.ListInstancesWithHttpInfo: " + 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] |
tag | string? | Filter by specific tag. | [optional] |
label | string? | Filter by label. | [optional] |
mainIp | string? | Filter by main ip address. | [optional] |
region | string? | Filter by Region id. | [optional] |
firewallGroupId | string? | Filter by Firewall group id. | [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 | - |
403 | Forbidden | - |
404 | Not Found | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void PostInstancesInstanceIdIpv4ReverseDefault (string instanceId, PostInstancesInstanceIdIpv4ReverseDefaultRequest? postInstancesInstanceIdIpv4ReverseDefaultRequest = null)
Set Default Reverse DNS Entry
Set a reverse DNS entry for an IPv4 address
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class PostInstancesInstanceIdIpv4ReverseDefaultExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var postInstancesInstanceIdIpv4ReverseDefaultRequest = new PostInstancesInstanceIdIpv4ReverseDefaultRequest?(); // PostInstancesInstanceIdIpv4ReverseDefaultRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Set Default Reverse DNS Entry
apiInstance.PostInstancesInstanceIdIpv4ReverseDefault(instanceId, postInstancesInstanceIdIpv4ReverseDefaultRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.PostInstancesInstanceIdIpv4ReverseDefault: " + 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
{
// Set Default Reverse DNS Entry
apiInstance.PostInstancesInstanceIdIpv4ReverseDefaultWithHttpInfo(instanceId, postInstancesInstanceIdIpv4ReverseDefaultRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.PostInstancesInstanceIdIpv4ReverseDefaultWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
postInstancesInstanceIdIpv4ReverseDefaultRequest | PostInstancesInstanceIdIpv4ReverseDefaultRequest? | 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]
void RebootInstance (string instanceId)
Reboot Instance
Reboot an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class RebootInstanceExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
try
{
// Reboot Instance
apiInstance.RebootInstance(instanceId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.RebootInstance: " + 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
{
// Reboot Instance
apiInstance.RebootInstanceWithHttpInfo(instanceId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.RebootInstanceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance 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 RebootInstances (RebootInstancesRequest? rebootInstancesRequest = null)
Reboot instances
Reboot Instances.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class RebootInstancesExample
{
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 InstancesApi(config);
var rebootInstancesRequest = new RebootInstancesRequest?(); // RebootInstancesRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Reboot instances
apiInstance.RebootInstances(rebootInstancesRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.RebootInstances: " + 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
{
// Reboot instances
apiInstance.RebootInstancesWithHttpInfo(rebootInstancesRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.RebootInstancesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
rebootInstancesRequest | RebootInstancesRequest? | 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]
CreateInstance202Response ReinstallInstance (string instanceId, ReinstallInstanceRequest? reinstallInstanceRequest = null)
Reinstall Instance
Reinstall an Instance using an optional hostname
. Note: This action may take a few extra seconds to complete.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ReinstallInstanceExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var reinstallInstanceRequest = new ReinstallInstanceRequest?(); // ReinstallInstanceRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Reinstall Instance
CreateInstance202Response result = apiInstance.ReinstallInstance(instanceId, reinstallInstanceRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.ReinstallInstance: " + 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
{
// Reinstall Instance
ApiResponse<CreateInstance202Response> response = apiInstance.ReinstallInstanceWithHttpInfo(instanceId, reinstallInstanceRequest);
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 InstancesApi.ReinstallInstanceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
reinstallInstanceRequest | ReinstallInstanceRequest? | 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 | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RestoreInstance202Response RestoreInstance (string instanceId, RestoreInstanceRequest? restoreInstanceRequest = null)
Restore Instance
Restore an Instance from either backup_id
or snapshot_id
.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class RestoreInstanceExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var restoreInstanceRequest = new RestoreInstanceRequest?(); // RestoreInstanceRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Restore Instance
RestoreInstance202Response result = apiInstance.RestoreInstance(instanceId, restoreInstanceRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.RestoreInstance: " + 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
{
// Restore Instance
ApiResponse<RestoreInstance202Response> response = apiInstance.RestoreInstanceWithHttpInfo(instanceId, restoreInstanceRequest);
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 InstancesApi.RestoreInstanceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
restoreInstanceRequest | RestoreInstanceRequest? | 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 | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void StartInstance (string instanceId)
Start instance
Start an Instance.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class StartInstanceExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
try
{
// Start instance
apiInstance.StartInstance(instanceId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.StartInstance: " + 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
{
// Start instance
apiInstance.StartInstanceWithHttpInfo(instanceId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.StartInstanceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance 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 StartInstances (StartInstancesRequest? startInstancesRequest = null)
Start instances
Start Instances.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class StartInstancesExample
{
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 InstancesApi(config);
var startInstancesRequest = new StartInstancesRequest?(); // StartInstancesRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Start instances
apiInstance.StartInstances(startInstancesRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.StartInstances: " + 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
{
// Start instances
apiInstance.StartInstancesWithHttpInfo(startInstancesRequest);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.StartInstancesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
startInstancesRequest | StartInstancesRequest? | 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]
CreateInstance202Response UpdateInstance (string instanceId, UpdateInstanceRequest? updateInstanceRequest = null)
Update Instance
Update information for an Instance. All attributes are optional. If not set, the attributes will retain their original values. Note: Changing os_id
, app_id
or image_id
may take a few extra seconds to complete.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class UpdateInstanceExample
{
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 InstancesApi(config);
var instanceId = "instanceId_example"; // string | The [Instance ID](#operation/list-instances).
var updateInstanceRequest = new UpdateInstanceRequest?(); // UpdateInstanceRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional)
try
{
// Update Instance
CreateInstance202Response result = apiInstance.UpdateInstance(instanceId, updateInstanceRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstancesApi.UpdateInstance: " + 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 Instance
ApiResponse<CreateInstance202Response> response = apiInstance.UpdateInstanceWithHttpInfo(instanceId, updateInstanceRequest);
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 InstancesApi.UpdateInstanceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string | The Instance ID. | |
updateInstanceRequest | UpdateInstanceRequest? | 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 | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]