Spaces method and path for this operation:
Refer to Spaces for more information.
Update an agent policy by ID.
[Required authorization] Route required privileges: fleet-agent-policies-all.
Body
-
Additional properties are NOT allowed.
-
Not more than
100elements. -
Additional properties are NOT allowed.
-
Minimum value is
0. Default value is1209600. -
Indicates this is a short-lived verifier policy used for OTel permission verification.
-
When set to true, monitoring will be enabled but logs/metrics collection will be disabled
Default value is
false. -
Additional properties are NOT allowed.
-
Not more than
3elements. Values arelogs,metrics, ortraces. -
Additional properties are NOT allowed.
-
Minimum length is
1. -
Minimum length is
1. -
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.
-
Not more than
100elements. -
Not more than
100elements. -
Indicates whether the agent policy supports agentless integrations. Deprecated in favor of the Fleet agentless policies API.
Default value is
false. -
Minimum value is
0.
curl \
--request PUT 'https://localhost:5601/api/fleet/agent_policies/{agentPolicyId}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"description":"An updated agent policy description","monitoring_enabled":["logs"],"name":"Updated agent policy","namespace":"default"}'
{
"description": "An updated agent policy description",
"monitoring_enabled": [
"logs"
],
"name": "Updated agent policy",
"namespace": "default"
}
{
"item": {
"description": "An updated agent policy description",
"id": "agent-policy-id-1",
"is_managed": false,
"is_protected": false,
"name": "Updated agent policy",
"namespace": "default",
"revision": 2,
"status": "active",
"updated_at": "2024-01-15T11:00:00.000Z",
"updated_by": "user1"
}
}
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}