登出门户 (Server)

许可等级:BasicStandardAdvanced

摘要

从当前您所登录的门户登出。对于想要在设有防火墙的情况下或在私有云环境中使用 ArcGIS Online 的组织,提供了可在自己的计算机网络中安装和使用的版本,即 Portal for ArcGIS。

了解有关 ArcGIS Online 的详细信息

用法

语法

SignOutFromPortal_server ()

代码实例

从 ArcGIS Online(Python 窗口)登出

从 ArcGIS Online 登出。

import arcpy
arcpy.SignOutFromPortal_server()
发布到 ArcGIS Online(独立脚本)

以下脚本通过登录门户过渡服务上传服务定义以及登出门户演示了 ArcGIS Online 的发布工作流。

# Name: SignInToPortal_Example1.py
# Description: Use SignInToPortal to sign-in to Portal for ArcGIS and use a
# service definition draft to create a service definition and then upload and
# publish that service definition.

# Import system modules
import arcpy
from arcpy import env

# Sign-in to ArcGIS Online
arcpy.SignInToPortal_server("username","password", "")

# Set environment settings
env.workspace = "C:/data"

# Set local variables
in_service_definition_draft = "MyMapService.sddraft"
out_service_definition = "MyMapService.sd"

# Execute StageService
arcpy.StageService_server(in_service_definition_draft, out_service_definition)

# Set local variables
in_sd_file = "MyMapService.sd"
in_server = "My Hosted Services"

# Execute UploadServiceDefinition
arcpy.UploadServiceDefinition_server(in_sd_file, in_server)

# Sign out from ArcGIS Online
arcpy.SignOutFromPortal_server()

环境

此工具不使用任何地理处理环境

相关主题

许可信息

ArcGIS for Desktop Basic: 是
ArcGIS for Desktop Standard: 是
ArcGIS for Desktop Advanced: 是
5/25/2014