Open Context Protocol is live! 🚀 Read the launch post

createVpc

Create a VPC

Details

  • Method: POST
  • Path: /vpcs
  • Operation ID: create-vpc

Parameters

{
  "region": {
    "description": "Create the VPC in this [Region id](#operation/list-regions).",
    "required": true,
    "location": "body",
    "type": "string"
  },
  "description": {
    "description": "A description of the VPC.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "v4_subnet": {
    "description": "The IPv4 VPC address. For example: 10.99.0.0",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "v4_subnet_mask": {
    "description": "The number of bits for the netmask in CIDR notation. Example: 24",
    "required": false,
    "location": "body",
    "type": "integer"
  }
}

Response Schema

{
  "type": "object",
  "properties": {
    "vpc": {
      "title": "vpc",
      "type": "object",
      "x-examples": {
        "example": {
          "id": "cb676a46-66fd-4dfb-b839-443f2e6c0b60",
          "date_created": "2020-10-10T01:56:20+00:00",
          "region": "ewr",
          "description": "Example VPC",
          "v4_subnet": "10.99.0.0",
          "v4_subnet_mask": 24
        }
      },
      "description": "VPC information.",
      "x-tags": [
        "VPCs"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "A unique ID for the VPC."
        },
        "region": {
          "type": "string",
          "description": "The [Region id](#operation/list-regions) where the VPC is located."
        },
        "date_created": {
          "type": "string",
          "description": "Date the VPC was created."
        },
        "description": {
          "type": "string",
          "description": "A description of the VPC."
        },
        "v4_subnet": {
          "type": "string",
          "description": "The IPv4 VPC address. For example: 10.99.0.0"
        },
        "v4_subnet_mask": {
          "type": "integer",
          "description": "The number of bits for the netmask in CIDR notation. Example: 24"
        }
      },
      "required": [
        "id"
      ]
    }
  }
}

Usage

from ocp_agent import OCPAgent

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

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