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
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ZoneMatchMode | String | No | Yes | Specifies whether to recommend instance types that are available only in the specified zone. | Valid values:
Note If you specify the ZoneId property, the default value of the ZoneMatchMode property is Strict. |
IoOptimized | String | No | Yes | Specifies whether the instance is an I/O optimized instance. | Default value: optimized. Valid values:
Note If you query retired instance types, the default value of the IoOptimized property is none. |
ZoneId | String | No | Yes | The ID of the zone. | You can call the DescribeZones operation to query zones. |
InstanceChargeType | String | No | Yes | The billing method of the instance. | Default value: PostPaid. Valid values:
|
Memory | Number | No | Yes | The 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. |
Scene | String | No | Yes | The scenario in which you want to use the instance type. | Default value: CREATE. Valid values:
|
SystemDiskCategory | String | No | Yes | The category of the system disk. | Valid values: 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. |
Cores | Integer | No | Yes | The 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. |
PriorityStrategy | String | No | Yes | The policy based on which the system recommends the instance type. | Default value: InventoryFirst. Valid values:
|
InstanceFamilyLevel | String | No | Yes | The level of the instance family. | Valid values:
|
MaxPrice | Number | No | Yes | The 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. |
InstanceType | String | No | No | The 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. |
InstanceTypeFamilies | List | No | Yes | The instance families. | You can call the DescribeInstanceTypeFamilies operation to query instance families. |
SpotStrategy | String | No | Yes | The bidding policy for the preemptible instance. | Default value: NoSpot. Valid values:
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.
Property | Type | Description | Constraint |
---|---|---|---|
InstanceTypeIds | List | The instance types. | None. |
InstanceTypes | List | Details of the instance types. | None. |
CommodityCode | String | The commodity code of the instance type. | None. |
ZoneId | String | The ID of the zone in which the instance type is available. | None. |
Priority | Integer | The priority based on which the system sorts the instance types. | None. |
NetworkType | String | The network type of the instance. | Valid values:
|
Scene | String | The scenario in which the instance type is used. | None. |
SpotStrategy | String | The bidding policy for the preemptible instance. | None. |
InstanceChargeType | String | The billing method of the instance. | None. |
InstanceType | String | The instance type. | None. |
Examples
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { }, "Resources": { "RecommendInstanceTypes": { "Type": "DATASOURCE::ECS::RecommendInstanceTypes", "Properties": { "Cores": 2, "Memory": 2 } } }, "Outputs": { "RecommendInstanceTypes": { "Value": { "Ref": "RecommendInstanceTypes" } } } }