1. Packages
  2. AWS Classic
  3. API Docs
  4. imagebuilder
  5. getImage

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.imagebuilder.getImage

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 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",
    });
    
    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")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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>
    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]
    func LookupImage(ctx *Context, args *LookupImageArgs, opts ...InvokeOption) (*LookupImageResult, error)
    func LookupImageOutput(ctx *Context, args *LookupImageOutputArgs, opts ...InvokeOption) LookupImageResultOutput

    > 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)
    }
    public static CompletableFuture<GetImageResult> getImage(GetImageArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:imagebuilder/getImage:getImage
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Arn 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 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 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 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 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 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 List<GetImageImageScanningConfigurationEcrConfiguration>
    Configuration block with ECR configuration.
    ImageScanningEnabled 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 []GetImageImageScanningConfigurationEcrConfiguration
    Configuration block with ECR configuration.
    ImageScanningEnabled 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 List<GetImageImageScanningConfigurationEcrConfiguration>
    Configuration block with ECR configuration.
    imageScanningEnabled 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 GetImageImageScanningConfigurationEcrConfiguration[]
    Configuration block with ECR configuration.
    imageScanningEnabled 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 Sequence[GetImageImageScanningConfigurationEcrConfiguration]
    Configuration block with ECR configuration.
    image_scanning_enabled 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 List<Property Map>
    Configuration block with ECR configuration.
    imageScanningEnabled 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 List<string>
    Set of tags for Image Builder to apply to the output container image that that Amazon Inspector scans.
    RepositoryName string
    The name of the container repository that Amazon Inspector scans to identify findings for your container images.
    ContainerTags []string
    Set of tags for Image Builder to apply to the output container image that that Amazon Inspector scans.
    RepositoryName string
    The name of the container repository that Amazon Inspector scans to identify findings for your container images.
    containerTags List<String>
    Set of tags for Image Builder to apply to the output container image that that Amazon Inspector scans.
    repositoryName String
    The name of the container repository that Amazon Inspector scans to identify findings for your container images.
    containerTags string[]
    Set of tags for Image Builder to apply to the output container image that that Amazon Inspector scans.
    repositoryName string
    The name of the container repository that Amazon Inspector scans to identify findings for your container images.
    container_tags Sequence[str]
    Set of tags for Image Builder to apply to the output container image that that Amazon Inspector scans.
    repository_name str
    The name of the container repository that Amazon Inspector scans to identify findings for your container images.
    containerTags List<String>
    Set of tags for Image Builder to apply to the output container image that that Amazon Inspector scans.
    repositoryName String
    The name of the container repository that Amazon Inspector scans to identify findings for your container images.

    GetImageImageTestsConfiguration

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

    GetImageOutputResource

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

    GetImageOutputResourceAmi

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

    GetImageOutputResourceContainer

    ImageUris List<string>
    Set of URIs for created containers.
    Region string
    Region of the container image.
    ImageUris []string
    Set of URIs for created containers.
    Region string
    Region of the container image.
    imageUris List<String>
    Set of URIs for created containers.
    region String
    Region of the container image.
    imageUris string[]
    Set of URIs for created containers.
    region string
    Region of the container image.
    image_uris Sequence[str]
    Set of URIs for created containers.
    region str
    Region of the container image.
    imageUris List<String>
    Set of URIs for created containers.
    region 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 logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi