Querying the Product Package List
Function
Query the product packages supported by Huawei Cloud Workspace.
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}/products
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
product_id |
No |
String |
Product ID. |
availability_zone |
No |
String |
AZ. |
os_type |
No |
String |
OS of a product package, for example, Windows or Linux. |
charge_mode |
No |
String |
ID of a periodic package. 0 indicates the yearly/monthly billing mode, and 1 indicates the pay-per-use billing mode. |
architecture |
No |
String |
Architecture type. Arm and x86 are supported. |
package_type |
No |
String |
Package series. |
limit |
No |
Integer |
Number of records on each page. The value ranges from 0 to 100 and defaults to 100. |
offset |
No |
Integer |
Offset. The default value is 0. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API 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, for example, application/json. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
os_type |
String |
OS types supported by a package. This parameter is available only when os_type is contained in the request. |
architecture |
String |
Product architecture. This parameter is available only when package_type is set to agile in the request. |
availability_zone |
String |
AZ. This parameter is available only when availability_zone is contained in the request. |
products |
Array of ProductInfo objects |
Product list. |
total_count |
Integer |
Number of objects. |
Parameter |
Type |
Description |
---|---|---|
product_id |
String |
Product ID. |
flavor_id |
String |
Flavor ID. |
type |
String |
Product type. The value can be: BASE: indicates the basic product package. The package image does not contain other commercial software products except the OS. Only this type of package can be used in private image scenarios. |
architecture |
String |
Product architecture. Currently, Arm and x86 are supported. |
cpu |
String |
CPU. |
cpu_desc |
String |
CPU description. |
memory |
String |
Memory. |
is_gpu |
Boolean |
Whether the specifications are of the GPU type. |
system_disk_type |
String |
System disk type. |
system_disk_size |
String |
System disk size, in GB. |
data_disk_size |
String |
Data disk size, in GB. |
gpu_desc |
String |
GPU description. |
bill_switch |
String |
Whether to enable the CDR function. The value can be on (enable CDR) or off (disable CDR). Only deserialization is supported. Serialization is not supported and is not displayed in the API. |
descriptions |
String |
Product description. |
charge_mode |
String |
ID of a periodic package. 0 indicates the yearly/monthly billing mode, and 1 indicates the pay-per-use billing mode. |
contain_data_disk |
Boolean |
Whether data disks are included in the package billing. off indicates no. |
resource_type |
String |
Resource specifications. |
cloud_service_type |
String |
Cloud service code. |
volume_product_type |
String |
Disk type. |
domain_ids |
Array of strings |
ID of the dedicated domain ID (domainId) supported by the product package. |
status |
String |
Product status. The options are normal, sellout, and abandon. |
sub_product_list |
Array of strings |
Subproduct of a dedicated host. |
default_desktop_num |
Integer |
Default number of desktops in an exclusive host package. |
max_apply_desktop_num |
Integer |
Maximum number of desktops that can be created on an exclusive host. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 405
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 503
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Example Requests
None
Example Responses
Status code: 200
Response to the request for querying products.
{ "os_type" : "Linux", "availability_zone" : "cn-north-4c", "total_count" : 1, "products" : { "product_id" : "workspace.k.xlarge.2.linux", "flavor_id" : "kc1.xlarge.2", "type" : "BASE", "cpu" : "4", "memory" : "8192", "system_disk_type" : "SAS", "system_disk_size" : "80", "descriptions" : "CPU:4vCPUs,Memory:8GB", "architecture" : "arm", "is_gpu" : false, "charge_mode" : "0", "contain_data_disk" : false, "resource_type" : "hws.resource.type.vdi.vm", "cloud_service_type" : "hws.service.type.vdi", "volume_product_type" : "workspace", "status" : "normal", "package_type" : "enterprise" } }
Status Codes
Status Code |
Description |
---|---|
200 |
Response to the request for querying products. |
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. |
405 |
The method specified in the request is not allowed. |
500 |
An internal service error occurred. For details, see the error code description. |
503 |
The service is unavailable. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot