安全软件编辑防病毒软件编辑主机IDS API

时间:2016-05-04 07:05:38

标签: ibm-cloud-infrastructure

在我购买了防病毒软件或主机IDS后,编辑防病毒和防病毒软件的权利是什么?编辑主机IDS(如Softlayer控件的安全软件列表) 我现在在java中实现,但如果有其他语言样本,请告诉我

enter image description here

1 个答案:

答案 0 :(得分:0)

Edit anti-virus,请参阅(其他示例):

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Software_Component_AntivirusSpyware/9510197/updateAntivirusSpywarePolicy

Method: POST

Json payload:

{
  "parameters": [
    4,
    true
  ]
}

<强>参考文献:

SoftLayer_Software_Component_AntivirusSpyware::updateAntivirusSpywarePolicy

要修改Host IDS Policy,请参阅以下请求:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Software_Component_HostIps/[Host_IDS_id]/updateHipsPolicies

Method: POST

Json Payload:

{
  "parameters": [
    "On_10",                # IPS Mode
    "Maximum Protection",   # IPS Protection
    "McAfee Default",       # Firewall Mode
    "No_Rules",             # Firewall RuleSet
    "",                     # newApplicationMode, this option cannot be set in Control Portal (N/A)
    "",                     # newApplicationRuleset, this option cannot be set in Control Portal (N/A)
    "__EPO_ENFORCE_YES__"   # Enforcement Policy
  ]
}

要获取要在上述请求中设置的值,请​​执行:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Software_Component_HostIps/[Host_IDS_id]/getObject?objectMask=enforcementPolicyNames;ipsModePolicyNames;ipsProtectionPolicyNames;firewallModePolicyNames;firewallRuleSetPolicyNames
Method: GET

响应将是这样的:

{
  "hardwareId": 588888,
  "id": 9700000,
  "manufacturerLicenseInstance": "0CC47A581D3888",
  "epoVersion": "4.5",
  "enforcementPolicyNames": [
    {
      "name": "__EPO_ENFORCE_YES__"
    },
    {
      "name": "__EPO_ENFORCE_NO__"
    }
  ],
  "firewallModePolicyNames": [
    {
      "name": "McAfee Default"
    },
    {
      "name": "My Default"
    },
    {
      "name": "Off [McAfee Default]"
    },
    {
      "name": "On"
    },
    {
      "name": "Adaptive"
    },
    {
      "name": "Learn"
    },
    {
      "name": "Custom_FWONSpecial_DONOTUSE"
    }
  ],
  "firewallRuleSetPolicyNames": [
    {
      "name": "McAfee Default"
    },
    {
      "name": "Typical Corporate Environment"
    },
    {
      "name": "SLDefault"
    },
    {
      "name": "No_Rules"
    },
    {
      "name": "My Default"
    }
  ],
  "ipsModePolicyNames": [
    {
      "name": "McAfee Default"
    },
    {
      "name": "On_120"
    },
    {
      "name": "On [McAfee Default]"
    },
    {
      "name": "Adaptive_10"
    },
    {
      "name": "Adaptive_120"
    },
    {
      "name": "Adaptive_UR"
    },
    {
      "name": "On_10"
    },
    {
      "name": "On_UR"
    },
    {
      "name": "Off"
    }
  ],
  "ipsProtectionPolicyNames": [
    {
      "name": "Basic Protection [McAfee Default]"
    },
    {
      "name": "Enhanced Protection"
    },
    {
      "name": "Maximum Protection"
    },
    {
      "name": "Prepare for Enhanced Protection"
    },
    {
      "name": "Prepare for Maximum Protection"
    },
    {
      "name": "Warning"
    }
  ]
}

<强>参考文献: SoftLayer_Software_Component_HostIps::updateHipsPolicies