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.
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, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
workspace:products:listDesktopProducts
List
-
-
-
ecs:cloudServerFlavors:get
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. If this parameter is specified, the information about the packages whose specifications can be changed will be returned. |
|
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
None
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 Product objects |
Product list. |
|
total_count |
Integer |
Number of objects. |
|
Parameter |
Type |
Description |
|---|---|---|
|
product_id |
String |
Product ID. |
|
type |
String |
Product type. Options: 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 for private images. |
|
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. |
|
vram |
String |
Size of the GPU memory, in GB. |
|
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 (CDR enabled) or off (CDR disabled). Only deserialization is supported. Serialization is not supported and is not displayed in the API. |
|
descriptions |
String |
Product description. |
|
product_desc |
Map<String,String> |
Product name <Language. Product description in each supported language>. |
|
charge_mode |
String |
Periodic package ID. 0 indicates yearly/monthly billing and 1 indicates pay-per-use billing. |
|
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 (domainId) supported by the product package. |
|
status |
String |
Product status. The options are normal, sellout, and abandon. |
|
package_type |
String |
Package type. |
|
name |
Map<String,String> |
Product name <Language. Product description in each supported language>. |
|
share_space_size |
Integer |
Number of collaboration participants. Maximum number of collaboration participants of the package. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
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
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
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
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
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
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
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: 405
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
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
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
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: 503
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
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
GET /v2/0e3f393ae380f5d12facc005678bcd4b/products
Example Responses
Status code: 200
Response to the request for querying products.
{
"products" : [ {
"product_id" : "workspace.x86.ultimate.large2",
"type" : "BASE",
"architecture" : "x86",
"cpu" : "2",
"memory" : "4096",
"is_gpu" : false,
"system_disk_type" : "SAS",
"system_disk_size" : "140",
"bill_switch" : "on",
"descriptions" : "Ultimate | 2 vCPUs | 4 GB memory",
"charge_mode" : "0",
"contain_data_disk" : false,
"resource_type" : "hws.resource.type.workspace.desktop",
"cloud_service_type" : "hws.service.type.vdi",
"volume_product_type" : "workspace",
"domain_ids" : [ ],
"status" : "normal",
"package_type" : "ultimate",
"name" : {
"en_us" : "Ultimate Desktop",
"zh_cn" : "Ultimate edition"
}
} ],
"total_count" : 1
}
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 |
No operation permissions. |
|
404 |
No resources found. |
|
405 |
The method specified in the request is not allowed. |
|
500 |
An internal service error occurred. For details about the error code, see the error code description. |
|
503 |
Service 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