AWS.ECRPublic reference
BatchCheckLayerAvailability
Section titled “BatchCheckLayerAvailability”Source:
src/AWS/ECRPublic/BatchCheckLayerAvailability.ts
Runtime binding for ecr-public:BatchCheckLayerAvailability.
Checks whether image layers already exist in the bound
PublicRepository so a push can skip re-uploading them. Provide
the implementation with
Effect.provide(AWS.ECRPublic.BatchCheckLayerAvailabilityHttp).
BatchCheckLayerAvailability: Pushing Images
Section titled “BatchCheckLayerAvailability: Pushing Images”// initconst checkLayers = yield* AWS.ECRPublic.BatchCheckLayerAvailability(repository);
// runtimeconst result = yield* checkLayers({ layerDigests: ["sha256:abc..."] });const missing = (result.failures ?? []).map((f) => f.layerDigest);BatchDeleteImage
Section titled “BatchDeleteImage”Source:
src/AWS/ECRPublic/BatchDeleteImage.ts
Runtime binding for ecr-public:BatchDeleteImage.
Deletes images (by tag or digest) from the bound
PublicRepository. Per-image failures (e.g. ImageNotFound) are
reported in the response’s failures list, not as errors. Provide the
implementation with Effect.provide(AWS.ECRPublic.BatchDeleteImageHttp).
BatchDeleteImage: Deleting Images
Section titled “BatchDeleteImage: Deleting Images”// initconst batchDeleteImage = yield* AWS.ECRPublic.BatchDeleteImage(repository);
// runtimeconst result = yield* batchDeleteImage({ imageIds: [{ imageTag: "stale" }],});CompleteLayerUpload
Section titled “CompleteLayerUpload”Source:
src/AWS/ECRPublic/CompleteLayerUpload.ts
Runtime binding for ecr-public:CompleteLayerUpload.
Seals an in-flight layer upload in the bound PublicRepository,
validating the uploaded bytes against the provided sha256 digest.
Provide the implementation with
Effect.provide(AWS.ECRPublic.CompleteLayerUploadHttp).
CompleteLayerUpload: Pushing Images
Section titled “CompleteLayerUpload: Pushing Images”// initconst completeLayerUpload = yield* AWS.ECRPublic.CompleteLayerUpload(repository);
// runtimeconst { layerDigest } = yield* completeLayerUpload({ uploadId, layerDigests: [digest],});DescribeImages
Section titled “DescribeImages”Source:
src/AWS/ECRPublic/DescribeImages.ts
Runtime binding for ecr-public:DescribeImages.
Lists metadata (digest, tags, size, push time) for the images in the
bound PublicRepository. Provide the implementation with
Effect.provide(AWS.ECRPublic.DescribeImagesHttp).
DescribeImages: Reading Images
Section titled “DescribeImages: Reading Images”// initconst describeImages = yield* AWS.ECRPublic.DescribeImages(repository);
// runtimeconst result = yield* describeImages();const digests = (result.imageDetails ?? []).map((i) => i.imageDigest);DescribeImageTags
Section titled “DescribeImageTags”Source:
src/AWS/ECRPublic/DescribeImageTags.ts
Runtime binding for ecr-public:DescribeImageTags.
Lists the tag details (tag, digest, push time) for the images in the
bound PublicRepository. Provide the implementation with
Effect.provide(AWS.ECRPublic.DescribeImageTagsHttp).
DescribeImageTags: Reading Images
Section titled “DescribeImageTags: Reading Images”// initconst describeImageTags = yield* AWS.ECRPublic.DescribeImageTags(repository);
// runtimeconst result = yield* describeImageTags();const tags = (result.imageTagDetails ?? []).map((t) => t.imageTag);DescribeRegistries
Section titled “DescribeRegistries”Source:
src/AWS/ECRPublic/DescribeRegistries.ts
Runtime binding for ecr-public:DescribeRegistries.
Reads the account’s public registry details — most usefully the registry
aliases that form public pull URIs (public.ecr.aws/<alias>/<repo>).
Provide the implementation with
Effect.provide(AWS.ECRPublic.DescribeRegistriesHttp).
DescribeRegistries: Registry Access
Section titled “DescribeRegistries: Registry Access”// init — registry-level binding takes no resourceconst describeRegistries = yield* AWS.ECRPublic.DescribeRegistries();
// runtimeconst result = yield* describeRegistries();const alias = result.registries?.[0]?.aliases?.[0]?.name;GetAuthorizationToken
Section titled “GetAuthorizationToken”Source:
src/AWS/ECRPublic/GetAuthorizationToken.ts
Runtime binding for ecr-public:GetAuthorizationToken (plus the
sts:GetServiceBearerToken permission the API requires).
Retrieves a registry authorization token (valid for 12 hours) used to
authenticate docker push against public.ecr.aws. The token in the
response is Redacted — unwrap it with Redacted.value at the point of
use. Provide the implementation with
Effect.provide(AWS.ECRPublic.GetAuthorizationTokenHttp).
GetAuthorizationToken: Registry Access
Section titled “GetAuthorizationToken: Registry Access”// init — registry-level binding takes no resourceconst getAuthorizationToken = yield* AWS.ECRPublic.GetAuthorizationToken();
// runtimeconst result = yield* getAuthorizationToken();const token = result.authorizationData?.authorizationToken; // Redacted<string>GetRegistryCatalogData
Section titled “GetRegistryCatalogData”Source:
src/AWS/ECRPublic/GetRegistryCatalogData.ts
Runtime binding for ecr-public:GetRegistryCatalogData.
Reads the registry-level catalog metadata (the gallery display name).
Provide the implementation with
Effect.provide(AWS.ECRPublic.GetRegistryCatalogDataHttp).
GetRegistryCatalogData: Registry Access
Section titled “GetRegistryCatalogData: Registry Access”// init — registry-level binding takes no resourceconst getRegistryCatalogData = yield* AWS.ECRPublic.GetRegistryCatalogData();
// runtimeconst result = yield* getRegistryCatalogData();const displayName = result.registryCatalogData.displayName;GetRepositoryCatalogData
Section titled “GetRepositoryCatalogData”Source:
src/AWS/ECRPublic/GetRepositoryCatalogData.ts
Runtime binding for ecr-public:GetRepositoryCatalogData.
Reads the gallery catalog metadata (description, architectures, about /
usage markdown) of the bound PublicRepository. Provide the
implementation with
Effect.provide(AWS.ECRPublic.GetRepositoryCatalogDataHttp).
GetRepositoryCatalogData: Catalog Metadata
Section titled “GetRepositoryCatalogData: Catalog Metadata”// initconst getCatalogData = yield* AWS.ECRPublic.GetRepositoryCatalogData(repository);
// runtimeconst result = yield* getCatalogData();const description = result.catalogData?.description;InitiateLayerUpload
Section titled “InitiateLayerUpload”Source:
src/AWS/ECRPublic/InitiateLayerUpload.ts
Runtime binding for ecr-public:InitiateLayerUpload.
Starts an image layer upload to the bound PublicRepository,
returning the uploadId used by UploadLayerPart and
CompleteLayerUpload. Provide the implementation with
Effect.provide(AWS.ECRPublic.InitiateLayerUploadHttp).
InitiateLayerUpload: Pushing Images
Section titled “InitiateLayerUpload: Pushing Images”// initconst initiateLayerUpload = yield* AWS.ECRPublic.InitiateLayerUpload(repository);
// runtimeconst { uploadId } = yield* initiateLayerUpload();PutImage
Section titled “PutImage”Source:
src/AWS/ECRPublic/PutImage.ts
Runtime binding for ecr-public:PutImage.
Creates or updates an image manifest in the bound
PublicRepository — the final step of an image push after all
referenced layers are uploaded (InitiateLayerUpload →
UploadLayerPart → CompleteLayerUpload). Provide the
implementation with Effect.provide(AWS.ECRPublic.PutImageHttp).
PutImage: Pushing Images
Section titled “PutImage: Pushing Images”// initconst putImage = yield* AWS.ECRPublic.PutImage(repository);
// runtimeconst result = yield* putImage({ imageManifest: JSON.stringify(manifest), imageManifestMediaType: "application/vnd.oci.image.manifest.v1+json", imageTag: "latest",});PublicRepository
Section titled “PublicRepository”Source:
src/AWS/ECRPublic/Repository.ts
An Amazon ECR Public repository on the public.ecr.aws registry. Images pushed
here are pullable by anyone. ECR Public is a global service hosted only in
us-east-1; this resource pins every control-plane call there regardless of
the stack region.
PublicRepository: Creating Public Repositories
Section titled “PublicRepository: Creating Public Repositories”Basic Public Repository
const repo = yield* PublicRepository("MyPublicRepo", {});With Catalog Metadata
const repo = yield* PublicRepository("MyPublicRepo", { catalogData: { description: "My awesome container image", architectures: ["x86-64", "ARM 64"], operatingSystems: ["Linux"], aboutText: "# About\nThis image does X.", usageText: "docker pull public.ecr.aws/...", },});PublicRepository: Access Policies
Section titled “PublicRepository: Access Policies”const repo = yield* PublicRepository("MyPublicRepo", { policyText: JSON.stringify({ Version: "2012-10-17", Statement: [ { Sid: "AllowPush", Effect: "Allow", Principal: { AWS: "arn:aws:iam::123456789012:root" }, Action: ["ecr-public:BatchCheckLayerAvailability", "ecr-public:PutImage"], }, ], }),});UploadLayerPart
Section titled “UploadLayerPart”Source:
src/AWS/ECRPublic/UploadLayerPart.ts
Runtime binding for ecr-public:UploadLayerPart.
Uploads one chunk of an in-flight image layer upload to the bound
PublicRepository. Provide the implementation with
Effect.provide(AWS.ECRPublic.UploadLayerPartHttp).
UploadLayerPart: Pushing Images
Section titled “UploadLayerPart: Pushing Images”// initconst uploadLayerPart = yield* AWS.ECRPublic.UploadLayerPart(repository);
// runtimeyield* uploadLayerPart({ uploadId, partFirstByte: 0, partLastByte: blob.byteLength - 1, layerPartBlob: blob,});