操作方法
使用 ArcGIS Online 订阅和 ArcGIS Enterprise 许可时,每种可用用户类型允许的用户数量有限。 为了管理流程并避免超出配额,确定每种用户类型允许的最大用户数量将非常重要,如以下知识库文章中所述:错误:您的组织已达到当前订阅允许的最大成员数量。 所提供的工作流介绍了使用 ArcGIS API for Python 以编程方式确定订阅和许可中每种用户类型的已分配用户数量和允许的最大用户数量的步骤。
Note: The script can be run standalone and in ArcGIS Notebook.
from arcgis.gis import GIS
import pandas as pd
#For ArcGIS Online
gis = GIS("<ORGANIZATION_URL>", "<username>", "<password>")
#For Portal for ArcGIS
gis = GIS("https://<machine>.<domain>.com/<web_adaptor_name>", "<username>", "<password>", verify_cert=False)
licenses = gis.users.license_types
for license in licenses:
print (license["id"], license["name"], license["maxUsers"])
user_type_assigned = gis.users.counts("user_type", as_df=True)
print(user_type_assigned)
以下为 Portal for ArcGIS 的完整脚本:
from arcgis.gis import GIS
import pandas as pd
#For Portal for ArcGIS
gis = GIS("https://machine_test.arcgis.com/", "username1", "password1!", verify_cert=False)
licenses = gis.users.license_types
for license in licenses:
print (license["id"], license["name"], license["maxUsers"])
user_type_assigned = gis.users.counts("user_type", as_df=True)
print(user_type_assigned)
文章 ID: 000032561
获取来自 ArcGIS 专家的帮助
立即开始聊天