1. Packages
  2. Linode
  3. API Docs
  4. getKernels
Linode v4.19.0 published on Wednesday, Apr 24, 2024 by Pulumi

linode.getKernels

Explore with Pulumi AI

linode logo
Linode v4.19.0 published on Wednesday, Apr 24, 2024 by Pulumi

    Provides information about Linode Kernels that match a set of filters.

    Example Usage

    The following example shows how one might use this data source to access information about a Linode Kernel.

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const filteredKernels = linode.getKernels({
        filters: [
            {
                name: "label",
                values: ["my-kernel"],
            },
            {
                name: "architecture",
                values: ["x86_64"],
            },
        ],
    });
    
    import pulumi
    import pulumi_linode as linode
    
    filtered_kernels = linode.get_kernels(filters=[
        linode.GetKernelsFilterArgs(
            name="label",
            values=["my-kernel"],
        ),
        linode.GetKernelsFilterArgs(
            name="architecture",
            values=["x86_64"],
        ),
    ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := linode.GetKernels(ctx, &linode.GetKernelsArgs{
    			Filters: []linode.GetKernelsFilter{
    				{
    					Name: "label",
    					Values: []string{
    						"my-kernel",
    					},
    				},
    				{
    					Name: "architecture",
    					Values: []string{
    						"x86_64",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var filteredKernels = Linode.GetKernels.Invoke(new()
        {
            Filters = new[]
            {
                new Linode.Inputs.GetKernelsFilterInputArgs
                {
                    Name = "label",
                    Values = new[]
                    {
                        "my-kernel",
                    },
                },
                new Linode.Inputs.GetKernelsFilterInputArgs
                {
                    Name = "architecture",
                    Values = new[]
                    {
                        "x86_64",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.LinodeFunctions;
    import com.pulumi.linode.inputs.GetKernelsArgs;
    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 filteredKernels = LinodeFunctions.getKernels(GetKernelsArgs.builder()
                .filters(            
                    GetKernelsFilterArgs.builder()
                        .name("label")
                        .values("my-kernel")
                        .build(),
                    GetKernelsFilterArgs.builder()
                        .name("architecture")
                        .values("x86_64")
                        .build())
                .build());
    
        }
    }
    
    variables:
      filteredKernels:
        fn::invoke:
          Function: linode:getKernels
          Arguments:
            filters:
              - name: label
                values:
                  - my-kernel
              - name: architecture
                values:
                  - x86_64
    

    Filterable Fields

    • id

    • architecture

    • deprecated

    • kvm

    • label

    • pvops

    • version

    • xen

    Using getKernels

    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 getKernels(args: GetKernelsArgs, opts?: InvokeOptions): Promise<GetKernelsResult>
    function getKernelsOutput(args: GetKernelsOutputArgs, opts?: InvokeOptions): Output<GetKernelsResult>
    def get_kernels(filters: Optional[Sequence[GetKernelsFilter]] = None,
                    kernels: Optional[Sequence[GetKernelsKernel]] = None,
                    order: Optional[str] = None,
                    order_by: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetKernelsResult
    def get_kernels_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetKernelsFilterArgs]]]] = None,
                    kernels: Optional[pulumi.Input[Sequence[pulumi.Input[GetKernelsKernelArgs]]]] = None,
                    order: Optional[pulumi.Input[str]] = None,
                    order_by: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetKernelsResult]
    func GetKernels(ctx *Context, args *GetKernelsArgs, opts ...InvokeOption) (*GetKernelsResult, error)
    func GetKernelsOutput(ctx *Context, args *GetKernelsOutputArgs, opts ...InvokeOption) GetKernelsResultOutput

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

    public static class GetKernels 
    {
        public static Task<GetKernelsResult> InvokeAsync(GetKernelsArgs args, InvokeOptions? opts = null)
        public static Output<GetKernelsResult> Invoke(GetKernelsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKernelsResult> getKernels(GetKernelsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: linode:index/getKernels:getKernels
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<GetKernelsFilter>
    Kernels List<GetKernelsKernel>
    Order string
    The order in which results should be returned. (asc, desc; default asc)
    OrderBy string
    The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
    Filters []GetKernelsFilter
    Kernels []GetKernelsKernel
    Order string
    The order in which results should be returned. (asc, desc; default asc)
    OrderBy string
    The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
    filters List<GetKernelsFilter>
    kernels List<GetKernelsKernel>
    order String
    The order in which results should be returned. (asc, desc; default asc)
    orderBy String
    The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
    filters GetKernelsFilter[]
    kernels GetKernelsKernel[]
    order string
    The order in which results should be returned. (asc, desc; default asc)
    orderBy string
    The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
    filters Sequence[GetKernelsFilter]
    kernels Sequence[GetKernelsKernel]
    order str
    The order in which results should be returned. (asc, desc; default asc)
    order_by str
    The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
    filters List<Property Map>
    kernels List<Property Map>
    order String
    The order in which results should be returned. (asc, desc; default asc)
    orderBy String
    The attribute to order the results by. See the Filterable Fields section for a list of valid fields.

    getKernels Result

    The following output properties are available:

    Id string
    The unique ID of this Kernel.
    Filters List<GetKernelsFilter>
    Kernels List<GetKernelsKernel>
    Order string
    OrderBy string
    Id string
    The unique ID of this Kernel.
    Filters []GetKernelsFilter
    Kernels []GetKernelsKernel
    Order string
    OrderBy string
    id String
    The unique ID of this Kernel.
    filters List<GetKernelsFilter>
    kernels List<GetKernelsKernel>
    order String
    orderBy String
    id string
    The unique ID of this Kernel.
    filters GetKernelsFilter[]
    kernels GetKernelsKernel[]
    order string
    orderBy string
    id String
    The unique ID of this Kernel.
    filters List<Property Map>
    kernels List<Property Map>
    order String
    orderBy String

    Supporting Types

    GetKernelsFilter

    Name string
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    Values List<string>
    A list of values for the filter to allow. These values should all be in string form.
    MatchBy string
    The method to match the field by. (exact, regex, substring; default exact)
    Name string
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    Values []string
    A list of values for the filter to allow. These values should all be in string form.
    MatchBy string
    The method to match the field by. (exact, regex, substring; default exact)
    name String
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values List<String>
    A list of values for the filter to allow. These values should all be in string form.
    matchBy String
    The method to match the field by. (exact, regex, substring; default exact)
    name string
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values string[]
    A list of values for the filter to allow. These values should all be in string form.
    matchBy string
    The method to match the field by. (exact, regex, substring; default exact)
    name str
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values Sequence[str]
    A list of values for the filter to allow. These values should all be in string form.
    match_by str
    The method to match the field by. (exact, regex, substring; default exact)
    name String
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values List<String>
    A list of values for the filter to allow. These values should all be in string form.
    matchBy String
    The method to match the field by. (exact, regex, substring; default exact)

    GetKernelsKernel

    Architecture string
    The architecture of this Kernel.
    Built string
    The date on which this Kernel was built.
    Deprecated bool
    Whether or not this Kernel is deprecated.
    Id string
    The unique ID of this Kernel.
    Kvm bool
    If this Kernel is suitable for KVM Linodes.
    Label string
    The friendly name of this Kernel.
    Pvops bool
    If this Kernel is suitable for paravirtualized operations.
    Version string
    Linux Kernel version
    Xen bool
    If this Kernel is suitable for Xen Linodes.
    Architecture string
    The architecture of this Kernel.
    Built string
    The date on which this Kernel was built.
    Deprecated bool
    Whether or not this Kernel is deprecated.
    Id string
    The unique ID of this Kernel.
    Kvm bool
    If this Kernel is suitable for KVM Linodes.
    Label string
    The friendly name of this Kernel.
    Pvops bool
    If this Kernel is suitable for paravirtualized operations.
    Version string
    Linux Kernel version
    Xen bool
    If this Kernel is suitable for Xen Linodes.
    architecture String
    The architecture of this Kernel.
    built String
    The date on which this Kernel was built.
    deprecated Boolean
    Whether or not this Kernel is deprecated.
    id String
    The unique ID of this Kernel.
    kvm Boolean
    If this Kernel is suitable for KVM Linodes.
    label String
    The friendly name of this Kernel.
    pvops Boolean
    If this Kernel is suitable for paravirtualized operations.
    version String
    Linux Kernel version
    xen Boolean
    If this Kernel is suitable for Xen Linodes.
    architecture string
    The architecture of this Kernel.
    built string
    The date on which this Kernel was built.
    deprecated boolean
    Whether or not this Kernel is deprecated.
    id string
    The unique ID of this Kernel.
    kvm boolean
    If this Kernel is suitable for KVM Linodes.
    label string
    The friendly name of this Kernel.
    pvops boolean
    If this Kernel is suitable for paravirtualized operations.
    version string
    Linux Kernel version
    xen boolean
    If this Kernel is suitable for Xen Linodes.
    architecture str
    The architecture of this Kernel.
    built str
    The date on which this Kernel was built.
    deprecated bool
    Whether or not this Kernel is deprecated.
    id str
    The unique ID of this Kernel.
    kvm bool
    If this Kernel is suitable for KVM Linodes.
    label str
    The friendly name of this Kernel.
    pvops bool
    If this Kernel is suitable for paravirtualized operations.
    version str
    Linux Kernel version
    xen bool
    If this Kernel is suitable for Xen Linodes.
    architecture String
    The architecture of this Kernel.
    built String
    The date on which this Kernel was built.
    deprecated Boolean
    Whether or not this Kernel is deprecated.
    id String
    The unique ID of this Kernel.
    kvm Boolean
    If this Kernel is suitable for KVM Linodes.
    label String
    The friendly name of this Kernel.
    pvops Boolean
    If this Kernel is suitable for paravirtualized operations.
    version String
    Linux Kernel version
    xen Boolean
    If this Kernel is suitable for Xen Linodes.

    Package Details

    Repository
    Linode pulumi/pulumi-linode
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the linode Terraform Provider.
    linode logo
    Linode v4.19.0 published on Wednesday, Apr 24, 2024 by Pulumi