CreateWorkflow - AWS Transfer Family

CreateWorkflow

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.

Request Syntax

{ "Description": "string", "OnExceptionSteps": [ { "CopyStepDetails": { "DestinationFileLocation": { "EfsFileLocation": { "FileSystemId": "string", "Path": "string" }, "S3FileLocation": { "Bucket": "string", "Key": "string" } }, "Name": "string", "OverwriteExisting": "string" }, "CustomStepDetails": { "Name": "string", "Target": "string", "TimeoutSeconds": number }, "DeleteStepDetails": { "Name": "string" }, "TagStepDetails": { "Name": "string", "Tags": [ { "Key": "string", "Value": "string" } ] }, "Type": "string" } ], "Steps": [ { "CopyStepDetails": { "DestinationFileLocation": { "EfsFileLocation": { "FileSystemId": "string", "Path": "string" }, "S3FileLocation": { "Bucket": "string", "Key": "string" } }, "Name": "string", "OverwriteExisting": "string" }, "CustomStepDetails": { "Name": "string", "Target": "string", "TimeoutSeconds": number }, "DeleteStepDetails": { "Name": "string" }, "TagStepDetails": { "Name": "string", "Tags": [ { "Key": "string", "Value": "string" } ] }, "Type": "string" } ], "Tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Description

A textual description for the workflow.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[\w- ]*$

Required: No

OnExceptionSteps

Specifies the steps (actions) to take if errors are encountered during execution of the workflow.

Note

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.

Type: Array of WorkflowStep objects

Array Members: Maximum number of 8 items.

Required: No

Steps

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: custom step with a lambda target

  • Delete: delete the file

  • Tag: add a tag to the file

Note

Currently, copying and tagging are supported only on S3.

For file location, you specify either the S3 bucket and key, or the EFS filesystem ID and path.

Type: Array of WorkflowStep objects

Array Members: Maximum number of 8 items.

Required: Yes

Tags

Key-value pairs that can be used to group and search for workflows. Tags are metadata attached to workflows for any purpose.

Type: Array of Tag objects

Array Members: Minimum number of 1 item. Maximum number of 50 items.

Required: No

Response Syntax

{ "WorkflowId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

WorkflowId

A unique identifier for the workflow.

Type: String

Length Constraints: Fixed length of 19.

Pattern: ^w-([a-z0-9]{17})$

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 400

InternalServiceError

This exception is thrown when an error occurs in the AWSTransfer Family service.

HTTP Status Code: 500

InvalidRequestException

This exception is thrown when the client submits a malformed request.

HTTP Status Code: 400

ResourceExistsException

The requested resource does not exist.

HTTP Status Code: 400

ServiceUnavailableException

The request has failed because the AWSTransfer Family service is not available.

HTTP Status Code: 500

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 400

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: