Linode

Pulumi Official
Package maintained by Pulumi
v3.7.1 published on Wednesday, Jan 5, 2022 by Pulumi

getImages

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

Attributes

Each Linode image will be stored in the images attribute and will export the following attributes:

  • id - The unique ID of this Image. The ID of private images begin with private/ followed by the numeric identifier of the private image, for example private/12345.

  • label - A short description of the Image.

  • created - When this Image was created.

  • created_by - The name of the User who created this Image, or “linode” for official Images.

  • deprecated - Whether or not this Image is deprecated. Will only be true for deprecated public Images.

  • description - A detailed description of this Image.

  • is_public - True if the Image is public.

  • size - The minimum size this Image needs to deploy. Size is in MB. example: 2500

  • status - The current status of this image. (creating, pending_upload, available)

  • type - How the Image was created. Manual Images can be created at any time. “Automatic” Images are created automatically from a deleted Linode. (manual, automatic)

  • vendor - The upstream distribution vendor. None for private Images.

Filterable Fields

  • deprecated

  • is_public

  • label

  • size

  • vendor

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
    public MyStack()
    {
        var specific_images = Output.Create(Linode.GetImages.InvokeAsync(new Linode.GetImagesArgs
        {
            Filters = 
            {
                new Linode.Inputs.GetImagesFilterArgs
                {
                    Name = "label",
                    Values = 
                    {
                        "Debian 8",
                    },
                },
                new Linode.Inputs.GetImagesFilterArgs
                {
                    Name = "is_public",
                    Values = 
                    {
                        "true",
                    },
                },
            },
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v3/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := linode.GetImages(ctx, &GetImagesArgs{
			Filters: []GetImagesFilter{
				GetImagesFilter{
					Name: "label",
					Values: []string{
						"Debian 8",
					},
				},
				GetImagesFilter{
					Name: "is_public",
					Values: []string{
						"true",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_linode as linode

specific_images = linode.get_images(filters=[
    linode.GetImagesFilterArgs(
        name="label",
        values=["Debian 8"],
    ),
    linode.GetImagesFilterArgs(
        name="is_public",
        values=["true"],
    ),
])
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const specific_images = pulumi.output(linode.getImages({
    filters: [
        {
            name: "label",
            values: ["Debian 8"],
        },
        {
            name: "is_public",
            values: ["true"],
        },
    ],
}));

Coming soon!

Using getImages

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 getImages(args: GetImagesArgs, opts?: InvokeOptions): Promise<GetImagesResult>
function getImagesOutput(args: GetImagesOutputArgs, opts?: InvokeOptions): Output<GetImagesResult>
def get_images(filters: Optional[Sequence[GetImagesFilter]] = None,
               latest: Optional[bool] = None,
               order: Optional[str] = None,
               order_by: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetImagesResult
def get_images_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetImagesFilterArgs]]]] = None,
               latest: Optional[pulumi.Input[bool]] = None,
               order: Optional[pulumi.Input[str]] = None,
               order_by: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetImagesResult]
func GetImages(ctx *Context, args *GetImagesArgs, opts ...InvokeOption) (*GetImagesResult, error)
func GetImagesOutput(ctx *Context, args *GetImagesOutputArgs, opts ...InvokeOption) GetImagesResultOutput

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

public static class GetImages 
{
    public static Task<GetImagesResult> InvokeAsync(GetImagesArgs args, InvokeOptions? opts = null)
    public static Output<GetImagesResult> Invoke(GetImagesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetImagesResult> getImages(GetImagesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: linode:index/getImages:getImages
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Filters List<GetImagesFilter>
Latest bool

If true, only the latest image will be returned. Images without a valid created field are not included in the result.

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 []GetImagesFilter
Latest bool

If true, only the latest image will be returned. Images without a valid created field are not included in the result.

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<GetImagesFilter>
latest Boolean

If true, only the latest image will be returned. Images without a valid created field are not included in the result.

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 GetImagesFilter[]
latest boolean

If true, only the latest image will be returned. Images without a valid created field are not included in the result.

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[GetImagesFilter]
latest bool

If true, only the latest image will be returned. Images without a valid created field are not included in the result.

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>
latest Boolean

If true, only the latest image will be returned. Images without a valid created field are not included in the result.

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.

getImages Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Images List<GetImagesImage>
Filters List<GetImagesFilter>
Latest bool
Order string
OrderBy string
Id string

The provider-assigned unique ID for this managed resource.

Images []GetImagesImage
Filters []GetImagesFilter
Latest bool
Order string
OrderBy string
id String

The provider-assigned unique ID for this managed resource.

images List<GetImagesImage>
filters List<GetImagesFilter>
latest Boolean
order String
orderBy String
id string

The provider-assigned unique ID for this managed resource.

images GetImagesImage[]
filters GetImagesFilter[]
latest boolean
order string
orderBy string
id str

The provider-assigned unique ID for this managed resource.

images Sequence[GetImagesImage]
filters Sequence[GetImagesFilter]
latest bool
order str
order_by str
id String

The provider-assigned unique ID for this managed resource.

images List<Property Map>
filters List<Property Map>
latest Boolean
order String
orderBy String

Supporting Types

GetImagesFilter

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)

GetImagesImage

Created string
CreatedBy string
Deprecated bool
Description string
Expiry string
Id string
IsPublic bool
Label string
Size int
Status string
Type string
Vendor string
Created string
CreatedBy string
Deprecated bool
Description string
Expiry string
Id string
IsPublic bool
Label string
Size int
Status string
Type string
Vendor string
created String
createdBy String
deprecated Boolean
description String
expiry String
id String
isPublic Boolean
label String
size Integer
status String
type String
vendor String
created string
createdBy string
deprecated boolean
description string
expiry string
id string
isPublic boolean
label string
size number
status string
type string
vendor string
created String
createdBy String
deprecated Boolean
description String
expiry String
id String
isPublic Boolean
label String
size Number
status String
type String
vendor String

Package Details

Repository
https://github.com/pulumi/pulumi-linode
License
Apache-2.0
Notes

This Pulumi package is based on the linode Terraform Provider.