SAS Generator
Overview
This Snap generates a SAS (Shared Access Signature) URI that enable you to access Azure Storage containers or blobs for a specified period. You can use this URI with other Snaps, such as File Writer or File Reader , to interact with the files in the Azure Storage container or blob. See Using SAS for more information on SAS.
Depending upon the Snap's configuration, you can either access all blobs in a container, or a specific blob in a container. See Snap Settings for more information.
Read-type Snap
Works in Ultra Tasks
SAS Type Compatibility Chart
| Snap Name | Service SAS On Container | Service SAS On Blob | Account SAS |
|---|---|---|---|
| Directory Browser | Yes | No | No |
| File Delete | Yes | Yes | No |
| File Operation | Yes | No | Yes |
| File Poller | Yes | No | No |
| File Reader | Yes | Yes | Yes |
| File Writer | Yes | Yes | Yes |
| Multi File Reader | Yes | No | No |
| Zipfile Read | Yes | Yes | Yes |
| Zipfile Write | Yes | Yes | Yes |
Configuring Accounts
This Snap uses account references created on the Accounts page of the SnapLogic Manager to handle access to this endpoint. This Snap requires an Azure Storage account. See Configuring Binary accounts for information on setting up accounts that work with this Snap.
Snap views
| View | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input | This Snap has at most one optional document input view. It may contain values
to evaluate expression properties in
SAS Generator
Snap. A document containing the key/value pairs required for populating the expression properties in the Snap. |
|
| Output | This Snap has exactly one output view. A document containing two fields,
SasType and SasUri. The following is a sample output document: |
|
| Error |
Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. |
|
Snap settings
- Expression icon (
): Allows using pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
- SnapGPT (
): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
- Suggestion icon (
): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
- Upload
: Uploads files. Learn more.
| Field / Field set | Type | Description |
|---|---|---|
| Label | String | Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: SAS Generator Example: SAS Generator |
| Container | String/Expression/ Suggestion | The name of the Azure Storage container that you want to access. Enter the name
or select one suggested by the Snap. This property is required for Service SAS on
container and Service SAS on blob. Warning: The container's name must
always be in lowercase. See Referencing Containers and Blobs for more
information. Default value: N/A Example: testcontainer |
| Blob | String/Expression/ Suggestion | The name of the Azure Storage blob that you want to access. Enter the name or
select one suggested by the Snap. Blob name should be a relative path in the
container. Warning: Leave this property blank to access all the blobs
in the specified container. Default value: N/A Example:
|
| Protocol | Dropdown list | The protocol over which Azure Storage permits access to the client using the
SAS URI. Available options are:
Default value: https |
| SAS Permissions | Select the file-access permissions that you want to assign to users of the SAS URI. See Specifying Permissions for more information. | |
| Read | Dropdown list | Permission to read a blob. Default value: READ |
| Write | Dropdown list | Permission to create or overwrite a blob. Default value: WRITE |
| List | Dropdown list | Permission to list a directory Default value: LIST |
| Create | Dropdown list | Permission to create a blob (cannot overwrite an existing blob) Default value: CREATE |
| Delete | Dropdown list | Permission to delete a blob. Default value: DELETE |
| Expire in (hours) | Integer/Expression | Specifies the validity of the SAS URI in hours. Configure this property and the
Expire in (minutes) property to specify the total duration of the URI's validity.
Minimum value: 0 Example: 3 Default value: 0 |
| Expire in (minutes) | Integer/Expression | Specifies the expire time in minutes. Minimum value: 0 Default value: 1 Example: 10 |
| Snap execution | Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
Default value: Execute only Example: Validate & Execute |
Understanding the SAS URI Validity
The validity of the SAS URI is determined by the values in the Expire in (hours) and Expire in (minutes) properties. For example, if the SAS Generator Snap is configured as shown below, the validity of the SAS URI generated by the Snap is 3 hours and 43 minutes.