Tüm Ürünler
Search
Belge Merkezi

:ModifyInstanceAttachmentAttributes

Son Güncelleme:Oct 02, 2026

Bir Elastic Compute Service (ECS) örneği için özel havuzun türünü değiştirir.

Operation description

Esneklik güvencesi veya kapasite rezervasyonu oluşturulduktan sonra bir özel havuz oluşturulur. Özel havuz, özel havuzu kullanan örneklerle ilgili bilgilerle ilişkilendirilir. Örneği ilişkili esneklik güvencesi veya kapasite rezervasyonuyla eşleştirmek üzere bir ECS örneği oluştururken özel havuz kullanılıp kullanılmayacağını belirtebilirsiniz.

  • Bir ECS örneğinin özel havuz özniteliklerini değiştirmek için bu işlemi çağırdıktan sonra, değişikliklerin etkili olması için örneği yeniden başlatmanız gerekmez.

  • Bir ECS örneği üzerinde aşağıdaki işlemleri çağırdığınızda, sistem örneği etkin özel havuzlarla eşleştirmeye çalışır. Örnek zaten belirli bir özel havuzla eşleştirilmişse, özel havuz kapasitesi tükendiğinde veya özel havuzun süresi dolduğunda işlem çağrısı başarısız olabilir. Çağrı başarısız olursa, özel havuzun türünü Open olarak değiştirmek için ModifyInstanceAttachmentAttributes işlemini çağırın.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:ModifyInstanceAttachmentAttributes

update

*Instance

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

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

Özel havuzun bölge kimliği. En son bölge listesini sorgulamak için DescribeRegions işlemini çağırabilirsiniz.

cn-hangzhou

InstanceId

string

Yes

Özel havuzun özniteliklerini değiştirmek istediğiniz örneğin kimliği.

i-bp67acfmxazb4****

PrivatePoolOptions.MatchCriteria

string

Yes

Yeni özel havuz türü. Geçerli değerler:

  • Open: Açık özel havuz. Sistem, örneği açık bir özel havuzla eşleştirir. Eşleşen açık özel havuz yoksa, sistem örneği başlatmak için genel havuzdaki kaynakları kullanır.

  • Target: Belirtilen özel havuz. Sistem, örneği başlatmak için belirtilen bir özel havuzdaki kapasiteyi kullanır. Belirtilen özel havuz kullanılamıyorsa örnek başlatılamaz. Bir özel havuzun kimliğini belirtmek için PrivatePoolOptions.Id değerini kullanmanız gerekir.

  • None: Özel havuz yok. Örneği başlatmak için özel havuzlardaki kapasite kullanılmaz.

Open

PrivatePoolOptions.Id

string

No

Özel havuzun kimliği. Değeri, özel havuzu oluşturan esneklik güvencesinin veya kapasite rezervasyonunun kimliği olarak ayarlayın.

  • PrivatePoolOptions.MatchCriteria değeri Target olarak ayarlandığında bu parametre gereklidir.

  • PrivatePoolOptions.MatchCriteria değeri Open veya None olarak ayarlandığında bu parametre boş olmalıdır.

eap-bp67acfmxazb4****

Response elements

Element

Type

Description

Example

object

RequestId

string

İsteğin kimliği.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParameter.RegionId The specified RegionId should not be null. The RegionId parameter is required.
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. The private pool does not support dedicated hosts.
400 SpotNotSupported Spot is not supported for PrivatePool. The private pool does not support spot instances.
400 ClassicNetworkNotSupported Classic network is not supported for PrivatePool. The private pool does not support instances in the classic network.
400 Invalid.InstanceId Instance does not exist. The specified instance does not exist.
400 Invalid.PrivatePoolOptions.MatchCriteria Target mode does not support this operation. The operation is not supported while the PrivatePoolOptions.MatchCriteria parameter is set to Target.
400 MissingParameter.PrivatePoolOptions.Id The specified PrivatePoolOptions.Id should not be null. The PrivatePoolOptions.Id parameter is required.
400 Invalid.PrivatePoolOptions.Id The PrivatePool does not exist. The private pool does not exist.
400 Invalid.InstanceType The InstanceType does not match the PrivatePool. The instance type and the private pool do not match.
400 Invalid.InstanceChargeType The InstanceChargeType does not match the PrivatePool. The instance billing method and the private pool do not match.
400 Invalid.ZoneId The ZoneId does not match the PrivatePool. The zone and the private pool do not match.
400 Invalid.PrivatePoolOptions.NoStock The PrivatePool has been used up. The capacity of the specified private pool (elastic assurance, capacity reservation) has been used up.
400 InvalidPlatform.ValueNotSupported The Platform does not match the PrivatePool. The specified Platform parameter does not match the private pool.
400 Invalid.PrivatePoolOptions.status The PrivatePool is expired or inactive. The private pool has expired or is not activated.
400 InvalidAliUid The PrivatePool does not belong to the user of the Instance. The specified private pool does not belong to the user who attempted to create the instance.
400 MissingParameter.PackageType The specified parameter "PackageType" can not be empty. The required parameter PackageType cannot be empty.
400 MissingParameter.PrivatePoolOptions.Ids The specified parameter "PrivatePoolOptions.Ids" can not be empty. Specifies that the parameter "PrivatePoolOptions.ids" cannot be empty.
400 MissingParameter.InstanceCpuCoreCount The specified parameter "InstanceCpuCoreCount" can not be empty. The specified parameter 'InstanceCpuCocount' cannot be empty.
400 MissingParameter.InstanceAmount The specified parameter "InstanceAmount" can not be empty. The specified parameter InstanceAmount cannot be empty.
400 MissingParameter.InstanceCpuCoreCountOrInstanceAmount The specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time. The specified parameter InstanceCpuCoreCount and InstanceAmount cannot be both empty.
400 Invalid.TooManyPrivatePoolOptions.Ids Too many PrivatePoolOptions.Ids in this request. The number of specified private pool IDs exceeds the upper limit.
400 Invalid.TooManyZoneIds Too many ZoneIds in the request. The number of specified zone IDs exceeds the upper limit.
400 Invalid.TooManyInstanceTypes Too many InstanceTypes in the request. The number of specified instance types exceeds the upper limit.
400 Invalid.TooManyUnpaidPrivatePool Too many PrivatePools create but still unpaid. Multiple private pools are created but not paid.
400 Invalid.InstanceCpuCoreCountOrInstanceAmount Both InstanceCpuCoreCount and InstanceAmount are provided. The InstanceCpuCoreCount and InstanceAmount parameters cannot be both specified.
400 Invalid.PrivatePoolOptions.Ids The specified parameter "PrivatePoolOptions.Ids" exist invalid element Id. The specified private pool ID does not exist.
400 Invalid.PackageType The specified parameter "PackageType" is invalid. The specified parameter PackageType is invalid.
400 Invalid.PrivatePool.Purchase The PrivatePool has already paid. The private pool is already paid.
400 Invalid.AssuranceTimes.NotSupported The value of AssuranceTimes is not supported. The specified AssuranceTimes parameter is invalid.
400 RepeatStartPrivatePool PrivatePool has already been started. The private pool is already started.
500 InternalError The request processing has failed due to some unknown error, exception or failure. An internal error has occurred. Try again later.
500 InvalidRegionId.NotFound The specified RegionId does not exist.
403 InvalidOperation.PrePaidInstanceUnsupported Not support to modify the private pool options of prepay instances.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.