1. Packages
  2. Scaleway
  3. API Docs
  4. elasticmetal
  5. getOs
Scaleway v1.37.0 published on Friday, Nov 7, 2025 by pulumiverse

scaleway.elasticmetal.getOs

Start a Neo task
Explain and create a scaleway.elasticmetal.getOs resource
scaleway logo
Scaleway v1.37.0 published on Friday, Nov 7, 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 "@pulumiverse/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",
    });
    
    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")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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>
    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]
    func GetOs(ctx *Context, args *GetOsArgs, opts ...InvokeOption) (*GetOsResult, error)
    func GetOsOutput(ctx *Context, args *GetOsOutputArgs, opts ...InvokeOption) GetOsResultOutput

    > 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)
    }
    public static CompletableFuture<GetOsResult> getOs(GetOsArgs args, InvokeOptions options)
    public static Output<GetOsResult> getOs(GetOsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scaleway:elasticmetal/getOs:getOs
      arguments:
        # arguments dictionary

    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 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 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 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 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 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 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.
    Name string
    OsId string
    Version string
    Zone string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    OsId string
    Version string
    Zone string
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    osId String
    version String
    zone String
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    osId string
    version string
    zone string
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    os_id str
    version str
    zone str
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    osId String
    version String
    zone String

    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.37.0 published on Friday, Nov 7, 2025 by pulumiverse
      Meet Neo: Your AI Platform Teammate