Skip to content

New-PveClusterSdnVnetsSubnets

Create a new sdn subnet object.

API: POST /cluster/sdn/vnets/{vnet}/subnets, Proxmox VE API viewer

New-PveClusterSdnVnetsSubnets
[-PveTicket <PveTicket>]
[-DhcpDnsServer <string>]
[-DhcpRange <array>]
[-Dnszoneprefix <string>]
[-Gateway <string>]
[-LockToken <string>]
[-Snat <bool>]
-Subnet <string>
-Type <string>
-Vnet <string>
[<CommonParameters>]
Parameter Type Required Description
-PveTicket PveTicket No Ticket data connection.
-DhcpDnsServer string No IP address for the DNS server.
-DhcpRange array No A list of DHCP ranges for this subnet.
-Dnszoneprefix string No dns domain zone prefix ex: ‘adm’ -> <hostname>.adm.mydomain.com.
-Gateway string No Subnet Gateway: Will be assign on vnet for layer3 zones.
-LockToken string No the token for unlocking the global SDN configuration.
-Snat bool No enable masquerade for this subnet if pve-firewall.
-Subnet string Yes The SDN subnet object identifier.
-Type string Yes Values: subnet.
-Vnet string Yes associated vnet.

Every parameter also binds by property name from the pipeline, so an object with node and vmid properties (the output of Get-PveGuest, for one) fills -Node and -Vmid. Without -PveTicket the cmdlet uses the last connection, see Connection.

A PveResponse: the data returned by Proxmox VE is in .Response.data, the outcome in .IsSuccessStatusCode. See Results and Errors.