• Workspace

workspace
  1. Help Center
  2. Workspace
  3. API Reference
  4. Desktops
  5. Modifying Desktop Attributes

Modifying Desktop Attributes

Function

This interface is used to modify desktop attributes.

URI

  • URI format

    PUT /v1.0/{project_id}/desktops/{desktop_id}

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    string

    Specifies the user ID.

    desktop_id

    Yes

    string

    Specifies the desktop ID.

Request

  • Request body parameter description

    Parameter

    Mandatory

    Type

    Description

    desktop

    No

    Dictionary data structure [1]

    Specifies desktop attributes.

[1] desktop field data structure description

Name

Type

Description

computer_name

string

Specifies the computer name, which can be viewed on the OS information page. The name must be unique. It must contain 1 to 15 characters and can contain only letters, digits, hyphens (-), and underscores (_). In addition, it must start with a letter.

NOTE:

The desktop will restart to make the modification take effect.

  • Request example
PUT /v1.0/92c84e5bce3d48d7ab5714a44901eb08/desktops/3c2dba15-15db-4204-9f86-f0a5b05cf610
Request Body: 
{
    "desktop": {
        "computer_name": "a01"
    }
}

Response

No response body

Returned Values

  • Normal

    204

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    The request syntax is incorrect and cannot be understood by the server.

    401 Unauthorized

    Authentication fails.

    403 Forbidden

    You are not authorized to perform the operation.

    404 Not Found

    The requested resource is not found.

    405 Method Not Allowed

    The method specified in the request is not allowed.

    500 Internal Server Error

    Internal service error. For details about error codes, see Error Code Description.

    503 Service Unavailable

    The service is unavailable.