Help Center/ Workspace/ API Reference/ Workspace APIs/ Huawei Cloud Workspace/ Queries Huawei Cloud Workspace details.
Updated on 2024-01-10 GMT+08:00

Queries Huawei Cloud Workspace details.

Function

Queries Huawei Cloud Workspace details.

Debugging

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

URI

GET /v2/{project_id}/workspaces

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

Yes

String

MIME type of the request body.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

String

Unique ID.

ad_domains

AdInfo object

Domain information.

vpc_id

String

VPC ID.

vpc_name

String

VPC name.

access_mode

String

Access mode.

  • INTERNET: access through Internet

  • DEDICATED: access through Direct Connect

  • DEDICATED: access through Internet or Direct Connect

dedicated_subnets

String

Direct Connect access CIDR. This parameter is returned only when access_mode is set to DEDICATED or BOTH.

dedicated_access_address

String

Direct Connect access address. This parameter is returned only when access_mode is set to DEDICATED or BOTH.

internet_access_address

String

Internet access address. This parameter is returned only when access_mode is set to INTERNET or BOTH.

internet_access_port

String

Internet access port.

status

String

Huawei Cloud Workspace service status.

  • PREPARING: The service is ready for subscription.

  • SUBSCRIBING: The service is being subscribed.

  • SUBSCRIBED: The service has been subscribed.

  • SUBSCRIPTION_FAILED: The service cannot be subscribed.

  • DEREGISTERING: The service is being unsubscribed.

  • DEREGISTRATION_FAILED: The service cannot be unsubscribed.

  • CLOSED: The service has been unsubscribed and is not subscribed.

access_status

String

Status of the task for switching between Internet access and Direct Connect access.

  • init: initial status after the service is subscribed to

  • available: The task has been executed and is restored to the normal state.

  • internetOpening: The Internet access is being enabled.

  • dedicatedOpening: The Direct Connect access is being enabled.

  • internetOpenFailed: The Internet access cannot be enabled.

  • dedicatedOpenFailed: The Direct Connect access cannot be enabled.

  • openSuccess: The Internet access has been enabled.

  • internetClosing: The Internet access is being disabled.

  • dedicatedClosing: The Direct Connect access is being disabled.

  • internetCloseFailed: The Internet access cannot be disabled.

  • dedicatedCloseFailed: The Direct Connect access cannot be disabled.

  • closeSuccess: The access mode has been disabled.

  • internetAccessPortModifying: The Internet access port is being modified.

  • internetAccessPortModifyFailed: The Internet access port cannot be modified.

subnet_ids

Array of SubnetInfo objects

Service subnet. You can specify the returned network ID to subscribe to a desktop.

management_subnet_cidr

String

Subnet CIDR of the management component.

infrastructure_security_group

SecurityGroup object

After the service is subscribed, a management component security group is created in the specified VPC.

desktop_security_group

SecurityGroup object

After the service is subscribed, a desktop security group is created in the specified VPC.

closable

Boolean

Whether the service can be unsubscribed.

config_status

String

Configuration status.

  • 0: The service has been subscribed and connected to the AD.

  • 1: The service has been subscribed but the AD configuration failed.

  • 2: The service has been subscribed but other errors occurred after the AD configuration failed.

  • 3: The service has been subscribed but the AD is not connected.

progress

String

Progress of subscribing to or unsubscribing from the service. The value is a percentage, for example, 100%.

job_id

String

ID of the task for subscribing to or unsubscribing from the service.

fail_code

Integer

Error code.

fail_reason

String

Failure cause.

enterprise_id

String

Enterprise ID.

is_send_email

Boolean

Whether to send a notification email upon desktop unsubscription.

dc_vnc_ip

String

User-defined Direct Connect VNC address.

Table 4 AdInfo

Parameter

Type

Description

domain_type

String

Domain type.

  • LITE_AS: local authentication

  • LOCAL_AD: local AD

domain_name

String

Domain name. This parameter is valid when domain_type is set to LOCAL_AD.

domain_admin_account

String

Domain administrator account. This parameter is valid when domain_type is set to LOCAL_AD.

active_domain_name

String

Name of the primary domain controller. This parameter is valid when domain_type is set to LOCAL_AD.

active_domain_ip

String

IP address of the primary domain controller. This parameter is valid when domain_type is set to LOCAL_AD.

standby_domain_name

String

Name of the backup domain controller. This parameter is valid when domain_type is set to LOCAL_AD.

standby_domain_ip

String

IP address of the backup domain controller. This parameter is valid when domain_type is set to LOCAL_AD.

active_dns_ip

String

IP address of the primary DNS server. This parameter is valid when domain_type is set to LOCAL_AD.

standby_dns_ip

String

IP address of the standby DNS server. This parameter is valid when domain_type is set to LOCAL_AD.

delete_computer_object

String

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

Boolean

Whether to enable LDAPS.

tls_config

TlsConfig object

TLS information.

Table 5 TlsConfig

Parameter

Type

Description

cert_pem

String

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

cert_start_time

String

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

cert_end_time

String

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

Table 6 SubnetInfo

Parameter

Type

Description

subnet_id

String

Subnet network ID.

Table 7 SecurityGroup

Parameter

Type

Description

id

String

Security group ID.

name

String

Security group name.

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 401

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 403

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 404

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 500

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

GET /v2/29dfe82ada564ac2b927e1ff036d9a9b/workspaces

Example Responses

Status code: 200

Response to the request for querying Huawei Cloud Workspace details.

{
  "id" : "8aa1908f74824d8701748bf039600065",
  "status" : "SUBSCRIBED",
  "config_status" : "0",
  "closable" : false,
  "ad_domains" : {
    "domain_type" : "LOCAL_AD",
    "domain_admin_account" : "vdsadmin",
    "active_domain_name" : "ecs-ad.vdesktop.com",
    "active_domain_ip" : "192.168.0.131",
    "standby_domain_name" : "",
    "standby_domain_ip" : "",
    "active_dns_ip" : "192.168.0.131",
    "standby_dns_ip" : "",
    "domain_name" : "vdesktop.com",
    "use_ldaps" : true,
    "tls_config" : {
      "cert_start_time" : "2022-01-25T09:24:27",
      "cert_end_time" : "2023-01-25T09:34:27"
    }
  },
  "vpc_id" : "fd3b4069-ac1e-45d2-ba27-4c18cd692d26",
  "vpc_name" : "vpc-be75",
  "dedicated_access_address" : "https://192.168.0.53",
  "dedicated_subnets" : "192.168.0.0/24;10.0.0.0/16",
  "internet_access_address" : "https://172.16.25.134",
  "internet_access_port" : "443",
  "access_mode" : "BOTH",
  "subnet_ids" : [ {
    "subnet_id" : "5dee0216-2260-47c2-9368-98a27d910e55"
  } ],
  "management_subnet_cidr" : "192.168.0.0/24",
  "infrastructure_security_group" : {
    "id" : "ffba6eda-5170-4343-b8a3-c306e0f21c88",
    "name" : "WorkspaceManagerSecurityGroup"
  },
  "desktop_security_group" : {
    "id" : "04abbdf6-e848-4c90-bdb1-6de856fa8a34",
    "name" : "WorkspaceUserSecurityGroup"
  },
  "progress" : "100%",
  "access_status" : "openSuccess",
  "is_send_email" : true
}

Status Codes

Status Code

Description

200

Response to the request for querying Huawei Cloud Workspace details.

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.