pub struct AgentPolicyEdit { /* private fields */ }Expand description
Changes to a retrieved agent policy, created by AgentPolicy::edit and
sent with Fleet::edit_agent_policy.
The request includes name, namespace and the retained inactivity timeout, plus explicitly changed settings. It omits response metadata, package policies and unknown fields. Unset optional fields keep their server values. Fleet merges submitted attributes and does not check the policy’s revision for concurrent updates.
Implementations§
Source§impl AgentPolicyEdit
impl AgentPolicyEdit
pub fn name(self, name: impl Into<String>) -> Self
pub fn namespace(self, namespace: impl Into<String>) -> Self
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Sets the description. An empty string clears its text.
Sourcepub fn monitoring_enabled<I: IntoIterator<Item = S>, S: Into<String>>(
self,
kinds: I,
) -> Self
pub fn monitoring_enabled<I: IntoIterator<Item = S>, S: Into<String>>( self, kinds: I, ) -> Self
Agent self-monitoring to collect: logs, metrics and traces.
Empty disables it; leaving this unset retains the existing selection.
Sourcepub fn data_output_id(self, id: impl Into<String>) -> Self
pub fn data_output_id(self, id: impl Into<String>) -> Self
Selects a data output explicitly. Leaving this unset retains the existing output selection. Kibana requires a Platinum license to set it.
Sourcepub fn clear_data_output_id(self) -> Self
pub fn clear_data_output_id(self) -> Self
Clears the output selection with JSON null, restoring Fleet’s default.
Sourcepub fn inactivity_timeout(self, seconds: u64) -> Self
pub fn inactivity_timeout(self, seconds: u64) -> Self
Seconds without check-in before an agent is considered inactive. Leaving this unset retains the retrieved timeout.