You can call this operation to enable or disable auto-renewal for an ApsaraDB for Redis instance.

Note Auto renewal is triggered seven days before the expiration date of the 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 No ModifyInstanceAutoRenewalAttribute

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

DBInstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the instance. Separate multiple IDs with a comma (,). You can specify up to 30 IDs.

Duration String No 3

The auto-renewal period. The parameter is valid and required if the value of the AutoRenew parameter is True. 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.

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-39C295C37738

The ID of the request.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/
?Action=ModifyInstanceAutoRenewalAttribute
&DBInstanceId=r-bp1xxxxxxxxxxxxx
&AutoRenew=True
&Duration=1
&<Common request parameters>

Sample success responses

XML format

<ModifyInstanceAutoRenewalAttributeResponse>
      <RequestId>52D901ED-E0A5-42FB-B9DB-39C295C37738</RequestId>
</ModifyInstanceAutoRenewalAttributeResponse>

JSON format

{
    "RequestId":"52D901ED-E0A5-42FB-B9DB-39C295C37738"
}

Error codes

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