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 modifications. 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 parameters 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 modifications 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 that ranges from 50 to 6000.
  • The storage capacity can be changed only for 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 integer 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.
  • To enable or disable the message trace feature, set the Parameter.N.Code parameter to SupportTracing and set the corresponding Parameter.N.Value parameter to one of the following values:
    • tracing_true: specifies that the message trace feature is enabled.
    • tracing_false: specifies that the message trace feature is disabled.
    Notice
    • The message trace feature is provided for Platinum Edition instances for 15 days free of charge. In this case, you can set the parameter only to tracing_true and set the retention period of message traces only to 15 days.
    • For instances of other specifications, you can set the parameter to tracing_true or tracing_false. When the message trace feature is disabled, you can set the retention period of message traces only to 0.
    For information about the combinations of values of the InstanceType, SupportTracing, and TracingStorageTime parameters, see the following section: Table 1.
  • To change the retention period of the message trace feature, set the Parameter.N.Code parameter to TracingStorageTime and set the corresponding Parameter.N.Value parameter to 0, 3, 7, or 15. Unit: days.
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 the value 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 modify 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.

Table 1. Limits on values of parameters related to the message trace feature
Value of the InstanceType parameter Value of the SupportTracing parameter Value of the TracingStorageTime parameter
  • professional
  • enterprise
tracing_false 0
  • professional
  • enterprise
tracing_true
  • 3
  • 7
  • 15
vip tracing_true 15

Response parameters

Parameter Type Example Description
Code String Success

The status code.

Data Struct

The returned data.

HostId String cn

The ID of the host.

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 was 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.