1. Packages
  2. Vultr
  3. API Docs
  4. getBareMetalServer
Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien

vultr.getBareMetalServer

Explore with Pulumi AI

vultr logo
Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien

    Get information about a Vultr bare metal server.

    Example Usage

    Get the information for a server by label:

    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@pulumi/vultr";
    
    const myServer = vultr.getBareMetalServer({
        filters: [{
            name: "label",
            values: ["my-server-label"],
        }],
    });
    
    import pulumi
    import pulumi_vultr as vultr
    
    my_server = vultr.get_bare_metal_server(filters=[vultr.GetBareMetalServerFilterArgs(
        name="label",
        values=["my-server-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.LookupBareMetalServer(ctx, &vultr.LookupBareMetalServerArgs{
    			Filters: []vultr.GetBareMetalServerFilter{
    				{
    					Name: "label",
    					Values: []string{
    						"my-server-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 myServer = Vultr.GetBareMetalServer.Invoke(new()
        {
            Filters = new[]
            {
                new Vultr.Inputs.GetBareMetalServerFilterInputArgs
                {
                    Name = "label",
                    Values = new[]
                    {
                        "my-server-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.GetBareMetalServerArgs;
    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 myServer = VultrFunctions.getBareMetalServer(GetBareMetalServerArgs.builder()
                .filters(GetBareMetalServerFilterArgs.builder()
                    .name("label")
                    .values("my-server-label")
                    .build())
                .build());
    
        }
    }
    
    variables:
      myServer:
        fn::invoke:
          Function: vultr:getBareMetalServer
          Arguments:
            filters:
              - name: label
                values:
                  - my-server-label
    

    Using getBareMetalServer

    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 getBareMetalServer(args: GetBareMetalServerArgs, opts?: InvokeOptions): Promise<GetBareMetalServerResult>
    function getBareMetalServerOutput(args: GetBareMetalServerOutputArgs, opts?: InvokeOptions): Output<GetBareMetalServerResult>
    def get_bare_metal_server(filters: Optional[Sequence[GetBareMetalServerFilter]] = None,
                              opts: Optional[InvokeOptions] = None) -> GetBareMetalServerResult
    def get_bare_metal_server_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetBareMetalServerFilterArgs]]]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetBareMetalServerResult]
    func LookupBareMetalServer(ctx *Context, args *LookupBareMetalServerArgs, opts ...InvokeOption) (*LookupBareMetalServerResult, error)
    func LookupBareMetalServerOutput(ctx *Context, args *LookupBareMetalServerOutputArgs, opts ...InvokeOption) LookupBareMetalServerResultOutput

    > Note: This function is named LookupBareMetalServer in the Go SDK.

    public static class GetBareMetalServer 
    {
        public static Task<GetBareMetalServerResult> InvokeAsync(GetBareMetalServerArgs args, InvokeOptions? opts = null)
        public static Output<GetBareMetalServerResult> Invoke(GetBareMetalServerInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBareMetalServerResult> getBareMetalServer(GetBareMetalServerArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: vultr:index/getBareMetalServer:getBareMetalServer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<ediri.Vultr.Inputs.GetBareMetalServerFilter>
    Query parameters for finding servers.
    Filters []GetBareMetalServerFilter
    Query parameters for finding servers.
    filters List<GetBareMetalServerFilter>
    Query parameters for finding servers.
    filters GetBareMetalServerFilter[]
    Query parameters for finding servers.
    filters Sequence[GetBareMetalServerFilter]
    Query parameters for finding servers.
    filters List<Property Map>
    Query parameters for finding servers.

    getBareMetalServer Result

    The following output properties are available:

    AppId int
    The server's application ID.
    CpuCount int
    The number of CPUs available on the server.
    DateCreated string
    The date the server was added to your Vultr account.
    Disk string
    The description of the disk(s) on the server.
    Features List<string>
    GatewayV4 string
    The server's IPv4 gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    ImageId string
    The Marketplace ID for this application.
    Label string
    The server's label.
    MacAddress int
    MainIp string
    The server's main IP address.
    NetmaskV4 string
    The server's IPv4 netmask.
    Os string
    The operating system of the server.
    OsId int
    The server's operating system ID.
    Plan string
    The server's plan ID.
    Ram string
    The amount of memory available on the server in MB.
    Region string
    The region ID of the server.
    Status string
    The status of the server's subscription.
    Tags List<string>
    A list of tags applied to the server.
    V6MainIp string
    V6Network string
    V6NetworkSize int
    Vpc2Ids List<string>
    A list of VPC 2.0 IDs attached to the server.
    Filters List<ediri.Vultr.Outputs.GetBareMetalServerFilter>
    AppId int
    The server's application ID.
    CpuCount int
    The number of CPUs available on the server.
    DateCreated string
    The date the server was added to your Vultr account.
    Disk string
    The description of the disk(s) on the server.
    Features []string
    GatewayV4 string
    The server's IPv4 gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    ImageId string
    The Marketplace ID for this application.
    Label string
    The server's label.
    MacAddress int
    MainIp string
    The server's main IP address.
    NetmaskV4 string
    The server's IPv4 netmask.
    Os string
    The operating system of the server.
    OsId int
    The server's operating system ID.
    Plan string
    The server's plan ID.
    Ram string
    The amount of memory available on the server in MB.
    Region string
    The region ID of the server.
    Status string
    The status of the server's subscription.
    Tags []string
    A list of tags applied to the server.
    V6MainIp string
    V6Network string
    V6NetworkSize int
    Vpc2Ids []string
    A list of VPC 2.0 IDs attached to the server.
    Filters []GetBareMetalServerFilter
    appId Integer
    The server's application ID.
    cpuCount Integer
    The number of CPUs available on the server.
    dateCreated String
    The date the server was added to your Vultr account.
    disk String
    The description of the disk(s) on the server.
    features List<String>
    gatewayV4 String
    The server's IPv4 gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    imageId String
    The Marketplace ID for this application.
    label String
    The server's label.
    macAddress Integer
    mainIp String
    The server's main IP address.
    netmaskV4 String
    The server's IPv4 netmask.
    os String
    The operating system of the server.
    osId Integer
    The server's operating system ID.
    plan String
    The server's plan ID.
    ram String
    The amount of memory available on the server in MB.
    region String
    The region ID of the server.
    status String
    The status of the server's subscription.
    tags List<String>
    A list of tags applied to the server.
    v6MainIp String
    v6Network String
    v6NetworkSize Integer
    vpc2Ids List<String>
    A list of VPC 2.0 IDs attached to the server.
    filters List<GetBareMetalServerFilter>
    appId number
    The server's application ID.
    cpuCount number
    The number of CPUs available on the server.
    dateCreated string
    The date the server was added to your Vultr account.
    disk string
    The description of the disk(s) on the server.
    features string[]
    gatewayV4 string
    The server's IPv4 gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    imageId string
    The Marketplace ID for this application.
    label string
    The server's label.
    macAddress number
    mainIp string
    The server's main IP address.
    netmaskV4 string
    The server's IPv4 netmask.
    os string
    The operating system of the server.
    osId number
    The server's operating system ID.
    plan string
    The server's plan ID.
    ram string
    The amount of memory available on the server in MB.
    region string
    The region ID of the server.
    status string
    The status of the server's subscription.
    tags string[]
    A list of tags applied to the server.
    v6MainIp string
    v6Network string
    v6NetworkSize number
    vpc2Ids string[]
    A list of VPC 2.0 IDs attached to the server.
    filters GetBareMetalServerFilter[]
    app_id int
    The server's application ID.
    cpu_count int
    The number of CPUs available on the server.
    date_created str
    The date the server was added to your Vultr account.
    disk str
    The description of the disk(s) on the server.
    features Sequence[str]
    gateway_v4 str
    The server's IPv4 gateway.
    id str
    The provider-assigned unique ID for this managed resource.
    image_id str
    The Marketplace ID for this application.
    label str
    The server's label.
    mac_address int
    main_ip str
    The server's main IP address.
    netmask_v4 str
    The server's IPv4 netmask.
    os str
    The operating system of the server.
    os_id int
    The server's operating system ID.
    plan str
    The server's plan ID.
    ram str
    The amount of memory available on the server in MB.
    region str
    The region ID of the server.
    status str
    The status of the server's subscription.
    tags Sequence[str]
    A list of tags applied to the server.
    v6_main_ip str
    v6_network str
    v6_network_size int
    vpc2_ids Sequence[str]
    A list of VPC 2.0 IDs attached to the server.
    filters Sequence[GetBareMetalServerFilter]
    appId Number
    The server's application ID.
    cpuCount Number
    The number of CPUs available on the server.
    dateCreated String
    The date the server was added to your Vultr account.
    disk String
    The description of the disk(s) on the server.
    features List<String>
    gatewayV4 String
    The server's IPv4 gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    imageId String
    The Marketplace ID for this application.
    label String
    The server's label.
    macAddress Number
    mainIp String
    The server's main IP address.
    netmaskV4 String
    The server's IPv4 netmask.
    os String
    The operating system of the server.
    osId Number
    The server's operating system ID.
    plan String
    The server's plan ID.
    ram String
    The amount of memory available on the server in MB.
    region String
    The region ID of the server.
    status String
    The status of the server's subscription.
    tags List<String>
    A list of tags applied to the server.
    v6MainIp String
    v6Network String
    v6NetworkSize Number
    vpc2Ids List<String>
    A list of VPC 2.0 IDs attached to the server.
    filters List<Property Map>

    Supporting Types

    GetBareMetalServerFilter

    Name string
    Attribute name to filter with.
    Values List<string>
    One or more values filter with.
    Name string
    Attribute name to filter with.
    Values []string
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.
    name string
    Attribute name to filter with.
    values string[]
    One or more values filter with.
    name str
    Attribute name to filter with.
    values Sequence[str]
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.

    Package Details

    Repository
    vultr dirien/pulumi-vultr
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vultr Terraform Provider.
    vultr logo
    Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien