create_workflow
¶
create_workflow(
steps: WorkflowSteps,
*,
config_overrides: Optional[TransferClientConfig] = 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/transfer.py
4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 | |