Enables or disables auto-renewal for ApsaraDB for Redis instances.

Note Auto renewal is triggered seven days before the expiration date of the instance.


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 ModifyInstanceAutoRenewalAttribute

The operation that you want to perform. Set the value to ModifyInstanceAutoRenewalAttribute.

DBInstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance. Separate multiple instance IDs with commas (,).

Note You can specify up to 30 IDs.
RegionId String No cn-hangzhou

The ID of the region where the instance is deployed.

Duration String No 3

The auto-renewal period. Valid values: 1 to 12. When the instance is about to expire, the instance is automatically renewed based on the number of months specified by this parameter.

Note This parameter is valid only when AutoRenew is set to true.
AutoRenew String No true

Specifies whether to enable auto-renewal. Valid values:

  • true
  • false
Note Default value: false.

Response parameters

Parameter Type Example Description
RequestId String 52D901ED-E0A5-42FB-B9DB-39C295C3****

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

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