image_build_versions
Creates, updates, deletes, gets or lists an image_build_versions resource.
Overview
| Name | image_build_versions |
| Type | Resource |
| Id | aws.imagebuilder.image_build_versions |
Fields
The following fields are returned by SELECT queries:
- list_image_build_versions
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the image. (pattern: <code>^[-_A-Za-z-0-9][-_A-Za-z0-9 ]{1,126}[-_A-Za-z-0-9]$</code>) |
arn | string | The 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_type | string | Indicates 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_created | string | The date on which Image Builder created this image. |
deprecation_time | string (date-time) | The time when deprecation occurs for an image resource. This can be a past or future date. |
image_source | string | The origin of the base image that Image Builder used to build this image. (AMAZON_MANAGED, AWS_MARKETPLACE, IMPORTED, CUSTOM) |
lifecycle_execution_id | string | Identifies 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_configuration | object | The logging configuration that's defined for the image. Image Builder uses the defined settings to direct execution log output during image creation. |
os_version | string | The operating system version of the instances that launch from this image. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019. |
output_resources | object | The output resources that Image Builder produced when it created this image. |
owner | string | The owner of the image. |
platform | string | The image operating system platform, such as Linux or Windows. (Windows, Linux, macOS) |
state | object | Image status and the reason for that status. |
tags | object | The tags that apply to this image. |
type_ | string | Specifies whether this image produces an AMI or a container image. (AMI, DOCKER) |
version | string | The version of the image. (pattern: <code>^[0-9]+.[0-9]+.[0-9]+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_image_build_versions | select | region | Returns a list of image build versions. | |
retry_image | exec | region, imageBuildVersionArn, clientToken | RetryImage 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_image_build_versions
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
- retry_image
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 }}"
}'
;