hcloud.getImages
Explore with Pulumi AI
Provides details about multiple Hetzner Cloud Images.
Example Usage
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 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
})
}
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());
}
}
import pulumi
import pulumi_hcloud as hcloud
image2 = hcloud.get_images(with_architectures=["x86"])
image3 = hcloud.get_images(with_selector="key=value")
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",
});
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:
- Include
Deprecated bool Also list images that are marked as deprecated.
- Most
Recent bool Sorts list by date.
- With
Architectures List<string> List only images with this architecture, could contain
x86
orarm
.- With
Selector string - With
Statuses List<string> List only images with the specified status, could contain
creating
oravailable
.
- Include
Deprecated bool Also list images that are marked as deprecated.
- Most
Recent bool Sorts list by date.
- With
Architectures []string List only images with this architecture, could contain
x86
orarm
.- With
Selector string - With
Statuses []string List only images with the specified status, could contain
creating
oravailable
.
- include
Deprecated Boolean Also list images that are marked as deprecated.
- most
Recent Boolean Sorts list by date.
- with
Architectures List<String> List only images with this architecture, could contain
x86
orarm
.- with
Selector String - with
Statuses List<String> List only images with the specified status, could contain
creating
oravailable
.
- include
Deprecated boolean Also list images that are marked as deprecated.
- most
Recent boolean Sorts list by date.
- with
Architectures string[] List only images with this architecture, could contain
x86
orarm
.- with
Selector string - with
Statuses string[] List only images with the specified status, could contain
creating
oravailable
.
- 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
orarm
.- with_
selector str - with_
statuses Sequence[str] List only images with the specified status, could contain
creating
oravailable
.
- include
Deprecated Boolean Also list images that are marked as deprecated.
- most
Recent Boolean Sorts list by date.
- with
Architectures List<String> List only images with this architecture, could contain
x86
orarm
.- with
Selector String - with
Statuses List<String> List only images with the specified status, could contain
creating
oravailable
.
getImages Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Images
List<Pulumi.
HCloud. Outputs. Get Images Image> (list) List of all matching images. See
data.hcloud_image
for schema.- Include
Deprecated bool - Most
Recent bool - With
Architectures List<string> - With
Selector string - With
Statuses List<string>
- Id string
The provider-assigned unique ID for this managed resource.
- Images
[]Get
Images Image (list) List of all matching images. See
data.hcloud_image
for schema.- Include
Deprecated bool - Most
Recent bool - With
Architectures []string - With
Selector string - With
Statuses []string
- id String
The provider-assigned unique ID for this managed resource.
- images
List<Get
Images Image> (list) List of all matching images. See
data.hcloud_image
for schema.- include
Deprecated Boolean - most
Recent Boolean - with
Architectures List<String> - with
Selector String - with
Statuses List<String>
- id string
The provider-assigned unique ID for this managed resource.
- images
Get
Images Image[] (list) List of all matching images. See
data.hcloud_image
for schema.- include
Deprecated boolean - most
Recent boolean - with
Architectures string[] - with
Selector string - with
Statuses string[]
- id str
The provider-assigned unique ID for this managed resource.
- images
Sequence[Get
Images Image] (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.- include
Deprecated Boolean - most
Recent Boolean - with
Architectures List<String> - with
Selector String - with
Statuses List<String>
Supporting Types
GetImagesImage
- Architecture string
- Created string
- Deprecated string
- Description string
- Id int
- Labels Dictionary<string, object>
- Name string
- Os
Flavor string - Os
Version string - Rapid
Deploy bool - Type string
- Selector string
Please use the with_selector property instead.
- Architecture string
- Created string
- Deprecated string
- Description string
- Id int
- Labels map[string]interface{}
- Name string
- Os
Flavor string - Os
Version string - Rapid
Deploy bool - Type string
- Selector string
Please use the with_selector property instead.
- architecture String
- created String
- deprecated String
- description String
- id Integer
- labels Map<String,Object>
- name String
- os
Flavor String - os
Version String - rapid
Deploy Boolean - type String
- selector String
Please use the with_selector property instead.
- architecture string
- created string
- deprecated string
- description string
- id number
- labels {[key: string]: any}
- name string
- os
Flavor string - os
Version string - rapid
Deploy boolean - type string
- selector string
Please use the with_selector property instead.
- architecture str
- 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
Please use the with_selector property instead.
- architecture String
- created String
- deprecated String
- description String
- id Number
- labels Map<Any>
- name String
- os
Flavor String - os
Version String - rapid
Deploy Boolean - type String
- selector String
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.