stack kb elastic-agent-policies put-fleet-agent-policies-agentpolicyid cli command
Auth required
Idempotent
Scope: global
elastic stack kb elastic-agent-policies put-fleet-agent-policies-agentpolicyid \
--agent-policy-id <agent-policy-id> \
--name <name> \
--namespace <namespace> \
[options]
Update an agent policy
Behaviour flags:
--dry-run — validate all inputs and exit without performing any action
--agent-policy-idstringrequired- The agentPolicyId parameter
--namestringrequired--namespacestringrequired--kb-formatstring--advanced-settingsstring--agent-featuresstring[]--agentlessstring--[no-]bump-revision--data-output-idstring--descriptionstring--download-source-idstring--fleet-server-host-idstring--[no-]force- User defined data tags that are added to all of the inputs. The values can be strings or numbers.
--[no-]has-agent-version-conditions--[no-]has-fleet-server--idstring--inactivity-timeoutnumber--[no-]is-default--[no-]is-default-fleet-server--[no-]is-managed--[no-]is-protected--[no-]is-verifier- Indicates this is a short-lived verifier policy used for OTel permission verification.
--[no-]keep-monitoring-alive- When set to true, monitoring will be enabled but logs/metrics collection will be disabled
--monitoring-diagnosticsstring--monitoring-enabledstring[]--monitoring-httpstring--monitoring-output-idstring--[no-]monitoring-pprof-enabled--overridesstring- Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.
--required-versionsstring[]--space-idsstring[]--[no-]supports-agentless- Indicates whether the agent policy supports agentless integrations. Deprecated in favor of the Fleet agentless policies API.
--unenroll-timeoutnumber--input-filestring- path to a JSON file to use as command input
--[no-]dry-run- validate all inputs and exit without performing any action (preview changes without applying them)
--[no-]json-
output as JSON