Overview
To use this template, you need an Alli Cloud Storage setup that uses Amazon S3 behind the scenes. You must have an active Amazon Web Services account with valid access credentials and permission to read, copy, and delete files in the target storage location. Before running it, decide whether you want to simply move files to another folder, rename them, or both.
It is worth understanding that any path to for a file that will be uploaded or moved in ACS is firstly made up of the S3 Bucket name and S3 Key Prefix, then any additional folder path you require. The prefix will look something like "source=app/app=forklift/" and is required for API purposes specfic to actions that create a file in a location of the bucket. Keep this in mind when manually searching in the ACS UI, but do not worry about these values otherwise – they will be prepended to your folder path by the code.
Variables
|
Name |
Reference |
Type |
Required |
Default |
Options |
Description |
|---|---|---|---|---|---|---|
|
Source File Name Match Type |
SOURCE_FILE_NAME_MATCH_TYPE |
Select |
➖ |
exact_match |
Exact Match: exact_match
|
How to interpret the source file name: use 'exact_match' for an exact file name or 'regex_match' to treat it as a regular expression for multiple files. |
|
Source Folder |
SOURCE_FOLDER_NAME |
Alphanumeric |
➖ |
- |
- |
Local workflows folder that contains the source file(s). Leave blank to use the current directory. |
|
Source File Name or Pattern |
SOURCE_FILE_NAME |
Alphanumeric |
✅ |
- |
- |
Local file name or regular expression pattern to select files to upload. |
|
Destination Folder |
DESTINATION_FOLDER_NAME |
Alphanumeric |
➖ |
- |
- |
Folder path in Alli Cloud Storage where the file(s) will be uploaded. Do not include the client's S3 bucket, upload prefix, or a leading slash (these will be handled by the code, see logs for their values). |
|
Destination File Name |
DESTINATION_FILE_NAME |
Alphanumeric |
➖ |
- |
- |
You can optionally enter a custom name for the uploaded file; if you leave it blank, the original filename will be used. When regex matching returns multiple files, your custom name serves as the base and “_1”, “_2”, etc., are appended to each file—if only one file matches, it uses your name unchanged. |
YAML
Below is the YAML template
source:
template: Alli Cloud Storage - Upload Files from Workflows
inputs:
SOURCE_FILE_NAME_MATCH_TYPE: exact_match
SOURCE_FOLDER_NAME:
SOURCE_FILE_NAME:
DESTINATION_FOLDER_NAME:
DESTINATION_FILE_NAME:
type: TEMPLATE
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- 10
- 13
- 101
- 103