vpc_release_floating_ip
Release a floating IP to disassociate it from a resource and make it available for reuse.
Instructions
Release a floating IP
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fip_id | Yes | ||
| region | No |
Implementation Reference
- src/tools/vpc/index.ts:140-142 (handler)The tool handler for vpc_release_floating_ip. Calls client.delete on the floating_ips endpoint with the provided fip_id, after asserting write permissions.
server.tool("vpc_release_floating_ip", "Release a floating IP", { fip_id: z.string(), region: z.string().optional(), }, async (p) => safeTool(async () => { w(); await client.delete(vpcUrl(p.region||r, `/floating_ips/${p.fip_id}`)); return {message:"Floating IP released"}; })); - src/tools/vpc/index.ts:141-141 (schema)Input schema for vpc_release_floating_ip: requires fip_id (string) and optional region (string).
fip_id: z.string(), region: z.string().optional(), - src/tools/vpc/index.ts:140-140 (registration)Registration of the tool via server.tool() call inside registerVPCTools().
server.tool("vpc_release_floating_ip", "Release a floating IP", { - src/server.ts:53-53 (registration)registerVPCTools is called from the main server.ts to register all VPC tools including vpc_release_floating_ip.
registerVPCTools(server, client, config); - src/lib/utils.ts:23-27 (helper)The vpcUrl helper function constructs the VPC API URL with version parameter, used by the handler.
export function vpcUrl(region: string, path: string, version: string = "2024-11-19"): string { const base = `https://${region}.iaas.cloud.ibm.com/v1${path}`; const sep = base.includes("?") ? "&" : "?"; return `${base}${sep}version=${version}&generation=2`; }