Skip to main content

Azure Files Component

Manage files and folders within Azure Files

Component key: azure-files

Description

Azure Files is Microsoft's cloud file sharing platform. While similar to Azure Blob Storage, Azure Files is geared towards creating SMB file shares that groups of users (rather than applications) can use. This component lets you manage files and shares within Azure Files.

Information about Azure Files can be found on their documentation site.

A common integration pattern involves listing files in a file store, and performing a series of actions on the array of files that are returned. See our looping over files quickstart for information about how to create a loop over an array of files.

Connections

Connection String

You can also grant limited access to your Azure Storage Resources using Shared Access Signatures (SAS) authentication, which involves an access token. You can obtain a connection string containing an SAS token from the Azure Portal. Keep in mind this token will eventually expire. Make sure to configure an expiration date you will remember, so you can manually refresh the token at a later date.

Storage Shared Key

Azure Files can use storageSharedKeyCredential authentication, which involves an account / key pair. You can obtain an account name / account key pair through the Azure Portal.

Actions

Copy File

Copy a file | key: copyFile

Output Example Payload

{
"data": {
"_response": {
"parsedHeaders": {},
"status": 200,
"request": {
"url": "www.prismatic.io",
"method": "POST",
"withCredentials": false,
"timeout": 500,
"requestId": "exampleID"
}
}
}
}

Create Folder

Create a folder under an existing path | key: createFolder

Output Example Payload

{
"data": {
"_response": {
"parsedHeaders": {},
"status": 200,
"request": {
"url": "www.prismatic.io",
"method": "POST",
"withCredentials": false,
"timeout": 500,
"requestId": "exampleID"
}
}
}
}

Create Share

Create a file share | key: createShare

Output Example Payload

{
"data": {
"lastModified": "2021-11-30T00:00:00.000Z",
"requestId": "example-request-id",
"version": "2019-07-07",
"date": "2021-11-30T00:00:00.000Z",
"errorCode": null,
"_response": {
"parsedHeaders": {}
}
}
}

Delete File

Delete a file | key: deleteFile

Output Example Payload

{
"data": {
"_response": {
"parsedHeaders": {},
"status": 200,
"request": {
"url": "www.prismatic.io",
"method": "POST",
"withCredentials": false,
"timeout": 500,
"requestId": "exampleID"
}
}
}
}

Delete Folder

Delete an empty folder under an existing path | key: deleteFolder

Output Example Payload

{
"data": {
"_response": {
"parsedHeaders": {},
"status": 200,
"request": {
"url": "www.prismatic.io",
"method": "POST",
"withCredentials": false,
"timeout": 500,
"requestId": "exampleID"
}
}
}
}

Delete Share

Delete a file share | key: deleteShare

Output Example Payload

{
"data": {
"_response": {
"parsedHeaders": {},
"status": 200,
"request": {
"url": "www.prismatic.io",
"method": "POST",
"withCredentials": false,
"timeout": 500,
"requestId": "exampleID"
}
}
}
}

Download File

Download a file | key: downloadFile

Output Example Payload

{
"data": {
"type": "Buffer",
"data": [
101,
120,
97,
109,
112,
108,
101
]
},
"contentType": "application/octet"
}

List Folder

List files and folders in a folder | key: listFolder

Output Example Payload

{
"data": [
{
"_response": {
"parsedHeaders": {},
"status": 200,
"request": {
"url": "www.prismatic.io",
"method": "POST",
"withCredentials": false,
"timeout": 500,
"requestId": "exampleID"
}
},
"shareName": "Example Share",
"serviceEndpoint": "https://example.com",
"directoryPath": "/share/exampleShare",
"continuationToken": "1234abc",
"segment": {
"directoryItems": [],
"fileItems": []
}
}
]
}

List Shares

Get a list of file shares available in the account | key: listShares

Output Example Payload

{
"data": [
{
"name": "example",
"snapshot": "snapshot-v1",
"properties": {}
}
]
}

Upload File

Upload a file under an existing path | key: uploadFile

Output Example Payload

{
"data": {
"_response": {
"parsedHeaders": {},
"status": 200,
"request": {
"url": "www.prismatic.io",
"method": "POST",
"withCredentials": false,
"timeout": 500,
"requestId": "exampleID"
}
}
}
}