DATASOURCE::ECS::RecommendInstanceTypes is used to query the recommended Elastic Compute Service (ECS) instance types.

Syntax

{
  "Type": "DATASOURCE::ECS::RecommendInstanceTypes",
  "Properties": {
    "ZoneMatchMode": String,
    "IoOptimized": String,
    "ZoneId": String,
    "InstanceChargeType": String,
    "Memory": Number,
    "Scene": String,
    "SystemDiskCategory": String,
    "Cores": Integer,
    "PriorityStrategy": String,
    "InstanceFamilyLevel": String,
    "MaxPrice": Number,
    "InstanceType": String,
    "InstanceTypeFamilies": List,
    "SpotStrategy": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
ZoneMatchModeStringNoYesSpecifies whether to recommend instance types that are available only in the specified zone. Valid values:
  • Strict: recommends instance types that are available only in the specified zone.
  • Include: recommends instance types that are available in other zones within the same region as the specified zone.
Note If you specify the ZoneId property, the default value of the ZoneMatchMode property is Strict.
IoOptimizedStringNoYesSpecifies whether the instance is an I/O optimized instance. Default value: optimized. Valid values:
  • optimized: an I/O optimized instance
  • none: a non-I/O optimized instance
Note If you query retired instance types, the default value of the IoOptimized property is none.
ZoneIdStringNoYesThe ID of the zone. You can call the DescribeZones operation to query zones.
InstanceChargeTypeStringNoYesThe billing method of the instance. Default value: PostPaid. Valid values:
  • PrePaid: subscription
  • PostPaid: pay-as-you-go
MemoryNumberNoYesThe memory size of the instance. Unit: GiB.

If you specify the Cores and Memory properties, the system returns all instance types that match the values of both properties.

SceneStringNoYesThe scenario in which you want to use the instance type. Default value: CREATE. Valid values:
  • UPGRADE: You want to upgrade or downgrade instance types.
  • CREATE: You want to create instances.
SystemDiskCategoryStringNoYesThe category of the system disk. Valid values:
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: enhanced SSD (ESSD)
  • cloud: basic disk
Note For non-I/O optimized instances, the default value of the SystemDiskCategory property is cloud. For I/O optimized instances, the default value of the SystemDiskCategory property is cloud_efficiency.
CoresIntegerNoYesThe number of vCPUs of the instance. If you specify the Cores and Memory properties, the system returns all instance types that match the values of both properties.
PriorityStrategyStringNoYesThe policy based on which the system recommends the instance type. Default value: InventoryFirst. Valid values:
  • InventoryFirst: recommends the most sufficient instance type in the inventory.
  • PriceFirst: recommends the most cost-effective instance type. Recommended instance types appear based on the hourly prices of vCPUs in ascending order.
  • NewProductFirst: recommends the latest instance type.
InstanceFamilyLevelStringNoYesThe level of the instance family. Valid values:
  • EntryLevel.
  • EnterpriseLevel.
  • CreditEntryLevel. For more information, see Overview.
MaxPriceNumberNoYesThe maximum hourly price for a pay-as-you-go instance or preemptible instance. This property takes effect when you set the SpotStrategy property to SpotWithPriceLimit.
InstanceTypeStringNoNoThe instance type. For more information, see Overview of instance families and DescribeInstanceTypes.
Note You cannot specify the InstanceType property and the Cores or Memory property at the same time.
InstanceTypeFamiliesListNoYesThe instance families. You can call the DescribeInstanceTypeFamilies operation to query instance families.
SpotStrategyStringNoYesThe bidding policy for the preemptible instance. Default value: NoSpot. Valid values:
  • NoSpot: The instance is created as a regular pay-as-you-go instance.
  • SpotWithPriceLimit: The instance is created as a preemptible instance for which you specify the maximum hourly price.
  • SpotAsPriceGo: The instance is created as a preemptible instance whose price is based on the market price at the time of purchase. The market price can be equal to the price of a pay-as-you-go instance.
Note This property takes effect when you set the InstanceChargeType property to Postpaid.

Return values (Fn::GetAtt)

  • InstanceTypeIds: the instance types.
  • InstanceTypes: details of the instance types.
PropertyTypeDescriptionConstraint
InstanceTypeIdsListThe instance types. None.
InstanceTypesListDetails of the instance types. None.
CommodityCodeStringThe commodity code of the instance type. None.
ZoneIdStringThe ID of the zone in which the instance type is available. None.
PriorityIntegerThe priority based on which the system sorts the instance types. None.
NetworkTypeStringThe network type of the instance. Valid values:
  • classic: classic network
  • vpc: virtual private cloud (VPC)
SceneStringThe scenario in which the instance type is used. None.
SpotStrategyStringThe bidding policy for the preemptible instance. None.
InstanceChargeTypeStringThe billing method of the instance. None.
InstanceTypeStringThe instance type. None.

Examples

  • YAMLformat

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      RecommendInstanceTypes:
        Type: DATASOURCE::ECS::RecommendInstanceTypes
        Properties:
          Cores: 2
          Memory: 2
    Outputs:
      RecommendInstanceTypes:
        Value:
          Ref: RecommendInstanceTypes
  • JSONformat

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "RecommendInstanceTypes": {
          "Type": "DATASOURCE::ECS::RecommendInstanceTypes",
          "Properties": {
            "Cores": 2,
            "Memory": 2
          }
        }
      },
      "Outputs": {
        "RecommendInstanceTypes": {
          "Value": {
            "Ref": "RecommendInstanceTypes"
          }
        }
      }
    }