Create a Stacklet
- Name
post
- Type
- /v1/stacklets
- Description
Send a
POST
request to create a stacklet.
Request
Attributes
Required
- Name
name
- Type
- string
- Description
New Human-readble name given to the Stacklet at its creation.
- Name
size
- Type
- string
- Description
The slug used to identify the Stacklet size selected by the user.
- Name
image
- Type
- string | integer
- Description
The id unique identifier or the slug identifier for the backup and snapshot images used for the Stacklet as base image.
- Name
region
- Type
- string
- Description
The slug used to identify the region where the user will choose to deploy the Stacklet.
Optional
- Name
tags
- Type
- array
- Description
An array of the tags which are used to tag the Stacklet.
- Name
volume
- Type
- string | object
- Description
The ID of an exist volume to be attached to the stacklet. Or object for a new volume. Learn more.
- Name
backups
- Type
- boolean
- Description
This attribute determine whether automatic backup is enabled or disabled for the Stacklet.
- Name
ssh_keys
- Type
- array
- Description
IDs of the SSH keys embedded in the Stacklet root account upon creation.
- Name
vpc_uuid
- Type
- string
- Description
The unique id identifier for the VPC added to the Stacklet.
- Name
project_uuid
- Type
- string
- Description
The project universal unique identifier where the Stacklet will be deployed. If the user didn't provide the UUID, the system will replace the Stacklet in the user default project.
- Name
userdata_uuid
- Type
- string
- Description
The ID of an exist userdata script that would run on the Stacklet first startup.
- Name
firewall_uuid
- Type
- string
- Description
The id unique identifier for an existing firewall to be assigned to the Stacklet.
- Name
private_networking
- Type
- boolean
- Description
This attribute determine whether private networking is enabled or disabled for the Stacklet.
Create New Volume
To create a new volume, the following attributes are used:
Required New Volume Attributes
- Name
name
- Type
- string
- Description
Human-readable name for the volume.
- Name
size_gigabytes
- Type
- integer
- Description
The size of the block storage volume in gigabytes.
Example
curl -X POST "https://api.simplystack.com/v1/stacklets" \
-H "Content-Type: application/json" \
-H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0" \
-d '{"name": "stacklet1", "region": "fra", "size": "b-1vcpu-1gb", "image": "ubuntu-20-04-1-x64"}'
Response
JSON object with a key named stacklets
which is an array of the following attributes associated with the stacklets:
Attributes
Example
{
"stacklet": {
"application": null,
"backup_ids": [],
"backups_enabled": false,
"created_at": "2020-09-21T13:11:08.481602Z",
"disk": 26843545600,
"distribution": {
"image": {
"available": true,
"default": true,
"extra_price": "0.0000",
"min_disk": null,
"min_vcpu": null,
"min_memory": null,
"slug": "ubuntu-20-04-1-x64",
"version": "20.04.1 x64"
},
"name": "Ubuntu"
},
"firewall_uuid": null,
"id": 24,
"locked": false,
"memory": 1073741824,
"name": "stacklet1",
"networks": {
"v4": [
{
"address": "192.168.50.6",
"gateway": "192.168.50.1",
"netmask": "255.255.192.0",
"type": "public"
}
],
"v6": [
{
"address": "2a07:440:2000:6::21",
"gateway": "2a07:440:2000:6::1",
"netmask": 64,
"range_end": "2a07:440:2000:6::2f",
"range_start": "2a07:440:2000:6::20",
"type": "public"
}
]
},
"recovery_mode": false,
"region": {
"available": true,
"features": ["floating_ips"],
"name": "Frankfurt",
"slug": "fra"
},
"size": {
"available": true,
"bandwidth": 1099511627776,
"disk": 26843545600,
"memory": 1073741824,
"price_hourly": 0.0069,
"price_monthly": 5.0,
"slug": "b-1vcpu-1gb",
"vcpu": 1
},
"snapshot_ids": [],
"status": "active",
"tags": ["server"],
"task": {
"id": 1,
"name": "create",
"description": {
"completed": "Stacklet is created.",
"progress": "Stacklet is creating."
}
},
"vcpu": 1,
"volume_uuid": null,
"vpc_uuid": null
}
}