Home Search

DriveWorks Pro 22
Generate File Share SAS for Single File

Send Feedback

Generate File Share SAS for Single File

Generates a Shared Access Signature (SAS) to allow a file stored in Microsoft Azure to be shared.

Properties

Property NameDescription
Connection StringThe connection string for the Storage Account.

See the Microsoft article Configure Azure Storage connection strings for more information.

Share NameName of the File Share.
Share PathThe File Share path to upload the file into. Leave blank to create a SAS at the root.

Must adhere to the following rules:

  • A path name must not exceed 2048 characters in length.
  • The depth of subdirectories in the path must not exceed 250.
  • Directory and file names must not exceed 255 characters in length.
  • Directory and file names must not use the following characters: " \ : | < > * ? /
  • Directory and file names must not be empty or consist only of whitespace.
  • Directory and file names must not have their last character be a full stop.
  • Directory and file names must not have their last character be whitespace.
  • Directory and file names must not only consist of full stop characters.
File NameThe name of the file to share.

Must adhere to the following rules:

  • Directory and file names must not exceed 255 characters in length.
  • Directory and file names must not use the following characters: " \ : | < > * ? /
  • Directory and file names must not be empty or consist only of whitespace.
  • Directory and file names must not have their last character be a full stop.
  • Directory and file names must not have their last character be whitespace.
  • Directory and file names must not only consist of full stop characters.
PermissionsA pipebar list of permissions. Supported values are: 'Read', 'Write', 'Create', 'Delete', and 'All' or use a '*' to represent 'All'.
Start Date/TimeThe date/time when the signature starts in UTC and 'yyyy-MM-dd hh:mm:ss zzz', 'yyyy-MM-dd hh:mm:ss' or 'yyyy-MM-dd' formats. Leave blank for the signature to start immediately.
Expiry Date/TimeThe date/time when the signature expires in UTC and 'yyyy-MM-dd hh:mm:ss zzz', 'yyyy-MM-dd hh:mm:ss' or 'yyyy-MM-dd' formats.

When this Task is added the properties are static. To be able to build rules on a static property see How To: Change A Static Property To A Dynamic Property.

Example

Property NameExample RuleMeaning
Connection StringDWVariableAzureStorageConnectionStringThis is the connection string used to identify the Azure Storage Account to connect to.
Share Name"My File Share"This is the name of the File Share.
Share Path"" This is the Azure File Share Path to upload the file to. A blank or empty value will upload the file to the root directory.
File Name"Quote.pdf"Will share the file named Quote.pdf
Permissions"read|write"Gives read and write permissions to the file.
Start Date/TimeThe share will be available immediately.
Expiry Date/TimeText(Now() + 3,"YYY-MM-DD")The share will be available for 3 days from the time calculated.

Using the Task in a Specification Macro

This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.

Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.

Data Outputs

The following Data Outputs are available to pass Data from the Task back into the Specification.

See Data Outputs for more information.

  • SAS URL - The generated Shared Access Signature URL.

Status Outputs

This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.

The status output navigation is as follows:

Success

  • SAS generated for file <File Name> in the share <Share Name>.

Success with Warnings

  • N/A - should never be fulfilled

Failed (one of the following occurred)

  • The provided <Connection String> is null or empty. Please provide a valid <Connection String>.
  • The provided <Share Name> is null or empty. Please provide a valid <Share Name>.
  • The provided <File Name> is null or empty. Please provide a valid <File Name>.
  • The provided <Permissions> is null or empty. Please provide a valid <Permissions>.
  • The provided <Expiry Date> is null or empty. Please provide a valid <Expiry Date>.
  • The property <Connection String> cannot be left empty.
  • The property <Share Name> cannot be left empty.
  • The property <File Name> cannot be left empty.
  • The property <Permissions> cannot be left empty.
  • The property <Expiry Date> cannot be left empty.
  • The Share Path <Share Path Value> is not a valid Azure File Share Path.
  • The File Name <File Name Value> is not a valid Azure File Share File Name.
  • At least one entry in the permissions list is empty or only consists of whitespace.
  • At least one of the provided SAS Permissions is invalid.
  • The provided Start Date value of <Start Date Value> has an incorrect format or is not a valid date time.
  • The provided Expiry Date value of <Expiry Date Value> has an incorrect format or is not a valid date time.
  • Unable to generate the Shared Access Signature: <PROBLEM_DETAILS>

More Information

DriveWorks can be hosted on Microsoft Azure, for more information see Microsoft Azure.