Consulte les détails d'un ou plusieurs hôtes dédiés. Elle renvoie des informations telles que les métriques de performances physiques, le code machine, l'état et la liste des instances ECS sur les hôtes. Vous pouvez filtrer les résultats à l'aide de paramètres tels que les identifiants des hôtes dédiés, l'identifiant du cluster d'hôtes dédiés, le nom de l'hôte ou l'état pour trouver des hôtes spécifiques. Cette fonctionnalité vous aide à gérer et à optimiser efficacement vos ressources de cloud computing.
Description de l'opération
API
Vous pouvez consulter les détails d'un ou plusieurs hôtes dédiés de l'une des manières suivantes :
-
Spécifiez
DedicatedHostIdspour consulter des hôtes dédiés spécifiques. -
Spécifiez
DedicatedHostClusterIdpour consulter tous les hôtes dédiés d'un cluster d'hôtes dédiés.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
ecs:DescribeDedicatedHosts |
get |
DedicatedHost
DedicatedHost
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| RegionId |
string |
Oui |
L'identifiant de la région où réside l'hôte dédié. Appelez l'opération DescribeRegions pour obtenir la liste la plus récente des régions d'Alibaba Cloud. |
cn-hangzhou |
| ZoneId |
string |
Non |
L'identifiant de la zone. Appelez l'opération DescribeZones pour obtenir la liste la plus récente des zones d'Alibaba Cloud. |
cn-hangzhou-g |
| DedicatedHostIds |
string |
Non |
Les identifiants des hôtes dédiés. Vous pouvez spécifier jusqu'à 100 identifiants d'hôtes dédiés dans un tableau JSON. |
["dh-bp165p6xk2tlw61e****", "dh-bp1f9vxmno7emy96****"] |
| DedicatedHostName |
string |
Non |
Le nom de l'hôte dédié. |
MyDDHTestName |
| Status |
string |
Non |
L'état de l'hôte dédié. Valeurs valides :
La valeur par défaut est |
Available |
| DedicatedHostType |
string |
Non |
Le type d'hôte dédié. Appelez l'opération DescribeDedicatedHostTypes pour obtenir la liste la plus récente des types d'hôtes dédiés. |
ddh.g5 |
| LockReason |
string |
Non |
La raison pour laquelle l'hôte dédié est verrouillé. Valeurs valides :
|
financial |
| PageNumber |
integer |
Non |
Remarque
Ce paramètre est obsolète. Utilisez NextToken et MaxResults pour la pagination. |
1 |
| PageSize |
integer |
Non |
Remarque
Ce paramètre est obsolète. Utilisez NextToken et MaxResults pour la pagination. |
10 |
| ResourceGroupId |
string |
Non |
L'identifiant du groupe de ressources auquel l'hôte dédié appartient. Lorsque vous utilisez ce paramètre pour filtrer les ressources, le nombre de ressources ne peut pas dépasser 1 000. Remarque
Le filtrage par le groupe de ressources par défaut n'est pas pris en charge. |
rg-aek3b6jzp66**** |
| Tag |
array<object> |
Non |
Les balises utilisées pour filtrer les hôtes dédiés. Vous pouvez spécifier jusqu'à 20 balises. |
|
|
object |
Non |
|||
| Key |
string |
Non |
La clé de la balise. La clé peut comporter jusqu'à 128 caractères. Elle ne peut pas être une chaîne vide, commencer par aliyun ou acs:, ni contenir http:// ou https://. |
TestKey |
| Value |
string |
Non |
La valeur de la balise. La valeur peut comporter jusqu'à 128 caractères et ne peut pas contenir http:// ou https://. Vous pouvez laisser la valeur vide. |
TestValue |
| DedicatedHostClusterId |
string |
Non |
L'identifiant du cluster d'hôtes dédiés. |
dc-bp12wlf6am0vz9v2**** |
| SocketDetails |
string |
Non |
Indique si les informations de capacité au niveau du socket doivent être renvoyées. Vous pouvez utiliser ces informations pour vérifier les ressources restantes en vCPU et en mémoire et déterminer si une instance ECS d'un type d'instance spécifique peut être créée sur l'hôte dédié. Valeurs valides :
Important
Un hôte dédié possède généralement deux processeurs, qui correspondent au Socket 0 et au Socket 1. Pour maximiser les performances, une instance ECS créée sur un hôte dédié est allouée à un seul socket et ne s'étend pas sur plusieurs sockets.
|
true |
| NextToken |
string |
Non |
Le jeton utilisé pour récupérer la page de résultats suivante. Ne définissez pas ce paramètre pour la première requête. Pour les requêtes suivantes, définissez ce paramètre sur la valeur NextToken renvoyée dans la réponse précédente. |
e71d8a535bd9cc11 |
| MaxResults |
integer |
Non |
Le nombre maximal de résultats à renvoyer par page. Valeur maximale : 100. Valeur par défaut : 10. |
10 |
| QueryInventory |
boolean |
Non |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
|||
| PageSize |
integer |
Le nombre d'entrées retournées sur chaque page. |
1 |
| RequestId |
string |
L'identifiant de la requête. |
7654525A-9964-4ABB-8BCD-98F8835E809A |
| PageNumber |
integer |
Le numéro de la page actuelle. |
5 |
| TotalCount |
integer |
Le nombre total d'hôtes dédiés. |
3 |
| NextToken |
string |
Le jeton utilisé pour récupérer la page de résultats suivante. Une valeur vide indique qu'aucun autre résultat n'est disponible. |
e71d8a535bd9cc11 |
| DedicatedHosts |
object |
||
| DedicatedHost |
array<object> |
Les détails des hôtes dédiés. |
|
|
array<object> |
Les détails d'un hôte dédié. |
||
| CreationTime |
string |
The creation time of the dedicated host. The time follows the ISO 8601 standard in UTC+0. Format: |
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 usage status of the dedicated host. Valid values:
|
Available |
| Cores |
integer |
The number of cores per CPU. |
3 |
| AutoPlacement |
string |
Indicates whether the dedicated host is added to the automatic deployment resource pool. Valid values:
For more information about automatic deployment, see Automatic deployment. |
on |
| GPUSpec |
string |
The GPU model. |
gpu |
| AutoReleaseTime |
string |
The automatic release time. The time follows the ISO 8601 standard in UTC+0. Format: |
2017-01-01T12:00Z |
| ChargeType |
string |
The billable methods of the dedicated host. |
Prepaid |
| CpuOverCommitRatio |
number |
The CPU overcommit ratio. Valid values: 1 to 5. |
1 |
| ActionOnMaintenance |
string |
The migration plan for instances when the dedicated host fails. Valid values:
Default value: Migrate when cloud disks are attached to the dedicated host. Stop when local disks are attached to the dedicated host. |
Migrate |
| SaleCycle |
string |
The subscription unit. 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 UTC+0. Format: |
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. |
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 ID of the dedicated host. |
12aaa123456ff19dec12345d3026e**** |
| Instances |
object |
||
| Instance |
array<object> |
The list of ECS instances created on the dedicated host. |
|
|
object |
The ECS instance created on the dedicated host. |
||
| InstanceType |
string |
The ECS instance type of the ECS instance created on the dedicated host. |
ecs.g5.large |
| InstanceId |
string |
The instance ID of the ECS instance created on the dedicated host. |
i-bp14ot0ykf8w13a1**** |
| SocketId |
string |
The socket number on which the instance resides. |
0,1 |
| InstanceOwnerId |
integer |
The user ID of the ECS instance owner. |
128************0 |
| OperationLocks |
object |
||
| OperationLock |
array<object> |
The reasons why the dedicated host is locked. |
|
|
object |
|||
| LockReason |
string |
The reason why the dedicated host is locked. Valid values:
|
financial |
| Tags |
object |
||
| Tag |
array<object> |
The tags of the dedicated host. |
|
|
object |
The tag key-value 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 list of ECS instance families supported by the dedicated host. |
|
|
string |
The ECS instance family supported by the dedicated host. |
ecs.g5 |
|
| SupportedCustomInstanceTypeFamilies |
object |
||
| SupportedCustomInstanceTypeFamily |
array |
The custom instance families supported by the dedicated host. |
|
|
string |
The custom instance family supported by the dedicated host. |
ecs.ddh6s.custom |
|
| SupportedInstanceTypesList |
object |
||
| SupportedInstanceTypesList |
array |
The list of ECS instance types supported by the dedicated host. |
|
|
string |
The ECS instance type supported by the dedicated host. |
ecs.g5.large |
|
| Capacity |
object |
The performance metrics of the dedicated host. |
|
| AvailableMemory |
number |
The available memory capacity. Unit: GiB. |
25 |
| LocalStorageCategory |
string |
The local disk type. |
i2 |
| TotalMemory |
number |
The total memory capacity. Unit: GiB. |
1024 |
| TotalLocalStorage |
integer |
The total local disk capacity. Unit: GiB. |
512 |
| TotalVcpus |
integer |
The total number of vCPUs. |
56 |
| TotalVgpus |
integer |
The total number of virtual GPUs. |
10 |
| AvailableLocalStorage |
integer |
The available local disk capacity. Unit: GiB. |
65 |
| AvailableVcpus |
integer |
The number of available vCPUs. |
5 |
| AvailableVgpus |
integer |
The number of available virtual GPUs. |
2 |
| SocketCapacities |
object |
||
| SocketCapacity |
array<object> |
The list of socket-level capacity information. |
|
|
object |
|||
| SocketId |
integer |
The socket number. |
1 |
| AvailableMemory |
number |
The available memory capacity. Unit: GiB. |
65 |
| TotalMemory |
number |
The total memory capacity. Unit: GiB. |
128 |
| AvailableVcpu |
integer |
The number of available vCPUs. |
64 |
| TotalVcpu |
integer |
The total number of vCPUs. |
128 |
| AvailableInstanceTypes |
object |
||
| AvailableInstanceType |
array<object> |
The list of available instance types. |
|
|
object |
The available instance type information. |
||
| InstanceType |
string |
The instance type. For more information, see Instance family. Remarque
This parameter is required. |
|
| AvailableInstanceCapacity |
integer |
The available capacity for the instance type. |
|
| NetworkAttributes |
object |
The network attributes of the dedicated host. |
|
| UdpTimeout |
integer |
The UDP session timeout period. Unit: seconds. Only 60 seconds is supported. |
60 |
| SlbUdpTimeout |
integer |
The SLB UDP session timeout period. Unit: seconds. Only 60 seconds is supported. |
60 |
| HostDetailInfo |
object |
This parameter is being deprecated. For better compatibility, use other parameters. |
|
| SerialNumber |
string |
This parameter is being deprecated. For better compatibility, use other parameters. |
null |
| DedicatedHostOwnerId |
integer |
The user ID of the dedicated host owner. |
100************7 |
Exemples
JSON format
{
"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
}
]
}
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | InvalidStatus.ValueNotSupported | The pecified dedicated host status is not supported. | The host is in a state that does not support the current operation. |
| 400 | MissingParamter.RegionId | The regionId should not be null. | The RegionId parameter is required. |
| 400 | InvalidParameter.DedicatedHostIds | The specified parameter dedicatedHostIds is not valid. | The specified DedicatedHostIds parameter is invalid. |
| 400 | InvalidRegion.NotFound | The specified parameter RegionId is not valid. | The specified RegionId parameter is invalid. |
| 400 | InvalidZone.NotFound | The specified parameter ZoneId is not valid. | The specified ZoneId parameter is invalid. |
| 403 | InvalidDedicatedHostIds.Malformed | The amount of specified dedicatedHostIds exceeds the limit. | More than 100 dedicated host IDs are specified in the DedicatedHostIds value. |
| 404 | InvalidLockReason.NotFound | The specified LockReason is not found. | The specified lockout reason does not exist. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.