How to use the azure-storage-queue.azure.storage.queue.sharedaccesssignature.QueueSharedAccessSignature function in azure-storage-queue

To help you get started, we’ve selected a few azure-storage-queue examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-storage-python / azure-storage-queue / azure / storage / queue / queueservice.py View on Github external
:param str ip:
            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.
        :param str protocol:
            Specifies the protocol permitted for a request made. The default value
            is https,http. See :class:`~azure.storage.common.models.Protocol` for possible values.
        :return: A Shared Access Signature (sas) token.
        :rtype: str
        '''
        _validate_not_none('self.account_name', self.account_name)
        _validate_not_none('self.account_key', self.account_key)

        sas = QueueSharedAccessSignature(self.account_name, self.account_key)
        return sas.generate_account(Services.QUEUE, resource_types, permission,
                                    expiry, start=start, ip=ip, protocol=protocol)
github Azure / azure-storage-python / azure-storage-queue / azure / storage / queue / queueservice.py View on Github external
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.
        :param str protocol:
            Specifies the protocol permitted for a request made. The default value
            is https,http. See :class:`~azure.storage.common.models.Protocol` for possible values.
        :return: A Shared Access Signature (sas) token.
        :rtype: str
        '''
        _validate_not_none('queue_name', queue_name)
        _validate_not_none('self.account_name', self.account_name)
        _validate_not_none('self.account_key', self.account_key)

        sas = QueueSharedAccessSignature(self.account_name, self.account_key)
        return sas.generate_queue(
            queue_name,
            permission=permission,
            expiry=expiry,
            start=start,
            id=id,
            ip=ip,
            protocol=protocol,
        )

azure-storage-queue

Microsoft Azure Azure Queue Storage Client Library for Python

MIT
Latest version published 2 months ago

Package Health Score

96 / 100
Full package analysis

Popular azure-storage-queue functions