Outbound SFTP Binary Stage
The Outbound SFTP Binary stage allows binary messages, such as PDFs and images, to be exported to an external SFTP destination.
Stage Overview
The Outbound SFTP Binary stage allows binary formatted messages (e.g. PDFs, images, etc.) to be exported from the Integration Hub service to an external, SFTP-based destination.
For sending text-based messages to an external, SFTP-based destination, see the Outbound SFTP stage.
Stage Definition File Location
All Outbound SFTP Binary stages are defined by creating an appropriately formatted JSON definition file in the following location:
Stage JSON Definition File Format
The JSON definition file for an Outbound SFTP Binary stage is as follows:
{
"name": "stage-name",
"displayName": "Brief Stage Title",
"description": "Brief description of the stage.",
"enabled": "$env:STATUS_<INTEGRATION_NAME>",
"source": "source-event",
"concurrency": 10,
"enableVnet": false,
"sftpDetails": {
// See Outbound SFTP stage
},
"actionRetryPolicy": {
"type": "fixed",
"interval": "PT5S",
"count": 90,
"minimumInterval": "PT5S",
"maximumInterval": "PT1H"
},
"emitEvent": "previous-stage-name-1",
"emitError": false,
"emitErrorTerminateSuccess": false,
"leaseLockName": "lock-name"
}
| Property | Description |
|---|---|
name | The name of the stage. |
displayName | Optional (but highly recommended). A short (3 or 4 word) "display name" for the stage, used as a "title" of the stage in the Integration Hub Portal service's self-documentation capability. |
description | Optional (but highly recommended). A brief (10 to 15 word) description of the stage, used as a brief description of the stage's purpose in the Integration Hub Portal service's self-documentation capability. For a more detailed explanation (when needed), use the stage markdown feature. |
enabled | Optional boolean flag (true or false). Default is true. Generally set via a DevOps variable. Controls if the stage is deployed enabled or not. |
source | The source event that the stage subscribes to. See Pub/Sub Model. Alternatively, sources may be supplied, and an array of one or more source events can be subscribed to. |
concurrency | Optional number of concurrent runs permitted for the stage. Default is 10. |
enableVnet | Optional. Boolean flag to indicate if the SFTP connection should use VNet integration to ensure the use of a fixed IP address or not. Default value is false.VNet integration is only supported when deploying using Standard Logic Apps. |
sftpDetails | Details of the SFTP service to send the binary payload to. The options are the same as the Outbound SFTP stage. |
actionRetryPolicy | Optional details of a retry policy to be applied to the relevant SFTP actions of the stage, to allow the default retry policy when performing SFTP actions to be overridden when needed. |
emitEvent | When the upload to the remote SFTP service is successful, the stage will normally terminate. However, under certain circumstances, it may be desirable to continue workflow processing. The optional emitEvent flag allows the payload of a previously run stage to be output as a message from this stage. The stage must have previously been executed in the run history of the overall Integration Hub integration, with the stage's exported payload details being present in the Cloud Event Attributes section. |
emitError | Optional boolean flag (true or false). Default is false. When true, the stage will capture and emit a payload if a non-retryable error is detected, or if a retryable error is detected on the final retry attempt. See the Emit Error Payload section below for more details. |
emitErrorTerminateSuccess | Optional boolean flag (true or false). Default is false. When true, and when emitError is also true, the stage will terminate with a Successful state, rather than a Failed state, in the event of an error being detected and emitted.When the stage is configured to operate in this way, the integration should be defined so that a subsequent stage, or series of stages, will be triggered by the emitted error payload to "handle" the error condition in such a way that reporting and alerting on the error (as would happen if the stage terminated with a Failed state) is unnecessary. |
leaseLockName | Optional. See Lease Locking. |
Required Payload Format
This stage must be triggered with a payload in the following format:
{
"filename": "filename.pdf",
"base64": "base64pfd"
}
| Property | Description |
|---|---|
filename | The full name of the file that will be created on the remote SFTP service. |
base64 | A Base64 encoded string of the file's contents. This string will be decoded into binary during creation of the remote file on the SFTP server. |
Emit Error Payload
In the event that the emitError option has been set to true and:
- a non-retryable error is detected when calling the external SFTP service; or
- a retryable error is detected on the final retry attempt
then the stage will emit an error payload.
There is no defined format for the error payload that is emitted, as it depends on the Azure SFTP action.
The event used to emit the payload will be the full stage name with -error appended, e.g. out-sftp-binary-stage-name-error.
Last updated on