Create Service utility
The Create Service utility allows you to publish a service from the command line. A service definition (.sd) file is required.
Parameters
Parameter | Details |
---|---|
-u | The name of an ArcGIS Server user who will execute the utility. The user must have the appropriate level of privileges to execute the action. |
-p | The password of the user who was specified with the -u parameter. |
-s | The URL of the site, in the format http://myserver:6080. |
-f | The path to the service definition file. |
-C | Optional. The cluster on which to deploy the service. If not specified, the default cluster is used. |
-F | Optional. The GIS server folder in which to deploy the service. |
-n | Optional. The name for the service, if you want to override the name contained in the service definition. |
-t | Passes the token to the server when the utility is executed. If this parameter is omitted, HTTP authentication is used. |
-h | Prints help for the utility. |
Examples
The following example creates a service named Yellowstone at the root level of the server using the file Yellowstone.sd.
<ArcGIS Server installation location>/arcgis/server/tools/python <ArcGIS Server installation location>/arcgis/server/tools/admin/createservice.py -u admin -p admin -s http://myserver:6080 -f /opt/data/Yellowstone/Yellowstone.sd -t -n Yellowstone
The following example creates a service named San Diego in the folder RegionalPlanning.
<ArcGIS Server installation location>/arcgis/server/tools/python <ArcGIS Server installation location>/arcgis/server/tools/admin/createservice.py -u admin -p admin -s http://myserver:6080 -f /opt/data/SanDiego/SanDiego.sd -t -F RegionalPlanning -n SanDiego