'List resource groups.
:return: A list of resource groups.
:rtype: ``list`` of :class:`.AzureResourceGroup`'

def ex_list_resource_groups(self):

    action = ('/subscriptions/%s/resourceGroups/' % self.subscription_id)
    r = self.connection.request(action, params={'api-version': '2016-09-01'})
    return [AzureResourceGroup(grp['id'], grp['name'], grp['location'], grp['properties']) for grp in r.object['value']]
