Changes the configurations of an ApsaraDB for Redis instance.

Note For more information about the processes, impacts, features, and fees of this operation, see Change the configurations of an instance.

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. You can call the DescribeInstances operation to query the ID of the instance.

RegionId String No cn-hangzhou

The ID of the region where the instance is deployed. You can call the DescribeInstances operation to query the region ID of instance.

InstanceClass String No redis.master.small.default

The instance type code after the configuration change. You can call the DescribeAvailableResource operation to query the instance types available for configuration change within the zone to which the instance belongs.

Note For more information about the instance types, see Overview.
BusinessInfo String No 000000000

The ID of the promotion event 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 configurations. Default value: true. Valid values:

  • false: The system does not forcibly change the configurations.
  • true: The system forcibly changes the configurations.
EffectiveTime String No Immediately

The time when the configurations are changed. Default value: Immediately. Valid values:

  • Immediately: The configurations are changed immediately.
  • MaintainTime: The configurations are changed during the maintenance window. You can call the ModifyInstanceMaintainTime operation to change the maintenance window.
AutoPay Boolean No true

Specifies whether to enable auto-renewal. Default value: true. Valid values:

  • true: Auto-renewal is enabled.
  • false: Auto-renewal is disabled. If you set this parameter to false, the instance must be manually renewed before it expires. For more information, see Renew an instance.
OrderType String No DOWNGRADE

The change type. This parameter is required when you change the configurations of a subscription instance. Default value: UPGRADE. Valid values:

  • UPGRADE: upgrades the configurations of a subscription instance.
  • DOWNGRADE: downgrades the configurations of a subscription instance.
Note
  • To downgrade a subscription instance, you must set this parameter to DOWNGRADE.
  • If the price of an instance increases after its configurations are changed, the instance is upgraded. If the price decreases, the instance is downgraded. 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

The major version to which you want to upgrade. When you change the configurations of an instance, you can upgrade the major version of the instance by setting this parameter. 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 is specified for your account.
400 HasRenewChangeOrder This instance has a renewChange order. The error message returned because an order for renewal and configuration change already exists.

For a list of error codes, visit the API Error Center.