All Products
Search
Document Center

Tair (Redis® OSS-Compatible):ModifyInstanceSpec

Last Updated:Aug 04, 2026

Changes the specifications of an ApsaraDB for Tair (Redis® OSS-Compatible) database instance.

Operation description

Note

For information about the execution process, impacts, feature limits, and billing of specification changes, see Change instance configurations.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

kvstore:ModifyInstanceSpec

update

*DBInstance

acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID. You can call DescribeRegions to query available regions. Use this parameter to specify the region of the instance whose specifications you want to change.

cn-hangzhou

InstanceId

string

Yes

The instance ID. You can call DescribeInstances to query the instance ID.

r-bp1zxszhcgatnx****

InstanceClass

string

No

The new instance type. You can call DescribeAvailableResource to query the instance types available for specification changes in the zone where the instance resides.

Note

For more information about instance types, see Instance type navigation.

redis.master.small.default

BusinessInfo

string

No

The activity ID and business information.

000000001

CouponNo

string

No

The coupon code. Default value: youhuiquan_promotion_option_id_for_blank.

youhuiquan_promotion_option_id_for_blank

ForceUpgrade

boolean

No

Specifies whether to forcibly change the specifications. Valid values:

  • false: does not forcibly change the specifications.

  • true: forcibly changes the specifications. This is the default value.

true

EffectiveTime

string

No

The time when the specification change takes effect. Valid values:

  • Immediately: The specification change takes effect immediately. This is the default value.

  • MaintainTime: The specification change takes effect during the maintenance window of the instance. You can call ModifyInstanceMaintainTime to modify the maintenance window.

Immediately

AutoPay

boolean

No

Specifies whether to enable automatic payment. Valid values:

  • true: Automatic payment is enabled. This is the default value.

  • false: Automatic payment is disabled. If you set this parameter to false, you must manually renew the instance before the instance expires in the console. For details, see Manual renewal.

true

OrderType

string

No

The type of specification change. This parameter is required when you change the specifications of a subscription instance. Valid values:

  • UPGRADE: Upgrade. This is the default value.

  • DOWNGRADE: Downgrade.

Note
  • You must set this parameter to DOWNGRADE when you downgrade a subscription instance.

  • If the price of the target instance type is higher than that of the current instance type, the change is an upgrade. Otherwise, the change is a downgrade. For example, the price of the read/write splitting 8 GB edition (5 read-only nodes) is higher than that of the 16 GB cluster edition. Changing from the latter to the former is an upgrade.

Valid values:

  • DOWNGRADE :

    DOWNGRADE

  • UPGRADE :

    UPGRADE

DOWNGRADE

MajorVersion

string

No

The major engine version for upgrading a classic instance. Valid values: 2.8, 4.0, and 5.0.

Note

When you upgrade the version, the InstanceClass parameter is required. This indicates that this operation supports version upgrades only when the instance specifications are also changed. To upgrade only the instance version, call ModifyInstanceMajorVersion.

5.0

ClientToken

string

No

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

ETnLKlblzczshOTUbOCz****

SourceBiz

string

No

The source of the request. This parameter is used only for internal maintenance and does not need to be specified.

SDK

ShardCount

integer

No

The number of shards. This parameter is applicable only to cloud-native cluster instances. You can use this parameter to specify a custom number of shards.

Note
  • To change a cloud-native cluster instance to a standard architecture, set ShardCount to 1 and set the instance type to a standard instance type.

  • To change a cloud-native standard instance to a cluster architecture, set ShardCount to a value greater than 1 and set the instance type to a cluster instance type.

8

ReplicaCount

integer

No

The number of replica nodes in the primary zone. This parameter is applicable only to cloud-native cluster multi-replica instances. You can use this parameter to specify a custom number of replica nodes. Valid values: 1 to 4.

Note

For multi-zone instances, you can use this parameter together with the SlaveReplicaCount parameter to specify the number of replica nodes in the primary and secondary zones. The sum of this parameter and the SlaveReplicaCount parameter cannot exceed 4.

1

SlaveReplicaCount

integer

No

The number of replica nodes in the secondary zone.

1

ReadOnlyCount

integer

No

