调用DescribeDedicatedHosts接口查询专属集群内的主机信息。

专属集群功能以集群形式批量管理实例,一个地域可以创建多个专属集群,一个专属集群包含多个主机,一个主机包含多个实例。详情请参见专属集群简介

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeDedicatedHosts

系统规定参数。取值:DescribeDedicatedHosts

DedicatedHostGroupId String dhg-7a9xxxxxxxx

专属集群ID。可调用DescribeDedicatedHostGroups获取。

RegionId String cn-hangzhou

地域ID。可以通过接口DescribeRegions查看地域ID。

OrderId Long 102565235

订单ID。

HostType String dhg_cloud_ssd

主机存储类型。取值:

  • dhg_cloud_ssd:ESSD云盘。
  • dhg_local_ssd:SSD本地盘。
HostStatus String 1

主机状态。取值:

  • 0:创建中
  • 1:使用中
  • 2:宕机
  • 3:宕机下线(替换主机中)
  • 4:下线
  • 5:删除
  • 6:重启中
AllocationStatus String 1

主机当前是否允许分配实例。取值:

  • 0:不允许分配。
  • 1:允许分配。
ZoneId String cn-hangzhou-i

可用区ID。

DedicatedHostId String ch-t4nn100ddxxxxxxxx

专属集群主机ID。

返回数据

名称 类型 示例值 描述
DedicatedHostGroupId String dhg-7a9xxxxxxxx

主机组ID。

DedicatedHosts Array of DedicatedHosts

主机信息列表。

DedicatedHosts
AccountName String test123

专属集群主机账号。可通过CreateDedicatedHostAccount创建。

AllocationStatus String 1

主机当前是否允许分配实例。返回值:

  • 0:不允许分配
  • 1:允许分配
BastionInstanceId String bastionhost-cn-m7xxxxxxxx

堡垒机ID。

CPUAllocationRatio String 200

当前专属集群的CPU超配比。单位:%。关于超配比的更多信息,请参见管理集群

CpuUsed String 4

主机CPU已使用核数。单位:个。

CreatedTime String 2021-03-25 17:29:06.0

主机创建时间。

DedicatedHostGroupId String dhg-7a9xxxxxxxx

专属集群ID。

DedicatedHostId String i-bpxxxxxxx

主机ID。

DiskAllocationRatio String 200

当前专属集群的磁盘空间超配比。单位:%。关于超配比的更多信息,请参见管理集群

EndTime String 2021-04-25T16:00:00Z

主机到期时间。

Engine String mysql

实例的数据库引擎。

HostCPU String 8

主机CPU总核数。单位:个。

HostClass String ecs.i2.16xlarge

主机规格。

HostMem String 32238

主机内存总量。单位:MB。

HostName String testHost1

主机名称。

HostStatus String 1

主机状态。返回值:

  • 0:创建中
  • 1:使用中
  • 2:宕机
  • 3:宕机下线(替换主机中)
  • 4:下线
  • 5:删除
  • 6:重启中
HostStorage String 2097152

主机存储容量。单位:MB。

HostType String dhg_cloud_ssd

主机存储类型。返回值:

  • dhg_cloud_ssd:ESSD云盘。
  • dhg_local_ssd:SSD本地盘。
IPAddress String 192.xx.xx.xx

主机内网IP地址。

ImageCategory String WindowsWithMssqlStdLicense

主机镜像。仅在Engine参数为mssql时返回。返回值:

  • WindowsWithMssqlStdLicense:Windows(含SQL Server标准版License)。
  • WindowsWithMssqlEntLisence:Windows(含SQL Server企业版License)。
  • WindowsWithMssqlWebLisence:Windows(含SQL ServerWeb版License)。
InstanceNumber String 4

主机上的实例总数。

MemAllocationRatio String 90

主机组中每台主机的内存最大使用率。

MemoryUsed String 16384

已使用内存。单位:MB。

OpenPermission String 3

主机OS权限开放状态。返回值:

  • 0或者null:不可开放。
  • 1:可开放。
  • 3:已开放。
StorageUsed String 0

已使用存储空间。

VPCId String vpc-bpxxxxxxx

主机所属专有网络VPC ID。

VSwitchId String vsw-bpxxxxxxx

主机所属虚拟交换机ID。

