Open Context Protocol is live! 🚀 Read the launch post
getKubernetesResources

getKubernetesResources

Get Kubernetes Resources

Details

  • Method: GET
  • Path: /kubernetes/clusters/{vke-id}/resources
  • Operation ID: get-kubernetes-resources

Parameters

{}

Response Schema

{
  "description": "",
  "type": "object",
  "x-examples": {
    "example-1": {
      "resources": {
        "block_storage": [
          {
            "id": "7eb35f6c-c4fa-4835-9548-d4730912cbd4",
            "label": "track-again3",
            "date_created": "2021-07-29T16:41:07+00:00",
            "status": "pending"
          },
          {
            "id": "6d1526c9-2d55-4f6b-a775-0024ec5048f0",
            "label": "tracking",
            "date_created": "2021-08-04T15:34:50+00:00",
            "status": "pending"
          }
        ],
        "load_balancer": [
          {
            "id": "04a27709-8d3d-42c2-ae69-c7d8ae6155d8",
            "label": "tracking8",
            "date_created": "2021-07-29T16:46:12+00:00",
            "status": "active"
          }
        ]
      }
    }
  },
  "properties": {
    "resources": {
      "type": "object",
      "properties": {
        "block_storage": {
          "type": "array",
          "uniqueItems": true,
          "minItems": 1,
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "Unique identifier for the block storage volume"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "description": "Label given to the block storage volume"
              },
              "date_created": {
                "type": "string",
                "minLength": 1,
                "description": "Date the block storage volume was created"
              },
              "status": {
                "type": "string",
                "minLength": 1,
                "description": "Status of the block storage volume"
              }
            }
          }
        },
        "load_balancer": {
          "type": "array",
          "uniqueItems": true,
          "minItems": 1,
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "Unique identifier for the load balancer"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "description": "Label given to the load balancer"
              },
              "date_created": {
                "type": "string",
                "minLength": 1,
                "description": "Date the load balancer was created"
              },
              "status": {
                "type": "string",
                "minLength": 1,
                "description": "Status of the load balancer"
              }
            }
          }
        }
      }
    }
  }
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('vultr')

# Call this tool
result = await agent.call_tool('getKubernetesResources', {
    # Add required parameters here
})