The number of read-only nodes in the primary zone. This parameter is applicable only to cloud-native read/write splitting instances.

  • For standard architecture instances, valid values are 0 to 9. A value of 0 indicates that read/write splitting is shutdown and the instance is switched to the standard architecture.

  • For cluster architecture instances, valid values are 1 to 4, which specifies the number of read-only nodes per data shard.

Note

For multi-zone instances, you can use this parameter together with the SlaveReadOnlyCount parameter to specify the number of read-only nodes in the primary and secondary zones.

  • For standard architecture instances, the sum of this parameter and SlaveReadOnlyCount cannot exceed 9.

  • For cluster architecture instances, the sum of this parameter and SlaveReadOnlyCount cannot exceed 4.

5

SlaveReadOnlyCount

integer

No

The number of read-only nodes in the secondary zone.

2

ForceTrans

boolean

No

Specifies whether to enable forced transmission. Valid values:

  • false (default): Before the specification change, the system checks the current minor engine version of the instance. If the minor engine version is too old, an error is returned. You must upgrade the minor engine version and retry.

  • true: Skips the check and directly executes the specification change operation.

false

NodeType

string

No

The node type. Valid values:

  • MASTER_SLAVE: high availability (dual-replica)

  • STAND_ALONE: single replica

  • double: dual-replica

  • single: single replica

Note

For cloud-native instances, select MASTER_SLAVE or STAND_ALONE. For classic instances, select double or single.

MASTER_SLAVE

StorageType

string

No

The storage type. Valid values: essd_pl1, essd_pl2, and essd_pl3.

Note

This parameter is required only when InstanceType is set to tair_essd and the instance is a Tair ESSD-based cloud disk instance.

essd_pl1

Storage

integer

No

The storage capacity of a cloud disk instance. The valid values vary based on the instance type. For more information, see Cloud disk-based instance types.

Note

This parameter is required only when InstanceType is set to tair_essd and you are creating a Tair ESSD-based cloud disk instance. For Tair SSD-based cloud disk instances, the storage capacity is a fixed value based on the instance type, and you do not need to specify this parameter.

60

SecondaryZoneId

string

No

The secondary zone ID. This parameter is required when you change the specifications of a single-zone instance and migrate it to a multi-zone deployment. You can call DescribeZones to query available zones.

Note

The value of this parameter must be different from the value of the ZoneId parameter. Do not set this parameter to the ID of a multi-zone.

cn-hangzhou-h

Response elements

Element

Type

Description

Example

object

The response object.

OrderId

string

The order ID.

20722623431****

RequestId

string

The request ID.

0DA1D7EF-C80D-432C-8758-7D225182626B

Examples

Success response

JSON format

{
  "OrderId": "20722623431****",
  "RequestId": "0DA1D7EF-C80D-432C-8758-7D225182626B"
}

Error codes

HTTP status code

Error code

Error message

Description

400 PaymentMethodNotFound No payment method has been registered on the account.
400 HasRenewChangeOrder This instance has a renewChange order.
400 %s Warn: {%s} are not supported after upgraded. you can set forceUpgrade=true to force upgrade.
400 GdcInstanceNotSupport The gdc custins trans not support.
400 AbnormalResourceStatusForRenew Abnormal resource status for renew.
400 MissingRedisShardingUnsupportPerfItem The metadb is missing redis sharding unsupoort command perf item.
400 IllegalParamError Action or resource must not be null.
400 IncorrectTargetMajorVersion Current target majorversion does not support this operation. the current operation does not support the specified target major version. make sure that the specified target major version is greater than the current major version of the instance.
400 IncorrectMinorVersion Current engine minor version does not support operations. The operation is not supported by the minor version of the instance. Update the instance to the latest minor version and try again.
400 DirectTargetLevelNotSupport The direct custins tranfer target instance level does not support.
400 DirectTransPreCheckError The direct custins trans pre check IsAddReduceNodes error.
400 DtsOpendNotSupportTrans The custins DtsSyncStatus opend does not support trans.
400 DirectTransNodeDoubleLevelError The direct custins tranfer node double target level error. When adjusting only the number of shards for directly connected instances and global multi-active instances, you need to specify 2 or 0.5 times the original number of shards.
400 DirectTransUpgradeMajorVersionNotSupport The direct custins tranfer does not support upgrade major version.
403 TargetMemoryLessThanCurrentUsed The target instance memory size below the current instance used memory.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.