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

Make sure that you fully understand the billing methods and pricing of ApsaraDB for MongoDB before calling this operation.

This operation is applicable to subscription instances.

Note When auto-renewal is enabled, your payment will be collected nine days before the expiration date of ApsaraDB for MongoDB. Ensure that your account has sufficient balance.

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 this parameter to ModifyInstanceAutoRenewalAttribute.

AutoRenew String Yes ture

Specifies whether to enable auto-renewal. Valid values:

  • true
  • false
Note If this parameter is set to true, you must set the Duration parameter.
DBInstanceId String Yes dds-bpxxxxxxxx

The ID of the instance.

RegionId String Yes cn-hangzhou

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

Duration String No 1

The auto-renewal period. Valid values: 1 to 12. Unit: month.

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

Response parameters

Parameter Type Example Description
RequestId String EFD65226-08CC-4C4D-B6A4-CB3C382F67B0

The ID of the request.

Examples

Sample requests

http(s)://mongodb.aliyuncs.com/? Action=ModifyInstanceAutoRenewalAttribute
&AutoRenew=ture
&DBInstanceId=dds-bpxxxxxxxx
&Duration=1
&<Common request parameters>

Sample success responses

XML format

<ModifyInstanceAutoRenewalAttributeResponse>
      <RequestId>EFD65226-08CC-4C4D-B6A4-CB3C382F67B0</RequestId>
</ModifyInstanceAutoRenewalAttributeResponse>

JSON format

{
    "RequestId": "EFD65226-08CC-4C4D-B6A4-CB3C382F67B0"
}

Error codes

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