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 = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all workflows in a region.
SELECT
region,
arn
FROM awscc.imagebuilder.workflows_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.imagebuilder.workflows
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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