1. Packages
  2. AWS
  3. API Docs
  4. workspaces
  5. getImage
AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

aws.workspaces.getImage

Explore with Pulumi AI

AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

Use this data source to get information about a Workspaces image.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.workspaces.getImage({
    imageId: "wsi-ten5h0y19",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.workspaces.get_image(image_id="wsi-ten5h0y19")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/workspaces"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := workspaces.GetImage(ctx, &workspaces.GetImageArgs{
			ImageId: "wsi-ten5h0y19",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.Workspaces.GetImage.Invoke(new()
    {
        ImageId = "wsi-ten5h0y19",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.workspaces.WorkspacesFunctions;
import com.pulumi.aws.workspaces.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 example = WorkspacesFunctions.getImage(GetImageArgs.builder()
            .imageId("wsi-ten5h0y19")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:workspaces:getImage
      arguments:
        imageId: wsi-ten5h0y19
Copy

Using getImage

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 getImage(args: GetImageArgs, opts?: InvokeOptions): Promise<GetImageResult>
function getImageOutput(args: GetImageOutputArgs, opts?: InvokeOptions): Output<GetImageResult>
Copy
def get_image(image_id: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetImageResult
def get_image_output(image_id: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetImageResult]
Copy
func GetImage(ctx *Context, args *GetImageArgs, opts ...InvokeOption) (*GetImageResult, error)
func GetImageOutput(ctx *Context, args *GetImageOutputArgs, opts ...InvokeOption) GetImageResultOutput
Copy

> Note: This function is named GetImage in the Go SDK.

public static class GetImage 
{
    public static Task<GetImageResult> InvokeAsync(GetImageArgs args, InvokeOptions? opts = null)
    public static Output<GetImageResult> Invoke(GetImageInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetImageResult> getImage(GetImageArgs args, InvokeOptions options)
public static Output<GetImageResult> getImage(GetImageArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:workspaces/getImage:getImage
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ImageId This property is required. string
ID of the image.
ImageId This property is required. string
ID of the image.
imageId This property is required. String
ID of the image.
imageId This property is required. string
ID of the image.
image_id This property is required. str
ID of the image.
imageId This property is required. String
ID of the image.

getImage Result

The following output properties are available:

Description string
The description of the image.
Id string
The provider-assigned unique ID for this managed resource.
ImageId string
Name string
The name of the image.
OperatingSystemType string
RequiredTenancy string
Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this value is set to DEDICATED. For more information, see Bring Your Own Windows Desktop Images.
State string
The status of the image.
Description string
The description of the image.
Id string
The provider-assigned unique ID for this managed resource.
ImageId string
Name string
The name of the image.
OperatingSystemType string
RequiredTenancy string
Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this value is set to DEDICATED. For more information, see Bring Your Own Windows Desktop Images.
State string
The status of the image.
description String
The description of the image.
id String
The provider-assigned unique ID for this managed resource.
imageId String
name String
The name of the image.
operatingSystemType String
requiredTenancy String
Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this value is set to DEDICATED. For more information, see Bring Your Own Windows Desktop Images.
state String
The status of the image.
description string
The description of the image.
id string
The provider-assigned unique ID for this managed resource.
imageId string
name string
The name of the image.
operatingSystemType string
requiredTenancy string
Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this value is set to DEDICATED. For more information, see Bring Your Own Windows Desktop Images.
state string
The status of the image.
description str
The description of the image.
id str
The provider-assigned unique ID for this managed resource.
image_id str
name str
The name of the image.
operating_system_type str
required_tenancy str
Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this value is set to DEDICATED. For more information, see Bring Your Own Windows Desktop Images.
state str
The status of the image.
description String
The description of the image.
id String
The provider-assigned unique ID for this managed resource.
imageId String
name String
The name of the image.
operatingSystemType String
requiredTenancy String
Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this value is set to DEDICATED. For more information, see Bring Your Own Windows Desktop Images.
state String
The status of the image.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi