Hi,
Need help creating security profile using rest api. There are lot of variables that need values but am not aware of expected inputs. Everytime I execute i am running in to bad request error. Below is the example I used from NSX API guide. Not able to find an example run anywhere.
https://docs.vmware.com/en/VMware-NSX-for-vSphere/6.3/nsx_63_api.pdf
<securityPolicy>
<name>SP-API-1</name>
<description>Created using Rest client</description>
<precedence></precedence>
<parent>
<objectId></objectId>
</parent>
<securityGroupBinding>
<objectId>securitygroup-28</objectId>
</securityGroupBinding>
<securityGroupBinding>
<objectId></objectId>
</securityGroupBinding>
<actionsByCategory>
<category>firewall</category>
<action class="firewallSecurityAction">
<name>API-Allow</name>
<description>Rule created using Rest API</description>
<category>firewall</category>
<actionType></actionType>
<isActionEnforced>no</isActionEnforced>
<isActive>no</isActive>
<isEnabled>no</isEnabled>
<secondarySecurityGroup>
<objectId></objectId>
</secondarySecurityGroup>
<secondarySecurityGroup>
<objectId></objectId>
</secondarySecurityGroup>
<applications>
<application>
<objectId></objectId>
</application>
<applicationGroup>
<objectId></objectId>
</applicationGroup>
</applications>
<logged></logged>
<action></action>
<direction></direction>
<outsideSecondaryContainer></outsideSecondaryContainer>
</action>
<action>
***
</action>
</actionsByCategory>
<actionsByCategory>
<category>endpoint</category>
<action class="endpointSecurityAction">
<name>name</name>
<description>description</description>
<category></category>
<actionType></actionType>
<isActionEnforced></isActionEnforced>
<isActive></isActive>
<isEnabled></isEnabled>
<serviceId></serviceId>
<serviceProfile>
<objectId>serviceprofile-1</objectId>
***
</serviceProfile>
<invalidServiceProfile>false</invalidServiceProfile>
</action>
</actionsByCategory>
<actionsByCategory>
<category>traffic_steering</category>
<action class="trafficSteeringSecurityAction">
<name>API-Allow</name>
<description>Created through rest API</description>
<category></category>
<actionType></actionType>
<isActionEnforced>no</isActionEnforced>
<isActive>no</isActive>
<isEnabled>no</isEnabled>
<logged></logged>
<redirect></redirect>
<serviceProfile>
<objectId></objectId>
</serviceProfile>
</action>
</actionsByCategory>
</securityPolicy>
Security Profile, could it be service profile or Security policy?
For Security Policy, service groups may need to be created for creating the specific service policy
Yes, it is security policy. I already have a security group created and now want to create a security policy and associate it with existing security group using rest API.