1. Packages
  2. AWS
  3. API Docs
  4. imagebuilder
  5. getImage
AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi

aws.imagebuilder.getImage

Explore with Pulumi AI

AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi

Provides details about an Image Builder Image.

Example Usage

Latest

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

const example = aws.imagebuilder.getImage({
    arn: "arn:aws:imagebuilder:us-west-2:aws:image/amazon-linux-2-x86/x.x.x",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.imagebuilder.get_image(arn="arn:aws:imagebuilder:us-west-2:aws:image/amazon-linux-2-x86/x.x.x")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := imagebuilder.LookupImage(ctx, &imagebuilder.LookupImageArgs{
			Arn: "arn:aws:imagebuilder:us-west-2:aws:image/amazon-linux-2-x86/x.x.x",
		}, 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.ImageBuilder.GetImage.Invoke(new()
    {
        Arn = "arn:aws:imagebuilder:us-west-2:aws:image/amazon-linux-2-x86/x.x.x",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.imagebuilder.ImagebuilderFunctions;
import com.pulumi.aws.imagebuilder.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 = ImagebuilderFunctions.getImage(GetImageArgs.builder()
            .arn("arn:aws:imagebuilder:us-west-2:aws:image/amazon-linux-2-x86/x.x.x")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:imagebuilder:getImage
      arguments:
        arn: arn:aws:imagebuilder:us-west-2:aws:image/amazon-linux-2-x86/x.x.x
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(arn: Optional[str] = None,
              tags: Optional[Mapping[str, str]] = None,
              opts: Optional[InvokeOptions] = None) -> GetImageResult
def get_image_output(arn: Optional[pulumi.Input[str]] = None,
              tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetImageResult]
Copy
func LookupImage(ctx *Context, args *LookupImageArgs, opts ...InvokeOption) (*LookupImageResult, error)
func LookupImageOutput(ctx *Context, args *LookupImageOutputArgs, opts ...InvokeOption) LookupImageResultOutput
Copy

> Note: This function is named LookupImage 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:imagebuilder/getImage:getImage
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Arn This property is required. string
ARN of the image. The suffix can either be specified with wildcards (x.x.x) to fetch the latest build version or a full build version (e.g., 2020.11.26/1) to fetch an exact version.
Tags Dictionary<string, string>
Key-value map of resource tags for the image.
Arn This property is required. string
ARN of the image. The suffix can either be specified with wildcards (x.x.x) to fetch the latest build version or a full build version (e.g., 2020.11.26/1) to fetch an exact version.
Tags map[string]string
Key-value map of resource tags for the image.
arn This property is required. String
ARN of the image. The suffix can either be specified with wildcards (x.x.x) to fetch the latest build version or a full build version (e.g., 2020.11.26/1) to fetch an exact version.
tags Map<String,String>
Key-value map of resource tags for the image.
arn This property is required. string
ARN of the image. The suffix can either be specified with wildcards (x.x.x) to fetch the latest build version or a full build version (e.g., 2020.11.26/1) to fetch an exact version.
tags {[key: string]: string}
Key-value map of resource tags for the image.
arn This property is required. str
ARN of the image. The suffix can either be specified with wildcards (x.x.x) to fetch the latest build version or a full build version (e.g., 2020.11.26/1) to fetch an exact version.
tags Mapping[str, str]
Key-value map of resource tags for the image.
arn This property is required. String
ARN of the image. The suffix can either be specified with wildcards (x.x.x) to fetch the latest build version or a full build version (e.g., 2020.11.26/1) to fetch an exact version.
tags Map<String>
Key-value map of resource tags for the image.

getImage Result

The following output properties are available:

Arn string
BuildVersionArn string
Build version ARN of the image. This will always have the #.#.#/# suffix.
ContainerRecipeArn string
ARN of the container recipe.
DateCreated string
Date the image was created.
DistributionConfigurationArn string
ARN of the Image Builder Distribution Configuration.
EnhancedImageMetadataEnabled bool
Whether additional information about the image being created is collected.
Id string
The provider-assigned unique ID for this managed resource.
ImageRecipeArn string
ARN of the image recipe.
ImageScanningConfigurations List<GetImageImageScanningConfiguration>
List of an object with image scanning configuration fields.
ImageTestsConfigurations List<GetImageImageTestsConfiguration>
List of an object with image tests configuration.
InfrastructureConfigurationArn string
ARN of the Image Builder Infrastructure Configuration.
Name string
Name of the AMI.
OsVersion string
Operating System version of the image.
OutputResources List<GetImageOutputResource>
List of objects with resources created by the image.
Platform string
Platform of the image.
Tags Dictionary<string, string>
Key-value map of resource tags for the image.
Version string
Version of the image.
Arn string
BuildVersionArn string
Build version ARN of the image. This will always have the #.#.#/# suffix.
ContainerRecipeArn string
ARN of the container recipe.
DateCreated string
Date the image was created.
DistributionConfigurationArn string
ARN of the Image Builder Distribution Configuration.
EnhancedImageMetadataEnabled bool
Whether additional information about the image being created is collected.
Id string
The provider-assigned unique ID for this managed resource.
ImageRecipeArn string
ARN of the image recipe.
ImageScanningConfigurations []GetImageImageScanningConfiguration
List of an object with image scanning configuration fields.
ImageTestsConfigurations []GetImageImageTestsConfiguration
List of an object with image tests configuration.
InfrastructureConfigurationArn string
ARN of the Image Builder Infrastructure Configuration.
Name string
Name of the AMI.
OsVersion string
Operating System version of the image.
OutputResources []GetImageOutputResource
List of objects with resources created by the image.
Platform string
Platform of the image.
Tags map[string]string
Key-value map of resource tags for the image.
Version string
Version of the image.
arn String
buildVersionArn String
Build version ARN of the image. This will always have the #.#.#/# suffix.
containerRecipeArn String
ARN of the container recipe.
dateCreated String
Date the image was created.
distributionConfigurationArn String
ARN of the Image Builder Distribution Configuration.
enhancedImageMetadataEnabled Boolean
Whether additional information about the image being created is collected.
id String
The provider-assigned unique ID for this managed resource.
imageRecipeArn String
ARN of the image recipe.
imageScanningConfigurations List<GetImageImageScanningConfiguration>
List of an object with image scanning configuration fields.
imageTestsConfigurations List<GetImageImageTestsConfiguration>
List of an object with image tests configuration.
infrastructureConfigurationArn String
ARN of the Image Builder Infrastructure Configuration.
name String
Name of the AMI.
osVersion String
Operating System version of the image.
outputResources List<GetImageOutputResource>
List of objects with resources created by the image.
platform String
Platform of the image.
tags Map<String,String>
Key-value map of resource tags for the image.
version String
Version of the image.
arn string
buildVersionArn string
Build version ARN of the image. This will always have the #.#.#/# suffix.
containerRecipeArn string
ARN of the container recipe.
dateCreated string
Date the image was created.
distributionConfigurationArn string
ARN of the Image Builder Distribution Configuration.
enhancedImageMetadataEnabled boolean
Whether additional information about the image being created is collected.
id string
The provider-assigned unique ID for this managed resource.
imageRecipeArn string
ARN of the image recipe.
imageScanningConfigurations GetImageImageScanningConfiguration[]
List of an object with image scanning configuration fields.
imageTestsConfigurations GetImageImageTestsConfiguration[]
List of an object with image tests configuration.
infrastructureConfigurationArn string
ARN of the Image Builder Infrastructure Configuration.
name string
Name of the AMI.
osVersion string
Operating System version of the image.
outputResources GetImageOutputResource[]
List of objects with resources created by the image.
platform string
Platform of the image.
tags {[key: string]: string}
Key-value map of resource tags for the image.
version string
Version of the image.
arn str
build_version_arn str
Build version ARN of the image. This will always have the #.#.#/# suffix.
container_recipe_arn str
ARN of the container recipe.
date_created str
Date the image was created.
distribution_configuration_arn str
ARN of the Image Builder Distribution Configuration.
enhanced_image_metadata_enabled bool
Whether additional information about the image being created is collected.
id str
The provider-assigned unique ID for this managed resource.
image_recipe_arn str
ARN of the image recipe.
image_scanning_configurations Sequence[GetImageImageScanningConfiguration]
List of an object with image scanning configuration fields.
image_tests_configurations Sequence[GetImageImageTestsConfiguration]
List of an object with image tests configuration.
infrastructure_configuration_arn str
ARN of the Image Builder Infrastructure Configuration.
name str
Name of the AMI.
os_version str
Operating System version of the image.
output_resources Sequence[GetImageOutputResource]
List of objects with resources created by the image.
platform str
Platform of the image.
tags Mapping[str, str]
Key-value map of resource tags for the image.
version str
Version of the image.
arn String
buildVersionArn String
Build version ARN of the image. This will always have the #.#.#/# suffix.
containerRecipeArn String
ARN of the container recipe.
dateCreated String
Date the image was created.
distributionConfigurationArn String
ARN of the Image Builder Distribution Configuration.
enhancedImageMetadataEnabled Boolean
Whether additional information about the image being created is collected.
id String
The provider-assigned unique ID for this managed resource.
imageRecipeArn String
ARN of the image recipe.
imageScanningConfigurations List<Property Map>
List of an object with image scanning configuration fields.
imageTestsConfigurations List<Property Map>
List of an object with image tests configuration.
infrastructureConfigurationArn String
ARN of the Image Builder Infrastructure Configuration.
name String
Name of the AMI.
osVersion String
Operating System version of the image.
outputResources List<Property Map>
List of objects with resources created by the image.
platform String
Platform of the image.
tags Map<String>
Key-value map of resource tags for the image.
version String
Version of the image.

Supporting Types

GetImageImageScanningConfiguration

EcrConfigurations This property is required. List<GetImageImageScanningConfigurationEcrConfiguration>
Configuration block with ECR configuration.
ImageScanningEnabled This property is required. bool
Indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.
EcrConfigurations This property is required. []GetImageImageScanningConfigurationEcrConfiguration
Configuration block with ECR configuration.
ImageScanningEnabled This property is required. bool
Indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.
ecrConfigurations This property is required. List<GetImageImageScanningConfigurationEcrConfiguration>
Configuration block with ECR configuration.
imageScanningEnabled This property is required. Boolean
Indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.
ecrConfigurations This property is required. GetImageImageScanningConfigurationEcrConfiguration[]
Configuration block with ECR configuration.
imageScanningEnabled This property is required. boolean
Indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.
ecr_configurations This property is required. Sequence[GetImageImageScanningConfigurationEcrConfiguration]
Configuration block with ECR configuration.
image_scanning_enabled This property is required. bool
Indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.
ecrConfigurations This property is required. List<Property Map>
Configuration block with ECR configuration.
imageScanningEnabled This property is required. Boolean
Indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.

GetImageImageScanningConfigurationEcrConfiguration

ContainerTags This property is required. List<string>
Set of tags for Image Builder to apply to the output container image that that Amazon Inspector scans.
RepositoryName This property is required. string
The name of the container repository that Amazon Inspector scans to identify findings for your container images.
ContainerTags This property is required. []string
Set of tags for Image Builder to apply to the output container image that that Amazon Inspector scans.
RepositoryName This property is required. string
The name of the container repository that Amazon Inspector scans to identify findings for your container images.
containerTags This property is required. List<String>
Set of tags for Image Builder to apply to the output container image that that Amazon Inspector scans.
repositoryName This property is required. String
The name of the container repository that Amazon Inspector scans to identify findings for your container images.
containerTags This property is required. string[]
Set of tags for Image Builder to apply to the output container image that that Amazon Inspector scans.
repositoryName This property is required. string
The name of the container repository that Amazon Inspector scans to identify findings for your container images.
container_tags This property is required. Sequence[str]
Set of tags for Image Builder to apply to the output container image that that Amazon Inspector scans.
repository_name This property is required. str
The name of the container repository that Amazon Inspector scans to identify findings for your container images.
containerTags This property is required. List<String>
Set of tags for Image Builder to apply to the output container image that that Amazon Inspector scans.
repositoryName This property is required. String
The name of the container repository that Amazon Inspector scans to identify findings for your container images.

GetImageImageTestsConfiguration

ImageTestsEnabled This property is required. bool
Whether image tests are enabled.
TimeoutMinutes This property is required. int
Number of minutes before image tests time out.
ImageTestsEnabled This property is required. bool
Whether image tests are enabled.
TimeoutMinutes This property is required. int
Number of minutes before image tests time out.
imageTestsEnabled This property is required. Boolean
Whether image tests are enabled.
timeoutMinutes This property is required. Integer
Number of minutes before image tests time out.
imageTestsEnabled This property is required. boolean
Whether image tests are enabled.
timeoutMinutes This property is required. number
Number of minutes before image tests time out.
image_tests_enabled This property is required. bool
Whether image tests are enabled.
timeout_minutes This property is required. int
Number of minutes before image tests time out.
imageTestsEnabled This property is required. Boolean
Whether image tests are enabled.
timeoutMinutes This property is required. Number
Number of minutes before image tests time out.

GetImageOutputResource

Amis This property is required. List<GetImageOutputResourceAmi>
Set of objects with each Amazon Machine Image (AMI) created.
Containers This property is required. List<GetImageOutputResourceContainer>
Set of objects with each container image created and stored in the output repository.
Amis This property is required. []GetImageOutputResourceAmi
Set of objects with each Amazon Machine Image (AMI) created.
Containers This property is required. []GetImageOutputResourceContainer
Set of objects with each container image created and stored in the output repository.
amis This property is required. List<GetImageOutputResourceAmi>
Set of objects with each Amazon Machine Image (AMI) created.
containers This property is required. List<GetImageOutputResourceContainer>
Set of objects with each container image created and stored in the output repository.
amis This property is required. GetImageOutputResourceAmi[]
Set of objects with each Amazon Machine Image (AMI) created.
containers This property is required. GetImageOutputResourceContainer[]
Set of objects with each container image created and stored in the output repository.
amis This property is required. Sequence[GetImageOutputResourceAmi]
Set of objects with each Amazon Machine Image (AMI) created.
containers This property is required. Sequence[GetImageOutputResourceContainer]
Set of objects with each container image created and stored in the output repository.
amis This property is required. List<Property Map>
Set of objects with each Amazon Machine Image (AMI) created.
containers This property is required. List<Property Map>
Set of objects with each container image created and stored in the output repository.

GetImageOutputResourceAmi

AccountId This property is required. string
Account identifier of the AMI.
Description This property is required. string
Description of the AMI.
Image This property is required. string
Identifier of the AMI.
Name This property is required. string
Name of the AMI.
Region This property is required. string
Region of the container image.
AccountId This property is required. string
Account identifier of the AMI.
Description This property is required. string
Description of the AMI.
Image This property is required. string
Identifier of the AMI.
Name This property is required. string
Name of the AMI.
Region This property is required. string
Region of the container image.
accountId This property is required. String
Account identifier of the AMI.
description This property is required. String
Description of the AMI.
image This property is required. String
Identifier of the AMI.
name This property is required. String
Name of the AMI.
region This property is required. String
Region of the container image.
accountId This property is required. string
Account identifier of the AMI.
description This property is required. string
Description of the AMI.
image This property is required. string
Identifier of the AMI.
name This property is required. string
Name of the AMI.
region This property is required. string
Region of the container image.
account_id This property is required. str
Account identifier of the AMI.
description This property is required. str
Description of the AMI.
image This property is required. str
Identifier of the AMI.
name This property is required. str
Name of the AMI.
region This property is required. str
Region of the container image.
accountId This property is required. String
Account identifier of the AMI.
description This property is required. String
Description of the AMI.
image This property is required. String
Identifier of the AMI.
name This property is required. String
Name of the AMI.
region This property is required. String
Region of the container image.

GetImageOutputResourceContainer

ImageUris This property is required. List<string>
Set of URIs for created containers.
Region This property is required. string
Region of the container image.
ImageUris This property is required. []string
Set of URIs for created containers.
Region This property is required. string
Region of the container image.
imageUris This property is required. List<String>
Set of URIs for created containers.
region This property is required. String
Region of the container image.
imageUris This property is required. string[]
Set of URIs for created containers.
region This property is required. string
Region of the container image.
image_uris This property is required. Sequence[str]
Set of URIs for created containers.
region This property is required. str
Region of the container image.
imageUris This property is required. List<String>
Set of URIs for created containers.
region This property is required. String
Region of the container 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.73.0 published on Wednesday, Mar 19, 2025 by Pulumi