ZoneId String cn-hangzhou-i

主机所在可用区ID。

RequestId String C860658E-68A6-46C1-AF6E-3AE7C4D3CACF

请求ID。

示例

请求示例

http(s)://rds.aliyuncs.com/?Action=DescribeDedicatedHosts
&DedicatedHostGroupId=dhg-7a9xxxxxxxx
&<公共请求参数>

正常返回示例

XML格式

<DescribeDedicatedHostsResponse>
      <DedicatedHosts>
            <DedicatedHosts>
                  <CPUAllocationRatio>200</CPUAllocationRatio>
                  <DiskAllocationRatio>200</DiskAllocationRatio>
                  <DedicatedHostId>i-bpxxxxxxx</DedicatedHostId>
                  <InstanceNumber>4</InstanceNumber>
                  <CreatedTime>2021-03-25 17:29:06.0</CreatedTime>
                  <EndTime>2021-04-25T16:00:00Z</EndTime>
                  <DedicatedHostGroupId>dhg-7a9xxxxxxxx</DedicatedHostGroupId>
                  <BastionInstanceId>bastionhost-cn-m7xxxxxxxx</BastionInstanceId>
                  <ImageCategory>WindowsWithMssqlStdLicense</ImageCategory>
                  <HostStorage>2097152</HostStorage>
                  <OpenPermission>3</OpenPermission>
                  <HostType>dhg_cloud_ssd</HostType>
                  <HostMem>32238</HostMem>
                  <MemoryUsed>16384</MemoryUsed>
                  <HostStatus>1</HostStatus>
                  <CpuUsed>4</CpuUsed>
                  <Engine>mysql</Engine>
                  <HostName>testHost1</HostName>
                  <AllocationStatus>1</AllocationStatus>
                  <ZoneId>cn-hangzhou-i</ZoneId>
                  <MemAllocationRatio>90</MemAllocationRatio>
                  <VPCId>vpc-bpxxxxxxx</VPCId>
                  <VSwitchId>vsw-bpxxxxxxx</VSwitchId>
                  <StorageUsed>0</StorageUsed>
                  <HostClass>ecs.i2.16xlarge</HostClass>
                  <HostCPU>8</HostCPU>
                  <IPAddress>192.xx.xx.xx</IPAddress>
                  <AccountName>test123</AccountName>
            </DedicatedHosts>
      </DedicatedHosts>
      <RequestId>C860658E-68A6-46C1-AF6E-3AE7C4D3CACF</RequestId>
      <DedicatedHostGroupId>dhg-7a9xxxxxxxx</DedicatedHostGroupId>
</DescribeDedicatedHostsResponse>

JSON格式

{
	"DedicatedHosts": {
		"DedicatedHosts": [{
			"CPUAllocationRatio": "200",
			"DiskAllocationRatio": "200",
			"DedicatedHostId": "i-bpxxxxxxx",
			"InstanceNumber": "4",
			"CreatedTime": "2021-03-25 17:29:06.0",
			"EndTime": "2021-04-25T16:00:00Z",
			"DedicatedHostGroupId": "dhg-7a9xxxxxxxx",
			"BastionInstanceId": "bastionhost-cn-m7xxxxxxxx",
			"ImageCategory": "WindowsWithMssqlStdLicense",
			"HostStorage": "2097152",
			"OpenPermission": "3",
			"HostType": "dhg_cloud_ssd",
			"HostMem": "32238",
			"MemoryUsed": "16384",
			"HostStatus": "1",
			"CpuUsed": "4",
			"Engine": "mysql",
			"HostName": "testHost1",
			"AllocationStatus": "1",
			"ZoneId": "cn-hangzhou-i",
			"MemAllocationRatio": "90",
			"VPCId": "vpc-bpxxxxxxx",
			"VSwitchId": "vsw-bpxxxxxxx",
			"StorageUsed": "0",
			"HostClass": "ecs.i2.16xlarge",
			"HostCPU": "8",
			"IPAddress": "192.xx.xx.xx",
			"AccountName": "test123"
		}]
	},
	"RequestId": "C860658E-68A6-46C1-AF6E-3AE7C4D3CACF",
	"DedicatedHostGroupId": "dhg-7a9xxxxxxxx"
}

错误码

访问错误中心查看更多错误码。