Skip to main content

workflows

Creates, updates, deletes or gets a workflow resource or lists workflows in a region

Overview

Nameworkflows
TypeResource
DescriptionResource schema for AWS::ImageBuilder::Workflow
Idawscc.imagebuilder.workflows

Fields

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the workflow.
namestringThe name of the workflow.
versionstringThe version of the workflow.
descriptionstringThe description of the workflow.
change_descriptionstringThe change description of the workflow.
typestringThe type of the workflow denotes whether the workflow is used to build, test, or distribute.
datastringThe data of the workflow.
uristringThe uri of the workflow.
kms_key_idstringThe KMS key identifier used to encrypt the workflow.
tagsobjectThe tags associated with the workflow.
regionstringAWS region.

For more information, see AWS::ImageBuilder::Workflow.

Methods

NameResourceAccessible byRequired Params
create_resourceworkflowsINSERTName, Type, Version, region
delete_resourceworkflowsDELETEIdentifier, region
update_resourceworkflowsUPDATEIdentifier, PatchDocument, region
list_resourcesworkflows_list_onlySELECTregion
get_resourceworkflowsSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new workflow resource, using stack-deploy.

/*+ 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
;

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:

ParameterDescription
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:

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