Managing NSX Edge services gateways
NSX Edge services gateways are for the connection between your data center and external networks. This is what we also call North-South network traffic. NSX Edge services gateways are deployed as a virtual appliance and provide services, such as VPN, NAT, load balancing, DHCP, and firewall.
Retrieving NSX Edge services gateways
To retrieve NSX edge services gateways, we use the same URI as in the preceding section,
Creating NSX Edge services gateways
, and save it in the variable $Uri
, as follows:
PowerCLI C:\> $Uri = "https://$NSXManager/api/4.0/edges"
We use the Invoke-RestMethod
cmdlet with the GET
method to retrieve the edges and save the result in the variable $xml
, using the following command:
PowerCLI C:\> $xml = Invoke-RestMethod -Uri $Uri -Method Get
-Headers $Headers
Because the Invoke-RestMethod
call returns the NSX edge services gateways and the NSX logical (distributed) routers, we pipe the output of $xml.pagedEdgeList.edgePage...