<?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: Sharing Options for Python Map Image Layer Automation in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/sharing-options-for-python-map-image-layer/m-p/44969#M3553</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked, thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Mar 2020 22:45:27 GMT</pubDate>
    <dc:creator>ClintonCooper2</dc:creator>
    <dc:date>2020-03-23T22:45:27Z</dc:date>
    <item>
      <title>Sharing Options for Python Map Image Layer Automation</title>
      <link>https://community.esri.com/t5/python-questions/sharing-options-for-python-map-image-layer/m-p/44967#M3551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Having been referred to the overwrite option for sharing a map image layer in python, I am wondering if there is an option to allow for sharing with a group or, within the organization or, with everyone.&amp;nbsp; In the documentation for the &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/sharing/mapimagesharingdraft-class.htm#C_GUID-60871391-D229-4DEB-A958-205FEB751791"&gt;method&lt;/A&gt;, there does not seem to be a sharing parameter option.&amp;nbsp; I was thinking about a solution like where I search for the layer and then update the parameter was&amp;nbsp; available option if there is no method in the other sharing option.&amp;nbsp; However i cannot get this code to actually update that parameter.&amp;nbsp; &amp;nbsp;Here is the code I am trying:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;from arcgis.gis import GIS&lt;BR /&gt;portal = "https://sdc01acgicpw01s.corp.company.com/portal/home/content.html"&lt;BR /&gt;user = "&amp;nbsp; &amp;nbsp; &amp;nbsp; "&lt;BR /&gt;password = "&amp;nbsp; &amp;nbsp; &amp;nbsp;"&lt;BR /&gt;service = "WebUpdate"&lt;BR /&gt;gis = GIS(portal, user, password)&lt;BR /&gt;print("Search for original SD on portal…")&lt;BR /&gt;search_results = gis.content.search("{} AND owner:{}".format(service, user), item_type="Map Image Layer")[0]&lt;BR /&gt;print("Found SD: {}, ID: {} ".format(search_results.title, search_results.id))&lt;BR /&gt;feature_layer_item = search_results[0]&lt;BR /&gt;print("Setting sharing options…")&lt;BR /&gt;feature_layer_item.share(everyone=True)&lt;BR /&gt;print("Finished updating: {} – ID: {}".format(feature_layer_item.title, feature_layer_item.id))&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anything I can do to&amp;nbsp;through code to change the sharing for a map image layer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Mar 2020 22:54:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sharing-options-for-python-map-image-layer/m-p/44967#M3551</guid>
      <dc:creator>ClintonCooper2</dc:creator>
      <dc:date>2020-03-22T22:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing Options for Python Map Image Layer Automation</title>
      <link>https://community.esri.com/t5/python-questions/sharing-options-for-python-map-image-layer/m-p/44968#M3552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Clinton,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GIS

&lt;SPAN class="comment token"&gt;# Varibales&lt;/SPAN&gt;
portal &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'https://sdc01acgicpw01s.corp.company.com/portal'&lt;/SPAN&gt;
username &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'gisuser'&lt;/SPAN&gt;
password &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'******'&lt;/SPAN&gt;
mapImageLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'WebUpdate'&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;# Service Name&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Connect to Portal&lt;/SPAN&gt;
gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;portal&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; username&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Search and share map service&lt;/SPAN&gt;
search_results &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'title: {0} AND owner: {1}'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mapImageLayer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; username&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item_type &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Map Image Layer'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
map_image_item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; search_results&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
map_image_item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;share&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;everyone&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Finished"&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:43:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sharing-options-for-python-map-image-layer/m-p/44968#M3552</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-10T21:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing Options for Python Map Image Layer Automation</title>
      <link>https://community.esri.com/t5/python-questions/sharing-options-for-python-map-image-layer/m-p/44969#M3553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked, thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 22:45:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sharing-options-for-python-map-image-layer/m-p/44969#M3553</guid>
      <dc:creator>ClintonCooper2</dc:creator>
      <dc:date>2020-03-23T22:45:27Z</dc:date>
    </item>
  </channel>
</rss>

