Cisco Cisco Security Manager 4.7 Guía Del Usuario

Descargar
Página de 290
 
 
 
  
 
Cisco Security Manager 4.7 API Specification (Version 2.0) 
 
OL- 32164-01 
Page  153
 
be updated, all the data needs to be sent with the request. Ideally this is used after the policy object is read and then 
the required field updated and sent as input to the modify policy object method. This also takes in hetrogenous and 
homogeneous bulk request and works in a single transaction and in fail-fast mode. 
In the following cases this method can be used: 
1.  Modifying a non-overridden Building Block: 
The “gid” element that is passed in the request defines the building block that will be modified. So 
this method can be used also to rename the building block. Along with the request the complete 
data is required to be passed with whatever elements that needs to be modified. 
 
2.  Modifying a overridden Building Block: 
To modify some data of a overridden BB for a particular device, then the gid of that particular 
building block needs to sent in the request and not the parent building blocks gid. If only the name 
is known of the building block, then use the method getPolicyObject to get the overridden 
building blocks gids and use it in this method. 
 
 
3.2.19.1 
Request 
The request of modify policy object takes in the type “ManagePolicyRequest” which is the same for 
addPolicyObject. Following gives an example and the XSD. 
 
 
Figure 109: ModifyPolicyObject Request Example 
URL: 
 
https://hostname/nbi/configservice/modifyPolicyObject 
 
HTTP Header: 
 
Set-Cookie: asCookie=732423sdfs73242; expires=Fri, 3-Sep-2013 23:59:59 GMT; path=/; 
domain=.hostdomain.com  
 
XML Argument: 
 
<?xml version=”1.0” encoding=”UTF-8”?> 
<csm:modifyPolicyObjectRequest xmlns:csm="csm"> 
        <csmSessionGID>00000000-0000-0000-0000-240518168641</csmSessionGID> 
        <enforceDuplicateDetection>false</enforceDuplicateDetection> 
 
        <servicePolicyObject> 
                 <gid>00000000-0000-0000-0000-231928234391</gid> 
                 <name>01_NbAPI_SPO</name> 
                 <type>ServicePolicyObject</type> 
                 <comment>Modified via NbAPI </comment> 
                 <isProperty>false</isProperty> 
                 <subType>SO</subType> 
                 <isGroup>false</isGroup> 
                 <serviceParameters> 
                         <protocol>ip</protocol> 
                         <icmpMessage/> 
                 </serviceParameters> 
        </servicePolicyObject> 
 
</csm:modifyPolicyObjectRequest>