I have a map in ArcGIS pro that I can upload to ArcGIS online using the "Share as Web Map" dialog, which gives me various options for how I want the data copied (in my case it creates an ArcGIS Online web map and a feature layer). I'd like to automate that in Python but having some trouble figuring out how to do it.
BTW - I first raised this a a question so there is more discussion there