VM Groups

Represents an arbitrary group of VMPower Virtual Machines. This helps organize VMs on the VMPower dashboard, delegates team access to VMPower Virtual Machines and can be associated with VM Schedules

Attributes

  • name - (String) Name of the VM Group,
  • cpu-average - (Number) The CPU average cutoff for Auto-off,
  • cpu-max - (Number) The CPU max cutoff for Auto-off,
  • disk-read-average - (Number) The disk read average cutoff for Auto-off,
  • disk-read-max - (Number) The disk read max cutoff for Auto-off,
  • disk-write-average - (Number) The write average cutoff for Auto-off,
  • disk-write-max - (Number) The disk write max cutoff for Auto-off,
  • network-in-max (Number)- The network in max cutoff for Auto-off,
  • network-in-average - (Number) The network in average cutoff for Auto-off,,
  • network-out-average - (Number) The network out average cutoff for Auto-off,,
  • network-out-max - (Number) The network out max cutoff for Auto-off,,
  • auto-off-timezone - (String) The timezone represented as a tz database timezone (eg: America/New_York)
  • include-disk-write-max - (Number) If true includes disk write max cutoff for idle status,
  • include-disk-write-average - (Number) If true includes disk write average cutoff for idle status,
  • include-disk-read-average - (Number) If true includes disk read average cutoff for idle status,
  • include-disk-read-max - (Number) If true includes disk read max cutoff for idle status,
  • include-cpu-average - (Number) If true includes cpu average cutoff for idle status,
  • include-cpu-max - (Number) If true includes cpu max cutoff for idle status,
  • include-network-in-average - (Number) If true includes network in average cutoff for idle status,
  • include-network-out-average - (Number) If true includes network out average cutoff for idle status,
  • include-network-in-max - (Number) If true includes network in max cutoff for idle status,
  • include-network-out-max - (Number) If true includes network out max cutoff for idle status,
  • ignore-hours-enabled - (Boolean) If true prevents Auto off from ocurring between ignore-hours-start and ignore-hours-end
  • ignore-hours-end - (Number) The end of the ignore hours time range (in hours),
  • ignore-hours-start - (Number) The start of the ignore hours time range (in hours),
  • auto-off-warning-sent - (Boolean) Indicates if the auto-off-warning has already been sent
  • auto-off-hours - (Boolean) The number of hours to wait while a VM in this group is considered idle before shutting it down.
  • auto-off-warning-hours - (Number) The number of hours before an expected Auto-off to send a warning notification,
  • auto-off-enabled - (Boolean) If false, Auto-off will not occur to the VMs on this VM Group.

Relationships

  • vms - (List<Virtual Machine>) The virtual machines that are associated with this VM Group. Virtual machines can be from any VMPower-supported cloud provider (eg: AWS, Azure, Google Cloud).

Operations

GET /vm-groups

Retrieves all VM Groups you have access to in your VMPower account.

{
    "links": {
        "self": "http://localhost:3000/vm-groups"
    },
    "data": [
        {
            "id": "598c9b23d905cc821736b771",
            "type": "vm-groups",
            "attributes": {
                "name": "CoreOS",
                "cpu-average": 5,
                "cpu-max": 10,
                "disk-read-average": 5,
                "disk-read-max": 5,
                "disk-write-average": 5,
                "disk-write-max": 5,
                "network-in-max": 5,
                "network-in-average": 5,
                "network-out-average": 5,
                "network-out-max": 5,
                "auto-off-timezone": "America/New_York",
                "include-disk-write-max": true,
                "include-disk-write-average": true,
                "include-disk-read-average": true,
                "include-disk-read-max": true,
                "include-cpu-average": true,
                "include-cpu-max": true,
                "include-network-in-average": true,
                "include-network-out-average": true,
                "include-network-in-max": true,
                "include-network-out-max": true,
                "ignore-hours-enabled": false,
                "ignore-hours-end": 17,
                "ignore-hours-start": 9,
                "auto-off-warning-sent": false,
                "auto-off-hours": 3,
                "auto-off-warning-hours": 1,
                "auto-off-enabled": false
            },
            "links": {
                "self": "https://api.vmpower.io/vm-groups/598c9b23d905cc821736b771"
            },
            "relationships": {
                "vms": {
                    "data": [
                        {
                            "type": "virtual-machines",
                            "id": "5952e19cd248c647d01751e9"
                        },
                        {
                            "type": "virtual-machines",
                            "id": "5952e19cd248c647d01751ea"
                        },
                        {
                            "type": "virtual-machines",
                            "id": "5952e19cd248c647d01751eb"
                        },
                        {
                            "type": "virtual-machines",
                            "id": "5952e19cd248c647d01751ec"
                        },
                        {
                            "type": "virtual-machines",
                            "id": "5952e19cd248c647d01751ed"
                        }
                    ],
                    "links": {
                        "self": "https://api.vmpower.io/virtual-machines/5952e19cd248c647d01751e9"
                    }
                }
            }
        }
    ]
}

