Enables or disables auto-renewal for an ApsaraDB for MongoDB instance.
Before you call this operation, make sure that you fully understand the billing methods and pricing.
This operation is applicable to subscription instances.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyInstanceAutoRenewalAttribute |
The operation that you want to perform. The operation that you want to perform. Set the value to ModifyInstanceAutoRenewalAttribute. |
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. |
DBInstanceId | String | Yes | dds-bp15da1923e3**** |
The 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.
|
AutoRenew | String | Yes | true |
Specifies whether to enable auto-renewal. Valid values:
Note If this parameter is set to true, you must set the Duration parameter.
|
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
&RegionId=cn-hangzhou
&DBInstanceId=dds-bp15da1923e3****
&Duration=1
&AutoRenew=true
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyInstanceAutoRenewalAttributeResponse>
<RequestId>EFD65226-08CC-4C4D-B6A4-CB3C382F67B0</RequestId>
</ModifyInstanceAutoRenewalAttributeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "EFD65226-08CC-4C4D-B6A4-CB3C382F67B0"
}
Error codes
For a list of error codes, visit the API Error Center.