Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien
vultr.getOs
Explore with Pulumi AI
Get information about operating systems that can be launched when creating a Vultr VPS.
Example Usage
Get the information for an operating system by name
:
import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@pulumi/vultr";
const centos = vultr.getOs({
filters: [{
name: "name",
values: ["CentOS 7 x64"],
}],
});
import pulumi
import pulumi_vultr as vultr
centos = vultr.get_os(filters=[vultr.GetOsFilterArgs(
name="name",
values=["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
})
}
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 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());
}
}
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. Get Os Filter> - Query parameters for finding operating systems.
- Filters
[]Get
Os Filter - Query parameters for finding operating systems.
- filters
List<Get
Os Filter> - Query parameters for finding operating systems.
- filters
Get
Os Filter[] - Query parameters for finding operating systems.
- filters
Sequence[Get
Os Filter] - Query parameters for finding operating systems.
- filters List<Property Map>
- Query parameters for finding operating systems.
getOs Result
The following output properties are available:
Supporting Types
GetOsFilter
Package Details
- Repository
- vultr dirien/pulumi-vultr
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vultr
Terraform Provider.