Important
The Nessus Package is currently a Technology Preview
Agent Groups¶
Methods described in this section relate to the the agent groups API.
These methods can be accessed at Nessus.agent_groups
.
- class AgentGroupsAPI(api: APISession)[source]¶
- add_agent(group_id: int, agent_id: int) → None[source]¶
Adds a singular agent to an agent group.
Example
>>> nessus.agent_groups.add_agent(group_id, agent_id)
- add_agents(group_id: int, agents: List[int]) → None[source]¶
Adds multiple agents to an agent group.
- Parameters:
Example
>>> nessus.agent_groups.add_agents(group_id, [agent1, agent2])
- configure(group_id: int, name: str) → None[source]¶
Changes the name of the given agent group.
Example
>>> nessus.agent_groups.configure(group_id, 'Example name')
- create(name: str) → Dict[source]¶
Creates an agent group.
- Parameters:
name (str) – The name of the agent group
Example
>>> group = nessus.agent_groups.create('Example agent group')
- delete_agent(group_id: int, agent_id: int) → None[source]¶
Deletes an agent from the agent group.
- Parameters:
Example
>>> nessus.agent_groups.delete_agent(group_id, agent_id)
- delete_agents(group_id: int, agents: List[int]) → None[source]¶
Deletes multiple agents from the agent group.
- Parameters:
Example
>>> nessus.agent_groups.delete_agents(group_id, [agent1, agent2])
- delete_group(group_id: int) → None[source]¶
Deletes an agent group.
- Parameters:
group_id (int) – The agent group id to be deleted.
Example
>>> nessus.agent_groups.delete_group(group_id)
- delete_groups(group_ids: List[int]) → None[source]¶
Deleted multiple agent groups.
Example
>>> nessus.agent_groups.delete_groups([group1, group2, group3])