It looks like the old AnalyzeForSD is still there library but is appears to fail opening the APRX ...
from an ArcMap 10.8 install: mapping.py:
def AnalyzeForSD(sddraft):
"""AnalyzeForSD(sddraft)
Analyzes Service Definition Draft ( .sddraft ) files to determine
suitability and sources of potential performance issues before converting
a Service Definition Draft file to a Service Definition ( .sd ) file.
sddraft(String):
A string that represents the path and file name for the Service Definition
Draft ( .sddraft ) file."""
import arcgisscripting
return convertArcObjectToPythonObject(arcgisscripting._analyzeForSD(*gp_fixargs([sddraft], True)))
My attempt at running this in Pro... all the imports work and it seems to start reading the sddraft
from arcpy.arcobjects.arcobjectconversion import convertArcObjectToPythonObject
import arcgisscripting
from arcpy.geoprocessing._base import gp_fixargs
sddraft = r"C:\Temp\Map.sddraft"
r = convertArcObjectToPythonObject(arcgisscripting._analyzeForSD(*gp_fixargs([sddraft], True)))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: C:\Temp\Map.aprx