Select to view content in your preferred language

Add CreateGISServerConnectionFile() to arcpy for ArcGIS Pro

09-20-2021 10:11 AM
Status: Under Consideration
Labels (1)
Status changed to: Under Consideration

This needs to be implemented, I should not have to click buttons in ArcPro to create a connection file. 

We have a multi environment platform, and need the ability to deploy services to different environments in an automated manner. 

This step is the only thing that we have to do manually...  not scalable, repeatable, or efficient. 


There is a workaround:

import arcgisscripting
arcgisscripting._createGISServerConnectionFile("ADMINISTER_GIS_SERVICES", "C:/admin", "new.ags", "", "ARCGIS_SERVER", True, "C:/admin", "sitemanager", "password123")


But ESRI should implement this within arcpy, so this idea is still valid.


Using an undocumented and unsupported function is generally a bad idea.  There is a reason it is prefaced with an "_"

Add to the fact that it doesn't accept keyword arguments - only positional arguments - so you have to guess what those positions are and hope they haven't change...

Throw in that since it is proprietary closed source python, if it fails you have pretty much no way to troubleshoot it...

At best this is a "temporary hack" (over 2 years now?!?). 


If this function is implemented for ArcGIS Pro, we would like it to include the option to save credentials to the Credential Manager (an option that is available when you manually add a server connection). This would allow us to easily set up access to standalone ArcGIS Servers for all users at our organization.