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

ParameterTypeRequiredExampleDescription
ActionStringYesModifyInstance

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

ModifyTypeStringYesUpgrade

The type of configuration changes. Valid values:

  • Upgrade
  • Downgrade
Parameter.N.CodeStringYestest

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 ApsaraMQ 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 ApsaraMQ 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 ApsaraMQ 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.ValueStringYestest

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.

ProductCodeStringYesons

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

SubscriptionTypeStringYesSubscription

The billing method of the instance. Valid values:

  • Subscription: the subscription billing method
  • PayAsYouGo: the pay-as-you-go billing method
ApsaraMQ for RabbitMQ instances do not support the pay-as-you-go billing method. Set this parameter to Subscription.
ProductTypeStringYesons_onsproxy_public_intlThe type of the service. Set the value to ons_onsproxy_public_intl.
InstanceIdStringYesamqp-cn-zvp2ajsj****

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

ClientTokenStringNoJAKSJFHFAKJSF

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

ParameterTypeExampleDescription
CodeStringSuccess

The HTTP status code.

DataStruct

The returned data.

HostIdStringcn

The ID of the vhost.

OrderIdString21017220559****

The ID of the order that was created.

MessageStringSuccessful!

The prompt message.

RequestIdStringDFCE1EB7-6AE6-5AC9-BC3C-42B0EC5B****

The ID of the request.

SuccessBooleantrue

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.