Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien
vultr.getInstance
Explore with Pulumi AI
Get information about a Vultr instance.
Example Usage
Get the information for a instance by label:
import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@pulumi/vultr";
const myInstance = vultr.getInstance({
    filters: [{
        name: "label",
        values: ["my-instance-label"],
    }],
});
import pulumi
import pulumi_vultr as vultr
my_instance = vultr.get_instance(filters=[vultr.GetInstanceFilterArgs(
    name="label",
    values=["my-instance-label"],
)])
package main
import (
	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vultr.LookupInstance(ctx, &vultr.LookupInstanceArgs{
			Filters: []vultr.GetInstanceFilter{
				{
					Name: "label",
					Values: []string{
						"my-instance-label",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vultr = Pulumi.Vultr;
return await Deployment.RunAsync(() => 
{
    var myInstance = Vultr.GetInstance.Invoke(new()
    {
        Filters = new[]
        {
            new Vultr.Inputs.GetInstanceFilterInputArgs
            {
                Name = "label",
                Values = new[]
                {
                    "my-instance-label",
                },
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vultr.VultrFunctions;
import com.pulumi.vultr.inputs.GetInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var myInstance = VultrFunctions.getInstance(GetInstanceArgs.builder()
            .filters(GetInstanceFilterArgs.builder()
                .name("label")
                .values("my-instance-label")
                .build())
            .build());
    }
}
variables:
  myInstance:
    fn::invoke:
      Function: vultr:getInstance
      Arguments:
        filters:
          - name: label
            values:
              - my-instance-label
Using getInstance
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getInstance(args: GetInstanceArgs, opts?: InvokeOptions): Promise<GetInstanceResult>
function getInstanceOutput(args: GetInstanceOutputArgs, opts?: InvokeOptions): Output<GetInstanceResult>def get_instance(filters: Optional[Sequence[GetInstanceFilter]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetInstanceResult
def get_instance_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetInstanceFilterArgs]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetInstanceResult]func LookupInstance(ctx *Context, args *LookupInstanceArgs, opts ...InvokeOption) (*LookupInstanceResult, error)
func LookupInstanceOutput(ctx *Context, args *LookupInstanceOutputArgs, opts ...InvokeOption) LookupInstanceResultOutput> Note: This function is named LookupInstance in the Go SDK.
public static class GetInstance 
{
    public static Task<GetInstanceResult> InvokeAsync(GetInstanceArgs args, InvokeOptions? opts = null)
    public static Output<GetInstanceResult> Invoke(GetInstanceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetInstanceResult> getInstance(GetInstanceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: vultr:index/getInstance:getInstance
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Filters
List<ediri.
Vultr. Inputs. Get Instance Filter>  - Query parameters for finding instances.
 
- Filters
[]Get
Instance Filter  - Query parameters for finding instances.
 
- filters
List<Get
Instance Filter>  - Query parameters for finding instances.
 
- filters
Get
Instance Filter[]  - Query parameters for finding instances.
 
- filters
Sequence[Get
Instance Filter]  - Query parameters for finding instances.
 
- filters List<Property Map>
 - Query parameters for finding instances.
 
getInstance Result
The following output properties are available:
- Allowed
Bandwidth int - The server's allowed bandwidth usage in GB.
 - App
Id int - The server's application ID.
 - Backups string
 - Backups
Schedule Dictionary<string, object> - The current configuration for backups
 - Date
Created string - The date the server was added to your Vultr account.
 - Disk int
 - The description of the disk(s) on the server.
 - Features List<string>
 - Array of which features are enabled.
 - Firewall
Group stringId  - The ID of the firewall group applied to this server.
 - Gateway
V4 string - The server's IPv4 gateway.
 - Hostname string
 - The hostname assigned to the server.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Image
Id string - The Marketplace ID for this application.
 - Internal
Ip string - The server's internal IP address.
 - Kvm string
 - The server's current KVM URL. This URL will change periodically. It is not advised to cache this value.
 - Label string
 - The server's label.
 - Location string
 - Main
Ip string - The server's main IP address.
 - Netmask
V4 string - The server's IPv4 netmask.
 - Os string
 - The operating system of the instance.
 - Os
Id int - The server's operating system ID.
 - Plan string
 - The server's plan ID.
 - Power
Status string - Whether the server is powered on or not.
 - Ram int
 - The amount of memory available on the instance in MB.
 - Region string
 - The region ID of the server.
 - Server
Status string - A more detailed server status (none, locked, installingbooting, isomounting, ok).
 - Status string
 - The status of the server's subscription.
 - List<string>
 - A list of tags applied to the instance.
 - V6Main
Ip string - The main IPv6 network address.
 - V6Network string
 - The IPv6 subnet.
 - V6Network
Size int - The IPv6 network size in bits.
 - Vcpu
Count int - The number of virtual CPUs available on the server.
 - Vpc2Ids List<string>
 - A list of VPC 2.0 IDs attached to the server.
 - Vpc
Ids List<string> - Filters
List<ediri.
Vultr. Outputs. Get Instance Filter>  
- Allowed
Bandwidth int - The server's allowed bandwidth usage in GB.
 - App
Id int - The server's application ID.
 - Backups string
 - Backups
Schedule map[string]interface{} - The current configuration for backups
 - Date
Created string - The date the server was added to your Vultr account.
 - Disk int
 - The description of the disk(s) on the server.
 - Features []string
 - Array of which features are enabled.
 - Firewall
Group stringId  - The ID of the firewall group applied to this server.
 - Gateway
V4 string - The server's IPv4 gateway.
 - Hostname string
 - The hostname assigned to the server.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Image
Id string - The Marketplace ID for this application.
 - Internal
Ip string - The server's internal IP address.
 - Kvm string
 - The server's current KVM URL. This URL will change periodically. It is not advised to cache this value.
 - Label string
 - The server's label.
 - Location string
 - Main
Ip string - The server's main IP address.
 - Netmask
V4 string - The server's IPv4 netmask.
 - Os string
 - The operating system of the instance.
 - Os
Id int - The server's operating system ID.
 - Plan string
 - The server's plan ID.
 - Power
Status string - Whether the server is powered on or not.
 - Ram int
 - The amount of memory available on the instance in MB.
 - Region string
 - The region ID of the server.
 - Server
Status string - A more detailed server status (none, locked, installingbooting, isomounting, ok).
 - Status string
 - The status of the server's subscription.
 - []string
 - A list of tags applied to the instance.
 - V6Main
Ip string - The main IPv6 network address.
 - V6Network string
 - The IPv6 subnet.
 - V6Network
Size int - The IPv6 network size in bits.
 - Vcpu
Count int - The number of virtual CPUs available on the server.
 - Vpc2Ids []string
 - A list of VPC 2.0 IDs attached to the server.
 - Vpc
Ids []string - Filters
[]Get
Instance Filter  
- allowed
Bandwidth Integer - The server's allowed bandwidth usage in GB.
 - app
Id Integer - The server's application ID.
 - backups String
 - backups
Schedule Map<String,Object> - The current configuration for backups
 - date
Created String - The date the server was added to your Vultr account.
 - disk Integer
 - The description of the disk(s) on the server.
 - features List<String>
 - Array of which features are enabled.
 - firewall
Group StringId  - The ID of the firewall group applied to this server.
 - gateway
V4 String - The server's IPv4 gateway.
 - hostname String
 - The hostname assigned to the server.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - image
Id String - The Marketplace ID for this application.
 - internal
Ip String - The server's internal IP address.
 - kvm String
 - The server's current KVM URL. This URL will change periodically. It is not advised to cache this value.
 - label String
 - The server's label.
 - location String
 - main
Ip String - The server's main IP address.
 - netmask
V4 String - The server's IPv4 netmask.
 - os String
 - The operating system of the instance.
 - os
Id Integer - The server's operating system ID.
 - plan String
 - The server's plan ID.
 - power
Status String - Whether the server is powered on or not.
 - ram Integer
 - The amount of memory available on the instance in MB.
 - region String
 - The region ID of the server.
 - server
Status String - A more detailed server status (none, locked, installingbooting, isomounting, ok).
 - status String
 - The status of the server's subscription.
 - List<String>
 - A list of tags applied to the instance.
 - v6Main
Ip String - The main IPv6 network address.
 - v6Network String
 - The IPv6 subnet.
 - v6Network
Size Integer - The IPv6 network size in bits.
 - vcpu
Count Integer - The number of virtual CPUs available on the server.
 - vpc2Ids List<String>
 - A list of VPC 2.0 IDs attached to the server.
 - vpc
Ids List<String> - filters
List<Get
Instance Filter>  
- allowed
Bandwidth number - The server's allowed bandwidth usage in GB.
 - app
Id number - The server's application ID.
 - backups string
 - backups
Schedule {[key: string]: any} - The current configuration for backups
 - date
Created string - The date the server was added to your Vultr account.
 - disk number
 - The description of the disk(s) on the server.
 - features string[]
 - Array of which features are enabled.
 - firewall
Group stringId  - The ID of the firewall group applied to this server.
 - gateway
V4 string - The server's IPv4 gateway.
 - hostname string
 - The hostname assigned to the server.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - image
Id string - The Marketplace ID for this application.
 - internal
Ip string - The server's internal IP address.
 - kvm string
 - The server's current KVM URL. This URL will change periodically. It is not advised to cache this value.
 - label string
 - The server's label.
 - location string
 - main
Ip string - The server's main IP address.
 - netmask
V4 string - The server's IPv4 netmask.
 - os string
 - The operating system of the instance.
 - os
Id number - The server's operating system ID.
 - plan string
 - The server's plan ID.
 - power
Status string - Whether the server is powered on or not.
 - ram number
 - The amount of memory available on the instance in MB.
 - region string
 - The region ID of the server.
 - server
Status string - A more detailed server status (none, locked, installingbooting, isomounting, ok).
 - status string
 - The status of the server's subscription.
 - string[]
 - A list of tags applied to the instance.
 - v6Main
Ip string - The main IPv6 network address.
 - v6Network string
 - The IPv6 subnet.
 - v6Network
Size number - The IPv6 network size in bits.
 - vcpu
Count number - The number of virtual CPUs available on the server.
 - vpc2Ids string[]
 - A list of VPC 2.0 IDs attached to the server.
 - vpc
Ids string[] - filters
Get
Instance Filter[]  
- allowed_
bandwidth int - The server's allowed bandwidth usage in GB.
 - app_
id int - The server's application ID.
 - backups str
 - backups_
schedule Mapping[str, Any] - The current configuration for backups
 - date_
created str - The date the server was added to your Vultr account.
 - disk int
 - The description of the disk(s) on the server.
 - features Sequence[str]
 - Array of which features are enabled.
 - firewall_
group_ strid  - The ID of the firewall group applied to this server.
 - gateway_
v4 str - The server's IPv4 gateway.
 - hostname str
 - The hostname assigned to the server.
 - id str
 - The provider-assigned unique ID for this managed resource.
 - image_
id str - The Marketplace ID for this application.
 - internal_
ip str - The server's internal IP address.
 - kvm str
 - The server's current KVM URL. This URL will change periodically. It is not advised to cache this value.
 - label str
 - The server's label.
 - location str
 - main_
ip str - The server's main IP address.
 - netmask_
v4 str - The server's IPv4 netmask.
 - os str
 - The operating system of the instance.
 - os_
id int - The server's operating system ID.
 - plan str
 - The server's plan ID.
 - power_
status str - Whether the server is powered on or not.
 - ram int
 - The amount of memory available on the instance in MB.
 - region str
 - The region ID of the server.
 - server_
status str - A more detailed server status (none, locked, installingbooting, isomounting, ok).
 - status str
 - The status of the server's subscription.
 - Sequence[str]
 - A list of tags applied to the instance.
 - v6_
main_ strip  - The main IPv6 network address.
 - v6_
network str - The IPv6 subnet.
 - v6_
network_ intsize  - The IPv6 network size in bits.
 - vcpu_
count int - The number of virtual CPUs available on the server.
 - vpc2_
ids Sequence[str] - A list of VPC 2.0 IDs attached to the server.
 - vpc_
ids Sequence[str] - filters
Sequence[Get
Instance Filter]  
- allowed
Bandwidth Number - The server's allowed bandwidth usage in GB.
 - app
Id Number - The server's application ID.
 - backups String
 - backups
Schedule Map<Any> - The current configuration for backups
 - date
Created String - The date the server was added to your Vultr account.
 - disk Number
 - The description of the disk(s) on the server.
 - features List<String>
 - Array of which features are enabled.
 - firewall
Group StringId  - The ID of the firewall group applied to this server.
 - gateway
V4 String - The server's IPv4 gateway.
 - hostname String
 - The hostname assigned to the server.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - image
Id String - The Marketplace ID for this application.
 - internal
Ip String - The server's internal IP address.
 - kvm String
 - The server's current KVM URL. This URL will change periodically. It is not advised to cache this value.
 - label String
 - The server's label.
 - location String
 - main
Ip String - The server's main IP address.
 - netmask
V4 String - The server's IPv4 netmask.
 - os String
 - The operating system of the instance.
 - os
Id Number - The server's operating system ID.
 - plan String
 - The server's plan ID.
 - power
Status String - Whether the server is powered on or not.
 - ram Number
 - The amount of memory available on the instance in MB.
 - region String
 - The region ID of the server.
 - server
Status String - A more detailed server status (none, locked, installingbooting, isomounting, ok).
 - status String
 - The status of the server's subscription.
 - List<String>
 - A list of tags applied to the instance.
 - v6Main
Ip String - The main IPv6 network address.
 - v6Network String
 - The IPv6 subnet.
 - v6Network
Size Number - The IPv6 network size in bits.
 - vcpu
Count Number - The number of virtual CPUs available on the server.
 - vpc2Ids List<String>
 - A list of VPC 2.0 IDs attached to the server.
 - vpc
Ids List<String> - filters List<Property Map>
 
Supporting Types
GetInstanceFilter  
Package Details
- Repository
 - vultr dirien/pulumi-vultr
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
vultrTerraform Provider.