The main problem here is that creating an endpoint often doesn't accept the same parameters as updating the endpoint.
I always use the same approach as you with generating the VLAN and then setting all needed parameters:
print("Step "+next(step)+": Create VLAN User-LAN ... ")
response = dashboard.appliance.createNetworkApplianceVlan(
network_hq_id, 1000, name='User-LAN',
subnet='10.1.0.0/24',
applianceIp='10.1.0.254'
)
print("Step "+next(step)+": Update VLAN User-LAN DHCP ... ")
response = dashboard.appliance.updateNetworkApplianceVlan(
network_hq_id, 1000,
dhcpHandling='Run a DHCP server',
dhcpLeaseTime='1 day',
dhcpBootOptionsEnabled=False,
reservedIpRanges=[{'start': '10.1.0.128', 'end': '10.1.0.254', 'comment': 'Reserved'}],
dnsNameservers='opendns',
dhcpOptions=[{'code': '18', 'type': 'text', 'value': 'company.intern'},
{'code': '42', 'type': 'IP', 'value': '192.53.103.101'}]
)
If you found this post helpful, please give it Kudos. If my answer solves your problem, please click Accept as Solution so others can benefit from it.