I am trying to create a phyton script to create a geoprocessing tool to Publish and overwrite web layers within ModelBuilder. I am referring to the instructions within this blog post:
https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/publish-and-overwrite-web-layers-in-modelbuilder/
The issue that I’m having is the script provided in the link above contains the input “map” and what I would like to select is an input “layer” in the content pane.
Jonah Lay has provided sample code within the comments of the blog post here: https://pro.arcgis.com/en/pro-app/latest/arcpy/sharing/featuresharingdraft-class.htm#GUID-8E27A3ED-A705-4ACF-8C7D-AA861327AD26
The issue is when I try to use that code I continue to receive errors. Is there someone that could help debug this issue? I have zero coding experience.