ValidateDataStoreItem
サマリー
The ValidateDataStoreItem function validates whether a folder or database has been successfully registered with an ArcGIS Server site.
構文
ValidateDataStoreItem(connection_file, datastore_type, connection_name)
| パラメーター | 説明 | データ タイプ |
|---|---|---|
|
connection_file |
The connection file. For a hosting server, provide the server URL or use the |
String |
|
datastore_type |
Specifies the type of data that will be validated.
|
String |
|
connection_name |
The name of the folder or database being validated that is registered with the ArcGIS Server site. |
String |
戻り値
| データ タイプ | 説明 |
|---|---|
|
String |
If the data store item is valid, returns |
コードのサンプル
Print 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(f"Validating data store items of type {store_type}")
for i in arcpy.ListDataStoreItems(conn, store_type):
validity = arcpy.ValidateDataStoreItem(conn, store_type, i[0])
print(f"The data item '{i[0]}' is {validity}")