Modifies the attributes of the private pool for an Elastic Compute Service (ECS) instance.


A private pool is generated after an elasticity assurance or a capacity reservation is created. The private pool is associated with information about instances that are created by using the private pool. You can configure whether to use a private pool when you create an ECS instance, so that the instance can match the elasticity assurance or capacity reservation.

  • After you call this operation to modify the attributes of the private pool for an instance, you do not need to restart the instance.
  • When you call the following operations, the system rematches the instance with private pools. If the instance already matches a specified private pool, the call to an operation may fail because the private pool capacity is used up or because the private pool is invalid. If the call fails, call the ModifyInstanceAttachmentAttributes operation to change the match mode of the private pool to Open.
    • StartInstance: Call this operation to restart a stopped instance in economical mode.
    • ReActivateInstances
    • ModifyInstanceChargeType
    • ModifyPrepayInstanceSpec
    • ReplaceSystemDisk


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyInstanceAttachmentAttributes

The operation that you want to perform. Set the value to ModifyInstanceAttachmentAttributes.

RegionId String Yes cn-hangzhou

The region ID of the private pool. You can call the DescribeRegions operation to query the most recent region list.

InstanceId String Yes i-bp67acfmxazb4****

The ID of the instance for which you want to modify the attributes of the private pool.

PrivatePoolOptions.MatchCriteria String Yes Open

The match mode of the private pool. Valid values:

  • Open: open private pool. The system matches the instance with open private pools.
  • Target: specified private pool. You must use PrivatePoolOptions.Id to specify the ID of a private pool.
  • None: no private pool. The instance starts normally without using private pools.
PrivatePoolOptions.Id String No eap-bp67acfmxazb4****

The ID of the private pool. Set the value to the ID of the elasticity assurance or capacity reservation that generates the private pool.

  • This parameter is required when PrivatePoolOptions.MatchCriteria is set to Target.
  • This parameter must be empty when PrivatePoolOptions.MatchCriteria is set to Open or None.

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.


Sample requests
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "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 error message returned because the required RegionId parameter is not specified.
500 InternalError The request processing has failed due to some unknown error, exception or failure. The error message returned because an internal error has occurred. Try again later. If the error persists, submit a ticket.

For a list of error codes, visit the API Error Center.