I need to create a softlayer network firewall rule through REST API. I have referred the Softlayer documents but still I'm unabe to create a firewall rule.
Please Advice.
I need to create a softlayer network firewall rule through REST API. I have referred the Softlayer documents but still I'm unabe to create a firewall rule.
Please Advice.
Please try this REST request to add Firewall rules (SoftLayer_Network_Firewall_Update_Request::createObject):
URL:
Method: POST
Where: The old rules have to configured in the above
body request
and add thenew rule
. In my case, I ‘m adding this new rule:To know the meaning of properties in
rules
section, please see: SoftLayer_Network_Firewall_Update_Request_RuleUpdate 1:
Also, to get
firewallContextAccessControlListId
, please see:If you know the
firewall_id
, please execute:The response in my case is:
Reference: SoftLayer_Network_Vlan_Firewall::getNetworkVlans
Otherwise, if you don't know the
firewall_id
, you can list allNetwork_Vlan_Firewall
adding some masks:Method: POST
Json Payload:
The response should be similar to the last request, but for all items.
Note: In this case we are using
v3.1
instead ofv3
in the request becauseadvancedSearch
service works only forv3.1
.take a look this codes let me know if you need more information
..