All Products
Search
Document Center

Tair (Redis® OSS-Compatible):ModifyInstanceSpec

Last Updated:May 16, 2025

Changes the configurations of a Tair (Redis OSS-compatible) instance.

Operation description

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

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
kvstore:ModifyInstanceSpecupdate
*DBInstance
acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The region ID. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
InstanceIdstringYes

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

r-bp1zxszhcgatnx****
InstanceClassstringNo

The new instance type. 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 .
redis.master.small.default
BusinessInfostringNo

The ID of the promotional event or the business information.

000000001
CouponNostringNo

The coupon code. Default value: youhuiquan_promotion_option_id_for_blank.

youhuiquan_promotion_option_id_for_blank
ForceUpgradebooleanNo

Specifies whether to forcibly change the configurations. Valid values:

  • false: The system does not forcefully change the configurations.
  • true (default): The system forcefully changes the configurations.
true
EffectiveTimestringNo

The time when you want the configurations to be changed. Valid values:

  • Immediately (default): immediately changes the configurations.
  • MaintainTime: changes the configurations within the maintenance window. You can call the ModifyInstanceMaintainTime operation to change the maintenance window.
Immediately
AutoPaybooleanNo

Specifies whether to enable automatic payment. Valid values:

  • true (default): enables automatic payment.
  • false: disables automatic payment. If you set this parameter to false, the instance must be manually renewed before it expires. For more information, see Renew an instance.
true
OrderTypestringNo

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

  • UPGRADE (default): upgrades the configurations of the subscription instance.
  • DOWNGRADE: downgrades the configurations of the 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.

DOWNGRADE
MajorVersionstringNo

The major version of the classic instance that you want to upgrade. Valid values: 2.8, 4.0, and 5.0.

Note The InstanceClass parameter is required when you upgrade the instance version. This parameter indicates that you can upgrade the instance version only when you update the instance specifications. If you only need to upgrade the instance version, call the ModifyInstanceMajorVersion operation.
5.0
ClientTokenstringNo

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****
SourceBizstringNo

The source of the operation. This parameter is used only for internal maintenance. You do not need to specify this parameter.

SDK
ShardCountintegerNo

The number of shards. This parameter is applicable only to cloud-native cluster instances.

Note
  • If you want to change a cloud-native cluster instance to a standard instance, you must explicitly set the ShardCount parameter to 1 and specify the specifications of the master-replica instance.

  • To change a cloud-native standard instance to a cluster instance, you must explicitly set the ShardCount parameter to a value greater than 1 and specify the specifications of the cluster instance.

8
ReplicaCountintegerNo

The number of replica nodes in the primary zone. This parameter is applicable only to cloud-native multi-replica cluster instances. Valid values: 1 to 4.

Note
  • The sum of the values of this parameter and the SlaveReplicaCount parameter cannot be greater than 4.

  • You can specify either ReplicaCount or ReadOnlyCount.

  • A master-replica instance cannot contain multiple replica nodes.

1
SlaveReplicaCountintegerNo

The number of replica nodes in the secondary zone when you create a cloud-native multi-replica cluster instance that is deployed across multiple zones. The sum of the values of this parameter and the ReplicaCount parameter cannot be greater than 4.

Note When you create a cloud-native multi-replica cluster instance that is deployed across multiple zones, you must specify both SlaveReplicaCount and SecondaryZoneId.
1
ReadOnlyCountintegerNo

The number of read replicas in the primary zone. Valid values: 0 to 5. This parameter applies only to the following scenarios:

  • If the instance is a cloud-native standard instance, you can set this parameter to a value greater than 0 to enable the read/write splitting architecture.
  • If the instance is a cloud-native read/write splitting instance, you can use this parameter to customize the number of read replicas. You can also set this parameter to 0 to disable the read/write splitting architecture and switch the instance to the standard architecture.
5
SlaveReadOnlyCountintegerNo

The number of read replicas in the secondary zone when you create a read/write splitting instance that is deployed across multiple zones. Valid values: 1 to 9. The sum of the values of this parameter and the ReadOnlyCount parameter cannot be greater than 9.

2
ForceTransbooleanNo

Specifies whether to enable forced transmission during a configuration change. Valid values:

  • false (default): Before the configuration change, the system checks the minor version of the instance. If the minor version of the instance is outdated, an error is reported. You must update the minor version of the instance and try again.
  • true: The system skips the version check and directly performs the configuration change.
false
NodeTypestringNo

The type of the node. Valid values:

  • MASTER_SLAVE: high availability (master-replica)
  • STAND_ALONE: standalone
  • double: master-replica
  • single: standalone
Note To create a cloud-native instance, set this parameter to MASTER_SLAVE or STAND_ALONE. To create a classic instance, set this parameter to double or single.
MASTER_SLAVE
StorageTypestringNo

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

Note This parameter is required only when you set the InstanceType parameter to tair_essd to create an ESSD-based instance.
essd_pl1
StorageintegerNo

The storage capacity of the ESSD/SSD-based instance. The valid values vary based on the instance type. For more information, see ESSD/SSD-based instances.

Note This parameter is required only when you set the InstanceType parameter to tair_essd to create an ESSD-based instance. If you create a Tair SSD-based instance, the Storage parameter is automatically specified based on predefined specifications. You do not need to specify this parameter.
60

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

OrderIdstring

The order ID.

20722623431****
RequestIdstring

The request ID.

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

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400PaymentMethodNotFoundNo payment method has been registered on the account.No payment methods are specified for your account.
400HasRenewChangeOrderThis instance has a renewChange order.An order for renewal and configuration change already exists.
400%sWarn: {%s} are not supported after upgraded. you can set forceUpgrade=true to force upgrade.-
400GdcInstanceNotSupportThe gdc custins trans not support.-
400AbnormalResourceStatusForRenewAbnormal resource status for renew.-
400MissingRedisShardingUnsupportPerfItemThe metadb is missing redis sharding unsupoort command perf item.-
400IllegalParamErrorAction or resource must not be null.-
400IncorrectTargetMajorVersionCurrent 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.
400IncorrectMinorVersionCurrent 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.
400DirectTargetLevelNotSupportThe direct custins tranfer target instance level does not support.-
400DirectTransPreCheckErrorThe direct custins trans pre check IsAddReduceNodes error.-
400DtsOpendNotSupportTransThe custins DtsSyncStatus opend does not support trans.-
400DirectTransNodeDoubleLevelErrorThe 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.
400DirectTransUpgradeMajorVersionNotSupportThe direct custins tranfer does not support upgrade major version.-
403TargetMemoryLessThanCurrentUsedThe target instance memory size below the current instance used memory.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-03-25API Description Update. The Error code has changedView Change Details
2024-12-04The Error code has changed. The request parameters of the API has changedView Change Details
2024-11-06The Error code has changed. The request parameters of the API has changedView Change Details
2024-03-21The Error code has changed. The request parameters of the API has changedView Change Details
2024-01-29The Error code has changed. The request parameters of the API has changedView Change Details
2023-12-27The Error code has changedView Change Details
2023-07-04The Error code has changed. The request parameters of the API has changedView Change Details
2022-02-22The Error code has changedView Change Details