getImage

suspend fun getImage(argument: GetImagePlainArgs): GetImageResult

Data source for managing an AWS AppStream 2.0 Image.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.appstream.getImage({
name: "AppStream-WinServer2019-06-17-2024",
type: "PUBLIC",
mostRecent: true,
});
import pulumi
import pulumi_aws as aws
test = aws.appstream.get_image(name="AppStream-WinServer2019-06-17-2024",
type="PUBLIC",
most_recent=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = Aws.AppStream.GetImage.Invoke(new()
{
Name = "AppStream-WinServer2019-06-17-2024",
Type = "PUBLIC",
MostRecent = true,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appstream"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appstream.GetImage(ctx, &appstream.GetImageArgs{
Name: pulumi.StringRef("AppStream-WinServer2019-06-17-2024"),
Type: pulumi.StringRef("PUBLIC"),
MostRecent: pulumi.BoolRef(true),
}, 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.aws.appstream.AppstreamFunctions;
import com.pulumi.aws.appstream.inputs.GetImageArgs;
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 test = AppstreamFunctions.getImage(GetImageArgs.builder()
.name("AppStream-WinServer2019-06-17-2024")
.type("PUBLIC")
.mostRecent(true)
.build());
}
}
variables:
test:
fn::invoke:
function: aws:appstream:getImage
arguments:
name: AppStream-WinServer2019-06-17-2024
type: PUBLIC
mostRecent: true

Return

A collection of values returned by getImage.

Parameters

argument

A collection of arguments for invoking getImage.


suspend fun getImage(arn: String? = null, mostRecent: Boolean? = null, name: String? = null, nameRegex: String? = null, type: String? = null): GetImageResult

Return

A collection of values returned by getImage.

Parameters

arn

Arn of the image being searched for. Cannot be used with name_regex or name.

mostRecent

Boolean that if it is set to true and there are multiple images returned the most recent will be returned. If it is set to false and there are multiple images return the datasource will error.

name

Name of the image being searched for. Cannot be used with name_regex or arn.

nameRegex

Regular expression name of the image being searched for. Cannot be used with arn or name.

type

The type of image which must be (PUBLIC, PRIVATE, or SHARED).

See also


suspend fun getImage(argument: suspend GetImagePlainArgsBuilder.() -> Unit): GetImageResult

Return

A collection of values returned by getImage.

Parameters

argument

Builder for com.pulumi.aws.appstream.kotlin.inputs.GetImagePlainArgs.

See also