image_pipelines
Creates, updates, deletes, gets or lists an image_pipelines resource.
Overview
| Name | image_pipelines |
| Type | Resource |
| Id | aws.imagebuilder.image_pipelines |
Fields
The following fields are returned by SELECT queries:
- get_image_pipeline
- list_image_pipelines
| Name | Datatype | Description |
|---|---|---|
image_pipeline | object | The image pipeline object. |
request_id | string | The request ID that uniquely identifies this request. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the image pipeline. (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 pipeline. (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>) |
consecutive_failures | integer | Image Builder tracks the number of consecutive failures for scheduled pipeline executions and takes one of the following actions each time it runs on a schedule: If the pipeline execution is successful, the number of consecutive failures resets to zero. If the pipeline execution fails, Image Builder increments the number of consecutive failures. If the failure count exceeds the limit defined in the AutoDisablePolicy, Image Builder disables the pipeline. The consecutive failure count is also reset to zero under the following conditions: The pipeline runs manually and succeeds. The pipeline configuration is updated. If the pipeline runs manually and fails, the count remains the same. The next scheduled run continues to increment where it left off before. |
container_recipe_arn | string | The Amazon Resource Name (ARN) of the container recipe that is used for this pipeline. |
date_created | string | The date on which this image pipeline was created. |
date_last_run | string | This is no longer supported, and does not return a value. |
date_next_run | string | The next date when the pipeline is scheduled to run. |
date_updated | string | The date on which this image pipeline was last updated. |
description | string | The description of the image pipeline. |
distribution_configuration_arn | string | The Amazon Resource Name (ARN) of the distribution configuration associated with this image pipeline. |
enhanced_image_metadata_enabled | boolean | Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default. |
execution_role | string | The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions. (pattern: <code>^(?:arn:aws(?:-[a-z]+)*:iam::[0-9]{12}:role/)?[a-zA-Z_0-9+=,.@-_/]+$</code>) |
image_recipe_arn | string | The Amazon Resource Name (ARN) of the image recipe associated with this image pipeline. |
image_scanning_configuration | object | Contains settings for Image Builder image resource and container image scans. |
image_tags | object | The tags to be applied to the images produced by this pipeline. |
image_tests_configuration | object | Configure image tests for your pipeline build. Tests run after building the image, to verify that the AMI or container image is valid before distributing it. |
infrastructure_configuration_arn | string | The Amazon Resource Name (ARN) of the infrastructure configuration associated with this image pipeline. |
last_run_status | string | The status of the last image that this pipeline built, such as BUILDING, TESTING, FAILED, or AVAILABLE. (PENDING, CREATING, BUILDING, TESTING, DISTRIBUTING, INTEGRATING, AVAILABLE, CANCELLED, FAILED, DEPRECATED, DELETED, DISABLED) |
logging_configuration | object | The logging configuration that's defined for pipeline execution. |
platform | string | The platform of the image pipeline. (Windows, Linux, macOS) |
schedule | object | A schedule configures when and how often a pipeline will automatically create a new image. |
status | string | The status of the image pipeline. (DISABLED, ENABLED) |
tags | object | The tags of this image pipeline. |
workflows | array | Contains the workflows that run for the image pipeline. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_image_pipeline | select | imagePipelineArn, region | Gets an image pipeline. | |
list_image_pipelines | select | region | Returns a list of image pipelines. | |
create_image_pipeline | insert | region, name, infrastructureConfigurationArn, clientToken | Creates a new image pipeline. Image pipelines enable you to automate the creation and distribution of images. | |
update_image_pipeline | update | region, imagePipelineArn, infrastructureConfigurationArn, clientToken | Updates an image pipeline. Image pipelines enable you to automate the creation and distribution of images. You must specify exactly one recipe for your image, using either a containerRecipeArn or an imageRecipeArn. UpdateImagePipeline does not support selective updates for the pipeline. You must specify all of the required properties in the update request, not just the properties that have changed. | |
delete_image_pipeline | delete | imagePipelineArn, region | Deletes an image pipeline. | |
start_image_pipeline_execution | exec | region, imagePipelineArn, clientToken | Manually triggers a pipeline to create an 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 |
|---|---|---|
imagePipelineArn | string | The Amazon Resource Name (ARN) of the image pipeline to delete. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_image_pipeline
- list_image_pipelines
Gets an image pipeline.
SELECT
image_pipeline,
request_id
FROM aws.imagebuilder.image_pipelines
WHERE imagePipelineArn = '{{ imagePipelineArn }}' -- required
AND region = '{{ region }}' -- required
;
Returns a list of image pipelines.
SELECT
name,
arn,
consecutive_failures,
container_recipe_arn,
date_created,
date_last_run,
date_next_run,
date_updated,
description,
distribution_configuration_arn,
enhanced_image_metadata_enabled,
execution_role,
image_recipe_arn,
image_scanning_configuration,
image_tags,
image_tests_configuration,
infrastructure_configuration_arn,
last_run_status,
logging_configuration,
platform,
schedule,
status,
tags,
workflows
FROM aws.imagebuilder.image_pipelines
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_image_pipeline
- Manifest
Creates a new image pipeline. Image pipelines enable you to automate the creation and distribution of images.
INSERT INTO aws.imagebuilder.image_pipelines (
name,
description,
imageRecipeArn,
containerRecipeArn,
infrastructureConfigurationArn,
distributionConfigurationArn,
imageTestsConfiguration,
enhancedImageMetadataEnabled,
schedule,
status,
tags,
imageTags,
clientToken,
imageScanningConfiguration,
workflows,
executionRole,
loggingConfiguration,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ imageRecipeArn }}',
'{{ containerRecipeArn }}',
'{{ infrastructureConfigurationArn }}' /* required */,
'{{ distributionConfigurationArn }}',
'{{ imageTestsConfiguration }}',
{{ enhancedImageMetadataEnabled }},
'{{ schedule }}',
'{{ status }}',
'{{ tags }}',
'{{ imageTags }}',
'{{ clientToken }}' /* required */,
'{{ imageScanningConfiguration }}',
'{{ workflows }}',
'{{ executionRole }}',
'{{ loggingConfiguration }}',
'{{ region }}'
RETURNING
client_token,
image_pipeline_arn,
request_id
;
# Description fields are for documentation purposes
- name: image_pipelines
props:
- name: region
value: "{{ region }}"
description: Required parameter for the image_pipelines resource.
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: imageRecipeArn
value: "{{ imageRecipeArn }}"
- name: containerRecipeArn
value: "{{ containerRecipeArn }}"
- name: infrastructureConfigurationArn
value: "{{ infrastructureConfigurationArn }}"
- name: distributionConfigurationArn
value: "{{ distributionConfigurationArn }}"
- name: imageTestsConfiguration
description: |
Configure image tests for your pipeline build. Tests run after building the image, to verify that the AMI or container image is valid before distributing it.
value:
imageTestsEnabled: {{ imageTestsEnabled }}
timeoutMinutes: {{ timeoutMinutes }}
- name: enhancedImageMetadataEnabled
value: {{ enhancedImageMetadataEnabled }}
- name: schedule
description: |
A schedule configures when and how often a pipeline will automatically create a new image.
value:
scheduleExpression: "{{ scheduleExpression }}"
timezone: "{{ timezone }}"
pipelineExecutionStartCondition: "{{ pipelineExecutionStartCondition }}"
autoDisablePolicy:
failureCount: {{ failureCount }}
- name: status
value: "{{ status }}"
valid_values: ['DISABLED', 'ENABLED']
- name: tags
value: "{{ tags }}"
- name: imageTags
value: "{{ imageTags }}"
- name: clientToken
value: "{{ clientToken }}"
- name: imageScanningConfiguration
description: |
Contains settings for Image Builder image resource and container image scans.
value:
imageScanningEnabled: {{ imageScanningEnabled }}
ecrConfiguration:
repositoryName: "{{ repositoryName }}"
containerTags:
- "{{ containerTags }}"
- name: workflows
value:
- workflowArn: "{{ workflowArn }}"
parameters: "{{ parameters }}"
parallelGroup: "{{ parallelGroup }}"
onFailure: "{{ onFailure }}"
- name: executionRole
value: "{{ executionRole }}"
- name: loggingConfiguration
description: |
The logging configuration that's defined for pipeline execution.
value:
imageLogGroupName: "{{ imageLogGroupName }}"
pipelineLogGroupName: "{{ pipelineLogGroupName }}"
UPDATE examples
- update_image_pipeline
Updates an image pipeline. Image pipelines enable you to automate the creation and distribution of images. You must specify exactly one recipe for your image, using either a containerRecipeArn or an imageRecipeArn. UpdateImagePipeline does not support selective updates for the pipeline. You must specify all of the required properties in the update request, not just the properties that have changed.
UPDATE aws.imagebuilder.image_pipelines
SET
imagePipelineArn = '{{ imagePipelineArn }}',
description = '{{ description }}',
imageRecipeArn = '{{ imageRecipeArn }}',
containerRecipeArn = '{{ containerRecipeArn }}',
infrastructureConfigurationArn = '{{ infrastructureConfigurationArn }}',
distributionConfigurationArn = '{{ distributionConfigurationArn }}',
imageTestsConfiguration = '{{ imageTestsConfiguration }}',
enhancedImageMetadataEnabled = {{ enhancedImageMetadataEnabled }},
schedule = '{{ schedule }}',
status = '{{ status }}',
clientToken = '{{ clientToken }}',
imageScanningConfiguration = '{{ imageScanningConfiguration }}',
workflows = '{{ workflows }}',
loggingConfiguration = '{{ loggingConfiguration }}',
executionRole = '{{ executionRole }}',
imageTags = '{{ imageTags }}'
WHERE
region = '{{ region }}' --required
AND imagePipelineArn = '{{ imagePipelineArn }}' --required
AND infrastructureConfigurationArn = '{{ infrastructureConfigurationArn }}' --required
AND clientToken = '{{ clientToken }}' --required
RETURNING
client_token,
image_pipeline_arn,
request_id;
DELETE examples
- delete_image_pipeline
Deletes an image pipeline.
DELETE FROM aws.imagebuilder.image_pipelines
WHERE imagePipelineArn = '{{ imagePipelineArn }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- start_image_pipeline_execution
Manually triggers a pipeline to create an image.
EXEC aws.imagebuilder.image_pipelines.start_image_pipeline_execution
@region='{{ region }}' --required
@@json=
'{
"imagePipelineArn": "{{ imagePipelineArn }}",
"clientToken": "{{ clientToken }}",
"tags": "{{ tags }}"
}'
;