CloudStorageAccount class
Definition
Provides a factory for creating the blob, queue, and file services with a common account name and account key or sas token. Users can either use the factory or can construct the appropriate service directly.
CloudStorageAccount(account_name=None, account_key=None, sas_token=None, is_emulated=None, endpoint_suffix=None)
- Inheritance
-
builtins.objectCloudStorageAccount
Methods
| create_append_blob_service |
Creates a AppendBlobService object with the settings specified in the CloudStorageAccount. |
| create_block_blob_service |
Creates a BlockBlobService object with the settings specified in the CloudStorageAccount. |
| create_file_service |
Creates a FileService object with the settings specified in the CloudStorageAccount. |
| create_page_blob_service |
Creates a PageBlobService object with the settings specified in the CloudStorageAccount. |
| create_queue_service |
Creates a QueueService object with the settings specified in the CloudStorageAccount. |
| generate_shared_access_signature |
Generates a shared access signature for the account. Use the returned signature with the sas_token parameter of the service or to create a new account object. |
create_append_blob_service
Creates a AppendBlobService object with the settings specified in the CloudStorageAccount.
create_append_blob_service()
Returns
A service object.
Return type
create_block_blob_service
Creates a BlockBlobService object with the settings specified in the CloudStorageAccount.
create_block_blob_service()
Returns
A service object.
Return type
create_file_service
Creates a FileService object with the settings specified in the CloudStorageAccount.
create_file_service()
Returns
A service object.
Return type
create_page_blob_service
Creates a PageBlobService object with the settings specified in the CloudStorageAccount.
create_page_blob_service()
Returns
A service object.
Return type
create_queue_service
Creates a QueueService object with the settings specified in the CloudStorageAccount.
create_queue_service()
Returns
A service object.
Return type
generate_shared_access_signature
Generates a shared access signature for the account. Use the returned signature with the sas_token parameter of the service or to create a new account object.
generate_shared_access_signature(services, resource_types, permission, expiry, start=None, ip=None, protocol=None)
Parameters
- services
- Services
Specifies the services accessible with the account SAS. You can combine values to provide access to more than one service.
- resource_types
- ResourceTypes
Specifies the resource types that are accessible with the account SAS. You can combine values to provide access to more than one resource type.
- permission
- AccountPermissions
The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy. You can combine values to provide more than one permission.
- expiry
- datetime or str
The time at which the shared access signature becomes invalid. Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC.
- start
- datetime or str
The time at which the shared access signature becomes valid. If omitted, start time for this call is assumed to be the time when the storage service receives the request. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC.
- ip
- str
Specifies an IP address or a range of IP addresses from which to accept requests. If the IP address from which the request originates does not match the IP address or address range specified on the SAS token, the request is not authenticated. For example, specifying sip=168.1.5.65 or sip=168.1.5.60-168.1.5.70 on the SAS restricts the request to those IP addresses.
- protocol
- str
Specifies the protocol permitted for a request made. Possible values are both HTTPS and HTTP (https,http) or HTTPS only (https). The default value is https,http. Note that HTTP only is not a permitted value.