查询云应用套餐
功能介绍
查询云应用套餐,按照条件过滤。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v1/{project_id}/product
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目唯一标识。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
product_id |
否 |
String |
如果不为空,将按产品ID进行过滤后返回。 |
|
flavor_id |
否 |
String |
如果不为空,将按规格ID进行过滤后返回。 |
|
availability_zone |
否 |
String |
可用分区,如果不为空,将按可用分区进行过滤后返回。
|
|
os_type |
否 |
String |
产品套餐的操作系统类型,当前支持:Windows。
|
|
charge_mode |
否 |
String |
套餐标识。
|
|
architecture |
否 |
String |
架构类型,当前支持:x86。
|
|
package_type |
否 |
String |
套餐类型:
|
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
否 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
availability_zone |
String |
可用分区。将服务创建到指定的可用分区。如果不指定则使用系统随机的可用分区。 |
|
os_type |
String |
系统类型,当前仅支持Windows。
|
|
products |
Array of ProductInfo objects |
产品列表。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
product_id |
String |
产品id。 |
|
flavor_id |
String |
规格ID。 |
|
type |
String |
产品类型。
|
|
architecture |
String |
产品架构,当前仅支持x86。
|
|
cpu |
String |
CPU。 |
|
cpu_desc |
String |
CPU描述。 |
|
memory |
String |
内存大小,单位兆:MB。 |
|
is_gpu |
Boolean |
是否是GPU类型的规格。 |
|
system_disk_type |
String |
系统盘类型。 |
|
system_disk_size |
String |
系统盘大小。 |
|
gpu_desc |
String |
GPU描述。 |
|
descriptions |
String |
产品描述。 |
|
charge_mode |
String |
套餐标识。
|
|
contain_data_disk |
Boolean |
套餐计费是否包含了数据盘。 |
|
resource_type |
String |
资源类型。 |
|
cloud_service_type |
String |
云服务类型。 |
|
volume_product_type |
String |
磁盘产品类型。 |
|
sessions |
Integer |
套餐默认支持的最大会话数。 |
|
status |
String |
产品套餐在销售模式下的状态,取值自ECS的cond:operation:status。 不配置时等同于normal在售状态。
|
|
cond_operation_az |
String |
产品套餐在可用区的状态,配套status使用。
说明:
|
|
sub_product_list |
Array of strings |
专属主机的子产品。 |
|
domain_ids |
Array of strings |
产品属于专有的domainId。 |
|
package_type |
String |
套餐类型:
|
|
series_type |
String |
系列类型。 |
|
expire_time |
DateTime |
产品套餐过期时间,产品将在改时间点后逐步下架。 |
|
support_gpu_type |
String |
产品套餐支持的GPU类型。 |
状态码:400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码,失败时返回。 |
|
error_msg |
String |
错误描述。 |
状态码:401
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码,失败时返回。 |
|
error_msg |
String |
错误描述。 |
状态码:403
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码,失败时返回。 |
|
error_msg |
String |
错误描述。 |
状态码:500
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码,失败时返回。 |
|
error_msg |
String |
错误描述。 |
请求示例
GET /v1/29dfe82ada564ac2b927e1ff036d9a9b/product
响应示例
状态码:200
成功响应。
{
"products" : [ {
"product_id" : "workspace.appstream.general.2xlarge.2",
"flavor_id" : "s2.xlarge.2",
"type" : "BASE",
"architecture" : "x86",
"cpu" : "4",
"memory" : "8192",
"is_gpu" : false,
"descriptions" : "s2.xlarge.2 云应用通用型|4核|8GB内存",
"charge_mode" : "0",
"resource_type" : "hws.resource.type.workspace.appstream",
"cloud_service_type" : "hws.service.type.vdi",
"volume_product_type" : "workspace",
"sessions" : 10,
"status" : "abandon",
"cond_operation_az" : "cn-north-7c(abandon),cn-north-7b(abandon),cn-north-7a(sellout)",
"domain_ids" : [ ],
"package_type" : "general"
} ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
成功响应。 |
|
400 |
由于包含语法错误,当前请求无法被服务器理解。 |
|
401 |
鉴权失败。 |
|
403 |
没有操作权限。 |
|
500 |
服务内部错误,具体返回错误码请参见错误码说明。 |
错误码
请参见错误码。