FileSASPermissions class
僅適用於運行時間NODE.JS。
這是協助程序類別,用來建構字串,代表 ServiceSAS 授與給檔案的許可權。 將值設定為 true 表示任何使用這些許可權的 SAS 都會授與該作業的許可權。 設定所有值之後,應該使用 toString 串行化,並設定為 FileSASSignatureValues 對象的許可權欄位。 可以建構沒有這個類別的許可權字串,但許可權的順序是特定的,而且這個類別保證正確性。
屬性
create | 指定授與建立存取權。 |
delete | 指定授與刪除存取權。 |
read | 指定授與的讀取許可權。 |
write | 指定授與的寫入存取權。 |
方法
parse(string) | 從指定的許可權字串建立 FileSASPermissions。 如果遇到未對應至有效許可權的字元,這個方法將會擲回 Error。 |
to |
將指定的許可權轉換為字串。 使用此方法可確保許可權依服務接受的順序。 |
屬性詳細資料
create
指定授與建立存取權。
create: boolean
屬性值
boolean
delete
指定授與刪除存取權。
delete: boolean
屬性值
boolean
read
指定授與的讀取許可權。
read: boolean
屬性值
boolean
write
指定授與的寫入存取權。
write: boolean
屬性值
boolean
方法詳細資料
parse(string)
從指定的許可權字串建立 FileSASPermissions。 如果遇到未對應至有效許可權的字元,這個方法將會擲回 Error。
static function parse(permissions: string): FileSASPermissions
參數
- permissions
-
string
傳回
toString()
將指定的許可權轉換為字串。 使用此方法可確保許可權依服務接受的順序。
function toString(): string
傳回
string
表示 FileSASPermissions 的字串