Add Local Target IP Port Translation

Last updated: 2020-06-04 18:29:51


    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 (CreateLocalDestinationIPPortTranslationNatRule) is used to add local destination IP port translation for Direct Connect gateway.
    Domain for API

    1) The Direct Connect peer accesses the VPC actively and needs to access the mapped IP port in order to communicate with the original IP within the VPC. Response packets are not affected. Only NAT Direct Connect gateways are supported.

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

    Parameter Name Required Type Description
    vpcId Yes String Virtual private cloud ID or unified ID (unified ID is recommended).
    directConnectGatewayId Yes String Direct Connect gateway ID.
    localDestinationIPPortTranslation.n Yes Array Array of local destination IP port translation rules.
    localDestinationIPPortTranslation.n.originalIP Yes String Original IP.
    localDestinationIPPortTranslation.n.originalPort Yes String Original port.
    localDestinationIPPortTranslation.n.translationIP Yes String Translated IP.
    localDestinationIPPortTranslation.n.translationPort Yes String Translated port.
    localDestinationIPPortTranslation.n.proto Yes String Protocol.
    localDestinationIPPortTranslation.n.description No String Note.

    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 code
    data Array Returned information

    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 you have entered resource information correctly. This can be queried via the Querying Virtual Private Cloud List (DescribeVpcEx) API.
    InvalidDirectConnectGateway.NotFound Invalid Direct Connect gateway. The Direct Connect gateway does not exist. Please verify that you have entered resource information correctly.
    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.
    LocalDestinationIPPortTranslationLimitExceeded The local destination IP port translation rules you added have reached the upper limit. Please contact customer service for more resources. For more information on VPC resource restrictions, refer to VPC Usage Restrictions.

    5. Example

    &<Common request parameters>



    Was this page helpful?

    Was this page helpful?

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