BlobSasPermissions Class

BlobSasPermissions class to be used with the generate_blob_sas function.

Inheritance
builtins.object
BlobSasPermissions

Constructor

BlobSasPermissions(read=False, add=False, create=False, write=False, delete=False, delete_previous_version=False, tag=False, **kwargs)

Parameters

read
bool
default value: False

Read the content, properties, metadata and block list. Use the blob as the source of a copy operation.

add
bool
default value: False

Add a block to an append blob.

create
bool
default value: False

Write a new blob, snapshot a blob, or copy a blob to a new blob.

write
bool
default value: False

Create or write content, properties, metadata, or block list. Snapshot or lease the blob. Resize the blob (page blob only). Use the blob as the destination of a copy operation within the same account.

delete
bool
default value: False

Delete the blob.

delete_previous_version
bool
default value: False

Delete the previous blob version for the versioning enabled storage account.

tag
bool
default value: False

Set or get tags on the blob.

permanent_delete
bool

To enable permanent delete on the blob is permitted.

move
bool

Move a blob or a directory and its contents to a new location.

execute
bool

Get the system properties and, if the hierarchical namespace is enabled for the storage account, get the POSIX ACL of a blob.

set_immutability_policy
bool

To enable operations related to set/delete immutability policy. To get immutability policy, you just need read permission.

Methods

from_string

Create a BlobSasPermissions from a string.

To specify read, add, create, write, or delete permissions you need only to include the first letter of the word in the string. E.g. For read and write permissions, you would provide a string "rw".

from_string

Create a BlobSasPermissions from a string.

To specify read, add, create, write, or delete permissions you need only to include the first letter of the word in the string. E.g. For read and write permissions, you would provide a string "rw".

from_string(permission)

Parameters

permission
str
Required

The string which dictates the read, add, create, write, or delete permissions.

permission
Required

Returns

A BlobSasPermissions object

Return type