ContainerSasPermissions class
Definition
ContainerSasPermissions class to be used with the generate_container_sas(account_name, container_name, account_key=None, user_delegation_key=None, permission=None, expiry=None, start=None, policy_id=None, ip=None, **kwargs) function and for the AccessPolicies used with set_container_access_policy(signed_identifiers, public_access=None, **kwargs).
ContainerSasPermissions(read=False, write=False, delete=False, list=False)
- Inheritance
-
builtins.objectContainerSasPermissions
Parameters
- read
- bool
Read the content, properties, metadata or block list of any blob in the container. Use any blob in the container as the source of a copy operation.
- write
- bool
For any blob in the container, 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. Note: You cannot grant permissions to read or write container properties or metadata, nor to lease a container, with a container SAS. Use an account SAS instead.
- delete
- bool
Delete any blob in the container. Note: You cannot grant permissions to delete a container with a container SAS. Use an account SAS instead.
- list
- bool
List blobs in the container.
Methods
| from_string |
Create a ContainerSasPermissions from a string. To specify read, write, delete, or list 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 ContainerSasPermissions from a string.
To specify read, write, delete, or list 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
The string which dictates the read, write, delete, and list permissions.
- permission
Returns
A ContainerSasPermissions object