All Products
Search
Document Center

Elastic Compute Service:ModifyInstanceSpec

Last Updated:Jun 26, 2026

Mengubah tipe instans atau bandwidth publik Instans ECS pay-as-you-go.

Deskripsi operasi

Sebelum menggunakan operasi ini, pastikan Anda sepenuhnya memahami metode penagihan dan Produk ECS...

.

Sebelum menggunakan operasi ini, pastikan Anda sepenuhnya memahami metode penagihan dan harga ECS...

Sebelum mengubah tipe instans instans pay-as-you-go, Anda dapat memanggil DescribeResourcesModification untuk mengkueri tipe instans yang dapat digunakan untuk mengubah instans saat ini.

Sebelum memulai.

  • Akun Anda tidak boleh memiliki pembayaran tertunggak.

  • Setiap panggilan hanya dapat mengubah satu konfigurasi dalam satu waktu. Anda hanya dapat mengubah tipe instans atau menyesuaikan bandwidth publik dalam satu permintaan.

  • Status instans harus Running (Running) atau Stopped (Stopped) sebelum Anda dapat menyesuaikan bandwidth publik. Perubahan akan langsung berlaku.

  • Status instans harus Stopped (Stopped) sebelum Anda dapat mengubah tipe instans. Setelah modifikasi, Anda harus memulai instans agar perubahan berlaku.

Catatan

Dalam satu wilayah, total bandwidth publik puncak pay-by-bandwidth untuk satu akun Alibaba Cloud dibatasi. Untuk informasi lebih lanjut, lihat Batas bandwidth publik.

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

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

ecs:ModifyInstanceSpec

update

*Instance

acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}

  • ecs:AssociatePublicIpAddress
None

Parameter permintaan

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

ID instans

i-bp67acfmxazb4p****

InstanceType

string

No

Tipe instans target. Untuk informasi lebih lanjut, lihat Keluarga instans. Anda juga dapat memanggil DescribeInstanceTypes untuk mengkueri daftar tipe instans terbaru.

ecs.g6.large

InternetMaxBandwidthOut

integer

No

Bandwidth publik arah keluar maksimum. Unit: Mbit/s. Nilai valid: 0 hingga 100.

Catatan

Dalam mode pay-by-Trafik, bandwidth puncak arah masuk dan arah keluar merupakan batas atas dan tidak dijamin. Ketika terjadi konflik sumber daya, bandwidth puncak dapat dibatasi. Jika workload Anda memerlukan bandwidth yang dijamin, gunakan mode pay-by-bandwidth.

10

InternetMaxBandwidthIn

integer

No

Bandwidth publik arah masuk maksimum. Unit: Mbit/s. Nilai valid:

  • Jika bandwidth publik arah keluar yang dibeli kurang dari atau sama dengan 10 Mbit/s: 1 hingga 10. Nilai default: 10.

  • Jika bandwidth publik arah keluar yang dibeli lebih besar dari 10 Mbit/s: 1 hingga nilai InternetMaxBandwidthOut. Nilai default: nilai InternetMaxBandwidthOut.

Catatan

Dalam mode pay-by-Trafik, bandwidth puncak arah masuk dan arah keluar merupakan batas atas dan tidak dijamin. Ketika terjadi konflik sumber daya, bandwidth puncak dapat dibatasi. Jika workload Anda memerlukan bandwidth yang dijamin, gunakan mode pay-by-bandwidth.

10

Temporary.StartTime

string

No

Catatan

Parameter ini berada dalam pratinjau undangan dan tidak tersedia secara publik.

null

Temporary.EndTime

string

No

Catatan

Parameter ini berada dalam pratinjau undangan dan tidak tersedia secara publik.

null

Temporary.InternetMaxBandwidthOut

integer

No

Catatan

Parameter ini berada dalam pratinjau undangan dan tidak tersedia secara publik.

null

Async

boolean

No

Apakah akan mengirimkan permintaan asinkron. Nilai valid:

  • true: Permintaan dikirimkan secara asinkron.

  • false: Permintaan tidak dikirimkan secara asinkron.

Nilai default: false.

false

AllowMigrateAcrossZone

boolean

No

Apakah akan mendukung peningkatan tipe instans lintas kluster.

  • true: didukung.

  • false: tidak didukung.

Nilai default: false.

Jika Anda mengatur parameter AllowMigrateAcrossZone ke true dan meningkatkan spesifikasi Instans Elastic Compute Service berdasarkan tanggapan, perhatikan hal berikut:

Instans jenis jaringan klasik:

  • Untuk tipe instans yang telah dihentikan, ketika instans non-I/O optimized diubah menjadi instans I/O optimized, alamat IP privat, nama perangkat disk, dan kode otorisasi perangkat lunak instans akan berubah. Untuk instans Linux, disk dasar (cloud) diidentifikasi sebagai xvda atau xvdb, dan disk ultra (cloud_efficiency) serta SSD standar (cloud_ssd) diidentifikasi sebagai vda atau vdb.

  • Untuk keluarga instans yang tersedia untuk dibeli, alamat IP privat instans akan berubah.

Instans jenis VPC: Untuk tipe instans yang telah dihentikan, ketika instans non-I/O optimized diubah menjadi instans I/O optimized, nama perangkat disk dan kode otorisasi perangkat lunak instans akan berubah. Untuk instans Linux, disk dasar (cloud) diidentifikasi sebagai xvda atau xvdb, dan disk ultra (cloud_efficiency) serta SSD standar (cloud_ssd) diidentifikasi sebagai vda atau vdb.

false

SystemDisk.Category

string

No

Kategori disk sistem baru. Nilai valid:

  • cloud_efficiency: disk ultra

  • cloud_ssd: SSD standar

Catatan

Parameter ini hanya valid ketika Anda melakukan Peningkatan dari tipe instans yang telah dihentikan ke keluarga instans yang tersedia untuk dibeli dan mengubah instans non-I/O optimized menjadi instans I/O optimized.

cloud_ssd

ClientToken

string

No

Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan token, tetapi pastikan token tersebut unik di antara permintaan yang berbeda. Nilai ClientToken hanya dapat berisi karakter ASCII dan tidak boleh melebihi 64 karakter. Untuk informasi lebih lanjut, lihat Cara memastikan idempotensi.

0c593ea1-3bea-11e9-b96b-88e9fe637760

ModifyMode

string

No

Catatan

Parameter ini tidak tersedia secara publik.

null

Disk

array<object>

No

Catatan

Parameter ini tidak tersedia secara publik.

object

No

Catatan

Parameter ini tidak tersedia secara publik.

DiskId

string

No

Catatan

Parameter ini tidak tersedia secara publik.

null

Category

string

No

Catatan

Parameter ini tidak tersedia secara publik.

null

PerformanceLevel

string

No

Catatan

Parameter ini tidak tersedia secara publik.

null

DryRun

boolean

No

Apakah akan menjalankan dry run saja. Nilai valid:

  • true: Hanya menjalankan dry run. Tipe instans dan bandwidth publik tidak diubah. Sistem memeriksa apakah parameter wajib telah ditentukan, apakah format permintaan valid, apakah batasan bisnis terpenuhi, dan apakah Sumber daya ECS mencukupi. Jika pemeriksaan gagal, error yang sesuai akan dikembalikan. Jika pemeriksaan berhasil, kode kesalahan DryRunOperation akan dikembalikan.

  • false (default): Menjalankan dry run dan mengirimkan permintaan. Jika pemeriksaan berhasil, tipe instans dan bandwidth publik akan diubah.

false

Elemen respons

Element

Type

Description

Example

object

RequestId

string

ID permintaan.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Contoh

Respons sukses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidInternetChargeType.ValueNotSupported The specified InternetChargeType is not valid.
400 InvalidInstanceType.ValueUnauthorized The specified InstanceType does not exist or beyond the permitted range.
400 InvalidInstanceType.ValueNotSupported The specified InstanceType does not exist or beyond the permitted range.
400 InvalidParameter The specified parameter "InternetMaxBandwidthOut" is not valid.
400 InvalidParameter.Mismatch Too many parameters in one request.
400 BandwidthUpgradeDenied.EipBoundInstance The specified VPC instance has bound EIP, temporary bandwidth upgrade is denied.
400 InvalidTemporary.StartTime The specifed Temporary.StartTime is not valid.
400 InvalidTemporary.EndTime The specifed Temporary.EndTime is not valid.
400 Downgrade.NotSupported Downgrade operation is not supported.
400 DependencyViolation.InstanceType The current InstanceType cannot be changed to the specified InstanceType.
400 Account.Arrearage Your account has an outstanding payment.
400 InvalidParameter.Bandwidth The specified parameter Bandwidth is not valid.
400 InvalidParameter.Conflict The specified image does not support the specified instance type.
400 InvalidParameter.AllowMigrateAcrossZone The specified parameter CanMigrateAcrossZone is not valid.
400 InvalidParam.SystemDiskCategory The specified param SystemDisk.Category is not valid.
400 Throttling Request was denied due to request throttling, please try again after 5 minutes.
400 InvalidInstanceStatus.NotStopped The specified Instance status is not stopped.
400 InvalidAction Specified action is not valid.
400 IdempotenceParamNotMatch There is a idempotence signature mismatch between this and last request.
400 InvalidClientToken.ValueNotSupported The ClientToken provided is invalid.
400 Price.PricePlanResultNotFound The internetMaxBandwidthIn or internetMaxBandwidthOut provided is invalid.
400 InvalidAction.NotSupport The ecs on dedicatedHost not support modify instanceType.
400 InvalidMarketImageStatus.NotSupported The status of specified market image does not support this operation.
400 InvalidOperation.VpcHasEnabledAdvancedNetworkFeature The specified vpc has enabled advanced network feature.
400 Invalid.PrivatePoolOptions.MatchCriteria Target mode does not support this operation.
400 InstanceTypeNotSupported.TooManyDisksAttached %s
400 InvalidDiskCategory.NotSupported The upgrade operation of instance does not support this category of disk.
400 InvalidParameter.CloudboxNotSupported %s
400 QuotaExceed.DiskCapacity The used capacity of disk type has exceeded the quota in the zone, %s.
400 InvalidParam.Async The specified parameter async is not valid.
400 MissingParameter.DiskCategory The specified parameter Disk.Category can not be null when Disk.DiskId is specified.
400 InvalidParameter.DiskCategory The specified parameter Disk.Category is not valid.
400 InvalidPerformanceLevel.Malformed The specified parameter Disk.n.PerformanceLevel is not valid.
400 NoPermission.Price The operation requires price permission. Please either apply for permission from your main account, or set the parameter AutoPay as true.
400 InvalidParameter.DedicatedRegionNotSupported The specified action is rejected because the specified ECS instance in the dedicated region does not support public IP.
400 InvalidOperation.OnlineModificationUnsupported Online modification of instance type is not supported for the specified instance due to its CPU topology.
400 QuotaExceeded.InternetBandwidth %s.
400 InvalidOperation.InstanceTypeNotSupportRss The ECS instance type does not support Rss.
400 InvalidInstanceType.NotSupportCpuOptionsNestedVirtualization The specified instance type does not support CpuOptions.NestedVirtualization: %s.
401 InvalidInstanceType.ValueUnauthorized The specified InstanceType is not authorized.
500 InternalError The request processing has failed due to some unknown error, exception or failure.
403 CategoryViolation The specified instance does not support this operation because of its disk category.
403 InvalidStatus.ValueNotSupported The current status of the resource does not support this operation.
403 InstanceLockedForSecurity The specified operation is denied as your instance is locked for security reasons.
403 InvalidAccountStatus.NotEnoughBalance Your account does not have enough balance.
403 ChargeTypeViolation The operation is not permitted due to charge type of the instance.
403 OperationDenied The specified instance is out of usage.
403 LastTokenProcessing The last token request is processing.
403 InvalidInstance.UnpaidOrder The specified instance has unpaid order.
403 InstanceSpecModification.NotEffective The specified instance has been reserved for making a spec modification and not taken effective in the current contract period.
403 InvalidInstanceType.ValueNotSupported The specified zone does not offer the specified instancetype.
403 ImageNotSupportInstanceType The specified image do not support the InstanceType instance.
403 InstanceType.Offline The specified InstanceType has been offline.
403 InvalidParameter.NotMatch %s
403 InvalidInstance.EipNotSupport The specified instance with eip is not supported, please unassociate eip first.
403 InvalidInstance.NatPortMapNotSupport The special instance with nat port map not support operate, please remove nat port map first.
403 InvalidOperation.StarterPackage StarterPackage not support modification.
403 OperationDenied.NoStock The resource is out of usage.
403 OperationDenied.UnpaidOrder The specified instance has unpaid order.
403 InvalidOperation.EipNotSupport The special instance with eip not support operate, please unassociate eip first.
403 InvalidParameter.InternetMaxBandwidthOut The specified parameter InternetMaxBandwidthOut is invalid.
403 InvalidOperation.EniCountExceeded %s
403 InvalidOperation.Ipv4CountExceeded %s
403 InvalidOperation.Ipv6CountExceeded %s
403 InvalidOperation.Ipv6NotSupport %s
403 InvalidOperation.Ipv4NotSupport %s
403 InvalidOperation.InstanceWithEipNotSupport The special instance with eip not support operate, please unassociate eip first.
403 SecurityRisk.3DVerification We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email.
403 InvalidInstance.NotFoundSystemDisk The specified instance has no system disk.
403 InvalidInstanceType.NotSupportDiskCategory The instanceType of the specified instance does not support this disk category.
403 QuotaExceed.ElasticQuota No additional quota is available for the specified ECS instance type.
403 InvalidResourceType.NotSupported %s
403 InvalidOperation.NotAllowed The specified vpc %s has enabled senior network feature.
403 InvalidOperation.InstanceTypeNotSupportEniTrunking %s
403 InvalidOperation.MaxEniQueueNumberExceeded %s
403 InvalidOperation.ExceedInstanceTypeQueueNumber %s
403 InvalidParameter.InvalidEniQueueNumber %s
403 HibernationConfigured.InstanceOperationForbidden The operation is not permitted due to limit of the hibernation configured instance.
403 InvalidOperation.InstanceTypeNotSupportHighPerformanceTrafficMode %s
403 InvalidOperation.EniQueuePairNumberOverflow %s
403 InvalidOperation.HighPerformanceEniPerInstanceLimitExceeded %s
403 InvalidOperation.MaxEniQueuePairNumberExceed %s
403 InvalidOperation.MaxModifyOnlineNumberExceeded The specified instance has reached the maximum number of modify online attempts and needs to be rebooted.
403 InvalidOperation.RebootingRequired The specified instance needs to be rebooted.
403 InvalidOperation.OSTypeNotSupported The specified OS type is not supported.
403 InvalidSystemDiskCategory.ValueNotSupported The specified parameter SystemDisk.Category is not valid.
403 InvalidDataDiskCategory.ValueNotSupported The specified Category of Data Disk is not valid.
403 InvalidDiskCategory.NotSupported The upgrade operation of instance does not support this category of disk.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist.
404 MissingTemporary.StartTime Temporary.StartTime is not specified.
404 MissingTemporary.EndTime Temporary.EndTime is not specified.
404 InvalidInstanceChargeType.NotFound The InstanceChargeType does not exist in our records.
503 LimitedOperation.ServiceUnavailable The service is currently unavailable. Please try again later.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.