How to use the azure-mgmt-storage.azure.mgmt.storage.storagemanagement.StorageAccount function in azure-mgmt-storage

To help you get started, we’ve selected a few azure-mgmt-storage 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-storage / azure / mgmt / storage / storagemanagement.py View on Github external
if status_code != 200:
            error = AzureHttpError(body, response.status_code)
            raise error
        
        # Create Result
        result = None
        # Deserialize Response
        if status_code == 200:
            response_content = body
            result = StorageAccountUpdateResponse()
            response_doc = None
            if response_content:
                response_doc = json.loads(response_content.decode())
            
            if response_doc is not None:
                storage_account_instance = StorageAccount(tags={})
                result.storage_account = storage_account_instance
                
                id_value = response_doc.get('id', None)
                if id_value is not None:
                    id_instance = id_value
                    storage_account_instance.id = id_instance
                
                name_value = response_doc.get('name', None)
                if name_value is not None:
                    name_instance = name_value
                    storage_account_instance.name = name_instance
                
                type_value = response_doc.get('type', None)
                if type_value is not None:
                    type_instance = type_value
                    storage_account_instance.type = type_instance
github Azure / azure-sdk-for-python / azure-mgmt-storage / azure / mgmt / storage / storagemanagement.py View on Github external
if status_code != 200 and status_code != 202 and status_code != 500:
            error = AzureHttpError(body, response.status_code)
            raise error
        
        # Create Result
        result = None
        # Deserialize Response
        if status_code == 200 or status_code == 202 or status_code == 500:
            response_content = body
            result = StorageAccountCreateResponse()
            response_doc = None
            if response_content:
                response_doc = json.loads(response_content.decode())
            
            if response_doc is not None:
                storage_account_instance = StorageAccount(tags={})
                result.storage_account = storage_account_instance
                
                id_value = response_doc.get('id', None)
                if id_value is not None:
                    id_instance = id_value
                    storage_account_instance.id = id_instance
                
                name_value = response_doc.get('name', None)
                if name_value is not None:
                    name_instance = name_value
                    storage_account_instance.name = name_instance
                
                type_value = response_doc.get('type', None)
                if type_value is not None:
                    type_instance = type_value
                    storage_account_instance.type = type_instance
github Azure / azure-sdk-for-python / azure-mgmt-storage / azure / mgmt / storage / storagemanagement.py View on Github external
# Create Result
        result = None
        # Deserialize Response
        if status_code == 200:
            response_content = body
            result = StorageAccountListResponse(storage_accounts=[])
            response_doc = None
            if response_content:
                response_doc = json.loads(response_content.decode())
            
            if response_doc is not None:
                value_array = response_doc.get('value', None)
                if value_array is not None:
                    for value_value in value_array:
                        storage_account_json_instance = StorageAccount(tags={})
                        result.storage_accounts.append(storage_account_json_instance)
                        
                        id_value = value_value.get('id', None)
                        if id_value is not None:
                            id_instance = id_value
                            storage_account_json_instance.id = id_instance
                        
                        name_value = value_value.get('name', None)
                        if name_value is not None:
                            name_instance = name_value
                            storage_account_json_instance.name = name_instance
                        
                        type_value = value_value.get('type', None)
                        if type_value is not None:
                            type_instance = type_value
                            storage_account_json_instance.type = type_instance
github Azure / azure-sdk-for-python / azure-mgmt-storage / azure / mgmt / storage / storagemanagement.py View on Github external
# Create Result
        result = None
        # Deserialize Response
        if status_code == 200:
            response_content = body
            result = StorageAccountListResponse(storage_accounts=[])
            response_doc = None
            if response_content:
                response_doc = json.loads(response_content.decode())
            
            if response_doc is not None:
                value_array = response_doc.get('value', None)
                if value_array is not None:
                    for value_value in value_array:
                        storage_account_json_instance = StorageAccount(tags={})
                        result.storage_accounts.append(storage_account_json_instance)
                        
                        id_value = value_value.get('id', None)
                        if id_value is not None:
                            id_instance = id_value
                            storage_account_json_instance.id = id_instance
                        
                        name_value = value_value.get('name', None)
                        if name_value is not None:
                            name_instance = name_value
                            storage_account_json_instance.name = name_instance
                        
                        type_value = value_value.get('type', None)
                        if type_value is not None:
                            type_instance = type_value
                            storage_account_json_instance.type = type_instance
github Azure / azure-sdk-for-python / azure-mgmt-storage / azure / mgmt / storage / storagemanagement.py View on Github external
if status_code != 200:
            error = AzureHttpError(body, response.status_code)
            raise error
        
        # Create Result
        result = None
        # Deserialize Response
        if status_code == 200:
            response_content = body
            result = StorageAccountGetPropertiesResponse()
            response_doc = None
            if response_content:
                response_doc = json.loads(response_content.decode())
            
            if response_doc is not None:
                storage_account_instance = StorageAccount(tags={})
                result.storage_account = storage_account_instance
                
                id_value = response_doc.get('id', None)
                if id_value is not None:
                    id_instance = id_value
                    storage_account_instance.id = id_instance
                
                name_value = response_doc.get('name', None)
                if name_value is not None:
                    name_instance = name_value
                    storage_account_instance.name = name_instance
                
                type_value = response_doc.get('type', None)
                if type_value is not None:
                    type_instance = type_value
                    storage_account_instance.type = type_instance
github Azure / azure-sdk-for-python / azure-mgmt-storage / azure / mgmt / storage / storagemanagement.py View on Github external
def __init__(self, **kwargs):
        super(StorageAccount, self).__init__(**kwargs)
        self._provisioning_state = kwargs.get('provisioning_state')
        self._account_type = kwargs.get('account_type')
        self._primary_endpoints = kwargs.get('primary_endpoints')
        self._primary_location = kwargs.get('primary_location')
        self._status_of_primary = kwargs.get('status_of_primary')
        self._last_geo_failover_time = kwargs.get('last_geo_failover_time')
        self._secondary_endpoints = kwargs.get('secondary_endpoints')
        self._secondary_location = kwargs.get('secondary_location')
        self._status_of_secondary = kwargs.get('status_of_secondary')
        self._creation_time = kwargs.get('creation_time')
        self._custom_domain = kwargs.get('custom_domain')
github Azure / azure-sdk-for-python / azure-mgmt-storage / azure / mgmt / storage / storagemanagement.py View on Github external
if status_code != 200 and status_code != 202:
            error = AzureHttpError(body, response.status_code)
            raise error
        
        # Create Result
        result = None
        # Deserialize Response
        if status_code == 200 or status_code == 202:
            response_content = body
            result = StorageAccountCreateResponse()
            response_doc = None
            if response_content:
                response_doc = json.loads(response_content.decode())
            
            if response_doc is not None:
                storage_account_instance = StorageAccount(tags={})
                result.storage_account = storage_account_instance
                
                id_value = response_doc.get('id', None)
                if id_value is not None:
                    id_instance = id_value
                    storage_account_instance.id = id_instance
                
                name_value = response_doc.get('name', None)
                if name_value is not None:
                    name_instance = name_value
                    storage_account_instance.name = name_instance
                
                type_value = response_doc.get('type', None)
                if type_value is not None:
                    type_instance = type_value
                    storage_account_instance.type = type_instance

azure-mgmt-storage

Microsoft Azure Storage Management Client Library for Python

MIT
Latest version published 5 months ago

Package Health Score

94 / 100
Full package analysis

Similar packages