1. Packages
  2. Hcloud Provider
  3. API Docs
  4. getImages
Hetzner Cloud v1.20.4 published on Tuesday, Sep 24, 2024 by Pulumi

hcloud.getImages

Explore with Pulumi AI

hcloud logo
Hetzner Cloud v1.20.4 published on Tuesday, Sep 24, 2024 by Pulumi

    Provides details about multiple Hetzner Cloud Images.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hcloud from "@pulumi/hcloud";
    
    const image2 = hcloud.getImages({
        withArchitectures: ["x86"],
    });
    const image3 = hcloud.getImages({
        withSelector: "key=value",
    });
    
    import pulumi
    import pulumi_hcloud as hcloud
    
    image2 = hcloud.get_images(with_architectures=["x86"])
    image3 = hcloud.get_images(with_selector="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, &hcloud.GetImagesArgs{
    			WithArchitectures: []string{
    				"x86",
    			},
    		}, 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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using HCloud = Pulumi.HCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var image2 = HCloud.GetImages.Invoke(new()
        {
            WithArchitectures = new[]
            {
                "x86",
            },
        });
    
        var image3 = HCloud.GetImages.Invoke(new()
        {
            WithSelector = "key=value",
        });
    
    });
    
    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(GetImagesArgs.builder()
                .withArchitectures("x86")
                .build());
    
            final var image3 = HcloudFunctions.getImages(GetImagesArgs.builder()
                .withSelector("key=value")
                .build());
    
        }
    }
    
    variables:
      image2:
        fn::invoke:
          Function: hcloud:getImages
          Arguments:
            withArchitectures:
              - x86
      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(include_deprecated: Optional[bool] = None,
                   most_recent: Optional[bool] = None,
                   with_architectures: Optional[Sequence[str]] = None,
                   with_selector: Optional[str] = None,
                   with_statuses: Optional[Sequence[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> GetImagesResult
    def get_images_output(include_deprecated: Optional[pulumi.Input[bool]] = None,
                   most_recent: Optional[pulumi.Input[bool]] = None,
                   with_architectures: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = 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:

    IncludeDeprecated bool
    Also list images that are marked as deprecated.
    MostRecent bool
    Sorts list by date.
    WithArchitectures List<string>
    List only images with this architecture, could contain x86 or arm.
    WithSelector string
    Label selector
    WithStatuses List<string>
    List only images with the specified status, could contain creating or available.
    IncludeDeprecated bool
    Also list images that are marked as deprecated.
    MostRecent bool
    Sorts list by date.
    WithArchitectures []string
    List only images with this architecture, could contain x86 or arm.
    WithSelector string
    Label selector
    WithStatuses []string
    List only images with the specified status, could contain creating or available.
    includeDeprecated Boolean
    Also list images that are marked as deprecated.
    mostRecent Boolean
    Sorts list by date.
    withArchitectures List<String>
    List only images with this architecture, could contain x86 or arm.
    withSelector String
    Label selector
    withStatuses List<String>
    List only images with the specified status, could contain creating or available.
    includeDeprecated boolean
    Also list images that are marked as deprecated.
    mostRecent boolean
    Sorts list by date.
    withArchitectures string[]
    List only images with this architecture, could contain x86 or arm.
    withSelector string
    Label selector
    withStatuses string[]
    List only images with the specified status, could contain creating or available.
    include_deprecated bool
    Also list images that are marked as deprecated.
    most_recent bool
    Sorts list by date.
    with_architectures Sequence[str]
    List only images with this architecture, could contain x86 or arm.
    with_selector str
    Label selector
    with_statuses Sequence[str]
    List only images with the specified status, could contain creating or available.
    includeDeprecated Boolean
    Also list images that are marked as deprecated.
    mostRecent Boolean
    Sorts list by date.
    withArchitectures List<String>
    List only images with this architecture, could contain x86 or arm.
    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.
    IncludeDeprecated bool
    MostRecent bool
    WithArchitectures List<string>
    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.
    IncludeDeprecated bool
    MostRecent bool
    WithArchitectures []string
    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.
    includeDeprecated Boolean
    mostRecent Boolean
    withArchitectures List<String>
    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.
    includeDeprecated boolean
    mostRecent boolean
    withArchitectures string[]
    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.
    include_deprecated bool
    most_recent bool
    with_architectures Sequence[str]
    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.
    includeDeprecated Boolean
    mostRecent Boolean
    withArchitectures List<String>
    withSelector String
    withStatuses List<String>

    Supporting Types

    GetImagesImage

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

    Deprecated: Please use the with_selector property instead.

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

    Deprecated: Please use the with_selector property instead.

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

    Deprecated: Please use the with_selector property instead.

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

    Deprecated: Please use the with_selector property instead.

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

    Deprecated: Please use the with_selector property instead.

    architecture String
    created String
    deprecated String
    description String
    id Number
    labels Map<String>
    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.
    hcloud logo
    Hetzner Cloud v1.20.4 published on Tuesday, Sep 24, 2024 by Pulumi