查询指定服务器组 - ShowServerGroup
功能介绍
查询指定的服务器组。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,需具备如下身份策略权限。
URI
GET /v1/{project_id}/app-server-groups/{server_group_id}
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目唯一标识。 |
server_group_id | 是 | String | 服务器组唯一标识。 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Auth-Token | 否 | String | 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码:200
参数 | 参数类型 | 描述 |
|---|---|---|
id | String | 服务器组的唯一标识。 |
name | String | 服务器组名称。 |
description | String | 服务器组描述。 |
image_id | String | 服务器组关联的镜像ID,用于创建对应组下的云服务器。 |
os_type | String | 系统类型,当前仅支持Windows。 |
product_id | String | 产品id。 |
subnet_id | String | 网卡对应的子网ID。 |
system_disk_type | String | 磁盘类型,获取可用磁盘类型详见接口磁盘管理ListVolumeType。 |
system_disk_size | Integer | 磁盘容量,单位GB。 |
is_vdi | Boolean | 是否为vdi单会话模式。 |
extra_session_type | String | 付费会话类型: |
extra_session_size | Integer | 付费会话个数。 |
app_type | String | 服务器组应用类型: |
create_time | String | 服务器组创建时间。 |
update_time | String | 服务器组更新时间。 |
storage_mount_policy | String | 用户访问APS的应用时,对应NAS存储目录在APS上的挂载策略。 |
enterprise_project_id | String | 企业项目ID(0表示默认企业项目Id)。 |
primary_server_group_ids | Array of strings | 主服务器组id列表。 |
secondary_server_group_ids | Array of strings | 备服务器组id列表。 |
server_group_status | Boolean | 服务器是否处于启用状态,true表示处于启用状态 false表示处于禁用状态。 |
site_type | String | 站点类型 - CENTER/IES。 |
site_id | String | 站点id。 |
app_server_flavor_count | Integer | 服务器配置总数量。 |
app_server_count | Integer | 服务器总数量。 |
app_group_count | Integer | 关联应用组的总数量。 |
image_name | String | 镜像名称。 |
product_info | ProductInfo object | 产品规格信息。 |
subnet_name | String | 子网名称。 |
scaling_policy | ScalingPolicy object | 弹性伸缩策略。 |
tags | Array of TmsTag objects | 标签信息。 |
ou_name | String | 默认组织名称。 |
flavors | Array of Flavor objects | 服务器规格列表。 |
project_name | String | 项目名称。 |
image_min_disk | Integer | 镜像运行的最小内存,单位为MB,默认设置为0。 |
route_policy | RoutePolicy object | 服务器组的路由策略。 |
image_product_id | String | 镜像的产品id。 |
image_type | String | 镜像类型。 |
ip_virtual | IpVirtual object | 虚拟IP功能选项。 |
参数 | 参数类型 | 描述 |
|---|---|---|
product_id | String | 产品id。 |
flavor_id | String | 规格ID。 |
type | String | 产品类型: |
architecture | String | 产品架构,当前仅支持x86。 |
cpu | String | CPU。 |
cpu_desc | String | CPU描述。 |
memory | String | 内存大小,单位兆:M。 |
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 | 套餐类型: |
expire_time | String | 产品套餐过期时间,产品将在该时间点后逐步下架。 |
support_gpu_type | String | 产品套餐支持的GPU类型。 |
参数 | 参数类型 | 描述 |
|---|---|---|
enable | Boolean | 是否启用策略,默认启用: 'true': 启用 'false': 禁用 |
max_scaling_amount | Integer | 最大扩容数量。 |
single_expansion_count | Integer | 单次扩容数量。 |
scaling_policy_by_session | ScalingPolicyBySession object | 基于会话的弹性策略。 |
参数 | 参数类型 | 描述 |
|---|---|---|
session_usage_threshold | Integer | 分组的总会话使用率(达到该阈值后扩容)。 |
shrink_after_session_idle_minutes | Integer | 给定时间内无会话连接的的实例进行释放。 |
参数 | 参数类型 | 描述 |
|---|---|---|
max_session | Integer | 单台服务器最大的连接会话数。 |
cpu_threshold | Integer | cpu使用率阈值,单位为%。 |
mem_threshold | Integer | 内存使用率阈值,单位为%。 |
状态码:400
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码,失败时返回。 |
error_msg | String | 错误描述。 |
状态码:401
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码,失败时返回。 |
error_msg | String | 错误描述。 |
状态码:403
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码,失败时返回。 |
error_msg | String | 错误描述。 |
状态码:404
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码,失败时返回。 |
error_msg | String | 错误描述。 |
状态码:405
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码,失败时返回。 |
error_msg | String | 错误描述。 |
状态码:500
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码,失败时返回。 |
error_msg | String | 错误描述。 |
状态码:503
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码,失败时返回。 |
error_msg | String | 错误描述。 |
请求示例
无
响应示例
状态码:200
成功响应。
{
"id" : "1",
"name" : "流程开发应用服务器组",
"description" : "XXX公司 软件开发应用服务器组。",
"image_id" : "a6ea73e0-9f4b-11ec-b909-0242ac120002",
"os_type" : "windows",
"product_id" : "workspace.x86.general.xlarge2",
"subnet_id" : "0ddf778f-c0fe-4717-9251-001caee7c95e",
"system_disk_type" : "SSD",
"system_disk_size" : 10,
"is_vdi" : false,
"extra_session_type" : "CPU",
"extra_session_size" : 1,
"app_type" : "SESSION_DESKTOP_APP",
"create_time" : "2022-03-07T10:40:43.858Z",
"update_time" : "2022-03-07T10:40:43.858Z",
"storage_mount_policy" : "ANY",
"enterprise_project_id" : "0",
"primary_server_group_ids" : [ "string" ],
"secondary_server_group_ids" : [ "string" ],
"server_group_status" : false,
"site_type" : "CENTER",
"site_id" : "ae985216-83fa-46b6-ab03-a36dcb3dd05a",
"app_server_flavor_count" : "1",
"app_server_count" : "1",
"app_group_count" : "1",
"image_name" : "Huawei cloud EulerOs 1.0 64bit",
"product_info" : {
"product_id" : "workspace.appstream.general.2xlarge.4",
"flavor_id" : "c3.large.4",
"type" : "BASE",
"architecture" : "x86",
"cpu" : 2,
"cpu_desc" : "云应用通用型|4核|8GB内存。",
"memory" : 4096,
"is_gpu" : false,
"system_disk_type" : "SAS",
"system_disk_size" : 80,
"gpu_desc" : "GPU图形加速",
"descriptions" : "GPU图形加速DG4型|32核128G内存32G显存|P02",
"charge_mode" : 1,
"contain_data_disk" : false,
"resource_type" : "hws.resource.type.xxxx.vm",
"cloud_service_type" : "hws.service.type.xxxxx",
"volume_product_type" : "workspace",
"sessions" : 2,
"status" : "string",
"cond_operation_az" : "cn-north-5a(normal),cn-north-5b(abandon),cn-north-5c(sellout)",
"sub_product_list" : [ "xxx", "xxxx" ],
"domain_ids" : [ "xxx", "xxxx" ],
"package_type" : "general",
"expire_time" : "2022-03-07T10:40:43Z",
"support_gpu_type" : "A40"
},
"subnet_name" : "string",
"scaling_policy" : {
"enable" : true,
"max_scaling_amount" : 10,
"single_expansion_count" : 1,
"scaling_policy_by_session" : {
"session_usage_threshold" : 85,
"shrink_after_session_idle_minutes" : 60
}
},
"tags" : [ {
"key" : "demo01",
"value" : "01"
} ],
"ou_name" : "wksappusers",
"flavors" : [ {
"id" : "asdfjkl-2131f-xxx-123123",
"links" : [ {
"rel" : "",
"hrel" : ""
} ]
} ],
"project_name" : "default",
"image_min_disk" : "10",
"route_policy" : {
"max_session" : 2,
"cpu_threshold" : 85,
"mem_threshold" : 85
},
"image_product_id" : "string",
"image_type" : "string",
"ip_virtual" : {
"enable" : false
}
} 状态码
状态码 | 描述 |
|---|---|
200 | 成功响应。 |
400 | 由于包含语法错误,当前请求无法被服务器理解。 |
401 | 鉴权失败。 |
403 | 没有操作权限。 |
404 | 找不到资源。 |
405 | 请求中指定的方法不被允许。 |
500 | 服务内部错误,具体返回错误码请参见错误码说明。 |
503 | 服务不可用。 |
错误码
请参见错误码。

