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:
|
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 ApsaraMQ for RabbitMQ instances:
|
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:
|
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.