BlobSasPermissions Class

BlobSasPermissions class to be used with the generate_blob_sas function.

Inheritance
builtins.object
BlobSasPermissions

Constructor

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

Parameters

Name Description
read

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

Default value: False
add

Add a block to an append blob.

Default value: False
create

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

Default value: False
write

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.

Default value: False
delete

Delete the blob.

Default value: False
delete_previous_version

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

Default value: False
tag

Set or get tags on the blob.

Default value: False

Keyword-Only Parameters

Name Description
permanent_delete

To enable permanent delete on the blob is permitted.

move

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

execute

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

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: str) -> BlobSasPermissions

Parameters

Name Description
permission
Required
str

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

Returns

Type Description

A BlobSasPermissions object

Attributes

add

The add permission for Blob SAS.

add: bool | None

create

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

create: bool | None

delete

The delete permission for Blob SAS.

delete: bool = False

delete_previous_version

Permission to delete previous blob version for versioning enabled storage accounts.

delete_previous_version: bool = False

execute

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

execute: bool | None

move

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

move: bool | None

permanent_delete

To enable permanent delete on the blob is permitted.

permanent_delete: bool | None

read

The read permission for Blob SAS.

read: bool = False

set_immutability_policy

To get immutability policy, you just need read permission.

set_immutability_policy: bool | None

tag

Set or get tags on the blobs in the Blob.

tag: bool = False

write

The write permission for Blob SAS.

write: bool = False