Enable Public Network Access

Last updated: 2017-12-14 10:24:47


1. API Description

This API (OpenCdbExtranetAccess) is used to enable the public network access of a Cloud Database instance. After enabling the public network access, you can access instances using the public network domain and port. You can use API Query List of Instances to acquire the information of the public network domain and port.
Domain for API request: cdb.api.qcloud.com

2. Input Parameters

The following request parameter list only provides API request parameters. Common request parameters need to be added when the API is called. For more information, refer to Common Request Parameters. The Action field for this API is OpenCdbExtranetAccess.

Parameter Name Required Type Description
cdbInstanceId Yes String Instance ID, such as: cdb-c1nl9rpv. It is identical to the instance ID displayed in the Cloud Database console page and can be obtained using API Query List of Instances. Its value equals to the uInstanceId field value in the output parameter.
password Yes String Public network access password, which should be a combination of 8-16 characters comprised of at least two of the following types: letters, numbers, special characters (_, +, -, &, =, !, @, #, $, %, ^, *, ())

3. Output Parameters

Parameter Name Type Description
code Int Common error code; 0: Succeeded; other values: Failed. For more information, please refer to Common Error Codes on the Error Code page.
message String Module error message description depending on API.
codeDesc String Error description
data Array Returned task data
Parameter data is composed of the following parameters:
Parameter Name Type Description
jobId String Task ID

4. Error Codes

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

Error Code Error Message Error Description
9572 InstanceNotExists Instance does not exist
9573 OperationDenied The public network permission is enabled
9574 OperationDenied The public network permission is not enabled
9575 OperationDenied The public network permission is being processed
9576 OperationDenied Unable to operate because the instance is not running
9587 InvalidParameter Wrong password

5. Example


&<Common request parameters>


    "code": 0,
    "message": "",
    "codeDesc": "Success",
    "data": {
        "jobId": 168137