Volumes
Create volume
This method creates a volume according to the specified parameters. To create a volume, follow these steps:
- Select a data center using the /v1/data-centers endpoint. The data center determines the provider and location of the volume.
- Select an available configuration for the volume using the /v1/volumes-configs endpoint.
- (optional) Specify the attachedToId field with existing virtual machine id to attach new volume to this virtual machine
post/v1/volumes
Request
- Base URLhttps://api.emma.ms/external
- AuthHTTP bearer
Request body
Example request
{
"dataCenterId": "aws-us-west-1",
"volumeGb": 500,
"volumeType": "ssd",
"attachedToId": 51080
}Response
Volume created
Example response
{
"id": 5819,
"name": "volume-1ay48j",
"attachedToId": 5806,
"projectId": 933,
"sizeGb": 250,
"type": "ssd",
"isSystem": true,
"status": "ACTIVE",
"provider": {
"id": 12,
"name": "AWS"
},
"location": {
"id": 6,
"name": "London",
"country": "United Kingdom",
"continent": "Europe",
"region": "EMEA",
"latitude": 51.50735,
"longitude": -0.1277583
},
"dataCenter": {
"id": "aws-eu-west-2",
"name": "eu-west-2",
"providerId": 12,
"providerName": "AWS",
"locationId": 6,
"locationName": "London"
},
"createdAt": "2021-11-26T14:54:11",
"createdByName": "Automation User",
"createdById": 123,
"modifiedAt": "2021-11-26T14:54:11",
"modifiedByName": "Automation User",
"modifiedById": 123,
"cost": {
"unit": "MONTHS",
"currency": "EUR",
"price": 5.479952
},
"deviceIdentifier": "/dev/sda"
}Changes
No recorded changes to this operation across all 1 revision of this API.