2016-05-04 3 views

Antwort

0

Um Edit anti-virus finden Sie unter (Rest Beispiel):

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

Method: POST 

Json payload: 

{ 
    "parameters": [ 
    4, 
    true 
    ] 
} 

Referenzen:

SoftLayer_Software_Component_AntivirusSpyware::updateAntivirusSpywarePolicy

Host IDS Policy zu bearbeiten, finden Sie in der folgenden Anfrage:

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 
    ] 
} 

Werte in der obigen Anforderung einstellen zu erhalten, führen Sie bitte:

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

Die Antwort wäre in etwa so:

{ 
    "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" 
    } 
    ] 
} 

Referenzen: SoftLayer_Software_Component_HostIps::updateHipsPolicies