Virtual Machine

Represents an individual VMPower Virtual Machine. Note that there is no POST method for this resource (Virtual Machines cannot be created, or destroyed through the API).

Attributes

  • instance-id - (String) the unique instance identifier,
  • power-state - (String) the currently known power state of the VM (on or off),
  • provider - (String) The cloud provider the VM is hosted on (azure, azureasm, gcp or aws),
  • instance-name - (String) The name of the instance as known by the cloud provider
  • iops - (Number) The number of Input or Output operations per second fo this VMs,
  • instance-type - (String) The type of VM as known by the cloud provider,
  • pub-ip - (String) The public IP address of the VM
  • resize-recommendations - (Boolean) - If true, VMPower will generate recommendations for this VM
  • cloud-native-diagnostics-link - (String) The direct link to the cloud provider dashboard modify the diagnostic settings for this VM
  • cloud-native-link - (String) The direct link to the cloud dashboard for this VM
  • idle-vm-detection - (Boolean) If true, VMPower will mark this VM as idle if it meets default cloud idle behavior or meets Auto-off idle settings.
  • rec-feedback-text - (String) Unused,
  • idle-feedback-text - (String) Unnused,
  • idle-feedback - (String) Unused,
  • rec-feedback - (String) Unused,
  • price-per-hour - (Number) The hourly compute cost of this VM as specified by the cloud provider public pricing sheet.
  • memory-gi-b - 4 (Number) The amount of memory in Gigabytes for this VM
  • off-since - (ISODate) If power-state is off, this field has the date of the last time the VM was observed to be turned off.
  • iops-average - The average IOPs used by this VMM
  • iops-max - (Number) The maximum IOPs used by this VM
  • iops-rec - (String) Indicates if the IOps should be scaled up, down or not change (scaleup, scaledown or nochange)
  • memory-rec - (String) Indicates if the memory should be scaled up, down or not change (scaleup, scaledown or nochange)
  • cpu-rec - (String) Indicates if the CPU should be scaled up, down or not change (scaleup, scaledown or nochange)
  • memory-utilized-max - (Number) The maximum memory utilized in GiB by this VM based on the Analysis Window length of time
  • memory-utilized-average - (Number) The maximum memory utilized in GiB by this VM based on the Analysis Window length of time
  • cpu-max - (Number) The maximum CPU utilized in % by this VM based on the Analysis Window length of time
  • cpu-average - (Number) The average memory utilized in GiB by this VM based on the Analysis Window length of time
  • disk-read-max - (Number) The maximum disk read speed in bytes/sec by this VM based on the Analysis Window length of time
  • disk-write-max - (Number) The maximum disk write speed in bytes/sec by this VM based on the Analysis Window length of time
  • disk-write-average - (Number) The average disk write speed in bytes/sec by this VM based on the Analysis Window length of time
  • disk-read-average - (Number) The average disk read speed in bytes/sec by this VM based on the Analysis Window length of time
  • network-in-max - (Number) The maximum network read speed in bytes/sec by this VM based on the Analysis Window length of time
  • network-in-average - (Number) The average network read speed in bytes/sec by this VM based on the Analysis Window length of time
  • network-out-max - (Number) The maximum network write speed in bytes/sec by this VM based on the Analysis Window length of time
  • network-out-average - (Number) The average network write speed in bytes/sec by this VM based on the Analysis Window length of time
  • estimated-iops-size - (Number) The estimated size of I/O operations for this VM (used when the cloud provider does not provide I/O operation sizes (such as azureasm))
  • auto-off-warning-sent - (Boolean) Flag for indicating if an Auto-off warning has already been sent for this particular VM.
  • idle-reason - (String) - Not used,
  • is-idle - (Boolean) - True if VMPower has detected this VM as idle
  • cpus - (Number) - The number of logical CPUs available to this VM
  • unstoppable - (Boolean) True if VMPower detects this VM as unable to be powered off (such as some gcp VMs)
  • os-type - (String) The operating system type (either windows or linux),
  • plan-enabled - (Boolean) If true the VM can be managed under the current VMPower subscription

Relationships

  • cloud-subscription - (Cloud Subscription) The associated Cloud Subscription for the VM
  • resizable-types - (List<VM Type>) All resize-compatible VM types for this VM
  • recommended-resize-types - (List<VM Type>) The recommended VM size(s) for this VM based on utilization

Operations

GET /virtual-machines

URL Query Parameters

  • limit - (Number) The maximum number of VM resources to return

  • next - (ID) The last id of the VM returned in your previous call (used to paginate VMs)

Lists all Virtual Machines available

