Create a VM Auto Scaling Group
Creates a VM Auto Scaling Group.
Note that creating a group triggers the creation of two monitoring alarms for 'Scale-In' and 'Scale-Out' operations according to the 'Policy' settings.
Authorization is granted when a valid proof of identity is provided along with an API request for data. This proof of identity is in the form of a JSON web access token, a unique string that identifies a user.
Example Request Header
Authorization: Bearer ACCESS_TOKEN
A group of virtual servers where the number of replicas can be scaled automatically.
The unique resource identifier.
1d67ca27-d4c0-419d-9a64-9ea42dfdd036The resource type.
autoscaling-groupThe absolute URL to the resource's representation.
https://api.ionos.com/autoscaling/groups/1d67ca27-d4c0-419d-9a64-9ea42dfdd036Created
A group of virtual servers where the number of replicas can be scaled automatically.
The unique resource identifier.
1d67ca27-d4c0-419d-9a64-9ea42dfdd036The resource type.
autoscaling-groupThe absolute URL to the resource's representation.
https://api.ionos.com/autoscaling/groups/1d67ca27-d4c0-419d-9a64-9ea42dfdd036Bad Request
Unauthorized
Forbidden
Unprocessable Entity
POST /autoscaling/groups HTTP/1.1
Host: api.ionos.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 1805
{
"properties": {
"datacenter": {
"id": "09043280-aafc-49f7-a048-d61673f52024"
},
"maxReplicaCount": 10,
"minReplicaCount": 1,
"name": "VM Auto Scaling Group 1",
"policy": {
"metric": "INSTANCE_CPU_UTILIZATION_AVERAGE",
"range": "P1D",
"scaleInAction": {
"amount": 1,
"amountType": "ABSOLUTE",
"cooldownPeriod": "5m",
"terminationPolicy": "OLDEST_SERVER_FIRST",
"deleteVolumes": true
},
"scaleInThreshold": 33,
"scaleOutAction": {
"amount": 1,
"amountType": "ABSOLUTE",
"cooldownPeriod": "5m"
},
"scaleOutThreshold": 77,
"unit": "PER_MINUTE"
},
"replicaConfiguration": {
"availabilityZone": "AUTO",
"cores": 2,
"cpuFamily": "INTEL_ICELAKE",
"nics": [
{
"lan": 1,
"name": "LAN NIC 1",
"dhcp": true,
"firewallActive": true,
"firewallType": "INGRESS",
"flowLogs": [
{
"name": "flow-log",
"action": "ACCEPTED",
"direction": "EGRESS",
"bucket": "bucketName/key"
}
],
"firewallRules": [
{
"name": "My resource",
"protocol": "TCP",
"sourceMac": "00:0a:95:9d:68:16",
"sourceIp": "22.231.113.64",
"targetIp": "22.231.113.64",
"icmpCode": 2,
"icmpType": 8,
"portRangeStart": 8,
"portRangeEnd": 8,
"type": "INGRESS"
}
],
"targetGroup": {
"targetGroupId": "id_example",
"port": 8080,
"weight": 15
}
}
],
"ram": 2048,
"volumes": [
{
"image": "6e928bd0-3a8e-4821-a20a-54984b0c2d21",
"imageAlias": "ubuntu:latest",
"name": "Volume 1",
"size": 30,
"sshKeys": [
"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSU\nGPl+nafzlHDTYW7hdI4yZ5ew18JH4JW9jbhUFrviQzM7xlELEVf4h9lFX5QVkbPppSwg0cda3\nPbv7kOdJ/MTyBlWXFCR+HAo3FXRitBqxiX1nKhXpHAZsMciLq8V6RjsNAQwdsdMFvSlVK/7XA\nt3FaoJoAsncM1Q9x5+3V0Ww68/eIFmb1zuUFljQJKprrX88XypNDvjYNby6vw/Pb0rwert/En\nmZ+AW4OZPnTPI89ZPmVMLuayrD2cE86Z/il8b+gw3r3+1nKatmIkjn2so1d01QraTlMqVSsbx\nNrRFi9wrf+M7Q== user@domain.local"
],
"type": "PERFORMANCE",
"userData": "ZWNobyAiSGVsbG8sIFdvcmxkIgo=",
"bus": "VIRTIO",
"backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
"bootOrder": "AUTO",
"imagePassword": "passw0rd"
}
]
}
}
}{
"id": "1d67ca27-d4c0-419d-9a64-9ea42dfdd036",
"type": "autoscaling-group",
"href": "https://api.ionos.com/autoscaling/groups/1d67ca27-d4c0-419d-9a64-9ea42dfdd036",
"metadata": {
"createdBy": "user@mail.local",
"createdByUserId": "919e4752-e700-40b1-9507-5ac545bb6355",
"createdDate": "2021-06-21T08:46:01.249829Z",
"etag": "text",
"lastModifiedBy": "user@mail.local",
"lastModifiedByUserId": "919e4752-e700-40b1-9507-5ac545bb6355",
"lastModifiedDate": "2021-07-26T09:30:39.562006Z",
"state": "AVAILABLE"
},
"properties": {
"datacenter": {
"id": "09043280-aafc-49f7-a048-d61673f52024",
"type": "datacenter",
"href": "https://api.ionos.com/cloudapi/v6/datacenters/09043280-aafc-49f7-a048-d61673f52024"
},
"location": "de/txl",
"maxReplicaCount": 10,
"minReplicaCount": 1,
"name": "VM Auto Scaling Group 1",
"policy": {
"metric": "INSTANCE_CPU_UTILIZATION_AVERAGE",
"range": "P1D",
"scaleInAction": {
"amount": 1,
"amountType": "ABSOLUTE",
"cooldownPeriod": "5m",
"terminationPolicy": "OLDEST_SERVER_FIRST",
"deleteVolumes": true
},
"scaleInThreshold": 33,
"scaleOutAction": {
"amount": 1,
"amountType": "ABSOLUTE",
"cooldownPeriod": "5m"
},
"scaleOutThreshold": 77,
"unit": "PER_MINUTE"
},
"replicaConfiguration": {
"availabilityZone": "AUTO",
"cores": 2,
"cpuFamily": "INTEL_ICELAKE",
"nics": [
{
"lan": 1,
"name": "LAN NIC 1",
"dhcp": true,
"firewallActive": true,
"firewallType": "INGRESS",
"flowLogs": [
{
"name": "flow-log",
"action": "ACCEPTED",
"direction": "EGRESS",
"bucket": "bucketName/key"
}
],
"firewallRules": [
{
"name": "My resource",
"protocol": "TCP",
"sourceMac": "00:0a:95:9d:68:16",
"sourceIp": "22.231.113.64",
"targetIp": "22.231.113.64",
"icmpCode": 2,
"icmpType": 8,
"portRangeStart": 8,
"portRangeEnd": 8,
"type": "INGRESS"
}
],
"targetGroup": {
"targetGroupId": "id_example",
"port": 8080,
"weight": 15
}
}
],
"ram": 2048,
"volumes": [
{
"image": "6e928bd0-3a8e-4821-a20a-54984b0c2d21",
"imageAlias": "ubuntu:latest",
"name": "Volume 1",
"size": 30,
"sshKeys": [
"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSU\nGPl+nafzlHDTYW7hdI4yZ5ew18JH4JW9jbhUFrviQzM7xlELEVf4h9lFX5QVkbPppSwg0cda3\nPbv7kOdJ/MTyBlWXFCR+HAo3FXRitBqxiX1nKhXpHAZsMciLq8V6RjsNAQwdsdMFvSlVK/7XA\nt3FaoJoAsncM1Q9x5+3V0Ww68/eIFmb1zuUFljQJKprrX88XypNDvjYNby6vw/Pb0rwert/En\nmZ+AW4OZPnTPI89ZPmVMLuayrD2cE86Z/il8b+gw3r3+1nKatmIkjn2so1d01QraTlMqVSsbx\nNrRFi9wrf+M7Q== user@domain.local"
],
"type": "PERFORMANCE",
"userData": "ZWNobyAiSGVsbG8sIFdvcmxkIgo=",
"bus": "VIRTIO",
"backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
"bootOrder": "AUTO",
"imagePassword": "passw0rd"
}
]
}
},
"entities": {
"actions": {
"id": "1d67ca27-d4c0-419d-9a64-9ea42dfdd036/actions",
"type": "collection",
"href": "https://api.ionos.com/autoscaling/groups/1d67ca27-d4c0-419d-9a64-9ea42dfdd036/actions"
},
"servers": {
"id": "1d67ca27-d4c0-419d-9a64-9ea42dfdd036/servers",
"type": "collection",
"href": "https://api.ionos.com/autoscaling/groups/1d67ca27-d4c0-419d-9a64-9ea42dfdd036/servers"
}
},
"startedActions": [
{
"id": "d8df1964-e923-4e63-af45-4c25d6687674",
"type": "autoscaling-action",
"href": "https://api.ionos.com/autoscaling/groups/1d67ca27-d4c0-419d-9a64-9ea42dfdd036/actions/d8df1964-e923-4e63-af45-4c25d6687674"
}
]
}Last updated
Was this helpful?