The ECR Public Images data source allows the list of images in a specified public repository to be retrieved.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
const example = aws.ecrpublic.getImages({
repositoryName: "my-public-repository",
});
export const imageDigests = example.then(example => .filter(img => img.digest != null).map(img => (img.digest)));
export const imageTags = example.then(example => std.flatten({
input: .map(img => (img.tags)),
})).then(invoke => std.distinct({
input: invoke.result,
})).then(invoke => invoke.result);
import pulumi
import pulumi_aws as aws
import pulumi_std as std
example = aws.ecrpublic.get_images(repository_name="my-public-repository")
pulumi.export("imageDigests", [img.digest for img in example.images if img.digest != None])
pulumi.export("imageTags", std.distinct(input=std.flatten(input=[img.tags for img in example.images]).result).result)
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var example = Aws.EcrPublic.GetImages.Invoke(new()
{
RepositoryName = "my-public-repository",
});
return new Dictionary<string, object?>
{
["imageDigests"] = .Where(img => img.Digest != null).Select(img =>
{
return img.Digest;
}).ToList(),
["imageTags"] = Std.Flatten.Invoke(new()
{
Input = .Select(img =>
{
return img.Tags;
}).ToList(),
}).Apply(invoke => Std.Distinct.Invoke(new()
{
Input = invoke.Result,
})).Apply(invoke => invoke.Result),
};
});
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(image_ids: Optional[Sequence[GetImagesImageId]] = None,
region: Optional[str] = None,
registry_id: Optional[str] = None,
repository_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetImagesResult
def get_images_output(image_ids: Optional[pulumi.Input[Sequence[pulumi.Input[GetImagesImageIdArgs]]]] = None,
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:ecrpublic/getImages:getImages
arguments:
# arguments dictionaryThe following arguments are supported:
- Repository
Name string - Name of the public repository.
- Image
Ids List<GetImages Image Id> - One or more image ID filters. Each image ID can use either a tag or digest (or both). Each object has the following attributes:
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Registry
Id string - AWS account ID associated with the public registry that contains the repository. If not specified, the default public registry is assumed.
- Repository
Name string - Name of the public repository.
- Image
Ids []GetImages Image Id - One or more image ID filters. Each image ID can use either a tag or digest (or both). Each object has the following attributes:
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Registry
Id string - AWS account ID associated with the public registry that contains the repository. If not specified, the default public registry is assumed.
- repository
Name String - Name of the public repository.
- image
Ids List<GetImages Image Id> - One or more image ID filters. Each image ID can use either a tag or digest (or both). Each object has the following attributes:
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- registry
Id String - AWS account ID associated with the public registry that contains the repository. If not specified, the default public registry is assumed.
- repository
Name string - Name of the public repository.
- image
Ids GetImages Image Id[] - One or more image ID filters. Each image ID can use either a tag or digest (or both). Each object has the following attributes:
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- registry
Id string - AWS account ID associated with the public registry that contains the repository. If not specified, the default public registry is assumed.
- repository_
name str - Name of the public repository.
- image_
ids Sequence[GetImages Image Id] - One or more image ID filters. Each image ID can use either a tag or digest (or both). Each object has the following attributes:
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- registry_
id str - AWS account ID associated with the public registry that contains the repository. If not specified, the default public registry is assumed.
- repository
Name String - Name of the public repository.
- image
Ids List<Property Map> - One or more image ID filters. Each image ID can use either a tag or digest (or both). Each object has the following attributes:
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- registry
Id String - AWS account ID associated with the public registry that contains the repository. If not specified, the default public registry is assumed.
getImages Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Images
List<Get
Images Image> - List of images returned. Each image contains:
- Region string
- Repository
Name string - Name of the repository.
- Image
Ids List<GetImages Image Id> - Registry
Id string - AWS account ID associated with the public registry.
- Id string
- The provider-assigned unique ID for this managed resource.
- Images
[]Get
Images Image - List of images returned. Each image contains:
- Region string
- Repository
Name string - Name of the repository.
- Image
Ids []GetImages Image Id - Registry
Id string - AWS account ID associated with the public registry.
- id String
- The provider-assigned unique ID for this managed resource.
- images
List<Get
Images Image> - List of images returned. Each image contains:
- region String
- repository
Name String - Name of the repository.
- image
Ids List<GetImages Image Id> - registry
Id String - AWS account ID associated with the public registry.
- id string
- The provider-assigned unique ID for this managed resource.
- images
Get
Images Image[] - List of images returned. Each image contains:
- region string
- repository
Name string - Name of the repository.
- image
Ids GetImages Image Id[] - registry
Id string - AWS account ID associated with the public registry.
- id str
- The provider-assigned unique ID for this managed resource.
- images
Sequence[Get
Images Image] - List of images returned. Each image contains:
- region str
- repository_
name str - Name of the repository.
- image_
ids Sequence[GetImages Image Id] - registry_
id str - AWS account ID associated with the public registry.
- id String
- The provider-assigned unique ID for this managed resource.
- images List<Property Map>
- List of images returned. Each image contains:
- region String
- repository
Name String - Name of the repository.
- image
Ids List<Property Map> - registry
Id String - AWS account ID associated with the public registry.
Supporting Types
GetImagesImage
- Artifact
Media stringType - Media type of the artifact.
- Image
Digest string - Digest of the image manifest.
- Image
Manifest stringMedia Type - Media type of the image manifest.
- Image
Pushed stringAt - Image
Size intIn Bytes - List<string>
- Registry
Id string - AWS account ID associated with the public registry that contains the repository. If not specified, the default public registry is assumed.
- Repository
Name string - Name of the public repository.
- Artifact
Media stringType - Media type of the artifact.
- Image
Digest string - Digest of the image manifest.
- Image
Manifest stringMedia Type - Media type of the image manifest.
- Image
Pushed stringAt - Image
Size intIn Bytes - []string
- Registry
Id string - AWS account ID associated with the public registry that contains the repository. If not specified, the default public registry is assumed.
- Repository
Name string - Name of the public repository.
- artifact
Media StringType - Media type of the artifact.
- image
Digest String - Digest of the image manifest.
- image
Manifest StringMedia Type - Media type of the image manifest.
- image
Pushed StringAt - image
Size IntegerIn Bytes - List<String>
- registry
Id String - AWS account ID associated with the public registry that contains the repository. If not specified, the default public registry is assumed.
- repository
Name String - Name of the public repository.
- artifact
Media stringType - Media type of the artifact.
- image
Digest string - Digest of the image manifest.
- image
Manifest stringMedia Type - Media type of the image manifest.
- image
Pushed stringAt - image
Size numberIn Bytes - string[]
- registry
Id string - AWS account ID associated with the public registry that contains the repository. If not specified, the default public registry is assumed.
- repository
Name string - Name of the public repository.
- artifact_
media_ strtype - Media type of the artifact.
- image_
digest str - Digest of the image manifest.
- image_
manifest_ strmedia_ type - Media type of the image manifest.
- image_
pushed_ strat - image_
size_ intin_ bytes - Sequence[str]
- registry_
id str - AWS account ID associated with the public registry that contains the repository. If not specified, the default public registry is assumed.
- repository_
name str - Name of the public repository.
- artifact
Media StringType - Media type of the artifact.
- image
Digest String - Digest of the image manifest.
- image
Manifest StringMedia Type - Media type of the image manifest.
- image
Pushed StringAt - image
Size NumberIn Bytes - List<String>
- registry
Id String - AWS account ID associated with the public registry that contains the repository. If not specified, the default public registry is assumed.
- repository
Name String - Name of the public repository.
GetImagesImageId
- Image
Digest string - Digest of the image manifest.
- Image
Tag string - Tag used for the image.
- Image
Digest string - Digest of the image manifest.
- Image
Tag string - Tag used for the image.
- image
Digest String - Digest of the image manifest.
- image
Tag String - Tag used for the image.
- image
Digest string - Digest of the image manifest.
- image
Tag string - Tag used for the image.
- image_
digest str - Digest of the image manifest.
- image_
tag str - Tag used for the image.
- image
Digest String - Digest of the image manifest.
- image
Tag String - Tag used for the image.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
