Skip to main content

image_build_versions

Creates, updates, deletes, gets or lists an image_build_versions resource.

Overview

Nameimage_build_versions
TypeResource
Idaws.imagebuilder.image_build_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the image. (pattern: <code>^[-_A-Za-z-0-9][-_A-Za-z0-9 ]{1,126}[-_A-Za-z-0-9]$</code>)
arnstringThe Amazon Resource Name (ARN) of the image. (pattern: <code>^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws(?:-[a-z-]+)?):(?:image-recipe|container-recipe|infrastructure-configuration|distribution-configuration|component|image|image-pipeline|lifecycle-policy|workflow/(?:build|test|distribution))/[a-z0-9-_]+(?:/(?:(?:x|[0-9]+).(?:x|[0-9]+).(?:x|[0-9]+))(?:/[0-9]+)?)?$</code>)
build_typestringIndicates the type of build that created this image. The build can be initiated in the following ways: USER_INITIATED – A manual pipeline build request. SCHEDULED – A pipeline build initiated by a cron expression in the Image Builder pipeline, or from EventBridge. IMPORT – A VM import created the image to use as the base image for the recipe. IMPORT_ISO – An ISO disk import created the image. (USER_INITIATED, SCHEDULED, IMPORT, IMPORT_ISO)
date_createdstringThe date on which Image Builder created this image.
deprecation_timestring (date-time)The time when deprecation occurs for an image resource. This can be a past or future date.
image_sourcestringThe origin of the base image that Image Builder used to build this image. (AMAZON_MANAGED, AWS_MARKETPLACE, IMPORTED, CUSTOM)
lifecycle_execution_idstringIdentifies the last runtime instance of the lifecycle policy to take action on the image. (pattern: <code>^lce-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$</code>)
logging_configurationobjectThe logging configuration that's defined for the image. Image Builder uses the defined settings to direct execution log output during image creation.
os_versionstringThe operating system version of the instances that launch from this image. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.
output_resourcesobjectThe output resources that Image Builder produced when it created this image.
ownerstringThe owner of the image.
platformstringThe image operating system platform, such as Linux or Windows. (Windows, Linux, macOS)
stateobjectImage status and the reason for that status.
tagsobjectThe tags that apply to this image.
type_stringSpecifies whether this image produces an AMI or a container image. (AMI, DOCKER)
versionstringThe version of the image. (pattern: <code>^[0-9]+.[0-9]+.[0-9]+$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_image_build_versionsselectregionReturns a list of image build versions.
retry_imageexecregion, imageBuildVersionArn, clientTokenRetryImage retries an image distribution without rebuilding the image.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns a list of image build versions.

SELECT
name,
arn,
build_type,
date_created,
deprecation_time,
image_source,
lifecycle_execution_id,
logging_configuration,
os_version,
output_resources,
owner,
platform,
state,
tags,
type_,
version
FROM aws.imagebuilder.image_build_versions
WHERE region = '{{ region }}' -- required
;

Lifecycle Methods

RetryImage retries an image distribution without rebuilding the image.

EXEC aws.imagebuilder.image_build_versions.retry_image
@region='{{ region }}' --required
@@json=
'{
"imageBuildVersionArn": "{{ imageBuildVersionArn }}",
"clientToken": "{{ clientToken }}"
}'
;