hcloud logo
Hetzner Cloud v1.10.3, Mar 8 23

hcloud.getImages

Provides details about multiple Hetzner Cloud Images.

Example Usage

using System.Collections.Generic;
using Pulumi;
using HCloud = Pulumi.HCloud;

return await Deployment.RunAsync(() => 
{
    var image2 = HCloud.GetImages.Invoke();

    var image3 = HCloud.GetImages.Invoke(new()
    {
        WithSelector = "key=value",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hcloud.GetImages(ctx, nil, nil)
		if err != nil {
			return err
		}
		_, err = hcloud.GetImages(ctx, &hcloud.GetImagesArgs{
			WithSelector: pulumi.StringRef("key=value"),
		}, 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.hcloud.HcloudFunctions;
import com.pulumi.hcloud.inputs.GetImagesArgs;
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 image2 = HcloudFunctions.getImages();

        final var image3 = HcloudFunctions.getImages(GetImagesArgs.builder()
            .withSelector("key=value")
            .build());

    }
}
import pulumi
import pulumi_hcloud as hcloud

image2 = hcloud.get_images()
image3 = hcloud.get_images(with_selector="key=value")
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";

const image2 = hcloud.getImages({});
const image3 = hcloud.getImages({
    withSelector: "key=value",
});
variables:
  image2:
    fn::invoke:
      Function: hcloud:getImages
      Arguments: {}
  image3:
    fn::invoke:
      Function: hcloud:getImages
      Arguments:
        withSelector: key=value

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(most_recent: Optional[bool] = None,
               with_selector: Optional[str] = None,
               with_statuses: Optional[Sequence[str]] = None,
               opts: Optional[InvokeOptions] = None) -> GetImagesResult
def get_images_output(most_recent: Optional[pulumi.Input[bool]] = None,
               with_selector: Optional[pulumi.Input[str]] = None,
               with_statuses: Optional[pulumi.Input[Sequence[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: hcloud:index/getImages:getImages
  arguments:
    # arguments dictionary

The following arguments are supported:

MostRecent bool

Sorts list by date.

WithSelector string

Label selector

WithStatuses List<string>

List only images with the specified status, could contain creating or available.

MostRecent bool

Sorts list by date.

WithSelector string

Label selector

WithStatuses []string

List only images with the specified status, could contain creating or available.

mostRecent Boolean

Sorts list by date.

withSelector String

Label selector

withStatuses List<String>

List only images with the specified status, could contain creating or available.

mostRecent boolean

Sorts list by date.

withSelector string

Label selector

withStatuses string[]

List only images with the specified status, could contain creating or available.

most_recent bool

Sorts list by date.

with_selector str

Label selector

with_statuses Sequence[str]

List only images with the specified status, could contain creating or available.

mostRecent Boolean

Sorts list by date.

withSelector String

Label selector

withStatuses List<String>

List only images with the specified status, could contain creating or available.

getImages Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Images List<Pulumi.HCloud.Outputs.GetImagesImage>

(list) List of all matching images. See data.hcloud_image for schema.

MostRecent bool
WithSelector string
WithStatuses List<string>
Id string

The provider-assigned unique ID for this managed resource.

Images []GetImagesImage

(list) List of all matching images. See data.hcloud_image for schema.

MostRecent bool
WithSelector string
WithStatuses []string
id String

The provider-assigned unique ID for this managed resource.

images List<GetImagesImage>

(list) List of all matching images. See data.hcloud_image for schema.

mostRecent Boolean
withSelector String
withStatuses List<String>
id string

The provider-assigned unique ID for this managed resource.

images GetImagesImage[]

(list) List of all matching images. See data.hcloud_image for schema.

mostRecent boolean
withSelector string
withStatuses string[]
id str

The provider-assigned unique ID for this managed resource.

images Sequence[GetImagesImage]

(list) List of all matching images. See data.hcloud_image for schema.

most_recent bool
with_selector str
with_statuses Sequence[str]
id String

The provider-assigned unique ID for this managed resource.

images List<Property Map>

(list) List of all matching images. See data.hcloud_image for schema.

mostRecent Boolean
withSelector String
withStatuses List<String>

Supporting Types

GetImagesImage

Created string
Deprecated string
Description string
Id int
Labels Dictionary<string, object>
Name string
OsFlavor string
OsVersion string
RapidDeploy bool
Type string
Selector string

Deprecated:

Please use the with_selector property instead.

Created string
Deprecated string
Description string
Id int
Labels map[string]interface{}
Name string
OsFlavor string
OsVersion string
RapidDeploy bool
Type string
Selector string

Deprecated:

Please use the with_selector property instead.

created String
deprecated String
description String
id Integer
labels Map<String,Object>
name String
osFlavor String
osVersion String
rapidDeploy Boolean
type String
selector String

Deprecated:

Please use the with_selector property instead.

created string
deprecated string
description string
id number
labels {[key: string]: any}
name string
osFlavor string
osVersion string
rapidDeploy boolean
type string
selector string

Deprecated:

Please use the with_selector property instead.

created str
deprecated str
description str
id int
labels Mapping[str, Any]
name str
os_flavor str
os_version str
rapid_deploy bool
type str
selector str

Deprecated:

Please use the with_selector property instead.

created String
deprecated String
description String
id Number
labels Map<Any>
name String
osFlavor String
osVersion String
rapidDeploy Boolean
type String
selector String

Deprecated:

Please use the with_selector property instead.

Package Details

Repository
Hetzner Cloud pulumi/pulumi-hcloud
License
Apache-2.0
Notes

This Pulumi package is based on the hcloud Terraform Provider.