Necesitaría automatizar la publicación de mi mxd en ArcGIS Online como un servicio de entidades accesible públicamente. Así será compartido por todos. Estoy con ArcGIS 10.1, por lo que no puedo usar la herramienta MXDToWebMap_server ya que solo está disponible para ArcGIS 10.3 y versiones superiores.<\/P>
<\/P>
Puedo realizar la mayor parte de la automatización siguiendo el documento de ayuda:<\/P>
Ayuda de ArcGIS 10.1<\/A> para ejecutar las siguientes herramientas en el orden correcto<\/P>arcpy.mapping.CreateMapSDDraft<\/LI>Actualizar el archivo sddraft para permitir reemplazo (sobrescribir el servicio de entidades publicado si ya existe)<\/LI>arcpy.StageService_server<\/LI>arcpy.SignInToPortal_server<\/LI>arcpy.UploadServiceDefinition_server<\/LI><\/OL><\/P>El problema que encontré es que el servicio de entidades se reemplaza y las propiedades de Compartir cambian a prvivate<\/STRONG> incluso si configuro manualmente Shared with Everyone<\/STRONG>.<\/P><\/P>El documento de ayuda no especifica si y cómo podemos configurar las propiedades de Compartir en el archivo sd antes de subirlo.<\/P><\/P>Encontré que hay un montón de parámetros para la herramienta arcpy.UploadServiceDefinition_server:<\/P>UploadServiceDefinition_server (in_sd_file, in_server, {in_service_name}, {in_cluster}, {in_folder_type}, {in_folder}, {in_startupType}, {in_override}, {in_my_contents}, {in_public}, {in_organization}, {in_groups})<\/P><\/P>Asumo que el parámetro {in_public} es el que necesito usar. Pero preferiría un ejemplo funcional del uso de esos parámetros en el contexto de publicar en ArcGIS Online (es decir, 'My Hosted Services').<\/P><\/BODY><\/HTML>
El problema que encontré es que el servicio de entidades se reemplaza y las propiedades de Compartir cambian a prvivate<\/STRONG> incluso si configuro manualmente Shared with Everyone<\/STRONG>.<\/P><\/P>El documento de ayuda no especifica si y cómo podemos configurar las propiedades de Compartir en el archivo sd antes de subirlo.<\/P><\/P>Encontré que hay un montón de parámetros para la herramienta arcpy.UploadServiceDefinition_server:<\/P>UploadServiceDefinition_server (in_sd_file, in_server, {in_service_name}, {in_cluster}, {in_folder_type}, {in_folder}, {in_startupType}, {in_override}, {in_my_contents}, {in_public}, {in_organization}, {in_groups})<\/P><\/P>Asumo que el parámetro {in_public} es el que necesito usar. Pero preferiría un ejemplo funcional del uso de esos parámetros en el contexto de publicar en ArcGIS Online (es decir, 'My Hosted Services').<\/P><\/BODY><\/HTML>
Did you ever find a solution to your problem? I'm having the same issue. I'd love to see an example of someone using the `in_public` parameter successfully.
I'm using:
in_public='PUBLIC'
This still sets my service to private.
I was having same issue.
Trying to schedule overwriting a service on ArcGIS Online, script being triggered from a machine running ArcGIS Pro 2.3
The following works for me.
Make sure you include the in_override parameter.
arcpy<SPAN class="punctuation token">.</SPAN>UploadServiceDefinition_server<SPAN class="punctuation token">(</SPAN>sd_output_filename<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"My Hosted Services"</SPAN><SPAN class="punctuation token">,</SPAN> in_override<SPAN class="operator token">=</SPAN><SPAN class="string token">"OVERRIDE_DEFINITION"</SPAN><SPAN class="punctuation token">,</SPAN> in_public<SPAN class="operator token">=</SPAN><SPAN class="string token">"PUBLIC"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
Thank you, I have no idea why this works but it does
Thanks it works, I had the same problem with arcgis pro 2.6.0 and portal 10.7
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.