GET /weekly-schedules/:id

Retrieves a single VM Group with the ID :id

{
    "links": {
        "self": "http://localhost:3000/vm-groups/598c9b23d905cc821736b771"
    },
    "data": {
        "id": "598c9b23d905cc821736b771",
        "type": "vm-groups",
        "attributes": {
            "name": "CoreOS",
            "cpu-average": 5,
            "cpu-max": 10,
            "disk-read-average": 5,
            "disk-read-max": 5,
            "disk-write-average": 5,
            "disk-write-max": 5,
            "network-in-max": 5,
            "network-in-average": 5,
            "network-out-average": 5,
            "network-out-max": 5,
            "auto-off-timezone": "America/New_York",
            "include-disk-write-max": true,
            "include-disk-write-average": true,
            "include-disk-read-average": true,
            "include-disk-read-max": true,
            "include-cpu-average": true,
            "include-cpu-max": true,
            "include-network-in-average": true,
            "include-network-out-average": true,
            "include-network-in-max": true,
            "include-network-out-max": true,
            "ignore-hours-enabled": false,
            "ignore-hours-end": 17,
            "ignore-hours-start": 9,
            "auto-off-warning-sent": false,
            "auto-off-hours": 3,
            "auto-off-warning-hours": 1,
            "auto-off-enabled": false
        },
        "links": {
            "self": "https://api.vmpower.io/vm-groups/598c9b23d905cc821736b771"
        },
        "relationships": {
            "vms": {
                "data": [
                    {
                        "type": "virtual-machines",
                        "id": "5952e19cd248c647d01751e9"
                    },
                    {
                        "type": "virtual-machines",
                        "id": "5952e19cd248c647d01751ea"
                    },
                    {
                        "type": "virtual-machines",
                        "id": "5952e19cd248c647d01751eb"
                    },
                    {
                        "type": "virtual-machines",
                        "id": "5952e19cd248c647d01751ec"
                    },
                    {
                        "type": "virtual-machines",
                        "id": "5952e19cd248c647d01751ed"
                    }
                ],
                "links": {
                    "self": "https://api.vmpower.io/virtual-machines/5952e19cd248c647d01751e9"
                }
            }
        }
    }
}

PATCH /vm-groups/:id

Updates an existing VM Group with the Id of id

Sample Request Body:

{
    "links": {
        "self": "http://localhost:3000/vm-groups/598c9b23d905cc821736b771"
    },
    "data": {
        "id": "598c9b23d905cc821736b771",
        "type": "vm-groups",
        "attributes": {
            "name": "CoreOS",
            "cpu-average": 5,
            "cpu-max": 10,
            "disk-read-average": 5,
            "disk-read-max": 5,
            "disk-write-average": 5,
            "disk-write-max": 5,
            "network-in-max": 5,
            "network-in-average": 5,
            "network-out-average": 5,
            "network-out-max": 5,
            "auto-off-timezone": "America/New_York",
            "include-disk-write-max": true,
            "include-disk-write-average": true,
            "include-disk-read-average": true,
            "include-disk-read-max": true,
            "include-cpu-average": true,
            "include-cpu-max": true,
            "include-network-in-average": true,
            "include-network-out-average": true,
            "include-network-in-max": true,
            "include-network-out-max": true,
            "ignore-hours-enabled": false,
            "ignore-hours-end": 17,
            "ignore-hours-start": 9,
            "auto-off-warning-sent": false,
            "auto-off-hours": 3,
            "auto-off-warning-hours": 1,
            "auto-off-enabled": false
        },
        "links": {
            "self": "https://api.vmpower.io/vm-groups/598c9b23d905cc821736b771"
        },
        "relationships": {
            "vms": {
                "data": [
                    {
                        "type": "virtual-machines",
                        "id": "5952e19cd248c647d01751e9"
                    },
                    {
                        "type": "virtual-machines",
                        "id": "5952e19cd248c647d01751ea"
                    },
                    {
                        "type": "virtual-machines",
                        "id": "5952e19cd248c647d01751eb"
                    },
                    {
                        "type": "virtual-machines",
                        "id": "5952e19cd248c647d01751ec"
                    },
                    {
                        "type": "virtual-machines",
                        "id": "5952e19cd248c647d01751ed"
                    }
                ],
                "links": {
                    "self": "https://api.vmpower.io/virtual-machines/5952e19cd248c647d01751e9"
                }
            }
        }
    }
}

POST /weekly-schedule

Creates a new VM Group with no associated VMs.

Sample Request Body:

{
    "data": {
        "type": "vm-groups",
        "attributes": {
            "name": "API Group"
        },
        "relationships": {
            "vms": {
                "data": [
                ]
            }
        }
    }
}