dots

floating-ip

assign-ip-to-droplet

original documentation

try {
  const input = {
    droplet_id: 123, // number,
    ip: '127.0.0.1', // string,
  };
  const {data:{action}} = await dots.floatingIp.assignIpToDroplet(input);
  console.log(action);
} catch (error) {
  console.log(error);
}

create-floating-ip

original documentation┬╣

original documentation┬▓

try {
  const input = {
    droplet_id: 123, // number
  };
  const {data:{floating_ip}} = await dots.floatingIp.createFloatingIp(input);
  console.log(floating_ip);
} catch (error) {
  console.log(error);
}

delete-floating-ip

original documentation

try {
  const input = {
    ip: '127.0.0.1', // string
  };
  const {status} = await dots.floatingIp.deleteFloatingIp(input);
  console.log(status);
} catch (error) {
  console.log(error);
}

get-floating-ip

original documentation

try {
  const input = {
    ip: '127.0.0.1', // string
  };
  const {data:{floating_ip}} = await dots.floatingIp.getFloatingIp(input);
  console.log(floating_ip);
} catch (error) {
  console.log(error);
}

get-floating-ip-action

original documentation

try {
  const input = {
    ip: '127.0.0.1', // string
    action_id: 'action-id', // string | number
  };
  const {data:{action}} = await dots.floatingIp.getFloatingIpAction(input);
  console.log(action);
} catch (error) {
  console.log(error);
}

list-floating-ip-actions

original documentation

try {
  const input = {
    ip: '127.0.0.1', // string
    per_page: 1, // number
  };
  const {data:{actions}} = await dots.floatingIp.listFloatingIpActions(input);
  console.log(actions);
} catch (error) {
  console.log(error);
}

list-floating-ips

original documentation

try {
  const input = {
    per_page: 123, // number
  };
  const {data:{floating_ips}} = await dots.floatingIp.listFloatingIps(input);
  console.log(floating_ips);
} catch (error) {
  console.log(error);
}

unassign-ip-from-droplet

original documentation

try {
  const input = {
    ip: '127.0.0.1', // string,
  };
  const {data:{action}} = await dots.floatingIp.unassignIpFromDroplet(input);
  console.log(action);
} catch (error) {
  console.log(error);
}