Updates an Agent's name, source_type, agent_type, or owner_id.
func (
r *AgentService) Update(ctx context.Context,
agentID string,
body AgentUpdateParams,
opts ...option.RequestOption) (res *Agent,
err error
)Updates an Agent's name, source_type, agent_type, or owner_id. Omitted fields keep their values. Changing or clearing owner_id additionally requires workspaces:manage; assigning an owner also requires workspaces:read and active workspace membership. Fleet ownership cannot be changed through this endpoint. Changing agent_type requires workspaces:manage in addition to project update access; repeating the current type is a no-op. Source type can change only for an EXTERNAL Agent without runtime bindings. The id is immutable and is rejected when present. Requires update permission on every environment project.
| Name | Type | Description |
|---|---|---|
ctx* | context.Context | |
agentID* | string | |
body* | AgentUpdateParams | |
opts* | ...option.RequestOption |