Agent Config

The following methods allow for interaction into the Tenable Vulnerability Management agent config API endpoints.

Methods available on tio.agent_config:

class AgentConfigAPI(api: restfly.session.APISession)[source]

This will contain all methods related to agent config

details(scanner_id=1)[source]

Returns the current agent configuration.

agent-config: details

Parameters

scanner_id (int, optional) – The scanner ID.

Returns

Dictionary of the current settings.

Return type

dict

Examples

>>> details = tio.agent_config.details()
>>> pprint(details)
edit(scanner_id=1, software_update=None, auto_unlink=None)[source]

Edits the agent configuration.

agent-config: edit

Parameters
  • scanner_id (int, optional) – The scanner ID.

  • software_update (bool, optional) – If True, software updates are enabled for agents (exclusions may override this). If false, software updates for all agents are disabled.

  • auto_unlink (int, optional) – If true, agent auto-unlinking is enabled, allowing agents to automatically unlink themselves after a given period of time. If the value is 0 or false, auto-unlinking is disabled. True values are between 1 and 365.

Returns

Dictionary of the applied settings is returned if successfully applied.

Return type

dict

Examples

Enabling auto-unlinking for agents after 30 days:

>>> tio.agent_config.edit(auto_unlink=30)

Disabling auto-unlinking for agents:

>>> tio.agent_config.edit(auto_unlink=False)

Enabling software updates for agents:

>>> tio.agent_config.edit(software_update=True)