How to use azure-mgmt-common - 4 common examples

To help you get started, we’ve selected a few azure-mgmt-common 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-sdk-for-python / azure-mgmt-common / azure / mgmt / common / __init__.py View on Github external
def sign_request(self, request):
        request.headers['Authorization'] = \
            (self.access_token_type + ' ' + self.access_token)


class AzureOperationResponse(object):
    """
    "A standard service response including an HTTP status code and request ID.
    """
    def __init__(self, **kwargs):
        self.request_id = None
        self.status_code = None


class OperationStatusResponse(AzureOperationResponse):
    """
    Represent the response from a long running operation.
    It contains the status of the specified operation, indicating 
    whether it has succeeded, is in progress, or has failed. If the
    operation failed, the error field includes the HTTP
    status code for the failed request, and also includes error
    information regarding the failure.
    """
    def __init__(self, *args, **kwargs):
        super(OperationStatusResponse, self).__init__(*args, **kwargs)
        self.id = None
        self.status = None
        self.http_status_code = None
        self.error = None

    class ErrorDetails:
github Azure / azure-sdk-for-python / azure-mgmt-common / azure / mgmt / common / __init__.py View on Github external
def __init__(self, *args, **kwargs):
        super(OperationStatusResponse, self).__init__(*args, **kwargs)
        self.id = None
        self.status = None
        self.http_status_code = None
        self.error = None
github Azure / azure-sdk-for-python / azure-mgmt-common / azure / mgmt / common / arm.py View on Github external
    @location.setter 
    def location(self, value):
        self._location = value

    @property
    def tags(self):
        """
         Gets the tags attached to the resource.
        """
        return self._tags
    
    @tags.setter 
    def tags(self, value):
        self._tags = value

class ResourceBaseExtended(ResourceBase):
    def __init__(self, **kwargs):
        super(ResourceBaseExtended, self).__init__(**kwargs)
        self._id = kwargs.get('id')
        self._name = kwargs.get('name')
        self._type = kwargs.get('type')

    @property
    def id(self):
        """
         Gets the ID of the resource.
        """
        return self._id
    
    @id.setter 
    def id(self, value):
        self._id = value
github Azure / azure-sdk-for-python / azure-mgmt-common / azure / mgmt / common / arm.py View on Github external
def __init__(self, **kwargs):
        super(ResourceBaseExtended, self).__init__(**kwargs)
        self._id = kwargs.get('id')
        self._name = kwargs.get('name')
        self._type = kwargs.get('type')

azure-mgmt-common

Microsoft Azure Resource Management Client Library for Python (Common)

MIT
Latest version published 9 years ago

Package Health Score

69 / 100
Full package analysis

Similar packages