All Products
Search
Document Center

ApsaraDB for Redis:ModifyInstanceSpec

Last Updated:May 28, 2024

Changes the specifications of an ApsaraDB for Redis 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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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:ModifyInstanceSpecWrite
  • DBInstance
    acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

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

cn-hangzhou
InstanceIdstringYes

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

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 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 forcefully change the configurations of the instance. Default value: true. Valid values:

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

The time when to change the configurations. Default value: Immediately. Valid values:

  • Immediately: The configurations are immediately changed.
  • MaintainTime: The configurations are changed within the maintenance window. You can call the ModifyInstanceMaintainTime operation to change the maintenance window.
Immediately
AutoPaybooleanNo

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

  • true: enables auto-renewal.
  • false: disables auto-renewal. 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. 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.
  • DOWNGRADE
    MajorVersionstringNo

    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.

    Enumeration Value:
    • 2.8
    • 4.0
    • 5.0
    • 6.0
    5.0
    ClientTokenstringNo

    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.

    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 available only for cluster instances that use cloud disks.

    8
    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 standard instance that uses cloud disks, you can set this parameter to a value greater than 0 to enable the read/write splitting architecture.
    • If the instance is a read/write splitting instance that uses cloud disks, 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
    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
    SlaveReadOnlyCountintegerNo

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

    2

    Response parameters

    ParameterTypeDescriptionExample
    object
    OrderIdstring

    The ID of the order.

    20722623431****
    RequestIdstring

    The ID of the request.

    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.-
    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.-
    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
    2024-03-21The Error code has changed. The request parameters of the API has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
    Input ParametersThe request parameters of the API has changed.
      Added Input Parameters: NodeType
    2024-01-29The Error code has changed. The request parameters of the API has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
    Input ParametersThe request parameters of the API has changed.
      Added Input Parameters: SlaveReadOnlyCount
    2023-12-27The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
    2023-07-04The Error code has changed. The request parameters of the API has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
    Input ParametersThe request parameters of the API has changed.
      Added Input Parameters: ForceTrans
    2022-02-22The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403