1. Packages
  2. Scaleway
  3. API Docs
  4. elasticmetal
  5. getServer
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.elasticmetal.getServer

Explore with Pulumi AI

Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

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

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";

// Get info by server name
const byName = scaleway.elasticmetal.getServer({
    name: "foobar",
    zone: "fr-par-2",
});
// Get info by server id
const byId = scaleway.elasticmetal.getServer({
    serverId: "11111111-1111-1111-1111-111111111111",
});
Copy
import pulumi
import pulumi_scaleway as scaleway

# Get info by server name
by_name = scaleway.elasticmetal.get_server(name="foobar",
    zone="fr-par-2")
# Get info by server id
by_id = scaleway.elasticmetal.get_server(server_id="11111111-1111-1111-1111-111111111111")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/elasticmetal"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Get info by server name
		_, err := elasticmetal.LookupServer(ctx, &elasticmetal.LookupServerArgs{
			Name: pulumi.StringRef("foobar"),
			Zone: pulumi.StringRef("fr-par-2"),
		}, nil)
		if err != nil {
			return err
		}
		// Get info by server id
		_, err = elasticmetal.LookupServer(ctx, &elasticmetal.LookupServerArgs{
			ServerId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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.Elasticmetal.GetServer.Invoke(new()
    {
        Name = "foobar",
        Zone = "fr-par-2",
    });

    // Get info by server id
    var byId = Scaleway.Elasticmetal.GetServer.Invoke(new()
    {
        ServerId = "11111111-1111-1111-1111-111111111111",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.elasticmetal.ElasticmetalFunctions;
import com.pulumi.scaleway.elasticmetal.inputs.GetServerArgs;
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 = ElasticmetalFunctions.getServer(GetServerArgs.builder()
            .name("foobar")
            .zone("fr-par-2")
            .build());

        // Get info by server id
        final var byId = ElasticmetalFunctions.getServer(GetServerArgs.builder()
            .serverId("11111111-1111-1111-1111-111111111111")
            .build());

    }
}
Copy
variables:
  # Get info by server name
  byName:
    fn::invoke:
      function: scaleway:elasticmetal:getServer
      arguments:
        name: foobar
        zone: fr-par-2
  # Get info by server id
  byId:
    fn::invoke:
      function: scaleway:elasticmetal:getServer
      arguments:
        serverId: 11111111-1111-1111-1111-111111111111
Copy

Using getServer

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 getServer(args: GetServerArgs, opts?: InvokeOptions): Promise<GetServerResult>
function getServerOutput(args: GetServerOutputArgs, opts?: InvokeOptions): Output<GetServerResult>
Copy
def get_server(name: Optional[str] = None,
               project_id: Optional[str] = None,
               server_id: Optional[str] = None,
               zone: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetServerResult
def get_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[GetServerResult]
Copy
func LookupServer(ctx *Context, args *LookupServerArgs, opts ...InvokeOption) (*LookupServerResult, error)
func LookupServerOutput(ctx *Context, args *LookupServerOutputArgs, opts ...InvokeOption) LookupServerResultOutput
Copy

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

public static class GetServer 
{
    public static Task<GetServerResult> InvokeAsync(GetServerArgs args, InvokeOptions? opts = null)
    public static Output<GetServerResult> Invoke(GetServerInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetServerResult> getServer(GetServerArgs args, InvokeOptions options)
public static Output<GetServerResult> getServer(GetServerArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:elasticmetal/getServer:getServer
  arguments:
    # arguments dictionary
Copy

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.

getServer 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 bool
Ips []GetServerIp
Ipv4s []GetServerIpv4
Ipv6s []GetServerIpv6
Offer string
OfferId string
OfferName string
Options []GetServerOption
OrganizationId string
Os string
OsName string
Partitioning string
Password string
PrivateNetworks []GetServerPrivateNetwork
ReinstallOnConfigChanges bool
ServicePassword string
ServiceUser string
SshKeyIds []string
Tags []string
User string
Name string
ProjectId string
ServerId string
Zone string
description String
domain String
hostname String
id String
The provider-assigned unique ID for this managed resource.
installConfigAfterward Boolean
ips List<GetServerIp>
ipv4s List<GetServerIpv4>
ipv6s List<GetServerIpv6>
offer String
offerId String
offerName String
options List<GetServerOption>
organizationId String
os String
osName String
partitioning String
password String
privateNetworks List<GetServerPrivateNetwork>
reinstallOnConfigChanges Boolean
servicePassword String
serviceUser String
sshKeyIds List<String>
tags List<String>
user String
name String
projectId String
serverId String
zone String
description string
domain string
hostname string
id string
The provider-assigned unique ID for this managed resource.
installConfigAfterward boolean
ips GetServerIp[]
ipv4s GetServerIpv4[]
ipv6s GetServerIpv6[]
offer string
offerId string
offerName string
options GetServerOption[]
organizationId string
os string
osName string
partitioning string
password string
privateNetworks GetServerPrivateNetwork[]
reinstallOnConfigChanges boolean
servicePassword string
serviceUser string
sshKeyIds string[]
tags string[]
user string
name string
projectId string
serverId string
zone string
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
partitioning 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

GetServerIp

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

GetServerIpv4

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

GetServerIpv6

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

GetServerOption

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

GetServerPrivateNetwork

CreatedAt This property is required. string
The date and time of the creation of the private network
Id This property is required. string
The ID of the server.
IpamIpIds This property is required. List<string>
List of IPAM IP IDs to attach to the server
Status This property is required. string
The private network status
UpdatedAt This property is required. string
The date and time of the last update of the private network
Vlan This property is required. int
The VLAN ID associated to the private network
CreatedAt This property is required. string
The date and time of the creation of the private network
Id This property is required. string
The ID of the server.
IpamIpIds This property is required. []string
List of IPAM IP IDs to attach to the server
Status This property is required. string
The private network status
UpdatedAt This property is required. string
The date and time of the last update of the private network
Vlan This property is required. int
The VLAN ID associated to the private network
createdAt This property is required. String
The date and time of the creation of the private network
id This property is required. String
The ID of the server.
ipamIpIds This property is required. List<String>
List of IPAM IP IDs to attach to the server
status This property is required. String
The private network status
updatedAt This property is required. String
The date and time of the last update of the private network
vlan This property is required. Integer
The VLAN ID associated to the private network
createdAt This property is required. string
The date and time of the creation of the private network
id This property is required. string
The ID of the server.
ipamIpIds This property is required. string[]
List of IPAM IP IDs to attach to the server
status This property is required. string
The private network status
updatedAt This property is required. string
The date and time of the last update of the private network
vlan This property is required. number
The VLAN ID associated to the private network
created_at This property is required. str
The date and time of the creation of the private network
id This property is required. str
The ID of the server.
ipam_ip_ids This property is required. Sequence[str]
List of IPAM IP IDs to attach to the server
status This property is required. str
The private network status
updated_at This property is required. str
The date and time of the last update of the private network
vlan This property is required. int
The VLAN ID associated to the private network
createdAt This property is required. String
The date and time of the creation of the private network
id This property is required. String
The ID of the server.
ipamIpIds This property is required. List<String>
List of IPAM IP IDs to attach to the server
status This property is required. String
The private network status
updatedAt This property is required. String
The date and time of the last update of the private network
vlan This property is required. 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 v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse