docs: def create_media_service_rg(access_token, subscription_id, rgname, location, stoname, msname):
      '''Create a media service in a resource group.
  
      Args:
          access_token (str): A valid Azure authentication token.
          subscription_id (str): Azure subscription id.
          rgname (str): Azure resource group name.
          location (str): Azure data center location. E.g. westus.
          stoname (str): Azure storage account name.
          msname (str): Media service name.
  
      Returns:
          HTTP response. JSON body.
      '''
      endpoint = ''.join([get_rm_endpoint(),
                          '/subscriptions/', subscription_id,
                          '/resourceGroups/', rgname,
                          '/providers/microsoft.media/mediaservices/', msname,
                          '?api-version=', MEDIA_API])
      ms_body = {'name': msname}
      ms_body['location'] = location
      sub_id_str = '/subscriptions/' + subscription_id + '/resourceGroups/' + rgname + \
          '/providers/Microsoft.Storage/storageAccounts/' + stoname
      storage_account = {'id': sub_id_str}
      storage_account['isPrimary'] = True
      properties = {'storageAccounts': [storage_account]}
      ms_body['properties'] = properties
      body = json.dumps(ms_body)
      return do_put(endpoint, body, access_token)