This post is related to an earlier question. I'm spawning a new thread since this is a more specific question.
When you're publishing a map service to ArcGIS Enterprise from ArcGIS Pro, you get to choose what server to publish to, e.g. your federated ArcGIS Server or a Hosting Server. You also get to select whether to "Reference Registered Data" or "Copy all data".
There are no similar preferences or parameters when using (documentation):
inServiceName,inCluster, inFolderType, inFolder, inStartup,
inOverride, inMyContents, inPublic, inOrganization, inGroups)
You just provide a server URL via inServer.
There is also the attribute
sharing_draft = m.getWebLayerSharingDraft( ... )
when creating your sddraft file.
I've run into a conundrum where the published service shows up in my federated server REST endpoint but the underlying SDE data that the map in PRO was referencing is not referenced by the map service, instead a GDB shows up at:
To confirm, if I wipe out the GDB (have to stop Server), sure enough, the associated Portal item comes up blank. I haven't run into this before. All my other scripted publishing has worked like a charm.
Since there is no "Reference Registered Data" option in arcpy, is this possibly default behavior when a specific datastore is not registered in ArcGIS Server Manager?