Skip to main content

Azure Files

Azure Files offers fully managed file shares in the cloud, accessible via the industry-standard SMB and NFS protocols and a REST API. The ballerinax/azure.storage.files connector connects WSO2 Integrator to Microsoft Azure Files, managing shares and the directories and files within them: uploads, downloads, copies, renames, byte ranges, snapshots, and SAS token generation. A polling Listener turns files arriving on a share into service events.

Key features​

  • Share-scoped Client for directory and file operations, transfers, copies, and byte ranges
  • Account-level AdminClient for creating, listing, deleting, and restoring shares
  • Polling Listener that routes files arriving on a watched path to raw, typed, or streaming content handlers, with an optional onError error handler
  • Share snapshots
  • Authentication with shared key, SAS tokens, connection strings, and Microsoft Entra ID
  • GraalVM compatible for native image builds

Actions​

Actions are operations you invoke on Azure Files from your integration: uploading and downloading files, managing directories and shares, copying, generating SAS tokens, and more. The connector exposes actions through two clients.

ClientActions
ClientDirectory, file, transfer, copy, range, snapshot, and SAS operations within one share
AdminClientAccount-level share management and file-service configuration

See the Action Reference for the full list of operations, parameters, and sample code for each client.

Triggers​

Triggers let your integration react to files arriving on a file share. The connector uses a polling Listener that periodically scans a watched path on a share and routes each file present there to the matching content handler of your service.

EventCallbackDescription
Any file without a dedicated typed handleronFileReceives the raw file content
Text file (.txt)onFileTextReceives the content as a string
JSON file (.json)onFileJsonReceives the parsed JSON content
XML file (.xml)onFileXmlReceives the parsed XML content
CSV file (.csv)onFileCsvReceives the parsed rows
Listener erroronErrorReceives poll failures, content-read failures, and content-binding failures

See the Trigger Reference for listener configuration, the service model, and callback signatures.

Documentation​

  • Setup Guide: How to create a storage account and file share, and obtain credentials.

  • Action Reference: Full reference for both clients: operations, parameters, return types, and sample code.

  • Trigger Reference: Reference for event-driven integration using the listener and service model.

  • Example: Learn how to build and configure an integration using the Azure Files connector, including connection setup, operation configuration, execution flow, and event-driven trigger setup.

How to contribute​

As an open source project, WSO2 welcomes contributions from the community.

To contribute to the code for this module, please create a pull request in the following repository.

Check the issue tracker for open issues that interest you. We look forward to receiving your contributions.