<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Use of parameters in UploadServiceDefinition_server tool on ArcGIS Online with ArcPy in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25723#M1280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks it works, I had the same problem with arcgis pro 2.6.0 and portal 10.7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Oct 2020 19:18:57 GMT</pubDate>
    <dc:creator>DiegoMonge_Chinchilla</dc:creator>
    <dc:date>2020-10-05T19:18:57Z</dc:date>
    <item>
      <title>Use of parameters in UploadServiceDefinition_server tool on ArcGIS Online with ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25718#M1275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would need to automate publishing my mxd to ArcGIS Online as a publicly-accessible feature service. So it will be shared by everyone. I am with ArcGIS 10.1 so I cannot use the MXDToWebMap_server tool as it is only available to ArcGIS 10.3 and above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to get most of the automation done by following the help document:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s30000006q000000" title="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s30000006q000000"&gt;ArcGIS Help 10.1&lt;/A&gt;&amp;nbsp; to run the following tools in the correct order&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;arcpy.mapping.CreateMapSDDraft&lt;/LI&gt;&lt;LI&gt;Update sddraft file to allow replacement (overwriting the published feature service if already existing)&lt;/LI&gt;&lt;LI&gt;arcpy.StageService_server&lt;/LI&gt;&lt;LI&gt;arcpy.SignInToPortal_server&lt;/LI&gt;&lt;LI&gt;arcpy.UploadServiceDefinition_server&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I came across is, the feature service is replaced and the Share properties are changed to &lt;STRONG&gt;prvivate&lt;/STRONG&gt; even if I manually set up &lt;STRONG&gt;Shared with Everyone&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The help document does not specify whether and how we can set up the Share properties in the sd file before uploading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did find there are a whole bunch of parameters for the arcpy.UploadServiceDefinition_server tool:&lt;/P&gt;&lt;P&gt;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})&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am assuming the {in_public} param is the one I need to use. But I would prefer a working example of use of those parameters in the context of publishing to ArcGIS Online (i.e. 'My Hosted Services').&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2017 01:02:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25718#M1275</guid>
      <dc:creator>AlexChen</dc:creator>
      <dc:date>2017-12-04T01:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Use of parameters in UploadServiceDefinition_server tool on ArcGIS Online with ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25719#M1276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2018 20:55:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25719#M1276</guid>
      <dc:creator>ScottDavis</dc:creator>
      <dc:date>2018-09-20T20:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use of parameters in UploadServiceDefinition_server tool on ArcGIS Online with ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25720#M1277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using:&amp;nbsp;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; font-size: 9.0pt;"&gt;&lt;SPAN style="color: #660099;"&gt;in_public&lt;/SPAN&gt;=&lt;SPAN style="color: #008080; font-weight: bold;"&gt;'PUBLIC' &lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This still sets my service to private.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2018 00:18:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25720#M1277</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2018-12-18T00:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Use of parameters in UploadServiceDefinition_server tool on ArcGIS Online with ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25721#M1278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was having same issue.&lt;/P&gt;&lt;P&gt;Trying to schedule overwriting a service on ArcGIS Online, script being triggered from a machine running ArcGIS Pro 2.3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following&amp;nbsp;works for me.&lt;/P&gt;&lt;P&gt;Make sure you include the &lt;STRONG&gt;in_override&lt;/STRONG&gt; parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UploadServiceDefinition_server&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sd_output_filename&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"My Hosted Services"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; in_override&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"OVERRIDE_DEFINITION"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; in_public&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"PUBLIC"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Feb 2019 03:44:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25721#M1278</guid>
      <dc:creator>SimonJackson</dc:creator>
      <dc:date>2019-02-02T03:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Use of parameters in UploadServiceDefinition_server tool on ArcGIS Online with ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25722#M1279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, I have no idea why this works but it does&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2019 17:12:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25722#M1279</guid>
      <dc:creator>RyanColeman</dc:creator>
      <dc:date>2019-05-08T17:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use of parameters in UploadServiceDefinition_server tool on ArcGIS Online with ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25723#M1280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks it works, I had the same problem with arcgis pro 2.6.0 and portal 10.7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2020 19:18:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/use-of-parameters-in-uploadservicedefinition/m-p/25723#M1280</guid>
      <dc:creator>DiegoMonge_Chinchilla</dc:creator>
      <dc:date>2020-10-05T19:18:57Z</dc:date>
    </item>
  </channel>
</rss>

