Add CreateGISServerConnectionFile() to arcpy for ArcGIS Pro

1421
5
09-20-2021 10:11 AM
Status: Under Consideration
Labels (1)
5 Comments
NaicongLi
Status changed to: Under Consideration
 
RoyJackson_AlertMedia

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. 

AlexHendriksDICTU

There is a workaround: https://community.esri.com/t5/arcgis-pro-questions/how-to-create-an-arcgis-server-connection-file/td...

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

 

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

RickOtten

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?!?). 

crutan-metro

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.