createInstance
Create Instance
Details
- Method:
POST - Path:
/instances - Operation ID:
create-instance
Parameters
{
"region": {
"description": "The [Region id](#operation/list-regions) where the Instance is located.",
"required": true,
"location": "body",
"type": "string"
},
"plan": {
"description": "The [Plan id](#operation/list-plans) to use when deploying this instance.",
"required": true,
"location": "body",
"type": "string"
},
"os_id": {
"description": "The [Operating System id](#operation/list-os) to use when deploying this instance.",
"required": false,
"location": "body",
"type": "integer"
},
"ipxe_chain_url": {
"description": "The URL location of the iPXE chainloader.",
"required": false,
"location": "body",
"type": "string"
},
"iso_id": {
"description": "The [ISO id](#operation/list-isos) to use when deploying this instance.",
"required": false,
"location": "body",
"type": "string"
},
"script_id": {
"description": "The [Startup Script id](#operation/list-startup-scripts) to use when deploying this instance.",
"required": false,
"location": "body",
"type": "string"
},
"snapshot_id": {
"description": "The [Snapshot id](#operation/list-snapshots) to use when deploying the instance.",
"required": false,
"location": "body",
"type": "string"
},
"enable_ipv6": {
"description": "Enable IPv6.\n\n* true",
"required": false,
"location": "body",
"type": "boolean"
},
"attach_private_network": {
"description": "Use `attach_vpc` instead. An array of [Private Network ids](#operation/list-networks) to attach to this Instance. This parameter takes precedence over `enable_private_network`. Please choose one parameter.",
"required": false,
"location": "body",
"type": "array"
},
"attach_vpc": {
"description": "An array of [VPC IDs](#operation/list-vpcs) to attach to this Instance. This parameter takes precedence over `enable_vpc`. Please choose one parameter.",
"required": false,
"location": "body",
"type": "array"
},
"label": {
"description": "A user-supplied label for this instance.",
"required": false,
"location": "body",
"type": "string"
},
"sshkey_id": {
"description": "The [SSH Key id](#operation/list-ssh-keys) to install on this instance.",
"required": false,
"location": "body",
"type": "array"
},
"backups": {
"description": "Enable automatic backups for the instance.\n\n* enabled\n* disabled",
"required": false,
"location": "body",
"type": "string"
},
"app_id": {
"description": "The [Application id](#operation/list-applications) to use when deploying this instance.",
"required": false,
"location": "body",
"type": "integer"
},
"image_id": {
"description": "The [Application image_id](#operation/list-applications) to use when deploying this instance.",
"required": false,
"location": "body",
"type": "string"
},
"user_data": {
"description": "The user-supplied, base64 encoded [user data](https://www.vultr.com/docs/manage-instance-user-data-with-the-vultr-metadata-api/) to attach to this instance.",
"required": false,
"location": "body",
"type": "string"
},
"ddos_protection": {
"description": "Enable DDoS protection (there is an additional charge for this).\n\n* true\n* false",
"required": false,
"location": "body",
"type": "boolean"
},
"activation_email": {
"description": "Notify by email after deployment.\n\n* true\n* false (default)",
"required": false,
"location": "body",
"type": "boolean"
},
"hostname": {
"description": "The hostname to use when deploying this instance.",
"required": false,
"location": "body",
"type": "string"
},
"tag": {
"description": "Use `tags` instead. The user-supplied tag.",
"required": false,
"location": "body",
"type": "string"
},
"firewall_group_id": {
"description": "The [Firewall Group id](#operation/list-firewall-groups) to attach to this Instance.",
"required": false,
"location": "body",
"type": "string"
},
"reserved_ipv4": {
"description": "ID of the floating IP to use as the main IP of this server.",
"required": false,
"location": "body",
"type": "string"
},
"enable_private_network": {
"description": "Use `enable_vpc` instead.\n\nIf `true`, private networking support will be added to the new server.\n\nThis parameter attaches a single network. When no network exists in the region, it will be automatically created.\n\nIf there are multiple private networks in the instance's region, use `attach_private_network` instead to specify a network.",
"required": false,
"location": "body",
"type": "boolean"
},
"enable_vpc": {
"description": "If `true`, VPC support will be added to the new server.\n\nThis parameter attaches a single VPC. When no VPC exists in the region, it will be automatically created.\n\nIf there are multiple VPCs in the instance's region, use `attach_vpc` instead to specify a network.",
"required": false,
"location": "body",
"type": "boolean"
},
"tags": {
"description": "Tags to apply to the instance",
"required": false,
"location": "body",
"type": "array"
}
}Response Schema
{
"type": "object",
"properties": {
"instance": {
"title": "instance",
"type": "object",
"x-tags": [
"instances"
],
"description": "Instance information.",
"x-examples": {},
"properties": {
"id": {
"type": "string",
"description": "A unique ID for the VPS Instance."
},
"os": {
"type": "string",
"description": "The [Operating System name](#operation/list-os)."
},
"ram": {
"type": "integer",
"description": "The amount of RAM in MB."
},
"disk": {
"type": "integer",
"description": "The size of the disk in GB."
},
"main_ip": {
"type": "string",
"description": "The main IPv4 address."
},
"vcpu_count": {
"type": "integer",
"description": "Number of vCPUs."
},
"region": {
"type": "string",
"description": "The [Region id](#operation/list-regions) where the Instance is located."
},
"default_password": {
"type": "string",
"description": "The default password assigned at deployment."
},
"date_created": {
"type": "string",
"description": "The date this instance was created."
},
"status": {
"type": "string",
"description": "The current status.\n\n* active\n* pending\n* suspended\n* resizing"
},
"power_status": {
"type": "string",
"description": "The power-on status.\n\n* running\n* stopped"
},
"server_status": {
"type": "string",
"description": "The server health status.\n\n* none\n* locked\n* installingbooting\n* ok"
},
"allowed_bandwidth": {
"type": "integer",
"description": "Monthly bandwidth quota in GB."
},
"netmask_v4": {
"type": "string",
"description": "The IPv4 netmask in dot-decimal notation."
},
"gateway_v4": {
"type": "string",
"description": "The gateway IP address."
},
"v6_networks": {
"type": "array",
"description": "An array of IPv6 objects.",
"items": {
"type": "object",
"description": "An IPv6 object.",
"properties": {
"network": {
"type": "string",
"description": "The IPv6 subnet."
},
"main_ip": {
"type": "string",
"description": "The main IPv6 network address."
},
"network_size": {
"description": "The IPv6 network size in bits.",
"type": "integer"
}
}
}
},
"hostname": {
"type": "string",
"description": "The hostname for this instance."
},
"label": {
"type": "string",
"description": "The user-supplied label for this instance."
},
"tag": {
"type": "string",
"description": "Use `tags` instead. The user-supplied tag for this instance.",
"deprecated": true
},
"internal_ip": {
"type": "string",
"description": "The internal IP used by this instance, if set."
},
"kvm": {
"type": "string",
"description": "HTTPS link to the Vultr noVNC Web Console."
},
"os_id": {
"type": "integer",
"description": "The [Operating System id](#operation/list-os) used by this instance."
},
"app_id": {
"type": "integer",
"description": "The [Application id](#operation/list-applications) used by this instance."
},
"image_id": {
"type": "string",
"description": "The [Application image_id](#operation/list-applications) used by this instance."
},
"firewall_group_id": {
"type": "string",
"description": "The [Firewall Group id](#operation/list-firewall-groups) linked to this Instance."
},
"features": {
"type": "array",
"description": "\"auto_backups\", \"ipv6\", \"ddos_protection\"",
"items": {
"type": "string"
}
},
"plan": {
"type": "string",
"description": "A unique ID for the Plan."
},
"tags": {
"type": "array",
"description": "Tags to apply to the instance",
"items": {
"type": "string"
}
}
}
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('vultr')
# Call this tool
result = await agent.call_tool('createInstance', {
# Add required parameters here
})