RemoveDataStoreItem
汇总
从 ArcGIS Server 站点注销文件夹或数据库。
语法
RemoveDataStoreItem(connection_file, datastore_type, connection_name)
| 参数 | 说明 | 数据类型 |
|---|---|---|
|
connection_file |
对于托管服务器,请提供服务器 URL 或使用 |
String |
|
datastore_type |
要取消注册的数据的类型。
|
String |
|
connection_name |
正在注销的文件夹或数据库的名称,因其当前已注册到了 ArcGIS Server 站点。 |
String |
代码示例
RemoveDataStoreItem 用于独立服务器示例
从 ArcGIS Server 移除别名为“My local data folder”的文件夹。
import arcpy
arcpy.RemoveDataStoreItem("GIS Servers/MyConnection.ags", "FOLDER",
"My local data folder")
RemoveDataStoreItem 用于托管服务器示例
从 ArcGIS Server 取消注册别名为“MSSQL_Conn”的数据库。
import arcpy
arcpy.RemoveDataStoreItem("https://organization.example.com/webadaptorname", "DATABASE",
"MSSQL_Conn")