1. Packages
  2. Scaleway
  3. API Docs
  4. getBaremetalOs
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

scaleway.getBaremetalOs

Explore with Pulumi AI

scaleway logo
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

    Gets information about a baremetal operating system. For more information, see the 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.getBaremetalOs({
        name: "Ubuntu",
        version: "20.04 LTS (Focal Fossa)",
    });
    // Get info by os id
    const byId = scaleway.getBaremetalOs({
        osId: "03b7f4ba-a6a1-4305-984e-b54fafbf1681",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    # Get info by os name and version
    by_name = scaleway.get_baremetal_os(name="Ubuntu",
        version="20.04 LTS (Focal Fossa)")
    # Get info by os id
    by_id = scaleway.get_baremetal_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"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Get info by os name and version
    		_, err := scaleway.GetBaremetalOs(ctx, &scaleway.GetBaremetalOsArgs{
    			Name:    pulumi.StringRef("Ubuntu"),
    			Version: pulumi.StringRef("20.04 LTS (Focal Fossa)"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Get info by os id
    		_, err = scaleway.GetBaremetalOs(ctx, &scaleway.GetBaremetalOsArgs{
    			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.GetBaremetalOs.Invoke(new()
        {
            Name = "Ubuntu",
            Version = "20.04 LTS (Focal Fossa)",
        });
    
        // Get info by os id
        var byId = Scaleway.GetBaremetalOs.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.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetBaremetalOsArgs;
    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 = ScalewayFunctions.getBaremetalOs(GetBaremetalOsArgs.builder()
                .name("Ubuntu")
                .version("20.04 LTS (Focal Fossa)")
                .build());
    
            // Get info by os id
            final var byId = ScalewayFunctions.getBaremetalOs(GetBaremetalOsArgs.builder()
                .osId("03b7f4ba-a6a1-4305-984e-b54fafbf1681")
                .build());
    
        }
    }
    
    variables:
      # Get info by os name and version
      byName:
        fn::invoke:
          Function: scaleway:getBaremetalOs
          Arguments:
            name: Ubuntu
            version: 20.04 LTS (Focal Fossa)
      # Get info by os id
      byId:
        fn::invoke:
          Function: scaleway:getBaremetalOs
          Arguments:
            osId: 03b7f4ba-a6a1-4305-984e-b54fafbf1681
    

    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>
    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]
    func GetBaremetalOs(ctx *Context, args *GetBaremetalOsArgs, opts ...InvokeOption) (*GetBaremetalOsResult, error)
    func GetBaremetalOsOutput(ctx *Context, args *GetBaremetalOsOutputArgs, opts ...InvokeOption) GetBaremetalOsResultOutput

    > 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)
    }
    public static CompletableFuture<GetBaremetalOsResult> getBaremetalOs(GetBaremetalOsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getBaremetalOs:getBaremetalOs
      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.

    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 logo
    Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse