I have to create web services on ArcGIS Enterprise (via ArcGIS Pro) that offer WMS/WFS capabilities from several hundred datasets coming from Enterprise geodatabases. While this is not a problem when being done manually (I simply check the respective check boxes when using "Share as a Web Layer" - see image below), I am not able to find a way how to do that with Python.
In Python I have been using getWebLayerSharingDraft, exportToSDDraft, arcpy.StageService_server and arcpy.UploadServiceDefinition_server
. This works pretty well, however, I only end up with a Map Image Service and Feature Service and have no idea how to get WMS and WFS. There seems to be no option to also create those services.