DirectorySASPermissions class

This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a directory. Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the values are set, this should be serialized with toString and set as the permissions field on a DataLakeSASSignatureValues object. It is possible to construct the permissions string without this class, but the order of the permissions is particular and this class guarantees correctness.

Properties

add

Specifies Add access granted.

create

Specifies Create access granted.

delete

Specifies Delete access granted.

execute

Specifies Execute access granted.

list

Specifies List access granted.

manageAccessControl

Specifies Permission access granted, which allows the caller to set permissions and POSIX ACLs on blobs (files and directories).

manageOwnership

Specifies Ownership access granted, which allows the caller to set owner, owning group, or act as the owner when renaming or deleting a blob (file or directory) within a folder that has the sticky bit set.

move

Specifies Move access granted.

read

Specifies Read access granted.

write

Specifies Write access granted.

Methods

parse(string)

Creates an DirectorySASPermissions from the specified permissions string. This method will throw an Error if it encounters a character that does not correspond to a valid permission.

toString()

Converts the given permissions to a string. Using this method will guarantee the permissions are in an order accepted by the service.

The order of the characters should be as specified here to ensure correctness.

See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas

Property Details

add

Specifies Add access granted.

add: boolean

Property Value

boolean

create

Specifies Create access granted.

create: boolean

Property Value

boolean

delete

Specifies Delete access granted.

delete: boolean

Property Value

boolean

execute

Specifies Execute access granted.

execute: boolean

Property Value

boolean

list

Specifies List access granted.

list: boolean

Property Value

boolean

manageAccessControl

Specifies Permission access granted, which allows the caller to set permissions and POSIX ACLs on blobs (files and directories).

manageAccessControl: boolean

Property Value

boolean

manageOwnership

Specifies Ownership access granted, which allows the caller to set owner, owning group, or act as the owner when renaming or deleting a blob (file or directory) within a folder that has the sticky bit set.

manageOwnership: boolean

Property Value

boolean

move

Specifies Move access granted.

move: boolean

Property Value

boolean

read

Specifies Read access granted.

read: boolean

Property Value

boolean

write

Specifies Write access granted.

write: boolean

Property Value

boolean

Method Details

parse(string)

Creates an DirectorySASPermissions from the specified permissions string. This method will throw an Error if it encounters a character that does not correspond to a valid permission.

static function parse(permissions: string): DirectorySASPermissions

Parameters

permissions

string

Returns

toString()

Converts the given permissions to a string. Using this method will guarantee the permissions are in an order accepted by the service.

The order of the characters should be as specified here to ensure correctness.

See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas

function toString(): string

Returns

string