pub struct Security<'a>(/* private fields */);Implementations§
Source§impl<'a> Security<'a>
impl<'a> Security<'a>
Sourcepub fn privileges(&self) -> GetPrivileges<'a>
pub fn privileges(&self) -> GetPrivileges<'a>
The current user’s detection-engine privileges.
Sourcepub fn create_alerts_index(&self) -> CreateAlertsIndex<'a>
pub fn create_alerts_index(&self) -> CreateAlertsIndex<'a>
Creates the space’s alert index and mappings if they do not exist.
Sourcepub fn find_rules(&self) -> FindRules<'a>
pub fn find_rules(&self) -> FindRules<'a>
One page of rules. Page through total to read the whole collection.
pub fn get_rule(&self, rule: RuleSelector<'_>) -> GetRule<'a>
Sourcepub fn create_rule<B: Serialize + ?Sized>(&self, rule: &B) -> CreateRule<'a>
pub fn create_rule<B: Serialize + ?Sized>(&self, rule: &B) -> CreateRule<'a>
Creates a rule from a QueryRule or any rule definition serializable as JSON.
Sourcepub fn patch_rule(&self, rule: RuleSelector<'_>) -> PatchRule<'a>
pub fn patch_rule(&self, rule: RuleSelector<'_>) -> PatchRule<'a>
Changes only the fields set on the returned builder. The selector is
sent in the body and protected by checked setters. Deliberate overrides
use PatchRule::unchecked_field or a replacement raw request body.
pub fn delete_rule(&self, rule: RuleSelector<'_>) -> DeleteRule<'a>
Sourcepub fn export_rules(&self) -> ExportRules<'a>
pub fn export_rules(&self) -> ExportRules<'a>
Exports rules as NDJSON. Without ExportRules::rule_ids, every rule is exported.
Sourcepub fn import_rules(&self, ndjson: impl Into<Vec<u8>>) -> ImportRules<'a>
pub fn import_rules(&self, ndjson: impl Into<Vec<u8>>) -> ImportRules<'a>
Imports an NDJSON export. Partial failures are reported with HTTP 200.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Security<'a>
impl<'a> !UnwindSafe for Security<'a>
impl<'a> Freeze for Security<'a>
impl<'a> Send for Security<'a>
impl<'a> Sync for Security<'a>
impl<'a> Unpin for Security<'a>
impl<'a> UnsafeUnpin for Security<'a>
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