All Products
Search
Document Center

Elastic Compute Service:ModifyInstanceAttachmentAttributes

Last Updated:Jun 12, 2026

Mengubah mode pencocokan private pool instans.

Deskripsi operasi

Private pool dibuat setelah layanan elasticity assurance atau capacity reservation dibuat dan dikaitkan dengan informasi instans yang cocok dengan private pool tersebut. Saat membuat instans, Anda dapat menentukan apakah akan memulai instans dengan private pool. Instans tersebut kemudian dicocokkan dengan layanan elasticity assurance atau capacity reservation.

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:ModifyInstanceAttachmentAttributes

update

*Instance

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

RegionId

string

Yes

ID wilayah private pool. Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah Alibaba Cloud terbaru.

cn-hangzhou

InstanceId

string

Yes

ID instans yang atribut pencocokan private pool-nya ingin Anda ubah.

i-bp67acfmxazb4****

PrivatePoolOptions.MatchCriteria

string

Yes

Modifies the private pool matching mode of the instance. Valid values:

  • Open: open mode. In this mode, the system automatically matches an open private pool for the instance. If no private pool meets the matching criteria, the instance is started with resources from the public pool.

  • Target: specified mode. The specified private pool capacity is used to start the instance. If the specified private pool capacity is unavailable, the instance fails to start. In this mode, you must also specify the PrivatePoolOptions.Id parameter to set the ID of the specified private pool.

  • None: not used. In this mode, the instance starts normally without using a private pool.

Open

PrivatePoolOptions.Id

string

No

The ID of the private pool, which is the ID of the elasticity assurance or capacity reservation service.

  • This parameter is required when PrivatePoolOptions.MatchCriteria is set to Target.

  • Do not specify this parameter when PrivatePoolOptions.MatchCriteria is set to Open or None.

eap-bp67acfmxazb4****

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 MissingParameter.RegionId The specified RegionId should not be null.
400 MissingParameter.InstanceId The specified InstanceId should not be null.
400 InvalidResourcePackage.BizStatus The resource package business status is not supported.
400 InvalidInstanceId.MalFormed The specified InstanceId is not valid.
400 DedicatedHostNotSupported DedicatedHost is not supported for PrivatePool.
400 SpotNotSupported Spot is not supported for PrivatePool.
400 ClassicNetworkNotSupported Classic network is not supported for PrivatePool.
400 Invalid.InstanceId Instance does not exist.
400 Invalid.PrivatePoolOptions.MatchCriteria Target mode does not support this operation.
400 MissingParameter.PrivatePoolOptions.Id The specified PrivatePoolOptions.Id should not be null.
400 Invalid.PrivatePoolOptions.Id The PrivatePool does not exist.
400 Invalid.InstanceType The InstanceType does not match the PrivatePool.
400 Invalid.InstanceChargeType The InstanceChargeType does not match the PrivatePool.
400 Invalid.ZoneId The ZoneId does not match the PrivatePool.
400 Invalid.PrivatePoolOptions.NoStock The PrivatePool has been used up.
400 InvalidPlatform.ValueNotSupported The Platform does not match the PrivatePool.
400 Invalid.PrivatePoolOptions.status The PrivatePool is expired or inactive.
400 InvalidAliUid The PrivatePool does not belong to the user of the Instance.
400 MissingParameter.PackageType The specified parameter "PackageType" can not be empty.
400 MissingParameter.PrivatePoolOptions.Ids The specified parameter "PrivatePoolOptions.Ids" can not be empty.
400 MissingParameter.InstanceCpuCoreCount The specified parameter "InstanceCpuCoreCount" can not be empty.
400 MissingParameter.InstanceAmount The specified parameter "InstanceAmount" can not be empty.
400 MissingParameter.InstanceCpuCoreCountOrInstanceAmount The specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time.
400 Invalid.TooManyPrivatePoolOptions.Ids Too many PrivatePoolOptions.Ids in this request.
400 Invalid.TooManyZoneIds Too many ZoneIds in the request.
400 Invalid.TooManyInstanceTypes Too many InstanceTypes in the request.
400 Invalid.TooManyUnpaidPrivatePool Too many PrivatePools create but still unpaid.
400 Invalid.InstanceCpuCoreCountOrInstanceAmount Both InstanceCpuCoreCount and InstanceAmount are provided.
400 Invalid.PrivatePoolOptions.Ids The specified parameter "PrivatePoolOptions.Ids" exist invalid element Id.
400 Invalid.PackageType The specified parameter "PackageType" is invalid.
400 Invalid.PrivatePool.Purchase The PrivatePool has already paid.
400 Invalid.AssuranceTimes.NotSupported The value of AssuranceTimes is not supported.
400 RepeatStartPrivatePool PrivatePool has already been started.
500 InternalError The request processing has failed due to some unknown error, exception or failure.
500 InvalidRegionId.NotFound The specified RegionId does not exist.
403 InvalidOperation.PrePaidInstanceUnsupported Not support to modify the private pool options of prepay instances.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.