Modify Local Target IP Port Translation

Last updated: 2020-06-04 18:30:28

    Note:

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

    1. API Description

    This API (ModifyLocalDestinationIPPortTranslationNatRule) is used to modify the local destination IP port translation rules for Direct Connect gateway.
    Domain for API request:vpc.api.qcloud.com

    This API is used to modify the local destination IP port translation rules for the specified Direct Connect gateway

    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 ModifyLocalDestinationIPPortTranslationNatRule.

    Parameter Name Required Type Description
    vpcId Yes String Virtual private cloud ID assigned by the system, for example: vpc-dfg5445.
    directConnectGatewayId Yes String Direct Connect gateway ID assigned by the system, for example: dcg-4d545d.
    oldOriginalIP Yes String The original IP before modification.
    oldOriginalPort Yes String The original port before modification.
    oldTranslationIP Yes String The translated IP before modification.
    oldTranslationPort Yes String The translated port before modification.
    oldProto Yes String The protocol before modification.
    originalIP No String Original IP.
    originalPort No String Original port.
    translationIP No String Translated IP.
    translationPort No String Translated port.
    proto No String Protocol.
    description No String Note. Fuzzy search is supported.

    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.

    4. Error Code List

    The following error code list only provides the business logic error codes for this API. For additional common error codes, refer to VPC Error Codes.

    Error Code Description
    InvalidVpc.NotFound Invalid VPC. VPC resource does not exist. Please verify that the resource information you entered is correct. This can be queried via the Query Virtual Private Cloud List (DescribeVpcEx) API.
    InvalidDirectConnectGateway.NotFound Invalid Direct Connect gateway. Direct Connect gateway resource does not exist. Please verify that the resource information you entered is correct. This can be queried via the Query Direct Connect Gateway (DescribeDirectConnectGateway) API.
    InvalidLocalDestinationIPPortTranslation.NotFound The local destination IP port translation to be modified does not exist. Please verify that the resource information you entered is correct. This can be queried via the Query Local Destination IP Port Translation for Direct Connect Gateway (DescribeLocalDestinationIPPortTranslationNatRule) API.
    InvalidOriginalIP.NotInVpcCidr Invalid original IP. The original IP is not in the VPC network segment.
    InvalidTranslationIP.InVpcCidr Invalid translated IP. The translated IP is in the VPC network segment.
    InvalidTranslationIP.Duplicate Invalid translated IP. Duplication of translated IP. The translated IP has already existed in the local IP Direct Connect rules of the gateway. Duplication of translated IP is not allowed.

    4. Example

    Input

    https://vpc.api.qcloud.com/v2/index.php?Action=ModifyLocalDestinationIPPortTranslationNatRule
    &>
    &vpcId=vpc-dfgg190
    &directConnectGatewayId=dcg-ddf14d
    &oldOriginalIP=10.0.0.1
    &oldOriginalPort=80
    &oldTranslationIP=138.0.0.1
    &oldTranslationPort=90
    &oldProto=tcp
    &description=dcg-ddf14d
    

    Output

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

    Was this page helpful?

    Was this page helpful?

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