Set Auto-Renewal

Last updated: 2020-06-04 18:35:38

    Note:

    This is a legacy API which has been hidden and will no longer be updated. We recommend using the new MongoDB API 3.0 which is standardized and faster.

    1. API Description

    This API (SetMongoDBAutoRenew) is used to set auto renewal for an instance.
    Domain for API request: mongodb.api.qcloud.com

    2. Input Parameters

    The following request parameter list only provides API request parameters. Common request parameters are also needed when the API is called. The Action field for this API is SetMongoDBAutoRenew.

    Parameter Name Required Type Description
    instanceIds.n Yes String One or more instance IDs (n represents array subscript starting with 0). This can be obtained from instanceId in the returned values of API DescribeMongoDBInstances.
    isAutoRenew Yes Int Set auto renewal flag: 0 - Do not set auto renewal; a notification will be given upon expiration of instance; 1 - Set auto renewal; instance will be automatically renewed upon expiration; 2 - Neither renewal nor notification will be made upon the expiration of instance

    3. Output Parameters

    Parameter Name Type Description
    code Int Common error code; 0: Succeeded; other values: Failed.
    message String Error message description. A null value indicates a success
    codeDesc String Description of error code at business side. For a successful operation, "Success" will be returned. In case of an error, a message describing the reason for the error will be returned.

    4. Error Codes

    The following error codes include the business logic error codes for this API.

    Error Code Error Message Error Description
    11050 InvalidParameter Incorrect business parameter
    10716 NoInstanceIds Array of requested instance IDs is empty
    11056 InstanceNotExists Instance does not exist
    11051 InstanceDeleted The instance has been reclaimed upon expiration

    5. Example

    Input

    https://mongodb.api.qcloud.com/v2/index.php?Action=SetMongoDBAutoRenew
    &instanceIds.0=cmgo-6ozqe0uh
    &isAutoRenew=1
    

    Output

    {
        "code": 0,
        "message": "",
        "codeDesc": "Success"
    }

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help