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

scaleway.getBaremetalOs

Explore with Pulumi AI

Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse
Deprecated: scaleway.index/getbaremetalos.getBaremetalOs has been deprecated in favor of scaleway.elasticmetal/getos.getOs

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

You can also use the scaleway-cli with scw baremetal os list to list all available operating systems.

Example Usage

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

// Get info by os name and version
const byName = scaleway.elasticmetal.getOs({
    name: "Ubuntu",
    version: "20.04 LTS (Focal Fossa)",
});
// Get info by os id
const byId = scaleway.elasticmetal.getOs({
    osId: "03b7f4ba-a6a1-4305-984e-b54fafbf1681",
});
Copy
import pulumi
import pulumi_scaleway as scaleway

# Get info by os name and version
by_name = scaleway.elasticmetal.get_os(name="Ubuntu",
    version="20.04 LTS (Focal Fossa)")
# Get info by os id
by_id = scaleway.elasticmetal.get_os(os_id="03b7f4ba-a6a1-4305-984e-b54fafbf1681")
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 os name and version
		_, err := elasticmetal.GetOs(ctx, &elasticmetal.GetOsArgs{
			Name:    pulumi.StringRef("Ubuntu"),
			Version: pulumi.StringRef("20.04 LTS (Focal Fossa)"),
		}, nil)
		if err != nil {
			return err
		}
		// Get info by os id
		_, err = elasticmetal.GetOs(ctx, &elasticmetal.GetOsArgs{
			OsId: pulumi.StringRef("03b7f4ba-a6a1-4305-984e-b54fafbf1681"),
		}, 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 os name and version
    var byName = Scaleway.Elasticmetal.GetOs.Invoke(new()
    {
        Name = "Ubuntu",
        Version = "20.04 LTS (Focal Fossa)",
    });

    // Get info by os id
    var byId = Scaleway.Elasticmetal.GetOs.Invoke(new()
    {
        OsId = "03b7f4ba-a6a1-4305-984e-b54fafbf1681",
    });

});
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.GetOsArgs;
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 os name and version
        final var byName = ElasticmetalFunctions.getOs(GetOsArgs.builder()
            .name("Ubuntu")
            .version("20.04 LTS (Focal Fossa)")
            .build());

        // Get info by os id
        final var byId = ElasticmetalFunctions.getOs(GetOsArgs.builder()
            .osId("03b7f4ba-a6a1-4305-984e-b54fafbf1681")
            .build());

    }
}
Copy
variables:
  # Get info by os name and version
  byName:
    fn::invoke:
      function: scaleway:elasticmetal:getOs
      arguments:
        name: Ubuntu
        version: 20.04 LTS (Focal Fossa)
  # Get info by os id
  byId:
    fn::invoke:
      function: scaleway:elasticmetal:getOs
      arguments:
        osId: 03b7f4ba-a6a1-4305-984e-b54fafbf1681
Copy

Using getBaremetalOs

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 getBaremetalOs(args: GetBaremetalOsArgs, opts?: InvokeOptions): Promise<GetBaremetalOsResult>
function getBaremetalOsOutput(args: GetBaremetalOsOutputArgs, opts?: InvokeOptions): Output<GetBaremetalOsResult>
Copy
def get_baremetal_os(name: Optional[str] = None,
                     os_id: Optional[str] = None,
                     version: Optional[str] = None,
                     zone: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetBaremetalOsResult
def get_baremetal_os_output(name: Optional[pulumi.Input[str]] = None,
                     os_id: Optional[pulumi.Input[str]] = None,
                     version: Optional[pulumi.Input[str]] = None,
                     zone: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetBaremetalOsResult]
Copy
func GetBaremetalOs(ctx *Context, args *GetBaremetalOsArgs, opts ...InvokeOption) (*GetBaremetalOsResult, error)
func GetBaremetalOsOutput(ctx *Context, args *GetBaremetalOsOutputArgs, opts ...InvokeOption) GetBaremetalOsResultOutput
Copy

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

public static class GetBaremetalOs 
{
    public static Task<GetBaremetalOsResult> InvokeAsync(GetBaremetalOsArgs args, InvokeOptions? opts = null)
    public static Output<GetBaremetalOsResult> Invoke(GetBaremetalOsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetBaremetalOsResult> getBaremetalOs(GetBaremetalOsArgs args, InvokeOptions options)
public static Output<GetBaremetalOsResult> getBaremetalOs(GetBaremetalOsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:index/getBaremetalOs:getBaremetalOs
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name string
The os name. Only one of name and os_id should be specified.
OsId string
The operating system id. Only one of name and os_id should be specified.
Version string
The os version.
Zone Changes to this property will trigger replacement. string
zone) The zone in which the os exists.
Name string
The os name. Only one of name and os_id should be specified.
OsId string
The operating system id. Only one of name and os_id should be specified.
Version string
The os version.
Zone Changes to this property will trigger replacement. string
zone) The zone in which the os exists.
name String
The os name. Only one of name and os_id should be specified.
osId String
The operating system id. Only one of name and os_id should be specified.
version String
The os version.
zone Changes to this property will trigger replacement. String
zone) The zone in which the os exists.
name string
The os name. Only one of name and os_id should be specified.
osId string
The operating system id. Only one of name and os_id should be specified.
version string
The os version.
zone Changes to this property will trigger replacement. string
zone) The zone in which the os exists.
name str
The os name. Only one of name and os_id should be specified.
os_id str
The operating system id. Only one of name and os_id should be specified.
version str
The os version.
zone Changes to this property will trigger replacement. str
zone) The zone in which the os exists.
name String
The os name. Only one of name and os_id should be specified.
osId String
The operating system id. Only one of name and os_id should be specified.
version String
The os version.
zone Changes to this property will trigger replacement. String
zone) The zone in which the os exists.

getBaremetalOs Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Zone string
Name string
OsId string
Version string
Id string
The provider-assigned unique ID for this managed resource.
Zone string
Name string
OsId string
Version string
id String
The provider-assigned unique ID for this managed resource.
zone String
name String
osId String
version String
id string
The provider-assigned unique ID for this managed resource.
zone string
name string
osId string
version string
id str
The provider-assigned unique ID for this managed resource.
zone str
name str
os_id str
version str
id String
The provider-assigned unique ID for this managed resource.
zone String
name String
osId String
version String

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