swarm_task_inspect
Get full details of a single Docker Swarm task by ID, unique prefix, or name. Use it to inspect or troubleshoot a specific task after listing tasks or viewing service events.
Instructions
Inspect a single swarm task, like docker inspect --type task.
For when you already hold a task reference -- from a swarm_task_list or service_ps row, a
service event, or an error message -- and want just that task. swarm_task_list returns the
same document for every task, so prefer it when scanning; this is the single-object fetch.
To reach the container behind a running task, read Status.ContainerStatus.ContainerID and pass
it to container_inspect / container_logs -- but note the container may be on another node,
where those tools cannot see it, and service_logs aggregates across tasks instead. Read-only.
Requires a swarm manager; raises docker.errors.APIError if the task does not exist, if a
prefix matches more than one task, or if this node is not a manager.
args:
id_or_name - The task id, an unambiguous id prefix, or the task's full name -- which is the
container-name form <service>.<slot>.<taskid> (<service>.<nodeid>.<taskid> for a
global service), NOT the shorter <service>.<slot> that docker service ps prints in
its NAME column, which does not resolve. The daemon tries full id, then full name, then
prefix, and rejects an ambiguous prefix rather than picking a match
returns: dict - Full task inspect payload, as docker inspect --type task. Carries no name
field of its own; compose one from ServiceID/Slot if you need it
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id_or_name | Yes |