Help Center/ Workspace/ API Reference/ Application Examples/ Cloud Desktops/ Purchasing a Pay-per-Use Cloud Desktop
Updated on 2026-06-23 GMT+08:00

Purchasing a Pay-per-Use Cloud Desktop

Description

You can call the Creates a desktop API to purchase a pay-per-use cloud desktop. For details about the parameters for creating a desktop, see Table 2.

For example:

The following shows how to purchase a pay-per-use desktop in the CN North-Beijing4 region:

{
    "desktop_type": "DEDICATED",
    "email_notification": true,
    "subnet_ids": [
        "0a7bd93a-4a20-423f-9f70-e455c2ffb354"
    ],
    "security_groups": [
        {
            "id": "147a8d8b-1319-49ba-89e0-3cfb74715b47"
        }
    ],
    "nics": [
        {
            "subnet_id": "0a7bd93a-4a20-423f-9f70-e455c2ffb354"
        }
    ],
    "tenantId": "facf43f95071479793d833800f190d2b",
    "availability_zone": "cn-north-4a",
    "product_id": "workspace.x86.ultimate.large2",
    "enterprise_project_id": "0",
    "vpc_id": "0ee8eae5-c079-4fcc-8719-b77930138542",
    "image_type": "gold",
    "image_id": "cc3bbc0b-9441-461b-b80b-48c52f3aed08",
    "root_volume": {
        "type": "SATA",
        "size": 80
    },
    "data_volumes": [
        {
            "type": "SATA",
            "size": 10
        }
    ],
    "size": 1,
    "desktop_name": "adfaqfq"
}

In the preceding request body, the value of email_notification is true, indicating that an email notification is sent. The value of desktop_type is DEDICATED, indicating a dedicated host.