All Products
Search
Document Center

Elastic Compute Service:DescribeDedicatedHostClusters

Last Updated:Dec 25, 2024

Queries the information about one or more dedicated host clusters.

Operation description

Usage notes

You can specify multiple request parameters to filter query results. Specified request parameters have logical AND relations. Only the specified parameters are included in the filter conditions. However, if DedicatedHostClusterIds is set to an empty JSON array ([]), this parameter is regarded as a valid filter condition and an empty result is returned.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:DescribeDedicatedHostClustersget
*DedicatedHostCluster
acs:ecs:{#regionId}:{#accountId}:ddhcluster/{#ddhclusterId}
*DedicatedHostCluster
acs:ecs:{#regionId}:{#accountId}:ddhcluster/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
StatusstringNo
Note This parameter is unavailable for use.
null
LockReasonstringNo
Note This parameter is unavailable for use.
null
ResourceGroupIdstringNo

The ID of the resource group to which the dedicated host cluster belongs. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.

Note Resources in the default resource group are displayed in the response regardless of how this parameter is set.
rg-bp67acfmxazb4p****
Tagarray<object>No

The tags of the dedicated host cluster.

objectNo
KeystringNo

The key of tag N of the dedicated host cluster. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot contain http:// or https://. The tag key cannot start with acs: or aliyun.

If you specify a single tag to query resources, up to 1,000 resources to which the tag is added are returned. If you specify multiple tags to query resources, up to 1,000 resources to which all specified tags are added are returned. To query more than 1,000 resources that have specified tags added, call the ListTagResources operation.

TestKey
ValuestringNo

The value of tag N of the dedicated host cluster. Valid values of N: 1 to 20. The tag value cannot be an empty string. The tag value can be up to 64 characters in length and cannot contain http:// or https://. The tag value cannot start with acs: or aliyun.

TestValue
RegionIdstringYes

The region ID of the dedicated host cluster. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ZoneIdstringNo

The zone ID of the dedicated host cluster. You can call the DescribeZones operation to query the most recent zone list.

cn-hangzhou-f
DedicatedHostClusterIdsstringNo

The IDs of dedicated host clusters. The value can be a JSON array that consists of up to 100 dedicated host cluster IDs in the format of ["dc-xxxxxxxxx", "dc-yyyyyyyyy", ... "dc-zzzzzzzzz"]. Separate the IDs with commas (,).

["dc-bp12wlf6am0vz9v2****", "dc-bp12wlf6am0vz9v3****"]
DedicatedHostClusterNamestringNo

The name of the dedicated host cluster.

myDDHCluster
PageNumberintegerNo

The page number.

Pages start from page 1.

Default value: 1.

1
PageSizeintegerNo

The number of entries per page.

Valid values: 1 to 100.

Default value: 10.

5

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries per page.

5
RequestIdstring

The request ID.

214A2187-B06F-4E49-A081-4D053466A8C7
PageNumberinteger

The page number.

1
TotalCountinteger

The total number of dedicated host clusters.

2
DedicatedHostClustersarray<object>

Details about the dedicated host clusters.

DedicatedHostClusterobject
Descriptionstring

The description of the dedicated host cluster.

This-is-my-DDHCluster
DedicatedHostClusterIdstring

The ID of the dedicated host cluster.

dc-bp12wlf6am0vz9v2****
ResourceGroupIdstring

The ID of the resource group to which the dedicated host cluster belongs.

rg-bp67acfmxazb4p****
ZoneIdstring

The zone ID of the dedicated host cluster.

cn-hangzhou-f
RegionIdstring

The region ID of the dedicated host cluster.

cn-hangzhou
DedicatedHostClusterNamestring

The name of the dedicated host cluster.

myDDHCluster
Tagsarray<object>

The tags of the dedicated host cluster.

Tagobject
TagValuestring

The tag value of the dedicated host cluster.

TestValue
TagKeystring

The tag key of the dedicated host cluster.

TestKey
DedicatedHostIdsarray

The IDs of dedicated hosts in the dedicated host cluster.

DedicatedHostIdstring

The ID of the dedicated host.

["dh-bp181e5064b5sotr****","dh-bp18064b5sotrr9c****"]
DedicatedHostClusterCapacityobject

The capacity of the dedicated host cluster.

AvailableVcpusinteger

The number of available vCPUs.

2
AvailableMemoryinteger

The size of available memory. Unit: GiB

4
TotalMemoryinteger

The total memory size. Unit: GiB

8
TotalVcpusinteger

The total number of vCPUs.

4
LocalStorageCapacitiesarray<object>

The local storage capacity.

LocalStorageCapacityobject
DataDiskCategorystring

The category of data disks. Valid values:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • ephemeral_ssd: local SSD
  • cloud_essd: Enterprise SSD (ESSD)
cloud
AvailableDiskinteger

The available capacity of the local disk. Unit: GiB

20
TotalDiskinteger

The total capacity of the local disk. Unit: GiB

40
AvailableInstanceTypesarray<object>

The available capacity of the Elastic Compute Service (ECS) instance types in the dedicated host cluster.

AvailableInstanceTypeobject
InstanceTypestring

The ECS instance type.

ecs.c6.26xlarge
AvailableInstanceCapacityinteger

The available capacity of the ECS instance type.

0

Examples

Sample success responses

JSONformat

{
  "PageSize": 5,
  "RequestId": "214A2187-B06F-4E49-A081-4D053466A8C7",
  "PageNumber": 1,
  "TotalCount": 2,
  "DedicatedHostClusters": {
    "DedicatedHostCluster": [
      {
        "Description": "This-is-my-DDHCluster",
        "DedicatedHostClusterId": "dc-bp12wlf6am0vz9v2****",
        "ResourceGroupId": "rg-bp67acfmxazb4p****",
        "ZoneId": "cn-hangzhou-f",
        "RegionId": "cn-hangzhou",
        "DedicatedHostClusterName": "myDDHCluster",
        "Tags": {
          "Tag": [
            {
              "TagValue": "TestValue",
              "TagKey": "TestKey"
            }
          ]
        },
        "DedicatedHostIds": {
          "DedicatedHostId": [
            "[\"dh-bp181e5064b5sotr****\",\"dh-bp18064b5sotrr9c****\"]"
          ]
        },
        "DedicatedHostClusterCapacity": {
          "AvailableVcpus": 2,
          "AvailableMemory": 4,
          "TotalMemory": 8,
          "TotalVcpus": 4,
          "LocalStorageCapacities": {
            "LocalStorageCapacity": [
              {
                "DataDiskCategory": "cloud",
                "AvailableDisk": 20,
                "TotalDisk": 40
              }
            ]
          },
          "AvailableInstanceTypes": {
            "AvailableInstanceType": [
              {
                "InstanceType": "ecs.c6.26xlarge",
                "AvailableInstanceCapacity": 0
              }
            ]
          }
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParamter.RegionIdThe regionId should not be null.The RegionId parameter is required.
400InvalidParameter.DedicatedHostClusterIdsThe specified parameter dedicatedHostClusterIds is not valid.-
400InvalidRegion.NotFoundThe specified parameter RegionId is not valid.The specified RegionId parameter is invalid.
400InvalidZone.NotFoundThe specified parameter ZoneId is not valid.The specified ZoneId parameter is invalid.
403InvalidDedicatedHostIds.MalformedThe amount of specified dedicatedHostClusterIds exceeds the limit.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history