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

scaleway.elasticmetal.getOs

Explore with Pulumi AI

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

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 getOs

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 getOs(args: GetOsArgs, opts?: InvokeOptions): Promise<GetOsResult>
function getOsOutput(args: GetOsOutputArgs, opts?: InvokeOptions): Output<GetOsResult>
Copy
def get_os(name: Optional[str] = None,
           os_id: Optional[str] = None,
           version: Optional[str] = None,
           zone: Optional[str] = None,
           opts: Optional[InvokeOptions] = None) -> GetOsResult
def get_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[GetOsResult]
Copy
func GetOs(ctx *Context, args *GetOsArgs, opts ...InvokeOption) (*GetOsResult, error)
func GetOsOutput(ctx *Context, args *GetOsOutputArgs, opts ...InvokeOption) GetOsResultOutput
Copy

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

public static class GetOs 
{
    public static Task<GetOsResult> InvokeAsync(GetOsArgs args, InvokeOptions? opts = null)
    public static Output<GetOsResult> Invoke(GetOsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOsResult> getOs(GetOsArgs args, InvokeOptions options)
public static Output<GetOsResult> getOs(GetOsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:elasticmetal/getOs:getOs
  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.

getOs 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