Viewing docs for AWS v7.22.0
published on Wednesday, Mar 11, 2026 by Pulumi
published on Wednesday, Mar 11, 2026 by Pulumi
Viewing docs for AWS v7.22.0
published on Wednesday, Mar 11, 2026 by Pulumi
published on Wednesday, Mar 11, 2026 by Pulumi
The ECR Images data source allows the list of images in a specified repository to be retrieved.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ecr.getImages({
repositoryName: "my-repository",
});
export const imageDigests = example.then(example => .filter(img => img.imageDigest != null).map(img => (img.imageDigest)));
export const imageTags = example.then(example => .filter(img => img.imageTag != null).map(img => (img.imageTag)));
import pulumi
import pulumi_aws as aws
example = aws.ecr.get_images(repository_name="my-repository")
pulumi.export("imageDigests", [img.image_digest for img in example.image_ids if img.image_digest != None])
pulumi.export("imageTags", [img.image_tag for img in example.image_ids if img.image_tag != None])
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Ecr.GetImages.Invoke(new()
{
RepositoryName = "my-repository",
});
return new Dictionary<string, object?>
{
["imageDigests"] = .Where(img => img.ImageDigest != null).Select(img =>
{
return img.ImageDigest;
}).ToList(),
["imageTags"] = .Where(img => img.ImageTag != null).Select(img =>
{
return img.ImageTag;
}).ToList(),
};
});
Example coming soon!
Example coming soon!
Using getImages
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 getImages(args: GetImagesArgs, opts?: InvokeOptions): Promise<GetImagesResult>
function getImagesOutput(args: GetImagesOutputArgs, opts?: InvokeOptions): Output<GetImagesResult>def get_images(region: Optional[str] = None,
registry_id: Optional[str] = None,
repository_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetImagesResult
def get_images_output(region: Optional[pulumi.Input[str]] = None,
registry_id: Optional[pulumi.Input[str]] = None,
repository_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetImagesResult]func GetImages(ctx *Context, args *GetImagesArgs, opts ...InvokeOption) (*GetImagesResult, error)
func GetImagesOutput(ctx *Context, args *GetImagesOutputArgs, opts ...InvokeOption) GetImagesResultOutput> Note: This function is named GetImages in the Go SDK.
public static class GetImages
{
public static Task<GetImagesResult> InvokeAsync(GetImagesArgs args, InvokeOptions? opts = null)
public static Output<GetImagesResult> Invoke(GetImagesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetImagesResult> getImages(GetImagesArgs args, InvokeOptions options)
public static Output<GetImagesResult> getImages(GetImagesArgs args, InvokeOptions options)
fn::invoke:
function: aws:ecr/getImages:getImages
arguments:
# arguments dictionaryThe following arguments are supported:
- Repository
Name string - Name of the ECR Repository.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Registry
Id string - ID of the Registry where the repository resides.
- Repository
Name string - Name of the ECR Repository.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Registry
Id string - ID of the Registry where the repository resides.
- repository
Name String - Name of the ECR Repository.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- registry
Id String - ID of the Registry where the repository resides.
- repository
Name string - Name of the ECR Repository.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- registry
Id string - ID of the Registry where the repository resides.
- repository_
name str - Name of the ECR Repository.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- registry_
id str - ID of the Registry where the repository resides.
- repository
Name String - Name of the ECR Repository.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- registry
Id String - ID of the Registry where the repository resides.
getImages Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Ids List<GetImages Image Id> - List of image objects containing image digest and tags. Each object has the following attributes:
- Region string
- Repository
Name string - Registry
Id string
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Ids []GetImages Image Id - List of image objects containing image digest and tags. Each object has the following attributes:
- Region string
- Repository
Name string - Registry
Id string
- id String
- The provider-assigned unique ID for this managed resource.
- image
Ids List<GetImages Image Id> - List of image objects containing image digest and tags. Each object has the following attributes:
- region String
- repository
Name String - registry
Id String
- id string
- The provider-assigned unique ID for this managed resource.
- image
Ids GetImages Image Id[] - List of image objects containing image digest and tags. Each object has the following attributes:
- region string
- repository
Name string - registry
Id string
- id str
- The provider-assigned unique ID for this managed resource.
- image_
ids Sequence[GetImages Image Id] - List of image objects containing image digest and tags. Each object has the following attributes:
- region str
- repository_
name str - registry_
id str
- id String
- The provider-assigned unique ID for this managed resource.
- image
Ids List<Property Map> - List of image objects containing image digest and tags. Each object has the following attributes:
- region String
- repository
Name String - registry
Id String
Supporting Types
GetImagesImageId
- Image
Digest string - The sha256 digest of the image manifest.
- Image
Tag string - The tag associated with the image.
- Image
Digest string - The sha256 digest of the image manifest.
- Image
Tag string - The tag associated with the image.
- image
Digest String - The sha256 digest of the image manifest.
- image
Tag String - The tag associated with the image.
- image
Digest string - The sha256 digest of the image manifest.
- image
Tag string - The tag associated with the image.
- image_
digest str - The sha256 digest of the image manifest.
- image_
tag str - The tag associated with the image.
- image
Digest String - The sha256 digest of the image manifest.
- image
Tag String - The tag associated with the image.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
Viewing docs for AWS v7.22.0
published on Wednesday, Mar 11, 2026 by Pulumi
published on Wednesday, Mar 11, 2026 by Pulumi
