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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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: youhuiquan_promotion_option_id_for_blank.

ForceUpgrade Boolean No true

Specifies whether to forcibly change the type. Valid values:

  • false: The system does not forcibly change the type.
  • true: The system forcibly changes the type.
Note Default value: true.
EffectiveTime String No Immediately

Specifies when the type is changed. Valid values:

  • Immediately: immediately changes the type.
  • MaintainTime: changes the type within the maintenance window.

Default value: Immediately.

AutoPay Boolean No true

Specifies whether to enable automatic renewal. Valid values:

  • true: enables automatic renewal.
  • false: manual payment. If you set this parameter to false, you must manually renew the instance before the instance expires. For more information, see Manual renewal.
Note Default value: true.
OrderType String No DOWNGRADE

Specifies a change type when you change the configuration of a subscription instance. Valid values:

  • UPGRADE: upgrades the configuration of a subscription instance. This is the default value.
  • DOWNGRADE: downgrades the configuration of a subscription instance.
Note
  • If you change the configuration of a pay-as-you-go instance, this parameter is not required.
  • To downgrade a subscription instance, you must set this parameter to DOWNGRADE.
  • If the price increases after specifications are changed, it is an upgrade configuration. If the price decreases, it is a downgrade configuration. For example, the price of an 8 GB read/write splitting instance with five read replicas is higher than that of a 16 GB cluster instance. If you want to change a 16 GB cluster instance to an 8 GB read/write splitting instance with five read replicas, you must upgrade the instance.
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.