From 35bb90d03bf3d7abd76f00d2aa0aac6407154618 Mon Sep 17 00:00:00 2001 From: VihasMakwana <121151420+VihasMakwana@users.noreply.github.com> Date: Fri, 4 Oct 2024 16:33:35 +0530 Subject: [PATCH] update agent policy schema to include overrides functionality You can use this setting to override custom settings which aren't available in fleet UI. For eg. https://www.elastic.co/guide/en/fleet/current/enable-custom-policy-settings.html and https://support.elastic.dev/knowledge/view/06b69893 This will make things much easier for elastic/elastic-agent#5648 --- kibana/fleet.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kibana/fleet.go b/kibana/fleet.go index 5bfd486f..0929e040 100644 --- a/kibana/fleet.go +++ b/kibana/fleet.go @@ -78,6 +78,7 @@ type AgentPolicy struct { UnenrollTimeout int `json:"unenroll_timeout,omitempty"` InactivityTImeout int `json:"inactivity_timeout,omitempty"` AgentFeatures []map[string]interface{} `json:"agent_features,omitempty"` + Overrides []map[string]interface{} `json:"overrides,omitempty"` IsProtected bool `json:"is_protected"` } @@ -110,6 +111,7 @@ type AgentPolicyUpdateRequest struct { UnenrollTimeout int `json:"unenroll_timeout,omitempty"` InactivityTImeout int `json:"inactivity_timeout,omitempty"` AgentFeatures []map[string]interface{} `json:"agent_features,omitempty"` + Overrides []map[string]interface{} `json:"overrides,omitempty"` IsProtected *bool `json:"is_protected,omitempty"` // Optional bool for compatibility with the older pre 8.9.0 stack }