Example 6-3. Posting a Firewall Rule Set at the Datacenter Level with Destination IP as a VLAN Container
Example:
POST /api/1.0/zones/datacenter-7/firewall/rules
content-type: application/xml; charset=UTF-8
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Host: 192.168.102.134
content-length: 655
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
VMware, Inc.
ref="ANY" exclude="false"/><Destination ref="ANY"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">ANY</Application><DestinationPorts>ANY</DestinationPorts><Protocol>
TCP</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><Rule><I
D>1004</ID><Precedence>Default</Precedence><Position>4</Position><Source ref="ANY"
exclude="false"/><Destination ref="ANY"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">ANY</Application><DestinationPorts>ANY</DestinationPorts><Protocol>
UDP</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><Rule><I
D>1005</ID><Precedence>Default</Precedence><Position>1</Position><Source ref="ANY"
exclude="false"/><Destination ref="ANY"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">ANY</Application><DestinationPorts>ANY</DestinationPorts><Protocol>
ARP</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><Rule><I
D>1006</ID><Precedence>Default</Precedence><Position>2</Position><Source ref="ANY"
exclude="false"/><Destination ref="ANY"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">ANY</Application><DestinationPorts>ANY</DestinationPorts><Protocol>
OTHER IPv4</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><
Rule><ID>1007</ID><Precedence>Default</Precedence><Position>3</Position><Source
ref="ANY" exclude="false"/><Destination ref="ANY"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">ANY</Application><DestinationPorts>ANY</DestinationPorts><Protocol>
OTHER LAYER 3</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rul
e></RuleSet></vshieldZonesFirewallConfiguration>
<vshieldZonesFirewallConfiguration><ContainerAssociation><Container id="No Vlan
(0)"><Name>No Vlan (0)</Name></Container><Container
id="vShield"><InstanceId>datacenter-7</InstanceId></Container><Container
id="ANY"><Name>ANY</Name></Container></ContainerAssociation><RuleSet><Rule><ID>0</
ID><Precedence>High</Precedence><Position>1</Position><Source ref="vShield"
exclude="true"/><Destination ref="No Vlan (0)"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">MS-RPC</Application><DestinationPorts>135</DestinationPorts><Protoc
ol>TCP</Protocol><Action>DENY</Action><Log>false</Log><Notes></Notes></Rule><Rule>
<ID>1001</ID><Precedence>Default</Precedence><Position>1</Position><Source
ref="ANY" exclude="false"/><Destination ref="ANY"
exclude="false"/><SourcePorts>68</SourcePorts><Application
type="UNICAST">DHCP-Server</Application><DestinationPorts>67</DestinationPorts><Pr
otocol>UDP</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><
Rule><ID>1002</ID><Precedence>Default</Precedence><Position>2</Position><Source
ref="ANY" exclude="false"/><Destination ref="ANY"
exclude="false"/><SourcePorts>67</SourcePorts><Application
type="UNICAST">DHCP-Client</Application><DestinationPorts>68</DestinationPorts><Pr
otocol>UDP</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><
Rule><ID>1003</ID><Precedence>Default</Precedence><Position>3</Position><Source
ref="ANY" exclude="false"/><Destination ref="ANY"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">ANY</Application><DestinationPorts>ANY</DestinationPorts><Protocol>
TCP</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><Rule><I
D>1004</ID><Precedence>Default</Precedence><Position>4</Position><Source ref="ANY"
exclude="false"/><Destination ref="ANY"
exclude="false"/><SourcePorts>ANY</SourcePorts><Application
type="UNICAST">ANY</Application><DestinationPorts>ANY</DestinationPorts><Protocol>
UDP</Protocol><Action>ALLOW</Action><Log>false</Log><Notes></Notes></Rule><Rule><I
D>1005</ID><Precedence>Default</Precedence><Position>1</Position><Source ref="ANY"
Chapter 6 vShield App Management
55
Need help?
Do you have a question about the VSHIELD APP 1.0 - API and is the answer not in the manual?
Questions and answers