Scaleway v1.27.0 published on Monday, Apr 21, 2025 by pulumiverse
scaleway.elasticmetal.getServer
Explore with Pulumi AI
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",
});
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")
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
	})
}
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",
    });
});
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());
    }
}
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
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>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]func LookupServer(ctx *Context, args *LookupServerArgs, opts ...InvokeOption) (*LookupServerResult, error)
func LookupServerOutput(ctx *Context, args *LookupServerOutputArgs, opts ...InvokeOption) LookupServerResultOutput> 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)
}public static CompletableFuture<GetServerResult> getServer(GetServerArgs args, InvokeOptions options)
public static Output<GetServerResult> getServer(GetServerArgs args, InvokeOptions options)
fn::invoke:
  function: scaleway:elasticmetal/getServer:getServer
  arguments:
    # arguments dictionaryThe following arguments are supported:
- name str
 - The server name. Only one of 
nameandserver_idshould 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.
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.
 - Install
Config boolAfterward  - Ips
List<Pulumiverse.
Scaleway. Elasticmetal. Outputs. Get Server Ip>  - Ipv4s
List<Pulumiverse.
Scaleway. Elasticmetal. Outputs. Get Server Ipv4>  - Ipv6s
List<Pulumiverse.
Scaleway. Elasticmetal. Outputs. Get Server Ipv6>  - Offer string
 - Offer
Id string - Offer
Name string - Options
List<Pulumiverse.
Scaleway. Elasticmetal. Outputs. Get Server Option>  - Organization
Id string - Os string
 - Os
Name string - Partitioning string
 - Password string
 - Private
Networks List<Pulumiverse.Scaleway. Elasticmetal. Outputs. Get Server Private Network>  - Reinstall
On boolConfig Changes  - Service
Password string - Service
User string - Ssh
Key List<string>Ids  - List<string>
 - User string
 - Name string
 - Project
Id string - Server
Id string - Zone string
 
- Description string
 - Domain string
 - Hostname string
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Install
Config boolAfterward  - Ips
[]Get
Server Ip  - Ipv4s
[]Get
Server Ipv4  - Ipv6s
[]Get
Server Ipv6  - Offer string
 - Offer
Id string - Offer
Name string - Options
[]Get
Server Option  - Organization
Id string - Os string
 - Os
Name string - Partitioning string
 - Password string
 - Private
Networks []GetServer Private Network  - Reinstall
On boolConfig Changes  - Service
Password string - Service
User string - Ssh
Key []stringIds  - []string
 - User string
 - Name string
 - Project
Id string - Server
Id string - Zone string
 
- description String
 - domain String
 - hostname String
 - id String
 - The provider-assigned unique ID for this managed resource.
 - install
Config BooleanAfterward  - ips
List<Get
Server Ip>  - ipv4s
List<Get
Server Ipv4>  - ipv6s
List<Get
Server Ipv6>  - offer String
 - offer
Id String - offer
Name String - options
List<Get
Server Option>  - organization
Id String - os String
 - os
Name String - partitioning String
 - password String
 - private
Networks List<GetServer Private Network>  - reinstall
On BooleanConfig Changes  - service
Password String - service
User String - ssh
Key List<String>Ids  - List<String>
 - user String
 - name String
 - project
Id String - server
Id String - zone String
 
- description string
 - domain string
 - hostname string
 - id string
 - The provider-assigned unique ID for this managed resource.
 - install
Config booleanAfterward  - ips
Get
Server Ip[]  - ipv4s
Get
Server Ipv4[]  - ipv6s
Get
Server Ipv6[]  - offer string
 - offer
Id string - offer
Name string - options
Get
Server Option[]  - organization
Id string - os string
 - os
Name string - partitioning string
 - password string
 - private
Networks GetServer Private Network[]  - reinstall
On booleanConfig Changes  - service
Password string - service
User string - ssh
Key string[]Ids  - string[]
 - user string
 - name string
 - project
Id string - server
Id string - zone string
 
- description str
 - domain str
 - hostname str
 - id str
 - The provider-assigned unique ID for this managed resource.
 - install_
config_ boolafterward  - ips
Sequence[Get
Server Ip]  - ipv4s
Sequence[Get
Server Ipv4]  - ipv6s
Sequence[Get
Server Ipv6]  - offer str
 - offer_
id str - offer_
name str - options
Sequence[Get
Server Option]  - organization_
id str - os str
 - os_
name str - partitioning str
 - password str
 - private_
networks Sequence[GetServer Private Network]  - reinstall_
on_ boolconfig_ changes  - service_
password str - service_
user str - ssh_
key_ Sequence[str]ids  - Sequence[str]
 - user str
 - name str
 - project_
id str - server_
id str - zone str
 
- description String
 - domain String
 - hostname String
 - id String
 - The provider-assigned unique ID for this managed resource.
 - install
Config BooleanAfterward  - ips List<Property Map>
 - ipv4s List<Property Map>
 - ipv6s List<Property Map>
 - offer String
 - offer
Id String - offer
Name String - options List<Property Map>
 - organization
Id String - os String
 - os
Name String - partitioning String
 - password String
 - private
Networks List<Property Map> - reinstall
On BooleanConfig Changes  - service
Password String - service
User String - ssh
Key List<String>Ids  - List<String>
 - user String
 - name String
 - project
Id String - server
Id String - zone String
 
Supporting Types
GetServerIp  
GetServerIpv4  
GetServerIpv6  
GetServerOption  
- 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 
nameandserver_idshould be specified. 
GetServerPrivateNetwork   
- Created
At string - The date and time of the creation of the private network
 - Id string
 - The ID of the server.
 - Ipam
Ip List<string>Ids  - List of IPAM IP IDs to attach to the server
 - Status string
 - The private network status
 - Updated
At string - The date and time of the last update of the private network
 - Vlan int
 - The VLAN ID associated to the private network
 
- Created
At string - The date and time of the creation of the private network
 - Id string
 - The ID of the server.
 - Ipam
Ip []stringIds  - List of IPAM IP IDs to attach to the server
 - Status string
 - The private network status
 - Updated
At string - The date and time of the last update of the private network
 - Vlan int
 - The VLAN ID associated to the private network
 
- created
At String - The date and time of the creation of the private network
 - id String
 - The ID of the server.
 - ipam
Ip List<String>Ids  - List of IPAM IP IDs to attach to the server
 - status String
 - The private network status
 - updated
At String - The date and time of the last update of the private network
 - vlan Integer
 - The VLAN ID associated to the private network
 
- created
At string - The date and time of the creation of the private network
 - id string
 - The ID of the server.
 - ipam
Ip string[]Ids  - List of IPAM IP IDs to attach to the server
 - status string
 - The private network status
 - updated
At 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_ Sequence[str]ids  - 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
 
- created
At String - The date and time of the creation of the private network
 - id String
 - The ID of the server.
 - ipam
Ip List<String>Ids  - List of IPAM IP IDs to attach to the server
 - status String
 - The private network status
 - updated
At 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 
scalewayTerraform Provider.