Updated on 2026-05-21 GMT+08:00

Configuring a Domain Controller

Function

Configures a domain controller.

Debugging

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

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

POST /v3/{project_id}/domains

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

uos_domain_info

No

CreateUosDomainInfo object

UOS domain controller name.

ad_domain_info

No

AdDomain object

UOS domain controller name.

auth_type

No

String

Interconnection protocol type.

Table 3 CreateUosDomainInfo

Parameter

Mandatory

Type

Description

username

Yes

String

Domain administrator.

user_password

Yes

String

Password of the domain administrator.

main_dc_address

Yes

String

Domain management platform address.

open_interface_address

Yes

String

Open interface address of the domain management system.

open_interface_domain_name

No

String

Domain name of the open interface of the domain management system.

internal_service_address

Yes

String

Internal service address of the domain management system.

app_cert

Yes

String

Public key of the client certificate.

app_cert_key

Yes

String

Private key of the client certificate.

openapi_ca_cert

Yes

String

Server CA.

domain_name

Yes

String

UOS domain controller name.

type

Yes

String

Interconnection protocol type.

Table 4 AdDomain

Parameter

Mandatory

Type

Description

id

No

String

Domain ID.

domain_type

Yes

String

Domain type.

  • LITE_AS: local authentication

  • LOCAL_AD: local AD

When domain_type is set to LOCAL_AD, ensure that the selected VPC can be connected to the network to which the AD belongs.

domain_name

No

String

Domain name. This parameter is mandatory when domain type is set to LOCAL_AD.

The domain name must be an existing domain name on the Windows AD server and can contain a maximum of 55 characters.

domain_admin_account

No

String

Domain administrator account. This parameter is mandatory when domain type is set to LOCAL_AD.

The account must be an existing domain administrator account on the Windows AD server.

domain_password

No

String

Domain administrator account and password. This parameter is mandatory when domain type is set to LOCAL_AD.

active_domain_ip

No

String

Primary domain controller IP address. This parameter is mandatory when domain type is set to LOCAL_AD.

active_domain_name

No

String

Primary domain controller name. This parameter is mandatory when domain type is set to LOCAL_AD.

standby_domain_ip

No

String

Backup domain controller IP address. This parameter is mandatory when domain type is set to LOCAL_AD and the standby node is configured.

standby_domain_name

No

String

Backup domain controller name. This parameter is mandatory when domain type is set to LOCAL_AD and the standby node is configured.

active_dns_ip

No

String

Primary DNS IP address. This parameter is mandatory when domain type is set to LOCAL_AD.

standby_dns_ip

No

String

Standby DNS IP address. This parameter is mandatory when domain type is set to LOCAL_AD and the standby node is configured.

delete_computer_object

No

Integer

Whether to delete the corresponding computer object from the AD when deleting the desktop. The value 0 indicates that the computer object is not deleted, and the value 1 indicates that the computer object is deleted.

use_ldaps

No

Boolean

Whether to enable LDAPS.

tls_config

No

TlsConfig object

TLS information.

cba_enabled

No

Boolean

Whether to enable smartcard authentication.

certificate_id

No

String

Smartcard certificate ID.

domain_controllers

No

Array of DomainController objects

List of domain controllers. If this parameter is specified, the following parameters are invalid: active_domain_name, active_domain_ip, standby_domain_name, and standby_domain_ip.

Table 5 TlsConfig

Parameter

Mandatory

Type

Description

cert_pem

No

String

PEM content. If the content exists, update it. Otherwise, upload it. The query result is not returned.

cert_start_time

No

String

Time when the certificate starts to take effect, for example, 2022-01-25T09:24:27.

cert_end_time

No

String

Time when the certificate expires, for example, 2022-01-25T09:24:27.

Table 6 DomainController

Parameter

Mandatory

Type

Description

dc_ip

Yes

String

IP address of the domain controller.

dc_name

Yes

String

Name of the domain controller.

Response Parameters

Status code: 204

Normal. No response body.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

error_detail

String

Error details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

error_detail

String

Error details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 403

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

error_detail

String

Error details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 404

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

error_detail

String

Error details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 500

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

error_detail

String

Error details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Example Requests

POST /v3/fb2e5ec048384c8f9469d22db0037908/domains

{
  "uos_domain_info" : {
    "username" : "admin",
    "user_password" : "password",
    "main_dc_address" : "https://127.0.0.1:4433",
    "open_interface_address" : "https://127.0.0.1:4434",
    "open_interface_domain_name" : "udcp-openapi.uniontech.com",
    "internal_service_address" : "https://127.0.0.1:4435",
    "app_cert" : "string",
    "app_cert_key" : "string",
    "openapi_ca_cert" : "string",
    "domain_name" : "UOS",
    "type" : "OPEN_API"
  },
  "auth_type" : "OPEN_API"
}

Example Responses

None

Status Codes

Status Code

Description

204

Normal. No response body.

400

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

401

Authorization failed.

403

No permissions.

404

Resources not found.

500

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

Error Codes

See Error Codes.