ValidateDataStoreItem (arcpy)

サマリ

Validates whether a folder or database has been successfully registered with an ArcGIS Server site.

説明

See About registering your data with the server to learn more about when and why you should register your data with ArcGIS Server.

構文

ValidateDataStoreItem (connection_file, datastore_type, connection_name)
パラメータ説明データ タイプ
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. Alternatively, you can create a connection file from scratch using the function CreateGISServerConnectionFile.

String
datastore_type

The type of data being validated.

  • DATABASEThe data resides in an enterprise database.
  • FOLDERThe data is file-based.
String
connection_name

The name by which the folder or database being validated is registered with the ArcGIS Server site.

String
戻り値
データ タイプ説明
String

コードのサンプル

ValidateDataStoreItem example

Prints the validity of all folders and databases registered with an ArcGIS Server site.

import arcpy

conn = "GIS Servers/MyConnection.ags"
for storetype in ["FOLDER", "DATABASE"]:
    print("Validating data store items of type " + storetype)
    for i in arcpy.ListDataStoreItems(conn, storetype):
        validity = arcpy.ValidateDataStoreItem(conn, storetype, i[0])
        print "The data item '" + i[0] + "' is " + validity
    print("")

関連トピック

9/14/2013