Save a service definition for a web tool or geoprocessing service

With ArcGIS Pro, you can save service definitions for your web tools and geoprocessing service to be shared or overwritten to ArcGIS Enterprise or a stand-alone ArcGIS Server at a later time. A service definition file (.sd) contains the information about how the web tool or geoprocessing service is going to be published and configured in ArcGIS Enterprise or ArcGIS Server. See Introduction to saving service definitions to learn more about how service definitions can be used in your organization's sharing workflows.

Save a connected service definition

A connected service definition is configured for a specific server connection. To save a connected service definition for publishing or overwriting, complete the following steps:

  1. If your service definition is for web tools on ArcGIS Enterprise, follow the steps in Share your web tools to ArcGIS Enterprise to open the Share as a web tool pane. For overwriting web tools, choose an existing web tool first.
  2. If your service definition is for geoprocessing services on stand-alone ArcGIS Server, follow the steps in share a geoprocessing service to a stand-alone server to open the Publish Geoprocessing Service pane. For overwriting a geoprocessing service, follow the steps in overwrite a geoprocessing service to open the Overwrite Geoprocessing Service pane.
  3. Set the publish pane properties using the steps from set the web tool and geoprocessing service properties.
  4. Under Finish Sharing, click Analyze Identify potential performance bottlenecks and errors to review potential problems.

    Errors and warnings are listed on the Messages tab. Right-click a message to open its help topic or take corrective action in the software. Errors Error must be resolved before you can save the service definition. Resolving warnings Warning is recommended but not required.

    Learn more about analyzing GIS resources

  5. After you resolve errors, and optionally, resolve warnings, click the Publish drop-down arrow and click Save As SD.

    The Save As Service Definition File dialog box appears.

  6. On the dialog box, specify the location and name of the service definition file and click Save.
  7. Optionally, click Jobs Open Job Status Pane to monitor the job status.
  8. Once the service definition has been successfully staged, click the Manage the service definition link at the bottom of the pane to open the location of the service definition file.

Save an offline service definition for a geoprocessing service on a stand-alone ArcGIS Server

An offline service definition is not configured for a specific server connection. You can save an offline service definition if you are offline or not connected to the server. The option to save an offline service definition is almost identical when saving a connected service definition above. The only difference is the Step 1 or 2, where you need to click Share As > Save As Offline Service Definition > Geoprocessing Service on Standalone Server.

When saving the offline service definition from ArcGIS Pro 3.0 or later, choose the correct version of ArcGIS Server you are sharing to, as several tools behave differently if you publish to 10.9.1 or an earlier version. When referencing data using a server data store while saving the offline service definition file, consider the following:

  • The data is either all copied or referenced when publishing the offline service definition file. If some data needs to be copied and other data needs to be referenced, save the file as a connected service definition file instead.
  • Before publishing the file to a server, ensure that the server has access to the database or folder path of the referenced data, and register the data on both the publisher and server side of the data store of the server.

Save a service definition using Python

To save a connected service definition using Python, review the code examples from the GeoprocessingSharingDraft class of the arcpy.sharing module or the CreateGPSDDraft publishing function.

To save an offline service definition, use the GeoprocessingSharingDraft class of the arcpy.sharing module using the offline and offlineTarget parameters.

If you are ready to publish your service to an ArcGIS Server site, see Publish a service definition.

Related topics


OSZAR »