Summary
Validates whether a folder or database has been successfully registered with an ArcGIS Server site.
Syntax
ValidateDataStoreItem (connection_file, datastore_type, connection_name)
Parameter | Explanation | Data Type |
connection_file | An ArcGIS Server connection file (.ags) for the server whose registered database or folder is being validated. If you've made a connection in ArcCatalog, you can use the connection file found in your user profile directory. | String |
datastore_type | The type of data being validated.
| String |
connection_name | The name by which the folder or database being validated is registered with the ArcGIS Server site. | String |
Return Value
Data Type | Explanation |
String |
Code sample
ValidateDataStoreItem example
Prints the validity of all folders and databases registered with an ArcGIS Server site.
import arcpy
conn = "GIS Servers/MyConnection.ags"
for store_type in ["FOLDER", "DATABASE"]:
print("Validating data store items of type {}".format(store_type))
for i in arcpy.ListDataStoreItems(conn, store_type):
validity = arcpy.ValidateDataStoreItem(conn, store_type, i[0])
print("The data item '{}' is {}".format(i[0], validity))