VMware VSHIELD APP 1.0.0 UPDATE 1 - API Programming Manual page 57

Vshield api
Hide thumbs Also See for VSHIELD APP 1.0.0 UPDATE 1 - API:
Table of Contents

Advertisement

You can add multiple security groups in one request.
Example 6-11. Adding Multiple Security Groups
Example:
POST /api/1.0/global/securityGroups/datacenter-7/groups/ HTTP/1.1
authorization: Basic YWRtaW46ZGVmYXVsdA==
host: 10.112.196.127
Content-Type: application/xml
Content-Length: 815
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Add a Virtual Machine to a Security Group
You can add a virtual machine to a Security Group by specifying the node in which the Security Group resides.
You use the vNIC identifier to identify the virtual machine. To get the <NIC-ID> parameter, see
Properties from a Virtual Machine"
Example 6-12. Adding a Virtual Machine to a Security Group
Request:
POST <vshield_manager-uri>/api/1.0/global/securityGroups/<base-node-moref-id>/nodes/<nic-id>
Example:
POST /api/1.0/global/securityGroups/dvportgroup-343/nodes/
502a7702-8936-be93-ec75-1f0d00abefdb.000 HTTP/1.1
authorization: Basic YWRtaW46ZGVmYXVsdA==
host: 10.112.196.127
Content-Type: application/xml
Content-Length: 207
<?xml version="1.0" encoding="UTF-8"
Get the List of All Security Groups under a Base Node
Example 6-13. Getting the List of All Security Groups under a Base Node
Request:
GET <vshield_manager-uri>/api/1.0/global/securityGroups/<base-node-moref-id>/groups
Example:
GET /api/1.0/global/securityGroups/datacenter-7/groups HTTP/1.1
authorization: Basic YWRtaW46ZGVmYXVsdA==
host: 10.112.196.127
VMware, Inc.
<VsmGlobalConfig><SecurityGroups><SecurityGroup><SecurityGroupBaseNode>
datacenter-7</SecurityGroupBaseNode><SecurityGroupName>secgroup-1
</SecurityGroupName><SecurityGroupNodeList><Node><Id>502888cf-e08c-61dc-4523-a87e2
34d821a.000</Id></Node><Node><Id>502a183c-715e-5e37-f413-aea57de1e884.000</Id>
</Node></SecurityGroupNodeList></SecurityGroup><SecurityGroup>
<SecurityGroupBaseNode>datacenter-7</SecurityGroupBaseNode><SecurityGroupName>
Zone-2</SecurityGroupName><SecurityGroupNodeList><Node><Id>502a183c-715e-5e37-f413
-aea57de1e884.000</Id></Node><Node><Id>5028300b-598f-1b50-f714-9f054027ff5a.000
</Id></Node></SecurityGroupNodeList></SecurityGroup></SecurityGroups>
</VsmGlobalConfig>
on page 58.
standalone="yes"?><VsmGlobalConfig><SecurityGroups><SecurityGroupIdList>
<SecurityGroupId>udz-1</SecurityGroupId></SecurityGroupIdList></SecurityGroups>
</VsmGlobalConfig>
Chapter 6 vShield App Management
"Get the
57

Advertisement

Table of Contents
loading

Table of Contents