1. Packages
  2. Scaleway
  3. API Docs
  4. getBaremetalServer
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

scaleway.getBaremetalServer

Explore with Pulumi AI

scaleway logo
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

    Gets information about a baremetal server. For more information, see the documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    // Get info by server name
    const byName = scaleway.getBaremetalServer({
        name: "foobar",
        zone: "fr-par-2",
    });
    // Get info by server id
    const byId = scaleway.getBaremetalServer({
        serverId: "11111111-1111-1111-1111-111111111111",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    # Get info by server name
    by_name = scaleway.get_baremetal_server(name="foobar",
        zone="fr-par-2")
    # Get info by server id
    by_id = scaleway.get_baremetal_server(server_id="11111111-1111-1111-1111-111111111111")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Get info by server name
    		_, err := scaleway.LookupBaremetalServer(ctx, &scaleway.LookupBaremetalServerArgs{
    			Name: pulumi.StringRef("foobar"),
    			Zone: pulumi.StringRef("fr-par-2"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Get info by server id
    		_, err = scaleway.LookupBaremetalServer(ctx, &scaleway.LookupBaremetalServerArgs{
    			ServerId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        // Get info by server name
        var byName = Scaleway.GetBaremetalServer.Invoke(new()
        {
            Name = "foobar",
            Zone = "fr-par-2",
        });
    
        // Get info by server id
        var byId = Scaleway.GetBaremetalServer.Invoke(new()
        {
            ServerId = "11111111-1111-1111-1111-111111111111",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.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) {
            // Get info by server name
            final var byName = ScalewayFunctions.getBaremetalServer(GetBaremetalServerArgs.builder()
                .name("foobar")
                .zone("fr-par-2")
                .build());
    
            // Get info by server id
            final var byId = ScalewayFunctions.getBaremetalServer(GetBaremetalServerArgs.builder()
                .serverId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    variables:
      # Get info by server name
      byName:
        fn::invoke:
          Function: scaleway:getBaremetalServer
          Arguments:
            name: foobar
            zone: fr-par-2
      # Get info by server id
      byId:
        fn::invoke:
          Function: scaleway:getBaremetalServer
          Arguments:
            serverId: 11111111-1111-1111-1111-111111111111
    

    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_baremetal_server(name: Optional[str] = None,
                             project_id: Optional[str] = None,
                             server_id: Optional[str] = None,
                             zone: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetBaremetalServerResult
    def get_baremetal_server_output(name: Optional[pulumi.Input[str]] = None,
                             project_id: Optional[pulumi.Input[str]] = None,
                             server_id: Optional[pulumi.Input[str]] = None,
                             zone: Optional[pulumi.Input[str]] = 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: scaleway:index/getBaremetalServer:getBaremetalServer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The server name. Only one of name and server_id should be specified.
    ProjectId string
    The ID of the project the baremetal server is associated with.
    ServerId string
    Zone string
    zone) The zone in which the server exists.
    Name string
    The server name. Only one of name and server_id should be specified.
    ProjectId string
    The ID of the project the baremetal server is associated with.
    ServerId string
    Zone string
    zone) The zone in which the server exists.
    name String
    The server name. Only one of name and server_id should be specified.
    projectId String
    The ID of the project the baremetal server is associated with.
    serverId String
    zone String
    zone) The zone in which the server exists.
    name string
    The server name. Only one of name and server_id should be specified.
    projectId string
    The ID of the project the baremetal server is associated with.
    serverId string
    zone string
    zone) The zone in which the server exists.
    name str
    The server name. Only one of name and server_id should be specified.
    project_id str
    The ID of the project the baremetal server is associated with.
    server_id str
    zone str
    zone) The zone in which the server exists.
    name String
    The server name. Only one of name and server_id should be specified.
    projectId String
    The ID of the project the baremetal server is associated with.
    serverId String
    zone String
    zone) The zone in which the server exists.

    getBaremetalServer Result

    The following output properties are available:

    description String
    domain String
    hostname String
    id String
    The provider-assigned unique ID for this managed resource.
    installConfigAfterward Boolean
    ips List<Property Map>
    ipv4s List<Property Map>
    ipv6s List<Property Map>
    offer String
    offerId String
    offerName String
    options List<Property Map>
    organizationId String
    os String
    osName String
    password String
    privateNetworks List<Property Map>
    reinstallOnConfigChanges Boolean
    servicePassword String
    serviceUser String
    sshKeyIds List<String>
    tags List<String>
    user String
    name String
    projectId String
    serverId String
    zone String

    Supporting Types

    GetBaremetalServerIp

    Address string
    The IPv6 address
    Id string
    The ID of the server.
    Reverse string
    The Reverse of the IPv6
    Version string
    The version of the IPv6
    Address string
    The IPv6 address
    Id string
    The ID of the server.
    Reverse string
    The Reverse of the IPv6
    Version string
    The version of the IPv6
    address String
    The IPv6 address
    id String
    The ID of the server.
    reverse String
    The Reverse of the IPv6
    version String
    The version of the IPv6
    address string
    The IPv6 address
    id string
    The ID of the server.
    reverse string
    The Reverse of the IPv6
    version string
    The version of the IPv6
    address str
    The IPv6 address
    id str
    The ID of the server.
    reverse str
    The Reverse of the IPv6
    version str
    The version of the IPv6
    address String
    The IPv6 address
    id String
    The ID of the server.
    reverse String
    The Reverse of the IPv6
    version String
    The version of the IPv6

    GetBaremetalServerIpv4

    Address string
    The IPv6 address
    Id string
    The ID of the server.
    Reverse string
    The Reverse of the IPv6
    Version string
    The version of the IPv6
    Address string
    The IPv6 address
    Id string
    The ID of the server.
    Reverse string
    The Reverse of the IPv6
    Version string
    The version of the IPv6
    address String
    The IPv6 address
    id String
    The ID of the server.
    reverse String
    The Reverse of the IPv6
    version String
    The version of the IPv6
    address string
    The IPv6 address
    id string
    The ID of the server.
    reverse string
    The Reverse of the IPv6
    version string
    The version of the IPv6
    address str
    The IPv6 address
    id str
    The ID of the server.
    reverse str
    The Reverse of the IPv6
    version str
    The version of the IPv6
    address String
    The IPv6 address
    id String
    The ID of the server.
    reverse String
    The Reverse of the IPv6
    version String
    The version of the IPv6

    GetBaremetalServerIpv6

    Address string
    The IPv6 address
    Id string
    The ID of the server.
    Reverse string
    The Reverse of the IPv6
    Version string
    The version of the IPv6
    Address string
    The IPv6 address
    Id string
    The ID of the server.
    Reverse string
    The Reverse of the IPv6
    Version string
    The version of the IPv6
    address String
    The IPv6 address
    id String
    The ID of the server.
    reverse String
    The Reverse of the IPv6
    version String
    The version of the IPv6
    address string
    The IPv6 address
    id string
    The ID of the server.
    reverse string
    The Reverse of the IPv6
    version string
    The version of the IPv6
    address str
    The IPv6 address
    id str
    The ID of the server.
    reverse str
    The Reverse of the IPv6
    version str
    The version of the IPv6
    address String
    The IPv6 address
    id String
    The ID of the server.
    reverse String
    The Reverse of the IPv6
    version String
    The version of the IPv6

    GetBaremetalServerOption

    ExpiresAt string
    Auto expire the option after this date
    Id string
    The ID of the server.
    Name string
    The server name. Only one of name and server_id should be specified.
    ExpiresAt string
    Auto expire the option after this date
    Id string
    The ID of the server.
    Name string
    The server name. Only one of name and server_id should be specified.
    expiresAt String
    Auto expire the option after this date
    id String
    The ID of the server.
    name String
    The server name. Only one of name and server_id should be specified.
    expiresAt string
    Auto expire the option after this date
    id string
    The ID of the server.
    name string
    The server name. Only one of name and server_id should be specified.
    expires_at str
    Auto expire the option after this date
    id str
    The ID of the server.
    name str
    The server name. Only one of name and server_id should be specified.
    expiresAt String
    Auto expire the option after this date
    id String
    The ID of the server.
    name String
    The server name. Only one of name and server_id should be specified.

    GetBaremetalServerPrivateNetwork

    CreatedAt string
    The date and time of the creation of the private network
    Id string
    The ID of the server.
    IpamIpIds List<string>
    List of IPAM IP IDs to attach to the server
    Status string
    The private network status
    UpdatedAt string
    The date and time of the last update of the private network
    Vlan int
    The VLAN ID associated to the private network
    CreatedAt string
    The date and time of the creation of the private network
    Id string
    The ID of the server.
    IpamIpIds []string
    List of IPAM IP IDs to attach to the server
    Status string
    The private network status
    UpdatedAt string
    The date and time of the last update of the private network
    Vlan int
    The VLAN ID associated to the private network
    createdAt String
    The date and time of the creation of the private network
    id String
    The ID of the server.
    ipamIpIds List<String>
    List of IPAM IP IDs to attach to the server
    status String
    The private network status
    updatedAt String
    The date and time of the last update of the private network
    vlan Integer
    The VLAN ID associated to the private network
    createdAt string
    The date and time of the creation of the private network
    id string
    The ID of the server.
    ipamIpIds string[]
    List of IPAM IP IDs to attach to the server
    status string
    The private network status
    updatedAt string
    The date and time of the last update of the private network
    vlan number
    The VLAN ID associated to the private network
    created_at str
    The date and time of the creation of the private network
    id str
    The ID of the server.
    ipam_ip_ids Sequence[str]
    List of IPAM IP IDs to attach to the server
    status str
    The private network status
    updated_at str
    The date and time of the last update of the private network
    vlan int
    The VLAN ID associated to the private network
    createdAt String
    The date and time of the creation of the private network
    id String
    The ID of the server.
    ipamIpIds List<String>
    List of IPAM IP IDs to attach to the server
    status String
    The private network status
    updatedAt String
    The date and time of the last update of the private network
    vlan Number
    The VLAN ID associated to the private network

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse