Skip to main content
Question

Is there a way to duplicate worklet from zone to another zone ?

  • October 8, 2024
  • 2 replies
  • 100 views

Forum|alt.badge.img

Hello,

I have deployed and create some (personal) worklets on one zone, and I am searching a way to easily duplicate them to anoter zone we have on our account.

I see it’s possible for policy, but I don’t find the same “clone” function for worklet.

 

Maybe there is another way to allow worklets to be applied on several zones ?

 

Thanks in advance

 

2 replies

JohnG-Automox
Forum|alt.badge.img
  • Automox Employee
  • 121 replies
  • October 8, 2024

Hi @Mika T ,

 

While you can clone Patch policies across zones natively within the Console today, unfortunately you cannot do the same for worklets.  You can however leverage our API to perform this action!

Here is an example of a Powershell script that utilizes the Automox API to clone ALL policies (worklets and patch polcies included!) from one target zone to another.
https://gist.github.com/Ax-jguarracino/2abbb50a943e89a6f584c76b897d6a2c

Note, this script would not be run as a worklet, but instead ran locally in Powershell on your device.

If you wanted to adapt the code to just perform “Worklet cloning”, you could add a Where-Object to the $response return and filter on where policy_type_nameis equal to “Custom”.


I hope that helps get you started!

Let me know if you have any questions.


Forum|alt.badge.img
  • Author
  • Rookie
  • 2 replies
  • October 9, 2024

Hi @JohnG-Automox 

Thanks. This powershell script is great.

Is there a further option on script that may be able to clone only a specified list of worklet ID ? (instead of all).

Many thanks.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings