I\'m trying to use azure-sdk-for-python library to connect to azure cloud and to execute certain operations.
I followed the below code samples provided in Azure docs to
Result of a list
call return an iterable, so first you would have to consume this iterable as a list. Then, each object will contain a serialize
method that will put back the object into its JSON form.
In practical terms:
client = CompteManagementClient(credentials, subscription_id)
vmSizesList = [vm_size.serialize() for vm_size in client.virtual_machine_sizes.list()]
json.dumps(vmSizesList)