1. API Description
This API (DescribeLocalIPTranslationNatRule) is used to query the local IP translation rules for Direct Connect gateway.
Domain for API request:vpc.api.qcloud.com
This API is used to query the local IP 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 DescribeLocalIPTranslationNatRule.
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. |
originalIP | No | String | Original IP. |
translationIP | No | String | Translated IP. |
description | No | String | Note. Fuzzy search is supported. |
offset | No | Int | Offset of initial line. Default is 0. |
limit | No | Int | Number of lines per page. Default is 20. |
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. |
data.n | Array | Local IP translation rule information array. |
data.n.originalIP | String | Original IP. |
data.n.translationIP | String | Translated IP. |
data.n.description | String | Note. |
4. Error Code List
The following 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. Direct Connect gateway resource does not exist. Please verify that you have entered resource information correctly. This can be queried via the Querying Direct Connect Gateway (DescribeDirectConnectGateway) API. |
InvalidLocalIPTranslation.NotFound | Invalid local IP translation rule. Local IP translation rule does not exist. Please verify that you have entered resource information correctly. This can be queried via the Querying Local IP Translation for Direct Connect Gateway (DescribeLocalIPTranslationNatRule) API. |
5. Example
Input
https://vpc.api.qcloud.com/v2/index.php?Action=DescribeLocalIPTranslationNatRule &<Common request parameters> &vpcId=vpc-dfgg190 &directConnectGatewayId=dcg-ddf14d
Output
{
"code":"0",
"message":"",
"data": [
{
"originalIP": "10.0.0.1",
"translationIP": "138.0.0.1",
"description": "Note 1"
}
]
}