Modify Local IP Port Translation

Last updated: 2017-12-05 17:00:34

PDF

1. API Description

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

This API is used to modify the local source 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 ModifyLocalSourceIPPortTranslationNatRule.

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.
oldTranslationIPPool Yes String Mapped IP pool before modification, for example: 111.0.0.1-111.0.0.100.
translationIPPool No String New mapped IP pool, for example: 111.0.0.2-111.0.0.100.
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.

4. Error Code Table

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.
InvalidTranslationIPPool.NotFound Invalid translated IP pool. Translated IP pool does not exist. Please verify that the resource information you entered is correct. This can be queried via the Query Local Source IP Port Translation for Direct Connect gateway (DescribeLocalSourceIPPortTranslationNatRule) API.
InvalidTranslationIPPool.InVpcCidr Invalid translated IP pool. The translated IP pool is in the VPC network segment.
InvalidTranslationIP.Duplicate Invalid translated IP pool. Duplication of translated IP pool. The translated IP pool has already existed in the local source IP port translation rules of the gateway. The translated IP pool must be unique.

5. Example

Input


https://vpc.api.qcloud.com/v2/index.php?Action=ModifyLocalSourceIPPortTranslationNatRule
&<Common request parameters>
&vpcId=vpc-dfgg190
&directConnectGatewayId=dcg-ddf14d
&oldTranslationIPPool=138.0.0.11-138.0.0.19
&translationIPPool=138.0.0.11-138.0.0.25

Output

{
     "code":"0",
    "message":"",
    "data":{
        "taskId":"17922"
    },
    "codeDesc":"Success"
}