Microsoft Azure Blob Storage Connector
This adapter allows you to connect to a Microsoft Azure Blob storage to perform various operations.Properties
Operation | Defines the operation executed by the adapter Possible values: The
|
Parameters
Adapter | Adapter main class (do not change!) Possible values: de.softproject.integration.adapter.microsoft.azure.blob.MicrosoftAzureBlobStorageAdapter: main class (default) |
accountName | Name of the Microsoft Azure storage account Possible values: Any valid string, e. g. |
accountKey | Password of the Microsoft Azure storage account Possible values: Any string containing the key, e. g. |
containerName | Name of the container where the blobs are organized Possible values: Any string containing the name The container name must meet the following naming rules:
|
blobName | Name of the blobs stored Possible values: Any string containing the name The blob name must meet the following naming rules:
|
fileLocation | Path of the file to be uploaded to the storage account; This parameter is only valid for the operation Possible values:
|
overwrite | Flag indicating whether blobs are overwritten or not |
sourceDirectoryName | Name of the source directory for all directory operations Possible values: Any valid string ending with |
targetDirectoryName | Name of the target directory for all directory operations Possible values: Any valid string ending with |
Status values
1 | The operation was executed successfully |
-1 | An error occurred during execution |
0 |
|
Input
The adapter expects any input document, e. g. a binary document or a base64 document (XML or text).
- Operation
Upload
: An input document can be omitted, if the parameterfileLocation
is specified. In any other cases an input document is required. - For all other operations, an input document is not required.
Output
The adapter returns different kind of documents depending on the executed operation:
Operation Upload:
If the operation was executed successfully (status
1
), the adapter returns an XML document with the URL of the uploaded file or document.Operation Upload: Status 1
XML<?xml version="1.0" encoding="UTF-8" <BLOB> <Upload>https://storage_account_name.blob.core.windows.net/container_name/blob_name</Upload> </BLOB>
In case of an error (status
-1
), the output corresponds to the input document.
Operation Search
:
If the operation was executed successfully (status
1
), the adapter returns an XML document with all containers and their blob URI objects.Operation Search: Status 1
XML<?xml version="1.0" encoding="UTF-8" <ListBlobs> <Container name="pc-files"> <Blob name="C-structure.xml">https://softproject.blob.core.windows.net/pc-files/C-structure.xml</Blob> <Blob name="XStore_WordDocument.doc">https://softproject.blob.core.windows.net/pc-files/XStore_WordDocument.doc</Blob> <Blob name="jar_files(1).zip">https://softproject.blob.core.windows.net/pc-files/jar_files(1).zip</Blob> <Blob name="x4db/HipChat-4.30.6.1676.exe">https://softproject.blob.core.windows.net/pc-files/x4db/HipChat-4.30.6.1676.exe</Blob> <Blob name="xstore/MWDocument.doc">https://softproject.blob.core.windows.net/pc-files/xstore/MWDocument.doc</Blob> </Container> <Container name="testcontainer-prototype"> <Blob name="base64Files/file1">https://softproject.blob.core.windows.net/testcontainer-prototype/base64Files/file1</Blob> <Blob name="documents/doc1">https://softproject.blob.core.windows.net/testcontainer-prototype/documents/doc1</Blob> <Blob name="documents/doc1.docx">https://softproject.blob.core.windows.net/testcontainer-prototype/documents/doc1.docx</Blob> <Blob name="imagesFiles/image1">https://softproject.blob.core.windows.net/testcontainer-prototype/imagesFiles/image1</Blob> <Blob name="textFiles/subTextFiles/text5.txt">https://softproject.blob.core.windows.net/testcontainer-prototype/textFiles/subTextFiles/text5.txt</Blob> <Blob name="xml1.xml">https://softproject.blob.core.windows.net/testcontainer-prototype/xml1.xml</Blob> <Blob name="xmlFiles/xml1">https://softproject.blob.core.windows.net/testcontainer-prototype/xmlFiles/xml1</Blob> <Blob name="xmlFiles/xml1.xml">https://softproject.blob.core.windows.net/testcontainer-prototype/xmlFiles/xml1.xml</Blob> </Container> <Container name="test">... </Container> </ListBlobs>
In case of an error (status
-1
), the output corresponds to the input document.
Operation Download:
- If the operation was executed successfully (status
1
), the adapter returns the downloaded blob (text, XML, binary document etc.). - In case of an error (status
-1
), the output corresponds to the input document. - If the blob or container don’t exist (status 0), the output document corresponds to the input document.
Operation UpdateDirectory
:
If the operation was executed successfully (status
1
), the output document shows all affected blobs after updating the source folder with the name of the target folder.Operation UpdateDirectory: Status 1
XML<?xml version="1.0" encoding="UTF-8" <UpdateDirectory targetDirectory="testFolderR/" sourceDirectory="testFolder/"> <Blob newName="testFolderR/C-structure.xml" name="testFolder/C-structure.xml"/> <Blob newName="testFolderR/X4_1_Configuration.txt" name="testFolder/X4_1_Configuration.txt"/> </UpdateDirectory>
- In case of an error (status
-1
), the output corresponds to the input document. If the source directory doesn't exists (status
0
), the output is an empty XML document.Operation UpdateDirectory: Status 0
XML<?xml version="1.0" encoding="UTF-8" <UpdateDirectory targetDirectory="otherFiles/testSubFolderR/" sourceDirectory="textFiles/subTextFiles"/>
Operation MoveDirectory:
If the operation was executed successfully (status
1
), the output document shows all affected blobs after moving the source folder to the target folder.Operation MoveDirectory: Status 1
XML<?xml version="1.0" encoding="UTF-8" <MoveDirectory targetDirectory="textFiles/" sourceDirectory="testFolderR/"> <Blob newName="textFiles/C-structure.xml" name="testFolderR/C-structure.xml"/> <Blob newName="textFiles/X4_1_Configuration.txt" name="testFolderR/X4_1_Configuration.txt"/> </MoveDirectory>
- In case of an error (status
-1
), the output corresponds to the input document. If the source or target directory doesn't exists (status
0
), the output is an empty XML document.Operation MoveDirectory: Status 0 - Target directory doesn't exist
XML<?xml version="1.0" encoding="UTF-8" <MoveDirectory targetDirectory="otherFiles/testSubFolderR/" sourceDirectory="textFiles/subFolderR"> Target Directory not found for Move operation </MoveDirectory>
Operation MoveDirectory: Status 0 - Source directory doesn't exist
XML<?xml version="1.0" encoding="UTF-8" <MoveBlobDirectory targetDirectory="textFiles/" sourceDirectory="otherFiles/testSubFolderR"/>
Operation DeleteDirectory:
If the operation was executed successfully (status
1
), the output document shows all affected blobs after deleting the source folder and its contentOperation DeleteDirectory: Status 1
XML<?xml version="1.0" encoding="UTF-8" <DeleteDirectory targetDirectory="" sourceDirectory="imagesFiles2/"> <Blob newName="" name="imagesFiles2/image1.png"/> </DeleteDirectory>
- In case of an error (status
-1
), the output corresponds to the input document. If the source directory doesn't exists (status
0
), the output is an empty XML document.Operation DeleteDirectory: Status 0
XML<?xml version="1.0" encoding="UTF-8" <DeleteDirectory targetDirectory="" sourceDirectory="imagesFiles2/"/>
Operation MoveBlobDirectory:
If the operation was executed successfully (status
1
), the output document shows the blobs moved from the source to the target folder.Operation MoveBlobDirectory: Status 1
XML<?xml version="1.0" encoding="UTF-8" <MoveBlobDirectory targetDirectory="/" sourceDirectory="textFiles/"> <Blob newName="X4_1_Configuration.txt" name="textFiles/X4_1_Configuration.txt"/> </MoveBlobDirectory>
- In case of an error (status
-1
), the output corresponds to the input document. If the source or target directory doesn't exists (status
0
), the output is an empty XML document.Operation MoveBlobDirectory: Status 0 - Target directory doesn't exist
XML<?xml version="1.0" encoding="UTF-8" <MoveBlobDirectory targetDirectory="otherFiles/testSubFolderR/" sourceDirectory="textFiles/subFolderR"> Target Directory not found for Move operation </MoveDirectory>
Operation MoveBlobDirectory: Status 0 - Source directory doesn't exist
XML<?xml version="1.0" encoding="UTF-8" <MoveBlobDirectory targetDirectory="textFiles/" sourceDirectory="otherFiles/testSubFolderR"/>