Queries 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,
"RefreshOptions": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
ZoneMatchMode |
String |
No |
Yes |
Whether to recommend only instance types available in the zone specified by ZoneId. |
Valid values:
Note
If you specify ZoneId, the default value of ZoneMatchMode is Strict. |
|
IoOptimized |
String |
No |
Yes |
Whether the instance is I/O optimized. |
Valid values:
Note
If you query retired instance types, the default value of this property is none. |
|
ZoneId |
String |
No |
Yes |
The zone ID. |
You can call the DescribeZones operation to query the zone ID. |
|
InstanceChargeType |
String |
No |
Yes |
The billing method of the instance. |
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 for the instance type. |
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 this property is cloud. For I/O optimized instances, the default value of this 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 for recommending instance types. |
Valid values:
|
|
InstanceFamilyLevel |
String |
No |
Yes |
The level of the instance family. |
Valid values:
|
|
MaxPrice |
Number |
No |
Yes |
The maximum hourly price of pay-as-you-go instances or preemptible instances. |
This property takes effect when SpotStrategy is set to SpotWithPriceLimit. |
|
InstanceType |
String |
No |
No |
The instance type. |
For more information, see Overview of instance families and DescribeInstanceTypes. Note
You cannot specify InstanceType together with one of Cores and Memory in a request. |
|
InstanceTypeFamilies |
List |
No |
Yes |
The instance families. |
You can call the DescribeInstanceTypeFamilies operation to query the instance families. |
|
SpotStrategy |
String |
No |
Yes |
The bidding policy for the preemptible instance. |
Valid values:
Note
This property takes effect when InstanceChargeType is set to PostPaid. |
|
RefreshOptions |
String |
No |
Yes |
The refresh policy for data source resources when the stack is updated. |
Valid values:
|
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 zone ID of the instance type. |
None. |
|
Priority |
Integer |
The sorting priority. |
None. |
|
NetworkType |
String |
The network type of the instance. |
Valid values:
|
|
Scene |
String |
The scenario for the instance type. |
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
ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
RecommendInstanceTypes:
Type: DATASOURCE::ECS::RecommendInstanceTypes
Properties:
Cores: 2
Memory: 2
Outputs:
RecommendInstanceTypes:
Value:
Ref: RecommendInstanceTypes{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
},
"Resources": {
"RecommendInstanceTypes": {
"Type": "DATASOURCE::ECS::RecommendInstanceTypes",
"Properties": {
"Cores": 2,
"Memory": 2
}
}
},
"Outputs": {
"RecommendInstanceTypes": {
"Value": {
"Ref": "RecommendInstanceTypes"
}
}
}
}