cURL
curl --request POST \ --url https://api.example.com/api/v2/instances \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "metadata": { "name": "my-host" }, "spec": { "organizationId": "d4600d6e-e965-4b44-a808-84fb2fa36702", "projectId": "cae219d7-10e5-4601-8c2c-ee7e066b93ce", "networkId": "b059b3e6-9ae5-42b7-94b4-f42fb7a6baee", "flavorId": "c7568e2d-f9ab-453d-9a3a-51375f78426b", "imageId": "a10e30e8-006a-48e6-a3c7-3c9416891f31", "networking": { "securityGroups": [ "dd5954af-1d71-4abf-bb16-5729c7163886" ] } } } '
{ "metadata": { "id": "c7568e2d-f9ab-453d-9a3a-51375f78426b", "name": "my-host", "organizationId": "d4600d6e-e965-4b44-a808-84fb2fa36702", "projectId": "cae219d7-10e5-4601-8c2c-ee7e066b93ce", "creationTime": "2023-07-31T10:45:45Z", "provisioningStatus": "provisioned", "healthStatus": "healthy" }, "spec": { "flavorId": "c7568e2d-f9ab-453d-9a3a-51375f78426b", "imageId": "a10e30e8-006a-48e6-a3c7-3c9416891f31", "networking": { "publicIP": true, "securityGroups": [ "dd5954af-1d71-4abf-bb16-5729c7163886" ] } }, "status": { "regionId": "bb518c64-6856-4d67-a799-314ba668649f", "networkId": "b059b3e6-9ae5-42b7-94b4-f42fb7a6baee", "privateIP": "192.168.0.3", "publicIP": "183.45.68.162", "powerState": "Running" } }
Create an instance.
Operation requires OAuth 2.0 bearer token authentication.
A compute instance creation request.
Metadata required for all API resource reads and writes.
Show child attributes
A compute instance.
Metadata required by project scoped resource reads.
Read only status information about a compute instance.