El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Creates a desktop.

Updated on 2024-01-10 GMT+08:00

Function

Creates and assigns a desktop to a user. After the desktop is created, the user can log in to the desktop.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

POST /v2/{project_id}/desktops

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Content-Type

No

String

MIME type of the request body.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

desktop_type

Yes

String

Cloud desktop type.

  • DEDICATED: Dedicated desktops for a single user.

  • SHARED: Multiple users share the desktop.

availability_zone

No

String

AZ. Creates a desktop in the specified AZ. If this parameter is not specified, the default AZ is used.

product_id

Yes

String

Package ID.

image_type

Yes

String

Image type. The default value is private.

  • private: a private image

  • gold: a public image

image_id

Yes

String

Image ID. This parameter is used together with product_id for creating desktops using custom images.

root_volume

Yes

Volume object

System disk.

data_volumes

No

Array of Volume objects

Data disks.

nics

No

Array of Nic objects

Information about the NIC corresponding to the desktop. If this parameter is not specified, the default NIC is used.

security_groups

No

Array of SecurityGroup objects

Security group used by the desktop. If no security group is specified, the security group specified in the desktop agent is used by default.

desktops

Yes

Array of Desktop objects

Parameters used for creating a desktop. The value contains 1 to 50 characters.

Currently, a batch of desktops cannot have different configurations. The configurations of all desktops must be the same as those of the first desktop. If no parameter is specified for the first desktop, the outer parameters with the same name are used.

desktop_name

No

String

This parameter is used together with size. If size is set to 1, this parameter indicates the desktop name, which consists of 1 to 15 characters. If size is set to a value greater than 1, this parameter indicates the desktop name prefix, which consists of 1 to 13 characters.

size

No

Integer

Number of desktops that are not assigned to users. This parameter cannot be used together with desktops. It is used together with desktop_name.

email_notification

No

Boolean

Whether to send an email to notify the desktop user after a desktop is created. The default value is true.

enterprise_project_id

No

String

Enterprise project ID. Its default value is 0.

tags

No

Array of Tag objects

Tags.

eip

No

Eip object

Indicates the EIP information.

Table 4 Volume

Parameter

Mandatory

Type

Description

type

Yes

String

Desktop data disk type, which must be the same as the disk type provided by the system.

  • SAS: High I/O

  • SSD: Ultra-high I/O

size

Yes

Integer

Disk capacity in GB. The system disk size ranges from 80 to 32760, and the data disk size ranges from 10 to 32760. The value must be a multiple of 10.

Table 5 Nic

Parameter

Mandatory

Type

Description

subnet_id

Yes

String

ID of the subnet on which the NIC works.

Table 6 SecurityGroup

Parameter

Mandatory

Type

Description

id

Yes

String

Security group ID.

Table 7 Desktop

Parameter

Mandatory

Type

Description

user_name

Yes

String

User to which a desktop belongs. After a desktop is created, the user can log in to the desktop. Only uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_) are allowed. When the domain type is LITE_AD, the value contains 1 to 20 characters starting with a lowercase or uppercase letter. When the domain type is LOCAL_AD, the value contains 1 to 20 characters starting with a lowercase or uppercase letter or digit.

user_email

No

String

Valid user email. After a desktop is created, the system informs users through emails.

user_phone

No

String

Mobile number of a valid user.

user_group

No

String

User group to which the desktop user belongs.

  • sudo: Linux administrator group.

  • default: Default Linux user group.

  • administrators: Windows administrator group. Administrators have full access to the desktop and can make any required changes except for forbidden operations.

  • users: standard Windows user group. Standard users can use most software programs and change system settings that do not affect other users.

computer_name

No

String

Desktop name, which must be unique. The desktop name can contain 1 to 15 characters, including uppercase letters, lowercase letters, digits, and hyphens (-). It must start with a letter or digit and cannot end with a hyphen (-).

desktop_name_prefix

No

String

Desktop name prefix. This parameter takes effect when computer_name is not specified.

Table 8 Tag

Parameter

Mandatory

Type

Description

key

Yes

String

Specifies the key of a tag that cannot be empty and can contain a maximum of 128 Unicode characters. The value can contain uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_). The value cannot contain the following characters: =*<>,|/.

value

No

String

Value of a tag, which can contain a maximum of 43 Unicode characters. The value can contain uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_). The value cannot contain the following characters: =*<>,|/.

Table 9 Eip

Parameter

Mandatory

Type

Description

id

No

String

ID of the EIP bound to the desktop. If this parameter is specified, the EIP is preferentially bound.

type

No

String

EIP type. The value can be 5_bgp (dynamic BGP) or 5_sbgp (static BGP).

charge_mode

No

String

EIP bandwidth billing mode.

  • TRAFFIC: billed by traffic.

  • BANDWIDTH: billed by bandwidth.

bandwidth_size

No

Integer

Bandwidth size.

Response Parameters

Status code: 200

Table 10 Response body parameters

Parameter

Type

Description

job_id

String

ID of the cloud desktop creation task.

Status code: 400

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

Status code: 401

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

Status code: 403

Table 13 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

Status code: 404

Table 14 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

Status code: 500

Table 15 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

Example Requests

{
  "desktop_type" : "DEDICATED",
  "image_type" : "gold",
  "image_id" : "a866298d-67db-44b0-a1f1-9d09bdddc20f",
  "root_volume" : {
    "type" : "SAS",
    "size" : 80
  },
  "availability_zone" : "az3.manage.x86",
  "desktops" : [ {
    "user_name" : "ljh-002",
    "user_group" : "administrators",
    "user_email" : "aaaaa@huawei.com"
  } ],
  "nics" : [ {
    "subnet_id" : "5dee0216-2260-47c2-9368-98a27d910e55"
  } ],
  "product_id" : "workspace.c2.large.windows.2",
  "email_notification" : true
}

Example Responses

Status code: 200

Response to the request for creating a cloud desktop.

{
  "job_id" : "3979904c-7beb-4f34-835f-2fa989a5550a"
}

Status Codes

Status Code

Description

200

Response to the request for creating a cloud desktop.

400

The request cannot be understood by the server due to malformed syntax.

401

Authentication failed.

403

You do not have required permissions.

404

No resource found.

500

An internal service error occurred. For details about the error code, see the error code description.

Error Codes

See Error Codes.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback