All Products
Search
Document Center

Elastic Compute Service:DescribeRecommendInstanceType

Last Updated:Jul 01, 2026

(Beta) Mengkueri satu atau beberapa tipe instans alternatif berdasarkan tipe instans yang ditentukan. Untuk tipe instans yang telah atau akan pensiun, DescribeRecommendInstanceType menampilkan daftar semua tipe instans yang dapat berfungsi sebagai pengganti.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Parameter permintaan

Parameter

Type

Required

Description

Example

Cores

integer

No

Jumlah vCPU Instans ECS.

Catatan

Jika Anda menentukan parameter Cores dan Memory, sistem akan mencocokkan semua tipe instans yang memenuhi persyaratan vCPU dan memori yang ditentukan.

2

Memory

number

No

Ukuran memori Instans ECS. Unit: GiB.

Catatan

Jika Anda menentukan parameter Cores dan Memory, sistem akan mencocokkan semua tipe instans yang memenuhi persyaratan vCPU dan memori yang ditentukan.

8.0

InstanceFamilyLevel

string

No

Tingkat keluarga instans. Nilai valid:

  • EntryLevel: level entry.

  • EnterpriseLevel: level enterprise.

  • CreditEntryLevel: level entry berbasis kredit. Untuk detail, lihat Instans burstable.

EnterpriseLevel

InstanceType

string

No

Tipe instans yang ditentukan. Untuk detail, lihat Keluarga instans. Anda juga dapat memanggil operasi DescribeInstanceTypes untuk mengkueri daftar tipe instans terbaru.

Catatan

Jika Anda menentukan InstanceType, Anda tidak dapat menentukan Cores atau Memory.

ecs.hfg6.large

NetworkType

string

Yes

Jenis jaringan Instans ECS. Nilai valid:

  • vpc: virtual private cloud (VPC).

  • classic: jaringan klasik. Jaringan klasik tidak lagi tersedia. Untuk informasi lebih lanjut, lihat Pemberitahuan penghentian.

Nilai default: vpc.

vpc

InstanceChargeType

string

No

Metode penagihan Instans ECS. Untuk detail, lihat Ikhtisar penagihan. Nilai valid:

  • PrePaid: langganan.

  • PostPaid: bayar sesuai pemakaian.

Nilai default: PostPaid.

PostPaid

SpotStrategy

string

No

Kebijakan penawaran untuk spot instans. Nilai valid:

  • NoSpot: instans bayar sesuai pemakaian.

  • SpotWithPriceLimit: spot instans dengan harga maksimum per jam.

  • SpotAsPriceGo: spot instans yang penawarannya dilakukan secara otomatis oleh sistem hingga harga bayar sesuai pemakaian.

Catatan

Saat menggunakan SpotStrategy, atur InstanceChargerType ke PostPaid.

Nilai default: NoSpot.

NoSpot

IoOptimized

string

No

Apakah instans dioptimalkan I/O. Jika tipe instans hanya mendukung instans yang tidak dioptimalkan I/O, Anda tidak dapat mengatur parameter IoOptimized. Nilai valid:

  • optimized: dioptimalkan I/O.

  • none: tidak dioptimalkan I/O.

Nilai default: optimized.

Jika Anda menentukan tipe instans yang telah pensiun, nilai default adalah none.

optimized

PriorityStrategy

string

No

Strategi rekomendasi berbasis prioritas. Nilai valid:

  • InventoryFirst: inventaris terlebih dahulu.

  • PriceFirst: harga terlebih dahulu. Tipe instans diurutkan berdasarkan harga satuan vCPU per jam dalam urutan menaik.

  • NewProductFirst: produk terbaru terlebih dahulu.

Nilai default: InventoryFirst.

PriceFirst

MaxPrice

number

No

Harga maksimum per jam yang dapat diterima untuk instans bayar sesuai pemakaian atau spot instans.

Catatan

Untuk mengatur harga maksimum per jam untuk spot instans, atur SpotStrategy ke SpotWithPriceLimit.

10.0

RegionId

string

Yes

ID wilayah. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru.

cn-hangzhou

ZoneId

string

No

ID zona. Anda dapat memanggil DescribeZones untuk mengkueri daftar zona terbaru.

Atur ZoneMatchMode ke Include (nilai default) untuk merekomendasikan secara prioritas tipe instans di zona yang ditentukan oleh ZoneId dan juga mencantumkan tipe instans di zona lain dalam wilayah yang sama.

cn-hangzhou-f

SystemDiskCategory

string

No

Kategori disk sistem. Nilai valid:

  • cloud_efficiency: disk ultra.

  • cloud_ssd: SSD standar.

  • cloud_essd: SSD Perusahaan (ESSD).

  • cloud: disk dasar.

Nilai default untuk instans yang tidak dioptimalkan I/O: cloud.

Nilai default untuk instans yang dioptimalkan I/O: cloud_efficiency.

cloud_ssd

ZoneMatchMode

string

No

Apakah akan merekomendasikan hanya tipe instans di zona yang ditentukan oleh ZoneId. Nilai valid:

  • Ketat: hanya merekomendasikan tipe instans di zona yang ditentukan oleh ZoneId.

  • Include: merekomendasikan tipe instans di zona lain dalam wilayah yang sama.

Saat ZoneId ditentukan, nilai default parameter ini adalah Ketat, yang menunjukkan bahwa hanya tipe instans di zona yang ditentukan oleh ZoneId yang direkomendasikan.

Strict

Scene

string

No

Skenario tempat tipe instans direkomendasikan. Nilai valid:

  • UPGRADE: Meningkatkan atau menurunkan spesifikasi tipe instans.

  • CREATE: membuat instans.

Nilai default: CREATE.

CREATE

InstanceTypeFamily

array

No

Pengaturan untuk kumpulan keluarga instans alternatif tempat tipe instans alternatif dipilih. Anda dapat menentukan hingga 10 keluarga instans.

ecs.hfg6

string

No

Keluarga instans. Untuk nilai valid tipe instans, lihat Keluarga instans. Anda juga dapat memanggil DescribeInstanceTypeFamilys untuk mengkueri daftar keluarga instans.

ecs.hfg6

Elemen respons

Element

Type

Description

Example

object

RequestId

string

ID permintaan.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Data

object

RecommendInstanceType

array<object>

Tipe instans yang direkomendasikan.

array<object>

CommodityCode

string

Kode komoditas tipe instans.

ecs

ZoneId

string

ID zona tipe instans.

cn-hangzhou-h

Priority

integer

Prioritas untuk pengurutan.

2

NetworkType

string

Jenis jaringan Instans ECS.

vpc

Scene

string

Skenario tempat tipe instans direkomendasikan.

CREATE

SpotStrategy

string

Kebijakan penawaran untuk spot instans.

NoSpot

RegionId

string

ID wilayah tipe instans.

cn-hangzhou

InstanceChargeType

string

Metode penagihan instans.

PostPaid

Zones

object

zone

array<object>

Zona tipe instans.

array<object>

ZoneNo

string

ID zona tipe instans.

cn-hangzhou-h

NetworkTypes

object

NetworkType

array

Jenis jaringan tipe instans.

string

Jenis jaringan tipe instans.

vpc

InstanceType

object

Nama tipe instans.

SupportIoOptimized

string

Apakah tipe instans mendukung optimasi I/O.

optimized

Cores

integer

Jumlah vCPU tipe instans.

1

Memory

integer

Ukuran memori tipe instans. Unit: MB.

8192

InstanceType

string

Nama tipe instans.

ecs.hfg6.large

InstanceTypeFamily

string

Keluarga instans.

ecs.hfg6

Generation

string

Generasi keluarga instans.

ecs-4

Contoh

Respons sukses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "Data": {
    "RecommendInstanceType": [
      {
        "CommodityCode": "ecs",
        "ZoneId": "cn-hangzhou-h",
        "Priority": 2,
        "NetworkType": "vpc",
        "Scene": "CREATE",
        "SpotStrategy": "NoSpot",
        "RegionId": "cn-hangzhou",
        "InstanceChargeType": "PostPaid",
        "Zones": {
          "zone": [
            {
              "ZoneNo": "cn-hangzhou-h",
              "NetworkTypes": {
                "NetworkType": [
                  "vpc"
                ]
              }
            }
          ]
        },
        "InstanceType": {
          "SupportIoOptimized": "optimized",
          "Cores": 1,
          "Memory": 8192,
          "InstanceType": "ecs.hfg6.large",
          "InstanceTypeFamily": "ecs.hfg6",
          "Generation": "ecs-4"
        }
      }
    ]
  }
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 RecommendEmpty.InstanceTypeNotAuthorized The recommend instanceTypes are not authorized.
400 RecommendEmpty.InstanceTypeSoldOut The recommend instanceTypes are out of usage.
400 RecommendEmpty.DiskCategoryNotRecommended The specified disk category is not available for recommended.
400 InvalidNetworkType.ValueNotSupported The specified parameter NetworkType is not valid.
400 InvalidSpotStrategy.ValueNotSupported The specified parameter SpotStrategy is not valid.
400 InvalidInstanceChargeType.NotFound The specified parameter InstanceChargeType is not valid.
400 InvalidPriorityStrategy.ValueNotSupported The specified parameter PriorityStrategy is not supported.
400 InvalidParam.TypeAndCpuMem.Conflict The specified parameters InstanceType and Cores,Memory should not be blank at the same time.
400 InvalidIoOptimized.NotFound The specified parameter IoOptimized is not valid.
400 InvalidRegionId.MalFormed The specified parameter RegionId is not valid.
400 InvalidDiskCategory.NotFound The specified parameter SystemDiskCategory is not supported.
400 InvalidInstanceTypeFamily.NotFound The specified InstanceTypeFamily is not valid.
400 InvalidMaxPrice.NotSupported The specified MaxPrice is not valid.
400 InvalidZoneId.MalFormed The specified ZoneId is not valid when Cores and Memory is not null.
400 InvalidInstanceType.NotSupported The specified InstanceType is not valid.
400 InvalidZoneId.ValueNotSupported The specified ZoneId is not valid.
400 InvalidCoreAndMemory.ValueNotSupported The specified Cores/Memory does not match instance type.
400 QuotaExceed.AfterpayInstance Living afterpay instances quota exceeded.
400 RecommendEmpty.PerformanceNotSatisfied The performance of recommend instanceType is not satisfied.
400 RecommendEmpty.PriceNotSatisfied The current price of recommend instanceTypes above user max price.
400 RecommendEmpty.QuotaNotSatisfied The quota of recommend instanceTypes are out of usage.
400 RecommendEmpty.IzNotMatched The iz of recommend instanceTypes are not match.
400 RecommendEmpty.InstanceTypeNotMatched The recommend instanceTypes are not match.
400 InvalidScene.ValueNotSupported The specified Scene is invalid.
400 RecommendEmpty.InstanceTypeFamilyNotMatched The recommend instanceTypeFamily are not match.
400 RecommendEmpty.GenerationNotMatch The recommend instanceType generation are not match.
400 RecommendEmpty.NetworkTypeNotSupported The recommend instanceType networkType are not match.
400 InvalidInstanceFamilyLevel.NotSupported The specified InstanceFamilyLevel is not valid.
404 InvalidRegionId.NotFound The RegionId provided does not exist in our records.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.