Closed lmazuel closed 4 years ago
from datetime import timedelta body = {} body['kind'] = 'LongTerm' body['location'] = 'westus' # str body['tags'] = {} # dictionary body.setdefault('sku', {})['name'] = 'sku_name' # str body.setdefault('sku', {})['capacity'] = 42 # number body['time_series_id_properties'] = [{"name": "deviceId", "type": "String"}, {"name": "deviceId2", "type": "String"}] # [TimeSeriesIdProperty] body['storage_configuration'] = {"account_name": 'storage_account_name', "management_key": 'storage_management_key'} # LongTermStorageConfigurationInput body['data_retention'] = timedelta(days=1) from azure.mgmt.timeseriesinsights.models import LongTermEnvironmentCreateOrUpdateParameters LongTermEnvironmentCreateOrUpdateParameters.from_dict(body)
Thanks @lmazuel. Linking to the PR https://github.com/Azure/msrest-for-python/pull/193 that makes rest_key_extractor and rest_key_case_insensitive_extractor safer.
rest_key_extractor
rest_key_case_insensitive_extractor
Fixed by https://github.com/Azure/msrest-for-python/pull/198