• Workspace

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

Modifying Workspace Attributes

Function

This interface is used to modify Workspace attributes. The attributes can be modified only after Workspace is subscribed.

URI

  • URI format

    PUT /v1.0/{project_id}/workspaces

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    string

    Specifies the user ID.

Request

  • Request body parameter description

    Name

    Mandatory

    Type

    Description

    ad_domains

    No

    Dictionary data structure [1]

    Specifies the domain information used by Workspace.

[1] ad_domains field data structure description

Name

Mandatory

Type

Description

domain_type

Yes

string

Specifies the domain type. Possible values are:

  • LITE_AD: indicates the lightweight AD that is deployed on the cloud.
  • LOCAL_AD: indicates the local AD, namely, the user's existing AD.

domain_admin_account

No

string

This field is optional when the domain type is LOCAL_AD. The new value must be an existing domain user on the AD server.

old_domain_password

No

string

Specifies the old password of the domain administrator account. This field is mandatory when the domain type is LITE_AD.

domain_password

No

string

Specifies the new password of the domain administrator account.

When the domain type is LITE_AD and the value is not blank, the new password must comply with the following rules:

  • Consists of at least four types of the following: uppercase letters, lowercase letters, digits, and special characters (~!@#$%^&*_-+=`|(){}[]:;"'<>,.?/). It begins with a letter and contains 8 to 64 characters.
  • Cannot be the domain administrator account or in the reverse order of it.
  • The password cannot contain more than two consecutive identical characters (for example, 111 is not allowed).
  • The password cannot contain huawei (case-insensitive).
  • Weak passwords can be added based on site requirements. This document does not list those weak passwords. For details, contact the administrator.

When the domain type is LOCAL_AD and the value is not blank, the new password must comply with the following rule:

  • Must be the password of the domain administrator account.
  • Request example
    When the domain type is LITE_AD:
    PUT /v1.0/29dfe82ada564ac2b927e1ff036d9a9b/workspaces
    Request Body:
    {
      "ad_domains": { 
        "domain_type": "LITE_AD", 
        "old_domain_password": "oldpassword", 
        "domain_password": "newpassword" 
      } 
    }
    When the domain type is LOCAL_AD:
    PUT /v1.0/29dfe82ada564ac2b927e1ff036d9a9b/workspaces
    Request Body:
    {
      "ad_domains": { 
        "domain_type": "LOCAL_AD", 
        "domain_admin_account": "domainuser", 
        "domain_password": "newpassword" 
      } 
    }

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.