Linode v4.22.0 published on Tuesday, Jun 25, 2024 by Pulumi
linode.getKernels
Explore with Pulumi AI
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
idarchitecturedeprecatedkvmlabelpvopsversionxen
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 dictionaryThe following arguments are supported:
- Filters
List<Get
Kernels Filter>  - Kernels
List<Get
Kernels Kernel>  - Order string
 - The order in which results should be returned. (
asc,desc; defaultasc) - Order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
 
- Filters
[]Get
Kernels Filter  - Kernels
[]Get
Kernels Kernel  - Order string
 - The order in which results should be returned. (
asc,desc; defaultasc) - Order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
 
- filters
List<Get
Kernels Filter>  - kernels
List<Get
Kernels Kernel>  - order String
 - The order in which results should be returned. (
asc,desc; defaultasc) - order
By String - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
 
- filters
Get
Kernels Filter[]  - kernels
Get
Kernels Kernel[]  - order string
 - The order in which results should be returned. (
asc,desc; defaultasc) - order
By string - The attribute to order the results by. See the Filterable Fields section for a list of valid fields.
 
- filters
Sequence[Get
Kernels Filter]  - kernels
Sequence[Get
Kernels Kernel]  - order str
 - The order in which results should be returned. (
asc,desc; defaultasc) - 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; defaultasc) - order
By 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<Get
Kernels Filter>  - Kernels
List<Get
Kernels Kernel>  - Order string
 - Order
By string 
- Id string
 - The unique ID of this Kernel.
 - Filters
[]Get
Kernels Filter  - Kernels
[]Get
Kernels Kernel  - Order string
 - Order
By string 
- id String
 - The unique ID of this Kernel.
 - filters
List<Get
Kernels Filter>  - kernels
List<Get
Kernels Kernel>  - order String
 - order
By String 
- id string
 - The unique ID of this Kernel.
 - filters
Get
Kernels Filter[]  - kernels
Get
Kernels Kernel[]  - order string
 - order
By string 
- id str
 - The unique ID of this Kernel.
 - filters
Sequence[Get
Kernels Filter]  - kernels
Sequence[Get
Kernels Kernel]  - order str
 - order_
by str 
- id String
 - The unique ID of this Kernel.
 - filters List<Property Map>
 - kernels List<Property Map>
 - order String
 - order
By 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.
 - Match
By string - The method to match the field by. (
exact,regex,substring; defaultexact) 
- 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.
 - Match
By string - The method to match the field by. (
exact,regex,substring; defaultexact) 
- 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.
 - match
By String - The method to match the field by. (
exact,regex,substring; defaultexact) 
- 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.
 - match
By string - The method to match the field by. (
exact,regex,substring; defaultexact) 
- 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; defaultexact) 
- 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.
 - match
By String - The method to match the field by. (
exact,regex,substring; defaultexact) 
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 
linodeTerraform Provider.