Changes the type of an ApsaraDB for Redis instance.
- For more information about instance types, see Instance types.
- For more information about how to perform the corresponding operation in the console, see Change specifications.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyInstanceSpec |
The operation that you want to perform. Set the value to ModifyInstanceSpec. |
InstanceId | String | Yes | r-bp1zxszhcgatnx**** |
The ID of the instance. |
RegionId | String | No | cn-hangzhou |
The ID of the region where the instance is deployed. |
InstanceClass | String | No | redis.master.small.default |
The instance type after the specifications change. For more information about the values of the InstanceClass parameter for different instance types, see Instance types. Note To downgrade a subscription instance, you must set the OrderType parameter to DOWNGRADE.
|
BusinessInfo | String | No | 000000000 |
The ID of the promotion or the business information. |
CouponNo | String | No | youhuiquan_promotion_option_id_for_blank |
The coupon code. Default value: |
ForceUpgrade | Boolean | No | true |
Specifies whether to forcibly change the type. Valid values:
Note Default value: true.
|
EffectiveTime | String | No | Immediately |
Specifies when the type is changed. Valid values:
Default value: Immediately. |
AutoPay | Boolean | No | true |
Specifies whether to enable automatic renewal. Valid values:
Note Default value: true.
|
OrderType | String | No | DOWNGRADE |
Specifies a change type when you change the configuration of a subscription instance. Valid values:
Note
|
MajorVersion | String | No | 5.0 |
When you change the configuration, you can upgrade the major version of an instance by setting this parameter to and the major version to which you want to upgrade. Valid values: 4.0 and 5.0. |
ClientToken | String | No | ETnLKlblzczshOTUbOCz**** |
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 make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
OrderId | String | 20722623431**** |
The ID of the order. |
RequestId | String | 0DA1D7EF-C80D-432C-8758-7D225182626B |
The ID of the request. |
Examples
Sample requests
https://r-kvstore.aliyuncs.com/?Action=ModifyInstanceSpec
&InstanceId=r-bp1zxszhcgatnx****
&InstanceClass=redis.master.small.default
&<Common request parameters>
Sample success responses
XML
format
<ModifyInstanceSpecResponse>
<RequestId>A4828C10-AF0A-4CD7-8FBE-737C6CC1193E</RequestId>
<OrderId>20722623431****</OrderId>
</ModifyInstanceSpecResponse>
JSON
format
{
"RequestId": "A4828C10-AF0A-4CD7-8FBE-737C6CC1193E",
"OrderId": "20722623431****"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | PaymentMethodNotFound | No payment method has been registered on the account. | The error message returned because no payment method has been registered for your account. |
400 | HasRenewChangeOrder | This instance has a renewChange order. | The error message returned because an order of renewal with specifications change already exists. |
For a list of error codes, visit the API Error Center.