I know that Esri has exposed many properties to the arcpy lib for publishing services. I need to publish a tiled/cached map service but I need to set the min/max scale when I do that. Can this be accomplished via Python code? I don't see it as a property on the help page of the CreateMapSDDraft script. Is it just not supported or am I doing something wrong?
These are the basic steps I've taken to create a cached map service using Python:
- arcpy.mapping.CreateMapSDDraft() tool creates the service definition draft;
- arcpy.server.StageService() creates the publishable service definition file;
- arcpy.server.UploadServiceDefinition() uploads the SD to the map servers;
- arcpy.server.CreateMapServerCache() sets the cache parameters, including map scales, for the map service;
- arcpy.server.ManageMapServerCacheTiles() starts the caching process.
The arcpy.server.ManageMapServerCacheScales() tool can be used to alter the caching scales but I find it easier to delete and recreate.