Mengkueri detail satu atau beberapa host khusus. Anda dapat mengambil informasi seperti metrik kinerja fisik, ID mesin, status penggunaan, dan daftar Instans ECS yang dibuat untuk setiap host khusus. Anda dapat memfilter hasil dengan menentukan parameter seperti ID host khusus, ID kluster host khusus, hostname, dan status untuk mengelola dan mengoptimalkan sumber daya komputasi cloud secara efisien.
Deskripsi operasi
Deskripsi operasi
Anda dapat mengkueri detail satu atau beberapa host khusus dengan menggunakan salah satu metode berikut:
Tentukan
DedicatedHostIdsuntuk mengkueri detail host khusus tertentu.Tentukan
DedicatedHostClusterIduntuk mengkueri detail host khusus dalam sebuah kluster host khusus.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeDedicatedHosts |
get |
DedicatedHost
DedicatedHost
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah host khusus. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| ZoneId |
string |
No |
ID zona. Anda dapat memanggil DescribeZones untuk mengkueri daftar zona terbaru. |
cn-hangzhou-g |
| DedicatedHostIds |
string |
No |
Daftar ID host khusus. Anda dapat menentukan hingga 100 ID, dipisahkan dengan koma (,). |
["dh-bp165p6xk2tlw61e****", "dh-bp1f9vxmno7emy96****"] |
| DedicatedHostName |
string |
No |
Nama host khusus. |
MyDDHTestName |
| Status |
string |
No |
Status penggunaan host khusus. Nilai valid:
Nilai default: Available. |
Available |
| DedicatedHostType |
string |
No |
Tipe host khusus. Anda dapat memanggil DescribeDedicatedHostTypes untuk mengkueri daftar tipe host khusus terbaru. |
ddh.g5 |
| LockReason |
string |
No |
Alasan host khusus terkunci. Nilai valid:
|
financial |
| PageNumber |
integer |
No |
Catatan
Parameter ini akan segera dinonaktifkan. Gunakan NextToken dan MaxResults untuk melakukan operasi kueri paging. |
1 |
| PageSize |
integer |
No |
Catatan
Parameter ini akan segera dinonaktifkan. Gunakan NextToken dan MaxResults untuk melakukan operasi kueri paging. |
10 |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya tempat host khusus berada. Saat Anda menggunakan parameter ini untuk memfilter resource, jumlah resource tidak boleh melebihi 1.000. Catatan
Pemfilteran berdasarkan kelompok sumber daya default tidak didukung. |
rg-aek3b6jzp66**** |
| Tag |
array<object> |
No |
Tag. Anda dapat menentukan hingga 20 tag. |
|
|
object |
No |
|||
| Key |
string |
No |
Kunci tag host khusus. Jika Anda menentukan parameter ini, nilainya tidak boleh berupa string kosong. Panjang kunci tag dapat mencapai 128 karakter dan tidak boleh diawali dengan |
TestKey |
| Value |
string |
No |
Nilai tag host khusus. Jika Anda menentukan parameter ini, nilainya dapat berupa string kosong. Panjang nilai tag dapat mencapai 128 karakter dan tidak boleh mengandung |
TestValue |
| DedicatedHostClusterId |
string |
No |
ID kluster host khusus. |
dc-bp12wlf6am0vz9v2**** |
| SocketDetails |
string |
No |
Apakah akan menampilkan informasi kapasitas tingkat socket. Anda dapat menggunakan informasi kapasitas tingkat socket untuk melihat sumber daya yang tersisa (vCPU, penggunaan memori, kapasitas tersisa, dan kapasitas total) guna menentukan apakah Instans ECS dengan tipe instans tertentu dapat dibuat. Nilai valid:
Penting
Setiap host khusus biasanya memiliki dua CPU, bernomor Socket 0 dan Socket 1. Pada host khusus, Instans ECS tidak dibuat melintasi socket untuk memastikan kinerja maksimum. Setiap Instans ECS dibuat pada satu socket.
|
true |
| NextToken |
string |
No |
Token pagination. Tetapkan parameter ini ke nilai NextToken yang dikembalikan dalam pemanggilan sebelumnya. Anda tidak perlu menetapkan parameter ini untuk permintaan pertama. |
e71d8a535bd9cc11 |
| MaxResults |
integer |
No |
Jumlah entri maksimum per halaman untuk kueri paging. Jika Anda menetapkan parameter ini, paging dilakukan dengan menggunakan MaxResults dan NextToken. Nilai maksimum: 100. Nilai default: 10. |
10 |
| QueryInventory |
boolean |
No |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| PageSize |
integer |
Jumlah entri per halaman. |
1 |
| RequestId |
string |
ID permintaan. |
7654525A-9964-4ABB-8BCD-98F8835E809A |
| PageNumber |
integer |
Nomor halaman daftar host khusus. |
5 |
| TotalCount |
integer |
Jumlah total host khusus. |
3 |
| NextToken |
string |
Token pagination yang dikembalikan dalam pemanggilan ini. Saat Anda menggunakan MaxResults dan NextToken untuk kueri paging dan nilai ini kosong, tidak ada data lagi yang tersedia. |
e71d8a535bd9cc11 |
| DedicatedHosts |
object |
||
| DedicatedHost |
array<object> |
Detail host khusus. |
|
|
array<object> |
ID Managed Private Space tempat host khusus berada. |
||
| CreationTime |
string |
The time when the dedicated host was created. The time follows the ISO 8601 standard in the |
2018-01-01T12:00Z |
| SchedulerOptions.ManagedPrivateSpaceId |
string |
The ID of the managed private space to which the dedicated host belongs. |
mps-iq81z6pkbqjx61php46e |
| Status |
string |
The status of the dedicated host. Valid values:
|
Available |
| Cores |
integer |
The number of physical cores per CPU. |
3 |
| AutoPlacement |
string |
Indicates whether the dedicated host is added to the resource pool for automatic deployment. Valid values:
For information about automatic deployment, see the "Automatic deployment" section in Functions and features. |
on |
| GPUSpec |
string |
The GPU model. |
gpu |
| AutoReleaseTime |
string |
The automatic release time of the dedicated host. The time follows the ISO 8601 standard in the |
2017-01-01T12:00Z |
| ChargeType |
string |
The billing method of the dedicated host. |
Prepaid |
| CpuOverCommitRatio |
number |
The CPU overcommit ratio. Valid values: 1 to 5. |
1 |
| ActionOnMaintenance |
string |
The policy used to migrate the ECS instances deployed on the dedicated host when the dedicated host fails. Valid values:
If the dedicated host has cloud disks attached, the default value is Migrate. If the dedicated host has local disks attached, the default value is Stop. |
Migrate |
| SaleCycle |
string |
The unit of the subscription duration. Valid values:
|
Month |
| PhysicalGpus |
integer |
The number of physical GPUs. |
10 |
| RegionId |
string |
The region ID of the dedicated host. |
cn-hangzhou |
| DedicatedHostName |
string |
The name of the dedicated host. |
MyDDHTestName |
| Description |
string |
The description of the dedicated host. |
this-is-my-DDH |
| DedicatedHostClusterId |
string |
The ID of the dedicated host cluster to which the dedicated host belongs. |
dc-bp12wlf6am0vz9v2**** |
| ExpiredTime |
string |
The expiration time of the subscription dedicated host. The time follows the ISO 8601 standard in the |
2019-01-01T12:00Z |
| DedicatedHostType |
string |
The type of the dedicated host. |
ddh.g5 |
| ResourceGroupId |
string |
The ID of the resource group to which the dedicated host belongs. |
rg-aek3b6jzp66**** |
| ZoneId |
string |
The zone ID of the dedicated host. |
cn-hangzhou-g |
| DedicatedHostId |
string |
The ID of the dedicated host. |
dh-bp165p6xk2tlw61e**** |
| Sockets |
integer |
The number of physical CPUs. |
5 |
| MachineId |
string |
The machine code of the dedicated host. |
12aaa123456ff19dec12345d3026e**** |
| Instances |
object |
||
| Instance |
array<object> |
The ECS instances that were created on the dedicated host. |
|
|
object |
An ECS instance created on the Dedicated Host. |
||
| InstanceType |
string |
The instance type of the ECS instance that was created on the dedicated host. |
ecs.g5.large |
| InstanceId |
string |
The ID of the ECS instance. |
i-bp14ot0ykf8w13a1**** |
| SocketId |
string |
The ID of the socket to which the ECS instance belongs. |
0,1 |
| InstanceOwnerId |
integer |
The ID of the ECS instance owner. |
128************0 |
| OperationLocks |
object |
||
| OperationLock |
array<object> |
The reasons why the resources of the dedicated host were locked. |
|
|
object |
|||
| LockReason |
string |
The reason why the dedicated host was locked. Valid values:
|
financial |
| Tags |
object |
||
| Tag |
array<object> |
The tags of the dedicated host. |
|
|
object |
Tag pair information. |
||
| TagValue |
string |
The tag value of the dedicated host. |
TestValue |
| TagKey |
string |
The tag key of the dedicated host. |
TestKey |
| SupportedInstanceTypeFamilies |
object |
||
| SupportedInstanceTypeFamily |
array |
The ECS instance families that are supported by the dedicated host. |
|
|
string |
The ECS instance family that is supported by the dedicated host. |
ecs.g5 |
|
| SupportedCustomInstanceTypeFamilies |
object |
||
| SupportedCustomInstanceTypeFamily |
array |
The custom ECS instance families that are supported by the dedicated host. |
|
|
string |
The custom ECS instance family that is supported by the dedicated host. |
ecs.ddh6s.custom |
|
| SupportedInstanceTypesList |
object |
||
| SupportedInstanceTypesList |
array |
The ECS instance types that are supported by the dedicated host. |
|
|
string |
The ECS instance type that is supported by the dedicated host. |
ecs.g5.large |
|
| Capacity |
object |
The performance specifications of the dedicated host. |
|
| AvailableMemory |
number |
The amount of available memory. Unit: GiB. |
25 |
| LocalStorageCategory |
string |
The category of local disks. |
i2 |
| TotalMemory |
number |
The total amount of memory. Unit: GiB. |
1024 |
| TotalLocalStorage |
integer |
The total capacity of local disks. Unit: GiB. |
512 |
| TotalVcpus |
integer |
The total number of vCPUs. |
56 |
| TotalVgpus |
integer |
The total number of vGPUs. |
10 |
| AvailableLocalStorage |
integer |
The amount of available space on the local disks. Unit: GiB |
65 |
| AvailableVcpus |
integer |
The number of available vCPUs. |
5 |
| AvailableVgpus |
integer |
The number of available vGPUs. |
2 |
| SocketCapacities |
object |
||
| SocketCapacity |
array<object> |
The socket capacities. |
|
|
object |
|||
| SocketId |
integer |
The socket ID. |
1 |
| AvailableMemory |
number |
The amount of available memory. Unit: GiB. |
65 |
| TotalMemory |
number |
The total amount of memory. Unit: GiB. |
128 |
| AvailableVcpu |
integer |
The number of available vCPUs. |
64 |
| TotalVcpu |
integer |
The total number of vCPUs. |
128 |
| AvailableInstanceTypes |
object |
||
| AvailableInstanceType |
array<object> |
List of available instance type information. |
|
|
object |
Information about an available instance type. |
||
| InstanceType |
string |
The instance type. For valid values, see Instance families. Catatan
This parameter is required. |
|
| AvailableInstanceCapacity |
integer |
The capacity of the available instance type. |
|
| NetworkAttributes |
object |
The network attributes of the dedicated host. |
|
| UdpTimeout |
integer |
The timeout period of the UDP session that is established between a user and an Alibaba Cloud service on the dedicated host. Unit: seconds. Only 60 is returned. |
60 |
| SlbUdpTimeout |
integer |
The timeout period of the UDP session that is established between Server Load Balancer (SLB) and the dedicated host. Unit: seconds. Only 60 is returned. |
60 |
| HostDetailInfo |
object |
This parameter will be removed in the future. We recommend that you use other parameters to ensure future compatibility. |
|
| SerialNumber |
string |
This parameter will be removed in the future. We recommend that you use other parameters to ensure future compatibility. |
null |
| DedicatedHostOwnerId |
integer |
The ID of the dedicated host owner. |
100************7 |
Contoh
Respons sukses
JSONformat
{
"PageSize": 1,
"RequestId": "7654525A-9964-4ABB-8BCD-98F8835E809A",
"PageNumber": 5,
"TotalCount": 3,
"NextToken": "e71d8a535bd9cc11",
"DedicatedHosts": {
"DedicatedHost": [
{
"CreationTime": "2018-01-01T12:00Z",
"SchedulerOptions.ManagedPrivateSpaceId": "mps-iq81z6pkbqjx61php46e",
"Status": "Available",
"Cores": 3,
"AutoPlacement": "on",
"GPUSpec": "gpu",
"AutoReleaseTime": "2017-01-01T12:00Z",
"ChargeType": "Prepaid",
"CpuOverCommitRatio": 1,
"ActionOnMaintenance": "Migrate",
"SaleCycle": "Month",
"PhysicalGpus": 10,
"RegionId": "cn-hangzhou",
"DedicatedHostName": "MyDDHTestName",
"Description": "this-is-my-DDH",
"DedicatedHostClusterId": "dc-bp12wlf6am0vz9v2****",
"ExpiredTime": "2019-01-01T12:00Z",
"DedicatedHostType": "ddh.g5",
"ResourceGroupId": "rg-aek3b6jzp66****",
"ZoneId": "cn-hangzhou-g",
"DedicatedHostId": "dh-bp165p6xk2tlw61e****",
"Sockets": 5,
"MachineId": "12aaa123456ff19dec12345d3026e****",
"Instances": {
"Instance": [
{
"InstanceType": "ecs.g5.large",
"InstanceId": "i-bp14ot0ykf8w13a1****",
"SocketId": "0,1",
"InstanceOwnerId": 0
}
]
},
"OperationLocks": {
"OperationLock": [
{
"LockReason": "financial"
}
]
},
"Tags": {
"Tag": [
{
"TagValue": "TestValue",
"TagKey": "TestKey"
}
]
},
"SupportedInstanceTypeFamilies": {
"SupportedInstanceTypeFamily": [
"ecs.g5"
]
},
"SupportedCustomInstanceTypeFamilies": {
"SupportedCustomInstanceTypeFamily": [
"ecs.ddh6s.custom"
]
},
"SupportedInstanceTypesList": {
"SupportedInstanceTypesList": [
"ecs.g5.large"
]
},
"Capacity": {
"AvailableMemory": 25,
"LocalStorageCategory": "i2",
"TotalMemory": 1024,
"TotalLocalStorage": 512,
"TotalVcpus": 56,
"TotalVgpus": 10,
"AvailableLocalStorage": 65,
"AvailableVcpus": 5,
"AvailableVgpus": 2,
"SocketCapacities": {
"SocketCapacity": [
{
"SocketId": 1,
"AvailableMemory": 65,
"TotalMemory": 128,
"AvailableVcpu": 64,
"TotalVcpu": 128
}
]
},
"AvailableInstanceTypes": {
"AvailableInstanceType": [
{
"InstanceType": "",
"AvailableInstanceCapacity": 0
}
]
}
},
"NetworkAttributes": {
"UdpTimeout": 60,
"SlbUdpTimeout": 60
},
"HostDetailInfo": {
"SerialNumber": "null"
},
"DedicatedHostOwnerId": 0
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidStatus.ValueNotSupported | The pecified dedicated host status is not supported. | |
| 400 | MissingParamter.RegionId | The regionId should not be null. | |
| 400 | InvalidParameter.DedicatedHostIds | The specified parameter dedicatedHostIds is not valid. | |
| 400 | InvalidRegion.NotFound | The specified parameter RegionId is not valid. | |
| 400 | InvalidZone.NotFound | The specified parameter ZoneId is not valid. | |
| 403 | InvalidDedicatedHostIds.Malformed | The amount of specified dedicatedHostIds exceeds the limit. | |
| 404 | InvalidLockReason.NotFound | The specified LockReason is not found. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.