workflows
Creates, updates, deletes or gets a workflow resource or lists workflows in a region
Overview
| Name | workflows |
| Type | Resource |
| Description | Resource Type definition for AWS::Transfer::Workflow |
| Id | awscc.transfer.workflows |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
on_exception_steps | array | Specifies the steps (actions) to take if any errors are encountered during execution of the workflow. |
steps | array | Specifies the details for the steps that are in the specified workflow. |
tags | array | Key-value pairs that can be used to group and search for workflows. Tags are metadata attached to workflows for any purpose. |
description | string | A textual description for the workflow. |
workflow_id | string | A unique identifier for the workflow. |
arn | string | Specifies the unique Amazon Resource Name (ARN) for the workflow. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
workflow_id | string | A unique identifier for the workflow. |
region | string | AWS region. |
For more information, see AWS::Transfer::Workflow.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | workflows | INSERT | Steps, 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,
on_exception_steps,
steps,
tags,
description,
workflow_id,
arn
FROM awscc.transfer.workflows
WHERE
region = '{{ region }}' AND
Identifier = '{{ workflow_id }}';
Lists all workflows in a region.
SELECT
region,
workflow_id
FROM awscc.transfer.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.transfer.workflows (
Steps,
region
)
SELECT
'{{ steps }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.transfer.workflows (
OnExceptionSteps,
Steps,
Tags,
Description,
region
)
SELECT
'{{ on_exception_steps }}',
'{{ steps }}',
'{{ tags }}',
'{{ description }}',
'{{ 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: on_exception_steps
value:
- copy_step_details:
destination_file_location:
s3_file_location:
bucket: '{{ bucket }}'
key: '{{ key }}'
name: '{{ name }}'
overwrite_existing: '{{ overwrite_existing }}'
source_file_location: '{{ source_file_location }}'
custom_step_details:
name: '{{ name }}'
target: '{{ target }}'
timeout_seconds: '{{ timeout_seconds }}'
source_file_location: '{{ source_file_location }}'
decrypt_step_details:
destination_file_location:
s3_file_location: null
efs_file_location:
file_system_id: '{{ file_system_id }}'
path: '{{ path }}'
name: '{{ name }}'
type: '{{ type }}'
overwrite_existing: '{{ overwrite_existing }}'
source_file_location: '{{ source_file_location }}'
delete_step_details:
name: '{{ name }}'
source_file_location: '{{ source_file_location }}'
tag_step_details:
name: '{{ name }}'
tags:
- key: '{{ key }}'
value: '{{ value }}'
source_file_location: '{{ source_file_location }}'
type: '{{ type }}'
- name: steps
value:
- null
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: description
value: '{{ description }}'
UPDATE example
Use the following StackQL query and manifest file to update a workflow resource, using stack-deploy.
/*+ update */
UPDATE awscc.transfer.workflows
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ workflow_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.transfer.workflows
WHERE
Identifier = '{{ workflow_id }}' 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
- Delete
- List
- Update
transfer:CreateWorkflow,
transfer:TagResource
transfer:DescribeWorkflow
transfer:DeleteWorkflow
transfer:ListWorkflows
transfer:UnTagResource,
transfer:TagResource