kubernetes.cluster.api_resources ​
List all API resources advertised by the cluster (kubectl api-resources equivalent)
List all API resources advertised by the Kubernetes cluster (equivalent to kubectl api-resources).
Calls the server's discovery endpoints:
/api/{version}for core (legacy) API groups/apis/{group}/{version}for named API groups
Optionally filters to a single apiGroup by passing the group field (e.g. "apps" for Deployments/ReplicaSets, "" for the core group resources like Pods).
Subresources (those whose name contains /) are always excluded from the output list.
Inputs:
- connection_uuid: Cloud connection UUID (required)
- group: If provided, only resources belonging to this apiGroup are returned. Use
""for the core group,"apps","batch", etc. for named groups. Omit to return all resources across every group.
Outputs:
- items: List of API resource descriptors — see module docstring for shape.
- count: Number of items returned.
Plugin required: context.get_plugin("connection").kubernetes_runner_clients(connection_uuid, organization_uuid) must expose api_client (a kubernetes.client.ApiClient instance) so that CoreV1Api and ApisApi can be instantiated from it.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-kubernetes |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | — |
group | string | No | — | — |
organization_uuid | uuid | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | — |
organization_uuid | uuid | No | — | — |
group | string | No | — | — |
items | json | No | — | — |
count | integer | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "kubernetes.cluster.api_resources",
"initial_data": {
"connection_uuid": "value"
}
}