Hetzner Cloud v1.19.1 published on Friday, May 10, 2024 by Pulumi
hcloud.getImages
Explore with Pulumi AI
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:
- 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 - Label selector
- 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 - Label selector
- 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 - Label selector
- 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 - Label selector
- 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 - Label selector
- 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 - Label selector
- 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
- 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
- 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
- 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
- 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
- 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
Package Details
- Repository
- Hetzner Cloud pulumi/pulumi-hcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcloud
Terraform Provider.