Azure Files

Interact with the Azure Files API

Component key: azure-files

Description#

Azure Files is Microsoft's solution for cloud file share solution. While similar to Azure Blob Storage, Azure Files is geared towards creating SMB file shares that groups of users (rather than applications) can use.

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

Authorization Methods#

Azure Files requires one of the following authorization methods:

Auth TypeKeyDescriptionFields
Basic AuthbasicBasic authorization using a username/password combination

Password |  password

Username |  username

Azure components use storageSharedKeyCredential authentication, which involves an account / key pair. You can obtain an account name / account key pair through the Azure Portal. Enter the account name as your Username, and account key as your Password.

Actions#

Copy File#

Copy a file | key: copyFile

InputKeyNotesExample

From Path

string
/ Required
fromPathAn object in Azure Files is a file that is saved in a 'share'. This represents the source object's file path. Include a leading //path/to/source/file.txt

Share Name

string
/ Required
shareNameAn Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.my-file-share

To Path

string
/ Required
toPathAn object in Azure Files is a file that is saved in a 'share'. This represents the destination object's file path. Include a leading //path/to/destination/file.txt

Output Example Payload#

{
"data": {
"_response": {
"status": 200,
"request": {
"url": "https://example.com",
"method": "POST"
}
},
"copyStatus": "success"
}
}

Create Folder#

Create a folder under an existing path | key: createFolder

InputKeyNotesExample

Path

string
/ Required
pathAn object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Include a leading //path/to/file.txt

Share Name

string
/ Required
shareNameAn Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.my-file-share

Output Example Payload#

{
"data": {
"directoryCreateResponse": {
"etag": "example",
"_response": {
"status": 200,
"request": {
"url": "https://example.com",
"method": "POST"
}
},
"lastModified": "2020-01-01T00:00:00.000Z",
"fileChangedOn": "2020-01-01T00:00:00.000Z",
"fileCreatedOn": "2020-01-01T00:00:00.000Z",
"fileLastWriteOn": "2020-01-01T00:00:00.000Z"
}
}
}

Create Share#

Create a file share | key: createShare

InputKeyNotesExample

Share Name

string
/ Required
shareNameAn Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.my-file-share

Output Example Payload#

{
"data": {
"ShareCreateResponse": {
"etag": "example",
"_response": {
"status": 200,
"request": {
"url": "https://example.com",
"method": "POST"
}
},
"lastModified": "2020-01-01T00:00:00.000Z"
}
}
}

Delete File#

Delete a file | key: deleteFile

InputKeyNotesExample

Path

string
/ Required
pathAn object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Include a leading //path/to/file.txt

Share Name

string
/ Required
shareNameAn Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.my-file-share

Output Example Payload#

{
"data": {
"_response": {
"status": 200,
"request": {
"url": "https://example.com",
"method": "POST"
}
}
}
}

Delete Folder#

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

InputKeyNotesExample

Path

string
/ Required
pathAn object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Include a leading //path/to/file.txt

Share Name

string
/ Required
shareNameAn Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.my-file-share

Output Example Payload#

{
"data": {
"DirectoryDeleteResponse": {
"_response": {
"status": 200,
"request": {
"url": "https://example.com",
"method": "POST"
}
}
}
}
}

Delete Share#

Delete a file share | key: deleteShare

InputKeyNotesExample

Share Name

string
/ Required
shareNameAn Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.my-file-share

Output Example Payload#

{
"data": {
"ShareDeleteResponse": {
"_response": {
"status": 200,
"request": {
"url": "https://example.com",
"method": "POST"
}
},
"lastModified": "2020-01-01T00:00:00.000Z"
}
}
}

Download File#

Download a file | key: downloadFile

InputKeyNotesExample

Path

string
/ Required
pathAn object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Include a leading //path/to/file.txt

Share Name

string
/ Required
shareNameAn Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.my-file-share

Output Example Payload#

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

List Folder#

List files and folders in a folder | key: listFolder

InputKeyNotesExample

Path

string
/ Required
pathAn object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Include a leading //path/to/file.txt

Share Name

string
/ Required
shareNameAn Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.my-file-share

Output Example Payload#

{
"data": [
{
"segment": {
"fileItems": [],
"directoryItems": []
},
"_response": {
"status": 200,
"request": {
"url": "https://example.com",
"method": "POST"
}
},
"shareName": "Example Share",
"directoryPath": "/share/exampleShare",
"serviceEndpoint": "https://example.com",
"continuationToken": "1234abc"
}
]
}

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

InputKeyNotesExample

File Contents

data
/ Required
fileContentsThe contents to write to a file. This can be a string of text, it can be binary data (like an image or PDF) that was generated in a previous step.My File Contents

Path

string
/ Required
pathAn object in Azure Files is a file that is saved in a 'share'. This represents the object's file path. Include a leading //path/to/file.txt

Share Name

string
/ Required
shareNameAn Azure Files 'share' is a container where files are stored. You can create a share from within the Azure console. Share names contain only letters, numbers, and dashes.my-file-share

Output Example Payload#

{
"data": {
"fileCreateResponse": {
"_response": {
"status": 200,
"request": {
"url": "https://example.com",
"method": "POST"
}
},
"fileChangedOn": "2020-01-01T00:00:00.000Z",
"fileCreatedOn": "2020-01-01T00:00:00.000Z",
"fileLastWriteOn": "2020-01-01T00:00:00.000Z"
}
}
}