images
Creates, updates, deletes, gets or lists an images resource.
Overview
| Name | images |
| Type | Resource |
| Id | aws.ecr_public.images |
Fields
The following fields are returned by SELECT queries:
- describe_images
| Name | Datatype | Description |
|---|---|---|
artifact_media_type | string | The artifact media type of the image. |
image_digest | string | The sha256 digest of the image manifest. |
image_manifest_media_type | string | The media type of the image manifest. |
image_pushed_at | string (date-time) | The date and time, expressed in standard JavaScript date format, that the current image was pushed to the repository at. |
image_size_in_bytes | integer (int64) | The size, in bytes, of the image in the repository. If the image is a manifest list, this is the max size of all manifests in the list. Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the docker images command shows the uncompressed image size, so it might return a larger image size than the image sizes that are returned by DescribeImages. |
image_tags | array | The list of tags that's associated with this image. |
registry_id | string | The Amazon Web Services account ID that's associated with the public registry where this image belongs. (pattern: <code>[0-9]{12}</code>) |
repository_name | string | The name of the repository where this image belongs. (pattern: <code>(?:[a-z0-9]+(?:[.-][a-z0-9]+)/)[a-z0-9]+(?:[.-][a-z0-9]+)*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_images | select | region | Returns metadata that's related to the images in a repository in a public registry. Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the docker images command shows the uncompressed image size. Therefore, it might return a larger image size than the image sizes that are returned by DescribeImages. | |
put_image | replace | region, repositoryName, imageManifest | Creates or updates the image manifest and tags that are associated with an image. When an image is pushed and all new image layers have been uploaded, the PutImage API is called once to create or update the image manifest and the tags that are associated with the image. This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_images
Returns metadata that's related to the images in a repository in a public registry. Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the docker images command shows the uncompressed image size. Therefore, it might return a larger image size than the image sizes that are returned by DescribeImages.
SELECT
artifact_media_type,
image_digest,
image_manifest_media_type,
image_pushed_at,
image_size_in_bytes,
image_tags,
registry_id,
repository_name
FROM aws.ecr_public.images
WHERE region = '{{ region }}' -- required
;
REPLACE examples
- put_image
Creates or updates the image manifest and tags that are associated with an image. When an image is pushed and all new image layers have been uploaded, the PutImage API is called once to create or update the image manifest and the tags that are associated with the image. This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
REPLACE aws.ecr_public.images
SET
registryId = '{{ registryId }}',
repositoryName = '{{ repositoryName }}',
imageManifest = '{{ imageManifest }}',
imageManifestMediaType = '{{ imageManifestMediaType }}',
imageTag = '{{ imageTag }}',
imageDigest = '{{ imageDigest }}'
WHERE
region = '{{ region }}' --required
AND repositoryName = '{{ repositoryName }}' --required
AND imageManifest = '{{ imageManifest }}' --required
RETURNING
image;