workflows
Creates, updates, deletes, gets or lists a workflows resource.
Overview
| Name | workflows |
| Type | Resource |
| Id | aws.transfer.workflows |
Fields
The following fields are returned by SELECT queries:
- describe_workflow
- list_workflows
| Name | Datatype | Description |
|---|---|---|
arn | string | Specifies the unique Amazon Resource Name (ARN) for the workflow. (pattern: <code>arn:\S+</code>) |
description | string | Specifies the text description for the workflow. (pattern: <code>[\w- ]*</code>) |
on_exception_steps | array | Specifies the steps (actions) to take if 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. |
workflow_id | string | A unique identifier for the workflow. (pattern: <code>w-([a-z0-9]{17})</code>) |
| Name | Datatype | Description |
|---|---|---|
arn | string | Specifies the unique Amazon Resource Name (ARN) for the workflow. (pattern: <code>arn:\S+</code>) |
description | string | Specifies the text description for the workflow. (pattern: <code>[\w- ]*</code>) |
workflow_id | string | A unique identifier for the workflow. (pattern: <code>w-([a-z0-9]{17})</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_workflow | select | region | Describes the specified workflow. | |
list_workflows | select | region | Lists all workflows associated with your Amazon Web Services account for your current region. | |
create_workflow | insert | region, Steps | Allows you to create a workflow with specified steps and step details the workflow invokes after file transfer completes. After creating a workflow, you can associate the workflow created with any transfer servers by specifying the workflow-details field in CreateServer and UpdateServer operations. | |
delete_workflow | delete | region | Deletes the specified workflow. | |
send_workflow_step_state | exec | region, WorkflowId, ExecutionId, Token, Status | Sends a callback for asynchronous custom steps. The ExecutionId, WorkflowId, and Token are passed to the target resource during execution of a custom step of a workflow. You must include those with their callback as well as providing a status. |
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) |
SELECT examples
- describe_workflow
- list_workflows
Describes the specified workflow.
SELECT
arn,
description,
on_exception_steps,
steps,
tags,
workflow_id
FROM aws.transfer.workflows
WHERE region = '{{ region }}' -- required
;
Lists all workflows associated with your Amazon Web Services account for your current region.
SELECT
arn,
description,
workflow_id
FROM aws.transfer.workflows
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_workflow
- Manifest
Allows you to create a workflow with specified steps and step details the workflow invokes after file transfer completes. After creating a workflow, you can associate the workflow created with any transfer servers by specifying the workflow-details field in CreateServer and UpdateServer operations.
INSERT INTO aws.transfer.workflows (
Description,
Steps,
OnExceptionSteps,
Tags,
region
)
SELECT
'{{ Description }}',
'{{ Steps }}' /* required */,
'{{ OnExceptionSteps }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
workflow_id
;
# Description fields are for documentation purposes
- name: workflows
props:
- name: region
value: "{{ region }}"
description: Required parameter for the workflows resource.
- name: Description
value: "{{ Description }}"
description: |
A textual description for the workflow.
- name: Steps
description: |
Specifies the details for the steps that are in the specified workflow. The TYPE specifies which of the following actions is being taken for this step. COPY - Copy the file to another location. CUSTOM - Perform a custom step with an Lambda function target. DECRYPT - Decrypt a file that was encrypted before it was uploaded. DELETE - Delete the file. TAG - Add a tag to the file. Currently, copying and tagging are supported only on S3. For file location, you specify either the Amazon S3 bucket and key, or the Amazon EFS file system ID and path.
value:
- Type: "{{ Type }}"
CopyStepDetails:
Name: "{{ Name }}"
DestinationFileLocation:
S3FileLocation:
Bucket: "{{ Bucket }}"
Key: "{{ Key }}"
EfsFileLocation:
FileSystemId: "{{ FileSystemId }}"
Path: "{{ Path }}"
OverwriteExisting: "{{ OverwriteExisting }}"
SourceFileLocation: "{{ SourceFileLocation }}"
CustomStepDetails:
Name: "{{ Name }}"
Target: "{{ Target }}"
TimeoutSeconds: {{ TimeoutSeconds }}
SourceFileLocation: "{{ SourceFileLocation }}"
DeleteStepDetails:
Name: "{{ Name }}"
SourceFileLocation: "{{ SourceFileLocation }}"
TagStepDetails:
Name: "{{ Name }}"
Tags:
- Key: "{{ Key }}"
Value: "{{ Value }}"
SourceFileLocation: "{{ SourceFileLocation }}"
DecryptStepDetails:
Name: "{{ Name }}"
Type: "{{ Type }}"
SourceFileLocation: "{{ SourceFileLocation }}"
OverwriteExisting: "{{ OverwriteExisting }}"
DestinationFileLocation:
S3FileLocation:
Bucket: "{{ Bucket }}"
Key: "{{ Key }}"
EfsFileLocation:
FileSystemId: "{{ FileSystemId }}"
Path: "{{ Path }}"
- name: OnExceptionSteps
description: |
Specifies the steps (actions) to take if errors are encountered during execution of the workflow. For custom steps, the Lambda function needs to send FAILURE to the call back API to kick off the exception steps. Additionally, if the Lambda does not send SUCCESS before it times out, the exception steps are executed.
value:
- Type: "{{ Type }}"
CopyStepDetails:
Name: "{{ Name }}"
DestinationFileLocation:
S3FileLocation:
Bucket: "{{ Bucket }}"
Key: "{{ Key }}"
EfsFileLocation:
FileSystemId: "{{ FileSystemId }}"
Path: "{{ Path }}"
OverwriteExisting: "{{ OverwriteExisting }}"
SourceFileLocation: "{{ SourceFileLocation }}"
CustomStepDetails:
Name: "{{ Name }}"
Target: "{{ Target }}"
TimeoutSeconds: {{ TimeoutSeconds }}
SourceFileLocation: "{{ SourceFileLocation }}"
DeleteStepDetails:
Name: "{{ Name }}"
SourceFileLocation: "{{ SourceFileLocation }}"
TagStepDetails:
Name: "{{ Name }}"
Tags:
- Key: "{{ Key }}"
Value: "{{ Value }}"
SourceFileLocation: "{{ SourceFileLocation }}"
DecryptStepDetails:
Name: "{{ Name }}"
Type: "{{ Type }}"
SourceFileLocation: "{{ SourceFileLocation }}"
OverwriteExisting: "{{ OverwriteExisting }}"
DestinationFileLocation:
S3FileLocation:
Bucket: "{{ Bucket }}"
Key: "{{ Key }}"
EfsFileLocation:
FileSystemId: "{{ FileSystemId }}"
Path: "{{ Path }}"
- name: Tags
description: |
Key-value pairs that can be used to group and search for workflows. Tags are metadata attached to workflows for any purpose.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
DELETE examples
- delete_workflow
Deletes the specified workflow.
DELETE FROM aws.transfer.workflows
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- send_workflow_step_state
Sends a callback for asynchronous custom steps. The ExecutionId, WorkflowId, and Token are passed to the target resource during execution of a custom step of a workflow. You must include those with their callback as well as providing a status.
EXEC aws.transfer.workflows.send_workflow_step_state
@region='{{ region }}' --required
@@json=
'{
"WorkflowId": "{{ WorkflowId }}",
"ExecutionId": "{{ ExecutionId }}",
"Token": "{{ Token }}",
"Status": "{{ Status }}"
}'
;