{
    "links": {
        "self": "http://localhost:3000/virtual-machines"
    },
    "data": [
        {
            "id": "5952e19cd248c647d01751e8",
            "type": "virtual-machines",
            "attributes": {
                "instance-id": "coreos-cluster/no-price-test",
                "power-state": "on",
                "provider": "azure",
                "instance-name": "no-price-test",
                "iops": 4500,
                "instance-type": "Standard_F2s",
                "pub-ip": "52.173.18.109",
                "resize-recommendations": true,
                "cloud-native-diagnostics-link": "https://portal.azure.com/#resource/subscriptions/14c22818-e709-45a4-bafb-924511949700/resourceGroups/coreos-cluster/providers/Microsoft.Compute/virtualMachines/no-price-test/diagnostics",
                "cloud-native-link": "https://portal.azure.com/#resource/subscriptions/14c22818-e709-45a4-bafb-924511949700/resourceGroups/coreos-cluster/providers/Microsoft.Compute/virtualMachines/no-price-test/overview",
                "idle-vm-detection": true,
                "rec-feedback-text": null,
                "idle-feedback-text": null,
                "idle-feedback": null,
                "rec-feedback": null,
                "price-per-hour": 0.211,
                "memory-gi-b": 4,
                "off-since": "2017-06-27T22:49:21.788Z",
                "iops-average": 0,
                "iops-max": 0,
                "iops-rec": "nochange",
                "memory-rec": "nochange",
                "cpu-rec": 0,
                "memory-utilized-max": 0,
                "memory-utilized-average": 0,
                "cpu-max": 0,
                "cpu-average": 0,
                "disk-read-max": 0,
                "disk-write-max": 0,
                "disk-write-average": 0,
                "disk-read-average": 0,
                "network-in-max": 0,
                "network-in-average": 0,
                "network-out-max": 0,
                "network-out-average": 0,
                "estimated-iops-size": 16000,
                "auto-off-warning-sent": false,
                "idle-reason": "",
                "is-idle": false,
                "cpus": 2,
                "unstoppable": false,
                "os-type": "windows",
                "plan-enabled": true
            },
            "links": {
                "self": "https://api.vmpower.io/virtual-machines/5952e19cd248c647d01751e8"
            },
            "relationships": {
                "cloud-subscription": {
                    "data": {
                        "type": "cloud-subscriptions",
                        "id": "5952e192d248c647d01751e6"
                    },
                    "links": {
                        "self": "https://api.vmpower.io/cloud-subscriptions/5952e192d248c647d01751e6"
                    }
                },
                "resizable-types": {
                    "data": [
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b1c"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b21"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2f"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b25"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2a"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b1d"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b26"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2b"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b22"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b30"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b1e"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b27"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2c"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b23"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b31"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b1f"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b28"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2d"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b24"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b32"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b20"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b29"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2e"
                        }
                    ],
                    "links": {
                        "self": "https://api.vmpower.io/vm-types/5952dee8601da4b0a96b2b1c"
                    }
                },
                "recommended-resize-types": {
                    "data": [],
                    "links": {
                        "self": "https://api.vmpower.io//"
                    }
                }
            }
        },
    ]
}

GET /virtual-machines/:id

Gets the Virtual Machine with the id id

{
    "links": {
        "self": "http://localhost:3000/virtual-machines"
    },
    "data":
        {
            "id": "5952e19cd248c647d01751e8",
            "type": "virtual-machines",
            "attributes": {
                "instance-id": "coreos-cluster/no-price-test",
                "power-state": "on",
                "provider": "azure",
                "instance-name": "no-price-test",
                "iops": 4500,
                "instance-type": "Standard_F2s",
                "pub-ip": "52.173.18.109",
                "resize-recommendations": true,
                "cloud-native-diagnostics-link": "https://portal.azure.com/#resource/subscriptions/14c22818-e709-45a4-bafb-924511949700/resourceGroups/coreos-cluster/providers/Microsoft.Compute/virtualMachines/no-price-test/diagnostics",
                "cloud-native-link": "https://portal.azure.com/#resource/subscriptions/14c22818-e709-45a4-bafb-924511949700/resourceGroups/coreos-cluster/providers/Microsoft.Compute/virtualMachines/no-price-test/overview",
                "idle-vm-detection": true,
                "rec-feedback-text": null,
                "idle-feedback-text": null,
                "idle-feedback": null,
                "rec-feedback": null,
                "price-per-hour": 0.211,
                "memory-gi-b": 4,
                "off-since": "2017-06-27T22:49:21.788Z",
                "iops-average": 0,
                "iops-max": 0,
                "iops-rec": "nochange",
                "memory-rec": "nochange",
                "cpu-rec": 0,
                "memory-utilized-max": 0,
                "memory-utilized-average": 0,
                "cpu-max": 0,
                "cpu-average": 0,
                "disk-read-max": 0,
                "disk-write-max": 0,
                "disk-write-average": 0,
                "disk-read-average": 0,
                "network-in-max": 0,
                "network-in-average": 0,
                "network-out-max": 0,
                "network-out-average": 0,
                "estimated-iops-size": 16000,
                "auto-off-warning-sent": false,
                "idle-reason": "",
                "is-idle": false,
                "cpus": 2,
                "unstoppable": false,
                "os-type": "windows",
                "plan-enabled": true
            },
            "links": {
                "self": "https://api.vmpower.io/virtual-machines/5952e19cd248c647d01751e8"
            },
            "relationships": {
                "cloud-subscription": {
                    "data": {
                        "type": "cloud-subscriptions",
                        "id": "5952e192d248c647d01751e6"
                    },
                    "links": {
                        "self": "https://api.vmpower.io/cloud-subscriptions/5952e192d248c647d01751e6"
                    }
                },
                "resizable-types": {
                    "data": [
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b1c"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b21"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2f"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b25"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2a"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b1d"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b26"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2b"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b22"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b30"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b1e"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b27"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2c"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b23"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b31"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b1f"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b28"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2d"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b24"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b32"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b20"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b29"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2e"
                        }
                    ],
                    "links": {
                        "self": "https://api.vmpower.io/vm-types/5952dee8601da4b0a96b2b1c"
                    }
                },
                "recommended-resize-types": {
                    "data": [],
                    "links": {
                        "self": "https://api.vmpower.io//"
                    }
                }
            }
        }
}

