Changing Site-to-Site VPN Hubs for Config Templates

Solved
NiftyMaker
Here to help

Changing Site-to-Site VPN Hubs for Config Templates

I'm looking to change the hubs that we have set for a grouping of config templates. Is there an API call that would be able to do this for the config templates? I'm able to do it for a single network - but if I enter the template ID into that same script, I get "The remote server returned an error: (400) Bad Request."

 

Below I've pasted a script that should just list the hubs for a network - this will work for a single network, but not a config template:

 

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$networkId = 'L_xxxxxxxxxxxx'
$baseURL = 'https://api.meraki.com/api/v1'

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("X-Cisco-Meraki-API-Key", "dxxxxxxxxxxxxxxx")
$headers.Add("Content-Type", "application/json")

$response = Invoke-RestMethod -Headers $headers -Uri $baseURL/networks/$networkId/appliance/vpn/siteToSiteVpn 

 

Does anyone happen to have any suggestions on how to modify the hubs for a config template?

 

1 Accepted Solution
GreenMan
Meraki Employee
Meraki Employee

The get and put calls for appliance site to site vpn can't be applied to a Template:


{ "errors": [ "Unsupported for configuration templates" ] }


From what I've seen, as you usually have few Templates (because it's Templates itself that generally caters for change at scale), things like changing Hubs would normally be made in the UI.   If you go down the road of scripting things, to cover change at scale, you'd normally unbind Networks from a Template and go solely for scripting.
That might not be the case for Service Providers, looking after lots of customers, but then you wouldn't have lots of customers pointing at the same VPN Hubs anyway...?

View solution in original post

2 Replies 2
GreenMan
Meraki Employee
Meraki Employee

The get and put calls for appliance site to site vpn can't be applied to a Template:


{ "errors": [ "Unsupported for configuration templates" ] }


From what I've seen, as you usually have few Templates (because it's Templates itself that generally caters for change at scale), things like changing Hubs would normally be made in the UI.   If you go down the road of scripting things, to cover change at scale, you'd normally unbind Networks from a Template and go solely for scripting.
That might not be the case for Service Providers, looking after lots of customers, but then you wouldn't have lots of customers pointing at the same VPN Hubs anyway...?

That's unfortunate. We have around 20 templates that needed to be modified, so I was really hoping that I wouldn't have to do that manually.

 

Thank you very much for the response!

Get notified when there are additional replies to this discussion.