I have created a Data Store and synced several feature classes to Feature Services. Each Feature Service is named the same as the feature class from the enterprise geodatabase and the single Feature Layer within that Feature Service is also named the same as the feature class. I want to alter the name of the Feature Layer. We have a data naming convention for feature classes and then use the alias to control how the data is named in a map.
For example: XXX_YYY_Lakes is the name of the feature class, with an alias of Lakes.
When I sync the the feature classes to the Data Store, the feature service and map image layer, are named XXX_YYY_Lakes, which is fine, however, the Feature Layer within the XXX_YYY_Lakes feature service is also named the same, when I simply want to call it Lakes.
I attempted to use the ArcGIS API for Python to alter the name but it failed.
Is this possible?
Did you publish the services manually through ArcGIS Pro or by using Bulk Publishing?
If you published through ArcGIS Pro, the service name is what you type into the Service Name field when publishing but the layer name is what is set in the Contents pane in ArcGIS Pro.
If you are using Bulk Publishing, it uses whatever the name of the feature class is in the database. You might be able to open the layer in ArcGIS Pro using the same connection that the Bulk Publishing uses, change the layer name to what you want it to be and overwrite the Bulk Published service. I have done that to update the symbology of some of our Bulk Published services but I have not thought to change the name before.