GetImage

The ECR Image data source allows the details of an image with a particular tag or digest to be retrieved.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var serviceImage = Output.Create(Aws.Ecr.GetImage.InvokeAsync(new Aws.Ecr.GetImageArgs
        {
            ImageTag = "latest",
            RepositoryName = "my/service",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ecr"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "latest"
        _, err := ecr.GetImage(ctx, &ecr.GetImageArgs{
            ImageTag:       &opt0,
            RepositoryName: "my/service",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

service_image = aws.ecr.get_image(image_tag="latest",
    repository_name="my/service")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const serviceImage = pulumi.output(aws.ecr.getImage({
    imageTag: "latest",
    repositoryName: "my/service",
}, { async: true }));

Using GetImage

function getImage(args: GetImageArgs, opts?: InvokeOptions): Promise<GetImageResult>
function  get_image(image_digest=None, image_tag=None, registry_id=None, repository_name=None, opts=None)
func GetImage(ctx *Context, args *GetImageArgs, opts ...InvokeOption) (*GetImageResult, error)
public static class GetImage {
    public static Task<GetImageResult> InvokeAsync(GetImageArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

RepositoryName string

The name of the ECR Repository.

ImageDigest string

The sha256 digest of the image manifest. At least one of image_digest or image_tag must be specified.

ImageTag string

The tag associated with this image. At least one of image_digest or image_tag must be specified.

RegistryId string

The ID of the Registry where the repository resides.

RepositoryName string

The name of the ECR Repository.

ImageDigest string

The sha256 digest of the image manifest. At least one of image_digest or image_tag must be specified.

ImageTag string

The tag associated with this image. At least one of image_digest or image_tag must be specified.

RegistryId string

The ID of the Registry where the repository resides.

repositoryName string

The name of the ECR Repository.

imageDigest string

The sha256 digest of the image manifest. At least one of image_digest or image_tag must be specified.

imageTag string

The tag associated with this image. At least one of image_digest or image_tag must be specified.

registryId string

The ID of the Registry where the repository resides.

repository_name str

The name of the ECR Repository.

image_digest str

The sha256 digest of the image manifest. At least one of image_digest or image_tag must be specified.

image_tag str

The tag associated with this image. At least one of image_digest or image_tag must be specified.

registry_id str

The ID of the Registry where the repository resides.

GetImage Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

ImageDigest string
ImagePushedAt int

The date and time, expressed as a unix timestamp, at which the current image was pushed to the repository.

ImageSizeInBytes int

The size, in bytes, of the image in the repository.

ImageTags List<string>

The list of tags associated with this image.

RegistryId string
RepositoryName string
ImageTag string
Id string

The provider-assigned unique ID for this managed resource.

ImageDigest string
ImagePushedAt int

The date and time, expressed as a unix timestamp, at which the current image was pushed to the repository.

ImageSizeInBytes int

The size, in bytes, of the image in the repository.

ImageTags []string

The list of tags associated with this image.

RegistryId string
RepositoryName string
ImageTag string
id string

The provider-assigned unique ID for this managed resource.

imageDigest string
imagePushedAt number

The date and time, expressed as a unix timestamp, at which the current image was pushed to the repository.

imageSizeInBytes number

The size, in bytes, of the image in the repository.

imageTags string[]

The list of tags associated with this image.

registryId string
repositoryName string
imageTag string
id str

The provider-assigned unique ID for this managed resource.

image_digest str
image_pushed_at float

The date and time, expressed as a unix timestamp, at which the current image was pushed to the repository.

image_size_in_bytes float

The size, in bytes, of the image in the repository.

image_tags List[str]

The list of tags associated with this image.

registry_id str
repository_name str
image_tag str

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.