tencent cloud

文档反馈

CreateRoInstanceIp

最后更新时间:2024-11-20 11:15:08

    1. API Description

    Domain name for API request: cdb.intl.tencentcloudapi.com.

    This API is used to create a VIP exclusive to a TencentDB read-only instance.

    A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: CreateRoInstanceIp.
    Version Yes String Common Params. The value used for this API: 2017-03-20.
    Region Yes String Common Params. For more information, please see the list of regions supported by the product.
    InstanceId Yes String Read-only instance ID in the format of "cdbro-3i70uj0k". Its value is the same as the read-only instance ID in the TencentDB Console.
    UniqSubnetId No String Subnet descriptor, such as "subnet-1typ0s7d".
    UniqVpcId No String VPC descriptor, such as "vpc-a23yt67j". If this field is passed in, UniqSubnetId will be required.

    3. Output Parameters

    Parameter Name Type Description
    RoVpcId Integer VPC ID of the read-only instance.
    RoSubnetId Integer Subnet ID of the read-only instance.
    RoVip String Private IP address of the read-only instance.
    RoVport Integer Private port number of the read-only instance.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Creating a VIP exclusive to a TencentDB read-only replica

    Input Example

    https://cdb.intl.tencentcloudapi.com/?Action=CreateRoInstanceIp
    &InstanceId=cdbro-c1nl9rpv
    &UniqSubnetId=subnet-1typ0s7d
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "RoVpcId": 511512,
            "RoSubnetId": 115839,
            "RoVip": "172.0.0.1",
            "RoVport": 3306,
            "RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    CdbError Backend or process error.
    FailedOperation.CreateRoVipError Failed to assign an exclusive VIP to the read-only replica.
    FailedOperation.StatusConflict Task status conflict.
    InternalError.CdbError System error.
    InternalError.DatabaseAccessError Internal database error.
    InternalError.DesError Internal system error.
    InternalError.HttpError Exceptional HTTP request
    InternalError.InternalHttpServerError An exception occurred while executing the request.
    InternalError.UnknownError Unknown error
    InvalidParameter Parameter error.
    InvalidParameter.InstanceNotFound The instance does not exist.
    InvalidParameter.ResourceNotFound The resource is not found.
    InvalidParameterValue.InvalidParameterValueError Invalid parameter value
    OperationDenied Operation denied.
    OperationDenied.ActionInProcess The instance is performing another task.
    OperationDenied.WrongStatus The backend task status is invalid.
    ResourceNotFound.CdbInstanceNotFoundError The instance cannot be found. Please check whether your instance status is normal.