All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ECS::RecommendInstanceTypes

Last Updated:Nov 26, 2024

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

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

Specifies whether to recommend instance types that are available only in the zone specified by ZoneId.

Valid values:

  • Strict: recommends instance types that are available only in the zone specified by ZoneId.

  • Include: recommends instance types that are available in the zone specified by ZoneId and instance types that are available in other zones within the same region.

Note

If you specify ZoneId, the default value of ZoneMatchMode is Strict.

IoOptimized

String

No

Yes

Specifies whether the instance is I/O optimized.

Valid values:

  • optimized (default): The instance is I/O optimized.

  • none: The instance is not I/O optimized.

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:

  • PrePaid: subscription

  • PostPaid (default): pay-as-you-go

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 the instance type is used.

Valid values:

  • UPGRADE: instance type upgrade or downgrade

  • CREATE (default): instance creation

SystemDiskCategory

String

No

Yes

The category of the system disk.

Valid values:

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: Enterprise SSD (ESSD)

  • cloud: basic disk

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 that is used to recommend instance types.

Valid values:

  • InventoryFirst (default): recommends the instance types that are in the most sufficient stock.

  • PriceFirst: recommends instance types based on the hourly prices of vCPUs in ascending order.

  • NewProductFirst: recommends the latest instance types.

InstanceFamilyLevel

String

No

Yes

The level of the instance family.

Valid values:

  • EntryLevel: entry level.

  • EnterpriseLevel: enterprise level.

  • CreditEntryLevel: credit-based entry level. For more information, see Overview.

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 to query the instance families.

SpotStrategy

String

No

Yes

The bidding policy for the preemptible instance.

Valid values:

  • NoSpot (default): The instance is created as a regular pay-as-you-go instance.

  • SpotWithPriceLimit: The instance is created as a preemptible instance that has a user-defined maximum hourly price.

  • SpotAsPriceGo: The instance is created as a preemptible instance for which the market price at the time of purchase is automatically used as the bid price. The market price can be up to the pay-as-you-go price.

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:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

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:

  • classic

  • vpc

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

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"
      }
    }
  }
}