Constructor
new EpoClient(dxlClient, epoUniqueIdopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
dxlClient |
external:DxlClient | The DXL client to use for communication with the ePO DXL service |
|
epoUniqueId |
String |
<optional> |
The unique identifier used to specify the ePO server that this client will communicate with. |
- Source:
Methods
(static) lookupEpoUniqueIdentifiers(dxlClient, callback)
Retrieves an array of strings containing the unique identifiers for the ePO servers that are currently exposed to the DXL fabric.
Parameters:
Name | Type | Description |
---|---|---|
dxlClient |
external:DxlClient | The DXL client with which to perform the request |
callback |
function | Callback function to invoke with the unique
identifiers which are found. If an error occurs when performing the lookup,
the first parameter supplied to the callback contains an |
- Source:
addThreatEventCallback(threatEventResponseCallback, topicopt)
Registers an event callback with the client to receive ePO threat events.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
threatEventResponseCallback |
function | The function that will receive ePO threat events. The first argument passed to the callback function is an object decoded from the JSON payload of the event content. The second argument passed to the callback function is the full DXL Event object. |
||
topic |
String |
<optional> |
/mcafee/event/epo/threat/response | The topic that ePO threat events are published to. |
- Source:
Example
epoClient.addThreatEventCallback(function (threatEventObj, originalEvent) {
console.log('Threat event on topic: ' + originalEvent.destinationTopic)
console.log(threatEventObj)
})
help(responseCallback)
Returns the list of remote commands that are supported by the ePO server this client is communicating with.
Parameters:
Name | Type | Description |
---|---|---|
responseCallback |
function | Callback function to invoke with the
remote commands which are found. If an error occurs when performing the
command, the first parameter supplied to the callback contains an If determination of the ePO unique identifier fails, the first parameter
supplied to the callback contains an
|
- Source:
Examples
Example Usage
epoClient.help(function (helpError, helpText) {
if (helpError) {
console.log('Error getting help: ' + helpError.message)
} else {
console.log(helpText)
}
})
Example Response Text
ComputerMgmt.createAgentDeploymentUrlCmd deployPath groupId [edit] [ahId]
[fallBackAhId] [urlName] [agentVersionNumber] [agentHotFix] - Create Agent
Deployment URL Command
ComputerMgmt.createCustomInstallPackageCmd deployPath [ahId] [fallBackAhId] -
Create Custom Install Package Command
ComputerMgmt.createDefaultAgentDeploymentUrlCmd tenantId - Create Default
Non-Editable Agent Deployment URL Command
ComputerMgmt.createTagGroup parentTagGroupId newTagGroupName - Create a new
subgroup under an existing tag group.
ComputerMgmt.deleteTag tagIds [forceDelete] - Delete one or more tags.
removeThreatEventCallback(threatEventResponseCallback, topicopt)
Unregisters an event callback from the client so that it will no longer receive ePO threat events.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
threatEventResponseCallback |
function | The function to unregister. |
||
topic |
String |
<optional> |
/mcafee/event/epo/threat/response | The topic that ePO threat events are published to. |
- Source:
runCommand(commandName, optionsopt)
Invokes an ePO remote command on the ePO server this client is communicating with.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commandName |
String | The name of the remote command to invoke. |
|||||||||||||||||||||
options |
Object |
<optional> |
Additional options to supply for the remote command. Properties
|
- Source:
Throws:
-
If the
outputFormat
is not valid. - Type
- TypeError
Examples
Example Usage
epoClient.runCommand('system.find',
{
responseCallback: function (searchError, responseObj) {
if (searchError) {
console.log('Error finding system: ' + searchError.message)
} else {
console.log(JSON.stringify(responseObj, null, 2))
}
},
params: {searchText: 'mySystem'}
}
)
Example Response Text
[
{
"EPOBranchNode.AutoID": 7,
"EPOComputerProperties.CPUSerialNum": "N/A",
"EPOComputerProperties.CPUSpeed": 2794,
"EPOComputerProperties.CPUType": "Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz",
"EPOComputerProperties.ComputerName": "mySystemForTesting",
"EPOComputerProperties.DefaultLangID": "0409",
...
}
]