• Workspace

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

Modifying Desktop Specifications

Function

This interface is used to modify the specifications of a desktop.

URI

  • URI format

    POST /v1.0/{project_id}/desktops/{desktop_id}/resize

  • 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

    product_id

    Yes

    string

    Specifies the ID of the new package. Specifications of the new package must be different from those of the original package.

    For the package information, see Querying the Product List.

  • Request example
    POST /v1.0/d2ce97927a1846608223ca1e20c7b73e/desktops/d7deecd2-e9ff-4ee7-8684-f607a2c7b34a/resize
    Request Body:  
    {      
            "product_id": "workspace.s.large.windows",
    }

Response

  • Description

    Name

    Type

    Description

    job_id

    string

    Specifies the ID of a modifying desktop specifications job. Users can use this ID to query the execution status of jobs.

  • Response example
    { 
        "job_id": "ff80808260fca2e50160fddbe0600026"
    }
    {
    	"error_code": "WKS.0408",
    	"error_msg": "The operating status of the desktop does not support specifications change."
    }

Returned Values

  • Normal

    200

  • 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.