1. Packages
  2. Vultr
  3. API Docs
  4. getOs
Vultr v2.19.0 published on Friday, Jan 5, 2024 by dirien

vultr.getOs

Explore with Pulumi AI

vultr logo
Vultr v2.19.0 published on Friday, Jan 5, 2024 by dirien

    Get information about operating systems that can be launched when creating a Vultr VPS.

    Example Usage

    Get the information for an operating system by

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vultr = Pulumi.Vultr;
    
    return await Deployment.RunAsync(() => 
    {
        var centos = Vultr.GetOs.Invoke(new()
        {
            Filters = new[]
            {
                new Vultr.Inputs.GetOsFilterInputArgs
                {
                    Name = "name",
                    Values = new[]
                    {
                        "CentOS 7 x64",
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vultr.GetOs(ctx, &vultr.GetOsArgs{
    			Filters: []vultr.GetOsFilter{
    				{
    					Name: "name",
    					Values: []string{
    						"CentOS 7 x64",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vultr.VultrFunctions;
    import com.pulumi.vultr.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) {
            final var centos = VultrFunctions.getOs(GetOsArgs.builder()
                .filters(GetOsFilterArgs.builder()
                    .name("name")
                    .values("CentOS 7 x64")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_vultr as vultr
    
    centos = vultr.get_os(filters=[vultr.GetOsFilterArgs(
        name="name",
        values=["CentOS 7 x64"],
    )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@pulumi/vultr";
    
    const centos = vultr.getOs({
        filters: [{
            name: "name",
            values: ["CentOS 7 x64"],
        }],
    });
    
    variables:
      centos:
        fn::invoke:
          Function: vultr:getOs
          Arguments:
            filters:
              - name: name
                values:
                  - CentOS 7 x64
    

    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(filters: Optional[Sequence[GetOsFilter]] = None,
               opts: Optional[InvokeOptions] = None) -> GetOsResult
    def get_os_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetOsFilterArgs]]]] = 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: vultr:index/getOs:getOs
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<ediri.Vultr.Inputs.GetOsFilter>
    Query parameters for finding operating systems.
    Filters []GetOsFilter
    Query parameters for finding operating systems.
    filters List<GetOsFilter>
    Query parameters for finding operating systems.
    filters GetOsFilter[]
    Query parameters for finding operating systems.
    filters Sequence[GetOsFilter]
    Query parameters for finding operating systems.
    filters List<Property Map>
    Query parameters for finding operating systems.

    getOs Result

    The following output properties are available:

    Arch string
    The architecture of the operating system.
    Family string
    The family of the operating system.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the operating system.
    Filters List<ediri.Vultr.Outputs.GetOsFilter>
    Arch string
    The architecture of the operating system.
    Family string
    The family of the operating system.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the operating system.
    Filters []GetOsFilter
    arch String
    The architecture of the operating system.
    family String
    The family of the operating system.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the operating system.
    filters List<GetOsFilter>
    arch string
    The architecture of the operating system.
    family string
    The family of the operating system.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the operating system.
    filters GetOsFilter[]
    arch str
    The architecture of the operating system.
    family str
    The family of the operating system.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the operating system.
    filters Sequence[GetOsFilter]
    arch String
    The architecture of the operating system.
    family String
    The family of the operating system.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the operating system.
    filters List<Property Map>

    Supporting Types

    GetOsFilter

    Name string
    Attribute name to filter with.
    Values List<string>
    One or more values filter with.
    Name string
    Attribute name to filter with.
    Values []string
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.
    name string
    Attribute name to filter with.
    values string[]
    One or more values filter with.
    name str
    Attribute name to filter with.
    values Sequence[str]
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.

    Package Details

    Repository
    vultr dirien/pulumi-vultr
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vultr Terraform Provider.
    vultr logo
    Vultr v2.19.0 published on Friday, Jan 5, 2024 by dirien