PATCH /virtual-machines/:id

Modify an existing Virtual Machine.

{
    "links": {
        "self": "http://localhost:3000/virtual-machines"
    },
    "data":
        {
            "id": "5952e19cd248c647d01751e8",
            "type": "virtual-machines",
            "attributes": {
                "instance-id": "coreos-cluster/no-price-test",
                "power-state": "on",
                "provider": "azure",
                "instance-name": "no-price-test",
                "iops": 4500,
                "instance-type": "Standard_F2s",
                "pub-ip": "52.173.18.109",
                "resize-recommendations": true,
                "cloud-native-diagnostics-link": "https://portal.azure.com/#resource/subscriptions/14c22818-e709-45a4-bafb-924511949700/resourceGroups/coreos-cluster/providers/Microsoft.Compute/virtualMachines/no-price-test/diagnostics",
                "cloud-native-link": "https://portal.azure.com/#resource/subscriptions/14c22818-e709-45a4-bafb-924511949700/resourceGroups/coreos-cluster/providers/Microsoft.Compute/virtualMachines/no-price-test/overview",
                "idle-vm-detection": true,
                "rec-feedback-text": null,
                "idle-feedback-text": null,
                "idle-feedback": null,
                "rec-feedback": null,
                "price-per-hour": 0.211,
                "memory-gi-b": 4,
                "off-since": "2017-06-27T22:49:21.788Z",
                "iops-average": 0,
                "iops-max": 0,
                "iops-rec": "nochange",
                "memory-rec": "nochange",
                "cpu-rec": 0,
                "memory-utilized-max": 0,
                "memory-utilized-average": 0,
                "cpu-max": 0,
                "cpu-average": 0,
                "disk-read-max": 0,
                "disk-write-max": 0,
                "disk-write-average": 0,
                "disk-read-average": 0,
                "network-in-max": 0,
                "network-in-average": 0,
                "network-out-max": 0,
                "network-out-average": 0,
                "estimated-iops-size": 16000,
                "auto-off-warning-sent": false,
                "idle-reason": "",
                "is-idle": false,
                "cpus": 2,
                "unstoppable": false,
                "os-type": "windows",
                "plan-enabled": true
            },
            "links": {
                "self": "https://api.vmpower.io/virtual-machines/5952e19cd248c647d01751e8"
            },
            "relationships": {
                "cloud-subscription": {
                    "data": {
                        "type": "cloud-subscriptions",
                        "id": "5952e192d248c647d01751e6"
                    },
                    "links": {
                        "self": "https://api.vmpower.io/cloud-subscriptions/5952e192d248c647d01751e6"
                    }
                },
                "resizable-types": {
                    "data": [
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b1c"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b21"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2f"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b25"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2a"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b1d"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b26"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2b"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b22"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b30"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b1e"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b27"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2c"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b23"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b31"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b1f"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b28"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2d"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b24"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b32"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b20"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b29"
                        },
                        {
                            "type": "vm-types",
                            "id": "5952dee8601da4b0a96b2b2e"
                        }
                    ],
                    "links": {
                        "self": "https://api.vmpower.io/vm-types/5952dee8601da4b0a96b2b1c"
                    }
                },
                "recommended-resize-types": {
                    "data": [],
                    "links": {
                        "self": "https://api.vmpower.io//"
                    }
                }
            }
        }
}