workflows
Creates, updates, deletes or gets a workflow resource or lists workflows in a region
Overview
| Name | workflows |
| Type | Resource |
| Description | Resource schema for AWS::ImageBuilder::Workflow |
| Id | awscc.imagebuilder.workflows |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the workflow. |
name | string | The name of the workflow. |
version | string | The version of the workflow. |
description | string | The description of the workflow. |
change_description | string | The change description of the workflow. |
type | string | The type of the workflow denotes whether the workflow is used to build, test, or distribute. |
data | string | The data of the workflow. |
uri | string | The uri of the workflow. |
kms_key_id | string | The KMS key identifier used to encrypt the workflow. |
tags | object | The tags associated with the workflow. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the workflow. |
region | string | AWS region. |
For more information, see AWS::ImageBuilder::Workflow.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | workflows | INSERT | Name, Type, Version, region |
delete_resource | workflows | DELETE | Identifier, region |
update_resource | workflows | UPDATE | Identifier, PatchDocument, region |
list_resources | workflows_list_only | SELECT | region |
get_resource | workflows | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual workflow.
SELECT
region,
arn,
name,
version,
description,
change_description,
type,
data,
uri,
kms_key_id,
tags
FROM awscc.imagebuilder.workflows
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all workflows in a region.
SELECT
region,
arn
FROM awscc.imagebuilder.workflows_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new workflow resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.imagebuilder.workflows (
Name,
Version,
Type,
region
)
SELECT
'{{ name }}',
'{{ version }}',
'{{ type }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.imagebuilder.workflows (
Name,
Version,
Description,
ChangeDescription,
Type,
Data,
Uri,
KmsKeyId,
Tags,
region
)
SELECT
'{{ name }}',
'{{ version }}',
'{{ description }}',
'{{ change_description }}',
'{{ type }}',
'{{ data }}',
'{{ uri }}',
'{{ kms_key_id }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: workflow
props:
- name: name
value: '{{ name }}'
- name: version
value: '{{ version }}'
- name: description
value: '{{ description }}'
- name: change_description
value: '{{ change_description }}'
- name: type
value: '{{ type }}'
- name: data
value: '{{ data }}'
- name: uri
value: '{{ uri }}'
- name: kms_key_id
value: '{{ kms_key_id }}'
- name: tags
value: {}
UPDATE example
Use the following StackQL query and manifest file to update a workflow resource, using stack-deploy.
/*+ update */
UPDATE awscc.imagebuilder.workflows
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.imagebuilder.workflows
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the workflows resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iam:GetRole,
kms:GenerateDataKey,
kms:GenerateDataKeyPair,
kms:GenerateDataKeyPairWithoutPlaintext,
kms:GenerateDataKeyWithoutPlaintext,
kms:Encrypt,
kms:Decrypt,
s3:GetObject,
s3:HeadBucket,
s3:GetBucketLocation,
imagebuilder:TagResource,
imagebuilder:GetWorkflow,
imagebuilder:CreateWorkflow
imagebuilder:GetWorkflow,
kms:Decrypt
imagebuilder:TagResource,
imagebuilder:UntagResource
imagebuilder:GetWorkflow,
imagebuilder:UntagResource,
imagebuilder:DeleteWorkflow
imagebuilder:ListWorkflows,
imagebuilder:ListWorkflowBuildVersions