DATASOURCE::ECS::DedicatedHosts is used to query dedicated hosts.

Syntax

{
  "Type": "DATASOURCE::ECS::DedicatedHosts",
  "Properties": {
    "Status": String,
    "ZoneId": String,
    "ResourceGroupId": String,
    "DedicatedHostName": String,
    "DedicatedHostType": String,
    "DedicatedHostIds": List,
    "Tags": List,
    "DedicatedHostClusterId": String
  }
}

Properties

Property Type Required Editable Description Constraint
Status String No Yes The state of the dedicated host. Valid values:
  • Available: The dedicated host runs as expected.
  • UnderAssessment: The dedicated host is available. However, the dedicated host has potential risks that may cause the Elastic Compute Service (ECS) instances on the dedicated host to fail.
  • PermanentFailure: The dedicated host has permanent failures and is unavailable.
ZoneId String No Yes The ID of the zone. None.
ResourceGroupId String No Yes The ID of the resource group to which the dedicated host belongs. None.
DedicatedHostName String No Yes The name of the dedicated host. None.
DedicatedHostType String No Yes The type of the dedicated host. None.
DedicatedHostIds List No Yes The IDs of the dedicated hosts. You can specify up to 100 dedicated host IDs.
Tags List No Yes The tags of the dedicated host. You can specify up to 20 tags.

For more information, see Tags properties.

DedicatedHostClusterId String No Yes The ID of the dedicated host cluster. None.

Tags syntax

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags properties

Property Type Required Editable Description Constraint
Value String No No The value of the tag. The tag value can be up to 128 characters in length, and cannot contain http:// or https://. The tag value cannot start with aliyun or acs:.
Key String Yes No The key of the tag. The tag key must be 1 to 128 characters in length, and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.

Return values (Fn::GetAtt)

  • DedicatedHostIds: the lDs of the dedicated hosts.
  • DedicatedHosts: details of the dedicated hosts.
Property Type Description Constraint
DedicatedHostIds List The IDs of the dedicated hosts. None.
DedicatedHosts List Details of the dedicated hosts. None.
Status String The state of the dedicated host. Valid values:
  • Available: The dedicated host runs as expected.
  • UnderAssessment: The dedicated host is available. However, the dedicated host has potential risks that may cause the ECS instances on the dedicated host to fail.
  • PermanentFailure: The dedicated host has permanent failures and is unavailable.
Cores Number The number of cores in a single CPU. None.
AutoPlacement String Indicates whether the dedicated host is added to the resource pool for automatic deployment. Valid values:
  • on: The dedicated host is added to the resource pool for automatic deployment.
  • off: The dedicated host is not added to the resource pool for automatic deployment.

For more information about automatic deployment, see Automatic deployment.

GPUSpec String The GPU model. None.
AutoReleaseTime String The automatic release time of the dedicated host.

The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mmZ format. The time is displayed in UTC.

ChargeType String The billing method of the dedicated host. Valid values:
  • PrePaid: subscription
  • PostPaid: pay-as-you-go
CpuOverCommitRatio Number The CPU overcommit ratio. None.
ActionOnMaintenance String The policy that is used to migrate the instances deployed on the dedicated host when the dedicated host fails or needs to be repaired online. Valid values:
  • Migrate: The instances are migrated to another dedicated host and restarted.
  • Stop: The instances are stopped. If the dedicated host cannot be repaired, the instances are migrated to another dedicated host and restarted.
SaleCycle String The unit of the subscription duration. Valid values:
  • Month
  • Year
Note This property is returned if the ChargeType property is set to PrePaid.
PhysicalGpus Number The number of physical GPUs. None.
DedicatedHostName String The name of the dedicated host. None.
Description String The description of the dedicated host. None.
DedicatedHostClusterId String The ID of the dedicated host cluster to which the dedicated host belongs. None.
ExpiredTime String The time when the subscription dedicated host expires.

The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

Example: 2019-01-01T12:00Z.

Note This property is returned if the ChargeType property is set to PrePaid.
DedicatedHostType String The type of the dedicated host. None.
ResourceGroupId String The ID of the resource group to which the dedicated host belongs. None.
ZoneId String The ID of the zone. None.
DedicatedHostId String The ID of the dedicated host. None.
Sockets Number The number of physical CPUs. None.
MachineId String The machine code of the dedicated host. None.
Instances List Details of the ECS instances that are created on the dedicated host. None.
OperationLocks List The reasons why the resources of the dedicated host are locked. None.
Tags List The tags of the dedicated host. None.
SupportedInstanceTypeFamilies List The ECS instance families that are supported by the dedicated host. None.
SupportedCustomInstanceTypeFamilies List The custom ECS instance families that are supported by the dedicated host. None.
SupportedInstanceTypesList List The ECS instance types that are supported by the dedicated host. None.
Capacity List The performance specifications of the dedicated host. None.
NetworkAttributes List The network attributes of the dedicated host. None.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
    "Parameters": {
    "DedicatedHostIds": {
      "Type": "Json",
      "Description": "The IDs of the dedicated hosts. You can specify up to 100 dedicated host IDs.",
      "MaxLength": 100,
      "Default": ["dh-bp165p6xk2tlw61e****"]
    },
    },
  "Resources": {
    "DedicatedHosts": {
      "Type": "DATASOURCE::ECS::DedicatedHosts",
      "Properties": {
        "DedicatedHostIds": {
           "Ref": "DedicatedHostIds"
        }
      }
    }
  },
  "Outputs": {
    "DedicatedHosts": {
      "Value": {
        "Fn::GetAtt": [
          "DedicatedHosts",
          "DedicatedHosts"
        ]
      }
    },
    "DedicatedHostIds": {
      "Value": {
        "Fn::GetAtt": [
          "DedicatedHosts",
          "DedicatedHostIds"
        ]
      }
    }
  }
}