DescribeDedicatedHostClusters

更新时间:
复制 MD 格式

Queries the details of one or more dedicated host groups.

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.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribeDedicatedHostClusters

get

DedicatedHostCluster

acs:ecs:{#regionId}:{#accountId}:ddhcluster/{#ddhclusterId}

DedicatedHostCluster

acs:ecs:{#regionId}:{#accountId}:ddhcluster/*

None None

Request parameters

Parameter

Type

Required

Description

Example

Status

string

No

Note

This parameter is unavailable for use.

null

LockReason

string

No

Note

This parameter is unavailable for use.

null

ResourceGroupId

string

No

The resource group ID of the host group. You can use a resource group ID to filter no more than 1,000 host groups.

Note

A default resource group is not supported.

rg-bp67acfmxazb4p****

Tag

array<object>

No

The tags of the host group.

object

No

The tags of the host group.

Key

string

No

The tag key. Valid values of N: 1 to 20. The tag key cannot be an empty string. It can be up to 64 characters in length, and can neither contain http:// or https:// nor acs: or aliyun.

You can filter no more than 1,000 host groups, regardless of how many tags are used. To query more than 1,000 host groups, call the ListTagResources API operation.

TestKey

Value

string

No

The tag value. Valid values of N: 1 to 20. The tag value cannot be an empty string. It can be up to 64 characters in length and cannot contain http:// or https://.

TestValue

RegionId

string

Yes

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

cn-hangzhou

ZoneId

string

No

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

cn-hangzhou-f

DedicatedHostClusterIds

string

No

The list of host group IDs. The value can be a JSON array consisting of multiple IDs in the ["dc-xxxxxxxxx", "dc-yyyyyyyyy",..., "dc-zzzzzzzzz"] format. Separate the IDs with commas (,).

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

DedicatedHostClusterName

string

No

The name of the host group.

myDDHCluster

PageNumber

integer

No

The page number.

Pages start from page 1.

Default value: 1

1

PageSize

integer

No

The number of entries to return on each page.

Valid values: 1 to 100.

Default value: 10.

5

Response elements

Element

Type

Description

Example

object

PageSize

integer

The number of entries per page.

5

RequestId

string

The request ID.

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

PageNumber

integer

The page number.

1

TotalCount

integer

The total number of dedicated host clusters.

2

DedicatedHostClusters

object

DedicatedHostCluster

array<object>

An array consisting of host group information.

array<object>

Description

string

The description of the host group.

This-is-my-DDHCluster

DedicatedHostClusterId

string

The ID of the host group.

dc-bp12wlf6am0vz9v2****

ResourceGroupId

string

The resource group ID of the host group.

rg-bp67acfmxazb4p****

ZoneId

string

The zone ID of the host group.

cn-hangzhou-f

RegionId

string

The region ID of the host group.

cn-hangzhou

DedicatedHostClusterName

string

The name of the host group.

myDDHCluster

Tags

object

Tag

array<object>

The tags of the host group.

object

TagValue

string

The tag value.

TestValue

TagKey

string

The tag key.

TestKey

DedicatedHostIds

object

DedicatedHostId

array

The IDs of dedicated hosts in the host group.

string

The ID of the dedicated host.

dh-bp181e5064b5sotr****

DedicatedHostClusterCapacity

object

The capacity of the host group.

AvailableVcpus

integer

The number of available vCPUs.

2

AvailableMemory

integer

The size of available memory. Unit: GiB

4

TotalMemory

integer

The total memory size. Unit: GiB

8

TotalVcpus

integer

The total number of vCPUs.

4

LocalStorageCapacities

object

LocalStorageCapacity

array<object>

The local storage capacity.

object

DataDiskCategory

string

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

AvailableDisk

integer

The available capacity of the local disk. Unit: GiB

20

TotalDisk

integer

The total capacity of the local disk. Unit: GiB

40

AvailableInstanceTypes

object

AvailableInstanceType

array<object>

The available capacity of ECS instances in the host group.

object

InstanceType

string

The ECS instance type.

ecs.c6.26xlarge

AvailableInstanceCapacity

integer

The available capacity of the ECS instance type.

0

Examples

Success response

JSON format

{
  "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****"
          ]
        },
        "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 code

Error code

Error message

Description

400 MissingParamter.RegionId The regionId should not be null. The RegionId parameter is required.
400 InvalidParameter.DedicatedHostClusterIds The specified parameter dedicatedHostClusterIds is not valid.
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 dedicatedHostClusterIds exceeds the limit.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.