pub struct ActiveResponseClient { /* private fields */ }Implementations§
Source§impl ActiveResponseClient
impl ActiveResponseClient
pub fn new(api_client: WazuhApiClient) -> Self
pub async fn get_active_response_commands( &mut self, ) -> Result<Vec<ActiveResponseCommand>, WazuhApiError>
pub async fn execute_command_on_agent( &mut self, agent_id: &str, command: &str, arguments: Option<Vec<String>>, custom: Option<bool>, alert: Option<Value>, ) -> Result<ActiveResponseResult, WazuhApiError>
pub async fn execute_command_on_agents( &mut self, agent_ids: &[String], command: &str, arguments: Option<Vec<String>>, custom: Option<bool>, alert: Option<Value>, ) -> Result<ActiveResponseResult, WazuhApiError>
pub async fn block_ip( &mut self, agent_id: &str, ip_address: &str, timeout: Option<u32>, ) -> Result<ActiveResponseResult, WazuhApiError>
pub async fn unblock_ip( &mut self, agent_id: &str, ip_address: &str, ) -> Result<ActiveResponseResult, WazuhApiError>
pub async fn isolate_host( &mut self, agent_id: &str, interface: Option<&str>, ) -> Result<ActiveResponseResult, WazuhApiError>
pub async fn kill_process( &mut self, agent_id: &str, pid: u32, ) -> Result<ActiveResponseResult, WazuhApiError>
pub async fn disable_user_account( &mut self, agent_id: &str, username: &str, ) -> Result<ActiveResponseResult, WazuhApiError>
pub async fn execute_custom_script( &mut self, agent_id: &str, script_name: &str, script_arguments: Option<Vec<String>>, ) -> Result<ActiveResponseResult, WazuhApiError>
pub async fn execute_response_for_alert( &mut self, agent_id: &str, alert: Value, command: &str, ) -> Result<ActiveResponseResult, WazuhApiError>
pub async fn get_execution_history( &mut self, agent_id: Option<&str>, limit: Option<u32>, ) -> Result<Vec<Value>, WazuhApiError>
pub async fn validate_command( &mut self, command: &str, arguments: Option<&[String]>, ) -> Result<bool, WazuhApiError>
Trait Implementations§
Source§impl Clone for ActiveResponseClient
impl Clone for ActiveResponseClient
Source§fn clone(&self) -> ActiveResponseClient
fn clone(&self) -> ActiveResponseClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ActiveResponseClient
impl !RefUnwindSafe for ActiveResponseClient
impl Send for ActiveResponseClient
impl Sync for ActiveResponseClient
impl Unpin for ActiveResponseClient
impl !UnwindSafe for ActiveResponseClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more