5.5

Table Of Contents
5 POST the modified EdgeGatewayServiceConfiguration element to the URL in the value of the href
attribute of the configureServices link described in Step 2.
The server takes the requested action and returns a Task element that tracks the progress of the request.
When the task completes successfully, the EdgeGatewayServiceConfiguration element you POSTed replaces
the one you copied in Step 3.
Example: Configure Services on an Edge Gateway
This example replaces the default firewall service on the Edge Gateway created in “Create an Edge
Gateway,” on page 172. For details about this FirewallService, see “Firewall Service Configurations,” on
page 179
Request:
POST https://vcloud.example.com/api/admin/edgeGateway/2000/action/configureServices
Content-Type: application/vnd.vmware.admin.edgeGatewayServiceConfiguration+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<EdgeGatewayServiceConfiguration
xmlns="http://www.vmware.com/vcloud/v1.5">
<FirewallService>
<IsEnabled>true</IsEnabled>
<DefaultAction>allow</DefaultAction>
<LogDefaultAction>false</LogDefaultAction>
<FirewallRule>
<IsEnabled>true</IsEnabled>
<Description>allow incoming ssh</Description>
<Policy>allow</Policy>
<Protocols>
<Tcp>true</Tcp>
</Protocols>
<DestinationPortRange>22</DestinationPortRange>
<DestinationIp>Internal</DestinationIp>
<SourcePortRange>Any</SourcePortRange>
<SourceIp>External</SourceIp>
<EnableLogging>true</EnableLogging>
</FirewallRule>
<FirewallRule>
<IsEnabled>true</IsEnabled>
<Description>deny incoming telnet</Description>
<Policy>drop</Policy>
<Protocols>
<Tcp>true</Tcp>
</Protocols>
<DestinationPortRange>23</DestinationPortRange>
<DestinationIp>Internal</DestinationIp>
<SourcePortRange>Any</SourcePortRange>
<SourceIp>External</SourceIp>
<EnableLogging>false</EnableLogging>
</FirewallRule>
</FirewallService>
</EdgeGatewayServiceConfiguration>
vCloud API Programming Guide
178 VMware, Inc.