create_workflow
async
¶
create_workflow(
steps: WorkflowSteps,
*,
config_overrides: Optional[AsyncTransferClientConfig] = None,
description: Optional[WorkflowDescription] = None,
on_exception_steps: Optional[WorkflowSteps] = None,
tags: Optional[Tags] = None,
structured_log_destinations: Optional[StructuredLogDestinations] = None,
) -> CreateWorkflowResponse
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.
Parameters:
-
description(Optional[WorkflowDescription], default:None) –A textual description for the workflow.
-
steps(WorkflowSteps) –Specifies the details for the steps that are in the specified workflow.
The
TYPEspecifies 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.
-
-
on_exception_steps(Optional[WorkflowSteps], default:None) –Specifies the steps (actions) to take if errors are encountered during execution of the workflow.
For custom steps, the Lambda function needs to send
FAILUREto the call back API to kick off the exception steps. Additionally, if the Lambda does not sendSUCCESSbefore it times out, the exception steps are executed. -
tags(Optional[Tags], default:None) –Key-value pairs that can be used to group and search for workflows. Tags are metadata attached to workflows for any purpose.
-
structured_log_destinations(Optional[StructuredLogDestinations], default:None) –Specifies the log groups to which your workflow logs are sent.
To specify a log group, you must provide the ARN for an existing log group. In this case, the format of the log group is as follows:
arn:partition:logs:region-name:amazon-account-id:log-group:log-group-name:*For example,
arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
InternalServiceError–This exception is thrown when an error occurs in the Transfer Family service.
-
InvalidRequestException–This exception is thrown when the client submits a malformed request.
-
ResourceExistsException–The requested resource does not exist, or exists in a region other than the one specified for the command.
-
ServiceUnavailableException–The request has failed because the Amazon Web ServicesTransfer Family service is not available.
-
ThrottlingException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_transfer/_services/async_transfer.py
4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 | |