workflows
Creates, updates, deletes, gets or lists a workflows resource.
Overview
| Name | workflows |
| Type | Resource |
| Id | aws.imagebuilder.workflows |
Fields
The following fields are returned by SELECT queries:
- get_workflow
- list_workflows
| Name | Datatype | Description |
|---|---|---|
latest_version_references | object | The resource ARNs with different wildcard variations of semantic versioning. |
workflow | object | The workflow resource specified in the request. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the workflow. (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 workflow resource. (pattern: <code>^arn:aws(?:-[a-z]+)*:imagebuilder:[a-z]{2,}(?:-[a-z]+)+-[0-9]+:(?:[0-9]{12}|aws(?:-[a-z-]+)?):workflow/(build|test|distribution)/[a-z0-9-_]+/[0-9]+.[0-9]+.[0-9]+$</code>) |
date_created | string | The timestamp when Image Builder created the workflow version. |
description | string | Describes the workflow. |
owner | string | The owner of the workflow resource. |
type_ | string | The image creation stage that this workflow applies to. Image Builder currently supports build and test stage workflows. (BUILD, TEST, DISTRIBUTION) |
version | string | The semantic version of the workflow resource. The format includes three nodes: <major>.<minor>.<patch>. (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 |
|---|---|---|---|---|
get_workflow | select | workflowBuildVersionArn, region | Get a workflow resource object. | |
list_workflows | select | region | Lists workflow build versions based on filtering parameters. | |
create_workflow | insert | region, name, semanticVersion, clientToken, type | Create a new workflow or a new version of an existing workflow. | |
delete_workflow | delete | workflowBuildVersionArn, region | Deletes a specific workflow resource. | |
send_workflow_step_action | exec | region, stepExecutionId, imageBuildVersionArn, action, clientToken | Pauses or resumes image creation when the associated workflow runs a WaitForAction step. |
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) |
workflowBuildVersionArn | string | The Amazon Resource Name (ARN) of the workflow resource to delete. |
SELECT examples
- get_workflow
- list_workflows
Get a workflow resource object.
SELECT
latest_version_references,
workflow
FROM aws.imagebuilder.workflows
WHERE workflowBuildVersionArn = '{{ workflowBuildVersionArn }}' -- required
AND region = '{{ region }}' -- required
;
Lists workflow build versions based on filtering parameters.
SELECT
name,
arn,
date_created,
description,
owner,
type_,
version
FROM aws.imagebuilder.workflows
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_workflow
- Manifest
Create a new workflow or a new version of an existing workflow.
INSERT INTO aws.imagebuilder.workflows (
name,
semanticVersion,
description,
changeDescription,
data,
uri,
kmsKeyId,
tags,
clientToken,
type,
dryRun,
region
)
SELECT
'{{ name }}' /* required */,
'{{ semanticVersion }}' /* required */,
'{{ description }}',
'{{ changeDescription }}',
'{{ data }}',
'{{ uri }}',
'{{ kmsKeyId }}',
'{{ tags }}',
'{{ clientToken }}' /* required */,
'{{ type }}' /* required */,
{{ dryRun }},
'{{ region }}'
RETURNING
client_token,
latest_version_references,
workflow_build_version_arn
;
# Description fields are for documentation purposes
- name: workflows
props:
- name: region
value: "{{ region }}"
description: Required parameter for the workflows resource.
- name: name
value: "{{ name }}"
- name: semanticVersion
value: "{{ semanticVersion }}"
- name: description
value: "{{ description }}"
- name: changeDescription
value: "{{ changeDescription }}"
- name: data
value: "{{ data }}"
- name: uri
value: "{{ uri }}"
- name: kmsKeyId
value: "{{ kmsKeyId }}"
- name: tags
value: "{{ tags }}"
- name: clientToken
value: "{{ clientToken }}"
- name: type
value: "{{ type }}"
valid_values: ['BUILD', 'TEST', 'DISTRIBUTION']
- name: dryRun
value: {{ dryRun }}
DELETE examples
- delete_workflow
Deletes a specific workflow resource.
DELETE FROM aws.imagebuilder.workflows
WHERE workflowBuildVersionArn = '{{ workflowBuildVersionArn }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- send_workflow_step_action
Pauses or resumes image creation when the associated workflow runs a WaitForAction step.
EXEC aws.imagebuilder.workflows.send_workflow_step_action
@region='{{ region }}' --required
@@json=
'{
"stepExecutionId": "{{ stepExecutionId }}",
"imageBuildVersionArn": "{{ imageBuildVersionArn }}",
"action": "{{ action }}",
"reason": "{{ reason }}",
"clientToken": "{{ clientToken }}"
}'
;