Select to view content in your preferred language

Automation for publishing CRFs in a Storage Account

403
10
Jump to solution
2 weeks ago
Jeff-Reinhart
Frequent Contributor

I am attempting to automate the workflow for publishing a CRF stored in an Azure Storage Account as a referenced Imagery Layer. We have close to 100 CRFs to publish as part of our cloud migration. So far, I have gathered that the general workflow would be to create a service definition and then use the ArcGIS Python API to publish that service definition.

I cannot even get past creating the service definition.

When I run:

crf_path = r'c:\myacsfile.acs\folder_name\mycrf.crf'
sharing_draft = arcpy.sharing.CreateSharingDraft('FEDERATED_SERVER', 'IMAGE_SERVICE', 'service_name', crf_path)

 The return is None. The likely culprit is that CreateSharingDraft does not like the value passed for the draft_value (crf_path). I copied the CRF path from Pro | Catalog | Project | Cloud Stores using r-click > Copy Path. I have successfully tested publishing the CRF via the UI. There does not seem to be any reason the path is wrong.

I tried arcpy.Exists(crf_path), and that is returning True.

Am I missing something or is this not supported?

 

0 Kudos
10 Replies
TonyAlmeida
MVP Regular Contributor

Noice!

0 Kudos