Modifies the configuration of a specified instance. When you call this operation, the system generates a modification order and automatically completes the payment.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyInstance

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

ModifyType String Yes Upgrade

The type of configuration changes. Valid values:

  • Upgrade
  • Downgrade
Parameter.N.Code String Yes test

The code of the Nth attribute configured for the instance. For each attribute that you want to configure, specify a unique value for N that is a positive integer or 0. If you want to configure multiple attributes for the instance, concatenate the parameter settings for the attributes.

Note Only the parameter of the attributes that you want to modify for the instance must be configured. For example, if the instance has Attribute A and Attribute B and only Attribute A must be modified, configure only the parameter of Attribute A.

This parameter must be used together with the Parameter.N.Value parameter. The following configuration changes are supported by Message Queue for RabbitMQ instances:

  • To change the maximum number of Internet-based transactions per second on the instance, set the Parameter.N.Code parameter to MaxEipTps, and set the corresponding Parameter.N.Value parameter to one of the peak TPS values on the buy page in the Message Queue for RabbitMQ console.
  • To change the maximum number of virtual private cloud (VPC)-based transactions per second on the instance, set the Parameter.N.Code parameter to MaxTps, and set the corresponding Parameter.N.Value parameter to one of the peak TPS values on the buy page in the Message Queue for RabbitMQ console.
  • To change the maximum number of queues, set the Parameter.N.Code parameter to QueueCapacity, and set the corresponding Parameter.N.Value parameter to an integer value that ranges from 50 to 6000.
  • The storage capacity can be changed only for Enterprise Platinum Edition instances. To change the message storage capacity, set the Parameter.N.Code parameter to StorageSize, and set the corresponding Parameter.N.Value parameter to an integral multiple of 100. The value of Parameter.N.Value is calculated by using the following formula: m × 100. In this formula, m is an integer that ranges from 7 to 28. Unit: GB.
Parameter.N.Value String Yes test

The value of the attribute whose code is Parameter.N.Code. For each attribute that you want to configure, specify a unique value for N that is a positive integer or 0. If you want to configure multiple attributes for the instance, concatenate the parameter settings for the attributes.

ProductCode String Yes ons

The code of the service. Set the value to ons.

SubscriptionType String Yes Subscription

The billing method of the instance. Valid values:

  • Subscription: the subscription billing method
  • PayAsYouGo: the pay-as-you-go billing method
Message Queue for RabbitMQ instances do not support the pay-as-you-go billing method. Set this parameter to Subscription.
ProductType String Yes ons_onsproxy_public_intl The type of the service. Set the value to ons_onsproxy_public_intl.
InstanceId String Yes amqp-cn-zvp2ajsj****

The ID of the instance of which you want to change the configuration.

ClientToken String No JAKSJFHFAKJSF

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests.

Response parameters

Parameter Type Example Description
Code String Success

The HTTP status code.

Data Struct

The returned data.

HostId String cn

The ID of the vhost.

OrderId String 21017220559****

The ID of the order that was created.

Message String Successful!

The prompt message.

RequestId String DFCE1EB7-6AE6-5AC9-BC3C-42B0EC5B****

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://business.aliyuncs.com/?Action=ModifyInstance
&ModifyType=Upgrade
&Parameter.0.Code=MaxTps
&Parameter.0.Value=60000
&Parameter.1.Code=MaxEipTps
&Parameter.1.Value=49408
&Parameter.2.Code=QueueCapacity
&Parameter.2.Value=60
&InstanceId=amqp-cn-i7m2a8bq****
&ProductCode=ons
&&ProductType=ons_onsproxy_public_intl
&SubscriptionType=Subscription&<Common request parameters>

Sample success responses

XML format

<ModifyInstanceResponse>
      <Message>Successful!</Message>
      <RequestId>DFCE1EB7-6AE6-5AC9-BC3C-42B0EC5B****</RequestId>
      <Data>
            <OrderId>21017220559****</OrderId>
            <HostId>cn</HostId>
      </Data>
      <Code>Success</Code>
      <Success>true</Success>      
</ModifyInstanceResponse>

JSON format

{
  "Message": "Successful!",
  "RequestId": "DFCE1EB7-6AE6-5AC9-BC3C-42B0EC5B****",
  "Data": {
    "OrderId": 21017220559****,
    "HostId": "cn"
  },
  "Code": "Success",
  "Success": true
}

Error codes

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